/* MiDueloSport360 — estilos. Naranja de cancha + azul noche, modo oscuro automático. */
:root {
  --accent: #e4572e;
  --accent-2: #1f6fd1;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --ink: #111827;
  --ink-2: #414a5c;
  --ink-3: #7b8394;
  --line: #dde1e8;
  --gold: #e0a100;
  --ok: #2f855a;
  --bad: #c53030;
  --warn: #b7791f;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(19 38 43 / 6%), 0 8px 24px rgb(19 38 43 / 7%);
  --on-accent: #ffffff;
  --display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent) 80%, #000);
  --warm-soft: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1220; --surface: #131c2e; --surface-2: #1c2740; --ink: #edf1f8; --ink-2: #b7c0d3; --ink-3: #8590a7; --line: #283550;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    --accent-ink: color-mix(in srgb, var(--accent) 65%, #fff);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1220; --surface: #131c2e; --surface-2: #1c2740; --ink: #edf1f8; --ink-2: #b7c0d3; --ink-3: #8590a7; --line: #283550;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  --accent-ink: color-mix(in srgb, var(--accent) 65%, #fff);
  color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; letter-spacing: .005em; }
h1 { font-size: clamp(1.9rem, 7vw, 3rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: .875rem; }
.small { font-size: .875rem; }
.boot { display: grid; place-items: center; min-height: 100vh; font: 600 1.6rem var(--display); color: var(--ink-3); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.nowrap-t { white-space: nowrap; }

/* --- Botones y formularios --- */
.btn { appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 1rem var(--sans);
  transition: transform .08s, filter .15s, opacity .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-warm { background: var(--accent-2); color: #fff; }
.btn-danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-red { background: var(--bad); color: #fff; }
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn-tiny { min-height: 30px; padding: 0 10px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-ghost-light { background: rgb(255 255 255 / 14%); color: #fff; }
.icon-btn { appearance: none; border: 0; background: none; cursor: pointer; font-size: 1.05rem; padding: 6px; border-radius: 10px; color: var(--ink-3); line-height: 1; }
.icon-btn:hover { background: var(--surface-2); }
.linkish { appearance: none; background: none; border: 0; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; font: 1rem var(--sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 48px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; min-height: 88px; }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--ink); margin: 0; }
.field + .field { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > .field + .field { margin-top: 0; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* --- Tarjetas --- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin-bottom: 8px; }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-3); }
.empty .big { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill-red { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill-green { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-warm { background: var(--warm-soft); color: color-mix(in srgb, var(--accent-2) 75%, var(--ink)); }
.alert { border-radius: var(--radius); padding: 14px 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.alert-red { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.alert-warm { background: var(--warm-soft); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin: 22px 0 10px; }
.section-title h2, .section-title h3 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.kpi b { display: block; font: 600 1.45rem var(--display); }
.kpi span { color: var(--ink-3); font-size: .8rem; }

/* --- Barra superior y navegación inferior --- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.lang-btn { gap: 4px; padding-inline: 8px; font-size: .85rem; }
.lang-btn .lang-code { font-weight: 700; letter-spacing: .03em; }
.brand { font: 600 1.2rem var(--display); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.brand b { color: var(--accent); font-weight: 700; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottomnav a { flex: 1; display: grid; justify-items: center; gap: 1px; text-decoration: none; color: var(--ink-3); font-size: .72rem; font-weight: 600; padding: 4px 0; border-radius: 12px; position: relative; }
.bottomnav a span { font-size: 1.3rem; line-height: 1.2; }
.bottomnav a[aria-current='page'] { color: var(--accent-ink); background: var(--accent-soft); }
.bottomnav .dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 3px; }
.has-nav { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.page { padding-top: 18px; padding-bottom: 32px; }

/* --- Pestañas y chips --- */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 14px -16px 16px; padding: 0 16px; scrollbar-width: none; position: sticky; top: 58px; z-index: 15; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; appearance: none; border: 0; background: none; padding: 12px 11px; font: 600 .92rem var(--sans); color: var(--ink-3); cursor: pointer; border-bottom: 2.5px solid transparent; }
.tab[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs .tab { border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .85rem; background: var(--surface); }
.subtabs .tab[aria-selected='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 500 .85rem var(--sans); cursor: pointer; white-space: nowrap; flex: none; }
.chip[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* --- Personas --- */
.avatar.xl { width: 88px; height: 88px; font-size: 1.7rem; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; overflow: hidden; }
.av { --h: 18; background: linear-gradient(135deg, hsl(var(--h) 65% 55%), hsl(calc(var(--h) + 40) 60% 42%)); color: #fff; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .ico { font-size: 1.35rem; width: 32px; text-align: center; flex: none; }
.list-row.done { opacity: .55; }
.list-row.done .t { text-decoration: line-through; }
/* --- Avisos --- */
.notif { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.notif.unread { font-weight: 600; }

/* --- Capas (hojas, preguntas, visor) --- */
#toasts { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 220; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: rise .25s ease; transition: opacity .4s, transform .4s; }
.toast-error { background: var(--bad); color: #fff; }
.toast-ok { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.sheet-back { position: fixed; inset: 0; z-index: 200; background: rgb(0 0 0 / 40%); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: rise .25s; max-height: 92vh; overflow: auto; }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
#app[aria-busy='true']::before { content: ''; position: fixed; top: 0; left: 0; z-index: 500; height: 3px; width: 40%; background: var(--accent); animation: loadbar 1s ease-in-out infinite; }

/* --- Portada --- */
.hero { padding: 34px 0 12px; text-align: center; }
.hero .big { font-size: 3rem; }
.hero p { font-size: 1.08rem; }
.feature-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.feature .ico { font-size: 1.8rem; }
.feature h3 { margin: 6px 0 4px; }
.auth { min-height: 80vh; display: grid; place-items: center; padding: 28px 16px; }
.auth .card { width: 100%; max-width: 420px; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; }
.qr-box { background: #fff; padding: 12px; border-radius: 16px; width: 200px; margin: 0 auto; }
.qr-box svg { width: 100%; height: auto; display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--ink); }
.offline-bar { position: sticky; top: 58px; z-index: 18; background: var(--ink); color: var(--bg); text-align: center; font-size: .85rem; padding: 6px; }
.emergency { border-left: 4px solid var(--bad); }
.diary-line { border-left: 3px solid var(--accent-2); padding: 4px 0 4px 12px; margin: 8px 0; }

@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes loadbar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Hoy: acciones rápidas --- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.quick-actions button { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 4px; display: grid; justify-items: center; gap: 2px; font: 600 .78rem var(--sans); cursor: pointer; min-height: 70px; }
.quick-actions button span { font-size: 1.5rem; line-height: 1.1; }
.quick-actions button:active { transform: scale(.96); }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 4px 0; }
/* --- Wrapped y ruta animada (formato historia) --- */
.story-wrap { max-width: 380px; margin: 8px auto 0; position: relative; }
.story { aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #13262b; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.story img { width: 100%; height: 100%; object-fit: cover; }
.story .empty { color: #fff; }
.story-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.story-bars > div { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 35%); overflow: hidden; }
.story-bars > div i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars > div.done i { width: 100%; }
.story-bars > div.now i { animation: storybar 4.5s linear forwards; }
@keyframes storybar { to { width: 100%; } }
.route-canvas { width: 100%; height: auto; border-radius: 22px; display: block; background: #13262b; box-shadow: var(--shadow); }

/* ====== MiDueloSport360 ====== */
.brand { font-size: 1.35rem; letter-spacing: .01em; }
.brand .logo { width: 30px; height: 30px; }

/* Ligas (Bronce → Leyenda) */
.tier { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font: 700 .75rem var(--sans); letter-spacing: .02em; white-space: nowrap; }
.tier-bronce { background: #f3e1d3; color: #8a4b20; }
.tier-plata { background: #e6e9ee; color: #4b5563; }
.tier-oro { background: #fdf0c4; color: #8a6400; }
.tier-diamante { background: #d9f1fb; color: #0b6a8f; }
.tier-leyenda { background: linear-gradient(90deg, #ffe08a, #ffb38a); color: #6b2b00; }

/* Elegir deporte */
.sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sport-opt { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 6px; display: grid; justify-items: center; gap: 2px; cursor: pointer; font: 600 .82rem var(--sans); min-height: 76px; }
.sport-opt span { font-size: 1.7rem; line-height: 1.1; }
.sport-opt[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.sport-opt small { font-weight: 500; color: var(--ink-3); font-size: .7rem; }

/* Duelo: lado A vs lado B */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.vs .side { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; text-decoration: none; color: inherit; }
.vs .side .avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.vs .side .name { font: 700 1.05rem var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .side.win .name { color: var(--accent-ink); }
.vs .mid { font: 800 1.6rem var(--display); color: var(--ink-3); text-align: center; }
.vs .mid .score { color: var(--ink); font-size: 1.5rem; letter-spacing: .02em; display: block; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.duel-hero { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 60%); }
.duel-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.duel-card + .duel-card { margin-top: 8px; }
.duel-card .ico { font-size: 1.6rem; flex: none; width: 34px; text-align: center; }
.duel-card .who { font-weight: 600; }
.duel-card.urgent { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.result-w { color: var(--ok); font-weight: 700; }
.result-l { color: var(--bad); font-weight: 700; }
.result-d { color: var(--ink-3); font-weight: 700; }

/* Anotar el marcador */
.score-sets { display: grid; gap: 8px; }
.score-set, .score-head { display: grid; grid-template-columns: 54px 1fr 18px 1fr 32px; gap: 6px; align-items: center; }
.score-set input { text-align: center; font: 700 1.25rem var(--display); padding: 6px; min-height: 46px; }
.score-set .lbl { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.score-head { font-size: .8rem; font-weight: 700; color: var(--ink-2); text-align: center; }
.score-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Marcador en vivo */
.scoreboard { background: #0e1626; color: #fff; border-radius: 22px; padding: 16px; display: grid; gap: 10px; }
.sb-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.sb-row .nm { font: 700 1.2rem var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.sb-row .sets { display: flex; gap: 8px; font: 700 1.2rem var(--display); color: #9aa6bd; }
.sb-row .sets b { color: #fff; }
.sb-row .pts { font: 800 2rem var(--display); min-width: 54px; text-align: center; background: rgb(255 255 255 / 10%); border-radius: 12px; padding: 0 8px; color: #ffd166; }
.serve { width: 10px; height: 10px; border-radius: 50%; background: #c6f432; flex: none; }
.sb-tag { font: 700 .8rem var(--sans); letter-spacing: .08em; color: #ffd166; text-transform: uppercase; text-align: center; }
.sb-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-btns .btn { min-height: 64px; font-size: 1.05rem; white-space: normal; min-width: 0; padding: 6px 10px; line-height: 1.15; text-align: center; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; margin-right: 4px; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Ranking, escalerilla y tablas */
.rank { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.rank:last-child { border-bottom: 0; }
.rank .pos-n { font: 800 1.15rem var(--display); width: 32px; text-align: center; color: var(--ink-3); flex: none; }
.rank.me { background: var(--accent-soft); border-radius: 12px; padding-inline: 6px; }
.rank .elo { font: 700 1.1rem var(--display); }
.ladder-pos { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 1.2rem var(--display); background: var(--surface-2); flex: none; }
.ladder-pos.top { background: linear-gradient(135deg, #ffd166, #ff9f43); color: #4a2400; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.table th, table.table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; }
table.table th:first-child, table.table td:first-child { text-align: left; }
table.table th { font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }

/* Cuadro del torneo */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.bracket .round { display: grid; align-content: space-around; gap: 10px; }
.bracket .round h4 { margin: 0 0 4px; font: 700 .8rem var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.match { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow: hidden; font-size: .88rem; text-decoration: none; color: inherit; display: block; }
.match .ln { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; }
.match .ln + .ln { border-top: 1px solid var(--line); }
.match .ln.win { font-weight: 700; background: color-mix(in srgb, var(--ok) 10%, transparent); }
.match .ln.tbd { color: var(--ink-3); font-style: italic; }
.match.live { border-color: #ff3b30; }

/* Muro */
.feed-card { padding: 14px 16px; }
.feed-card + .feed-card { margin-top: 10px; }
.feed-card .line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-card .big-score { font: 800 1.4rem var(--display); }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.react { appearance: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; cursor: pointer; font: 600 .85rem var(--sans); color: var(--ink); }
.react[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }

/* Insignias */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.badge-card { border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px; text-align: center; background: var(--surface); font-size: .78rem; font-weight: 600; }
.badge-card .e { font-size: 1.8rem; display: block; line-height: 1.2; }
.badge-card.off { opacity: .4; filter: grayscale(1); }

/* Escudo de equipo y club */
.crest { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--c, var(--accent)); flex: none; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 25%); }
.crest.big { width: 72px; height: 72px; font-size: 2.4rem; border-radius: 22px; }

/* Portada */
.hero-sport { position: relative; overflow: hidden; border-radius: 0 0 32px 32px; background: radial-gradient(120% 90% at 85% 0%, #ff8a3d 0%, #e4572e 35%, #1b2a4a 80%); color: #fff; padding: 46px 0 36px; }
.hero-sport h1 { color: #fff; font-size: clamp(2.4rem, 10vw, 4.2rem); line-height: .95; text-transform: uppercase; font-style: italic; }
.hero-sport p { color: rgb(255 255 255 / 88%); font-size: 1.1rem; max-width: 520px; }
.hero-sport .btn { background: #fff; color: #b8381a; }
.hero-sport .btn.btn-line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 60%); }
.hero-sport .wrap { position: relative; z-index: 1; }
.ball-float { position: absolute; font-size: 2.6rem; opacity: .18; animation: floaty 7s ease-in-out infinite; pointer-events: none; }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(12deg); } }
.steps { counter-reset: s; display: grid; gap: 12px; }
.steps > div { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps > div::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 800 1rem var(--display); flex: none; }

/* Pantalla del torneo (TV del club) */
.screen { min-height: 100vh; background: #0b1220; color: #fff; padding: 24px; display: grid; gap: 18px; align-content: start; }
.screen h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.4rem); margin: 0; }
.screen .match { background: #131c2e; border-color: #283550; color: #fff; font-size: 1.05rem; }
.screen .bracket { grid-auto-columns: minmax(240px, 1fr); }
.screen .card { background: #131c2e; border-color: #283550; color: #fff; }

/* Temporada (tipo historia) */
.season-card { aspect-ratio: 9 / 16; max-width: 380px; margin: 0 auto; border-radius: 26px; color: #fff; padding: 28px 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center;
  background: radial-gradient(120% 80% at 80% 0%, #ff8a3d, #e4572e 40%, #1b2a4a 85%); box-shadow: var(--shadow); cursor: pointer; user-select: none; }
.season-card .big { font: 800 clamp(3rem, 18vw, 5rem) var(--display); line-height: 1; }
.season-card h2 { color: #fff; font-size: 1.6rem; }
.season-card .e { font-size: 3rem; }
.quick-actions .qa-link { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 4px; display: grid; justify-items: center; align-content: center; gap: 2px; font: 600 .78rem var(--sans); min-height: 70px; text-decoration: none; text-align: center; }
.quick-actions .qa-link span { font-size: 1.5rem; line-height: 1.1; }
.quick-actions .qa-link:active { transform: scale(.96); }

/* MiDueloSport360 Pro y pagos */
.pro-price { font: 800 2.4rem var(--display); line-height: 1; }
.pro-price small { font: 600 1rem var(--sans); color: var(--ink-3); margin-left: 4px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks li > span:first-child { font-size: 1.2rem; line-height: 1.3; }
.pay-box { max-width: 460px; margin: 24px auto 0; }
.pay-big { font-size: 3rem; line-height: 1; }
.pill-pro { background: color-mix(in srgb, var(--gold) 18%, transparent); color: color-mix(in srgb, var(--gold) 70%, var(--ink)); }
.screen .pro-wall { max-width: 640px; margin: 10vh auto 0; text-align: center; font-size: 1.3rem; }
.screen .pro-wall a { color: #ffb38a; }
