/* ============================================================
   Survivor Liga MX — Sistema de diseño (Linear / Airbnb)
   Minimalista · blanco/gris/azul · Inter · Material Symbols
   ============================================================ */

:root {
  /* Superficies y neutros */
  --bg: #f7f8fa;            /* fondo de la página */
  --surface: #ffffff;      /* tarjetas */
  --surface-2: #f4f5f7;    /* superficie sutil */
  --border: #e7e9ee;       /* bordes 1px */
  --border-strong: #d6d9e0;

  /* Texto (alto contraste) */
  --text: #14161a;         /* principal */
  --text-2: #5b6472;       /* secundario */
  --text-3: #8b93a1;       /* terciario */

  /* Primario (azul) */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-weak: #eef4ff;
  --primary-border: #cfe0ff;

  /* Estados */
  --success: #16a34a;
  --success-weak: #eafaf0;
  --danger: #dc2626;
  --danger-weak: #fef1f1;

  /* Radios y sombras */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);

  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: 150ms;
  --t: 200ms;

  --tap: 44px;             /* objetivo táctil mínimo */

  /* Alias de compatibilidad para estilos inline heredados */
  --text-dim: var(--text-2);
  --green-2: var(--success);
  --red: var(--danger);
  --yellow: var(--text);
  --accent: var(--primary);
  --accent-2: var(--primary-hover);
  --bg-2: var(--surface);
  --bg-3: var(--surface-2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; cursor: pointer; }
a:hover { color: var(--primary-hover); }

/* Iconos (Material Symbols Rounded) */
.material-symbols-rounded, .msr {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  display: inline-flex;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  flex-shrink: 0;
}
.msr.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.msr.sm { font-size: 18px; }
.msr.lg { font-size: 24px; }
.msr.xl { font-size: 40px; }

/* ---------- Layout ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 20px;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; cursor: pointer; letter-spacing: -0.02em; }
.topbar .brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.topbar .brand .logo .msr { font-size: 20px; }
.topbar nav { display: flex; gap: 2px; align-items: center; }
.topbar nav button {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-2); cursor: pointer;
  height: 40px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  font-family: inherit; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.topbar nav button:hover { color: var(--text); background: var(--surface-2); }
.topbar nav button.active { color: var(--primary); background: var(--primary-weak); }
.topbar nav .avatar-btn { padding: 0; width: 40px; justify-content: center; }

/* Barra de navegación inferior (móvil) */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  .nav-desktop { display: none !important; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
  }
  .bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: none; border: none; color: var(--text-2); font-family: inherit;
    font-size: 11px; font-weight: 500; cursor: pointer; min-height: 44px;
    transition: color var(--t-fast) var(--ease);
  }
  .bottom-nav button .msr { font-size: 24px; }
  .bottom-nav button.active { color: var(--primary); }
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 600; font-size: 13px; overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 88px; height: 88px; font-size: 32px; box-shadow: var(--shadow-md); }

.container { max-width: 880px; margin: 0 auto; padding: 40px 20px 80px; width: 100%; }
.container.narrow { max-width: 440px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow-md); }
.auth-card .brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.auth-card .brand-mark .msr { font-size: 26px; }
.auth-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-card .sub { color: var(--text-2); margin-bottom: 26px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-2); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--tap); padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.field .hint { font-size: 12.5px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; min-height: 32px; color: var(--text); }
.check input { width: auto; min-height: 0; accent-color: var(--primary); width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 14.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; letter-spacing: -0.01em;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .msr { font-size: 19px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:focus-visible { box-shadow: var(--ring); outline: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(.95); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--border-strong); }
.btn-danger:hover:not(:disabled) { background: var(--danger-weak); border-color: var(--danger); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-sm .msr { font-size: 17px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 680px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } .row { flex-direction: column; gap: 0; } }

.group-card { cursor: pointer; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); display: flex; flex-direction: column; gap: 16px; }
.group-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.group-card .gc-head { display: flex; align-items: center; gap: 12px; }
.group-card .gc-img { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-weak); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.group-card .gc-img .msr { font-size: 22px; }
.group-card .gc-title { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.group-card .gc-sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.gc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gc-stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.gc-stat .v { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.gc-stat .l { font-size: 11px; color: var(--text-2); margin-top: 3px; font-weight: 500; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; line-height: 1.2; border: 1px solid transparent; }
.badge .msr { font-size: 15px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge.primary, .badge.open, .badge.active { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-border); }
.badge.finished { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge.alive, .badge.won, .badge.success { background: var(--success-weak); color: var(--success); }
.badge.alive .dot, .badge.success .dot { background: var(--success); }
.badge.eliminated, .badge.lost, .badge.danger { background: var(--danger-weak); color: var(--danger); }
.badge.eliminated .dot { background: var(--danger); }
.badge.draw, .badge.pending { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

.live-badge { background: var(--danger-weak); color: var(--danger); }
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: livepulse 1.4s var(--ease) infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Page headers ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; display: flex; align-items: center; gap: 10px; }
.page-head .sub { color: var(--text-2); font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; margin: 32px 0 14px; display: flex; align-items: center; gap: 7px; }
.section-title .msr { font-size: 17px; color: var(--text-3); }

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 680px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow-sm); }
.stat-box .v { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.stat-box .l { font-size: 12.5px; color: var(--text-2); margin-top: 3px; font-weight: 500; }
.stat-box.green .v { color: var(--success); }
.stat-box.red .v { color: var(--danger); }
.stat-box.gold .v { color: var(--text); }

/* ---------- Tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; color: var(--text-2); font-weight: 600; letter-spacing: 0.02em; padding: 0 12px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table tr:last-child td { border-bottom: none; }
.table tr.me td { background: var(--primary-weak); }
.table tr.me td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.table tr.me td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rank-num { font-weight: 600; color: var(--text-3); width: 28px; font-variant-numeric: tabular-nums; }
.player-cell { display: flex; align-items: center; gap: 10px; }

/* ---------- Matches ---------- */
.match { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; gap: 10px; box-shadow: var(--shadow-sm); }
.match .teams { display: flex; align-items: center; gap: 12px; flex: 1; }
.team-pick {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: var(--tap);
  border-radius: var(--radius-sm); cursor: pointer; border: 1.5px solid var(--border);
  background: var(--surface); flex: 1; justify-content: center; font-weight: 500; font-size: 14px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.team-pick:hover:not(.disabled) { border-color: var(--primary); background: var(--primary-weak); }
.team-pick.selected { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.team-pick.selected .msr { color: var(--primary); }
.team-pick.disabled { opacity: .45; cursor: not-allowed; }
.team-pick .tp-name { text-align: center; line-height: 1.25; }

/* Selección de equipos: dos columnas iguales y de la misma altura */
.pick-match { flex-direction: column; align-items: stretch; gap: 10px; }
.pick-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; width: 100%; }
.pick-teams .team-pick { width: 100%; height: 100%; }
.pick-teams .match-mid { min-width: 0; align-self: center; }
.pick-match .kickoff { min-width: 0; text-align: left; display: inline-flex; align-items: center; gap: 4px; }
.pick-match .kickoff .msr { font-size: 15px; }
.pick-confirm { position: sticky; bottom: 0; background: var(--bg); padding: 16px 0; margin-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .pick-confirm { bottom: calc(60px + env(safe-area-inset-bottom)); } }
.match .vs { color: var(--text-3); font-size: 11px; font-weight: 600; padding: 0 6px; }
.match .kickoff { font-size: 12px; color: var(--text-2); min-width: 96px; text-align: right; }
.match .score { font-weight: 700; font-size: 18px; min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.result-select { display: flex; gap: 6px; }
.result-select button { min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: all var(--t-fast) var(--ease); }
.result-select button:hover { border-color: var(--primary); color: var(--primary); }
.result-select button.sel { background: var(--primary); color: #fff; border-color: var(--primary); }

/* team crest */
.crest { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.crest.logo { background: var(--surface-2); border: 1px solid var(--border); }
.crest.logo img { width: 22px; height: 22px; object-fit: contain; }

/* ---------- Invite / join ---------- */
.invite-box { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; }
.invite-box code { flex: 1; font-size: 14px; word-break: break-all; color: var(--text); font-family: "SF Mono", ui-monospace, Menlo, monospace; }

/* ---------- Winner / podium ---------- */
.winner-screen { text-align: center; padding: 48px 20px 8px; }
.winner-trophy { width: 76px; height: 76px; margin: 0 auto; border-radius: 20px; background: var(--primary-weak); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.winner-trophy .msr { font-size: 44px; }
.winner-screen .eyebrow { color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 600; margin-top: 18px; }
.winner-screen h1 { font-size: 32px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -0.03em; }
.winner-screen .pot-big { font-size: 26px; font-weight: 700; color: var(--success); margin-top: 14px; letter-spacing: -0.02em; }

.podium-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 10px; }
.podium-row:last-child { margin-bottom: 0; }
.podium-row.first { background: var(--primary-weak); border: 1px solid var(--primary-border); }
.pod-medal { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.podium-row.first .pod-medal { background: var(--primary); color: #fff; border-color: var(--primary); }
.pod-info { flex: 1; min-width: 0; text-align: left; }
.pod-name { font-weight: 600; font-size: 15px; }
.pod-place { font-size: 12.5px; color: var(--text-2); }
.pod-amount { font-weight: 700; color: var(--success); font-size: 15px; white-space: nowrap; letter-spacing: -0.02em; }

/* ---------- Breakdown / split ---------- */
.breakdown { display: flex; flex-direction: column; gap: 10px; }
.bd-row { display: flex; justify-content: space-between; font-size: 14px; }
.bd-row.muted { color: var(--text-2); }
.bd-row.total { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 2px; font-weight: 700; }
.bd-row.total span:last-child { color: var(--success); }
.split-mini { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.split-row span:last-child { color: var(--text); font-weight: 600; }
.split-input-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.split-input-row:last-child { border-bottom: none; }
.split-input-row .split-pct { width: 76px; min-height: 40px; padding: 8px 10px; text-align: right; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-family: inherit; }
.split-total { margin-top: 12px; font-size: 14px; color: var(--text-2); }

/* ---------- Notes / callouts ---------- */
.note { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-size: 13.5px; color: var(--text-2); display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.note .msr { font-size: 19px; color: var(--text-3); margin-top: 1px; }
.note.info { background: var(--primary-weak); border-color: var(--primary-border); color: var(--primary-hover); }
.note.info .msr { color: var(--primary); }
.note b { color: var(--text); font-weight: 600; }
.note.info b { color: var(--primary-hover); }

.pill-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pill-info:last-child { border-bottom: none; }
.pill-info .k { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.pill-info .v { font-weight: 600; text-align: right; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--surface-2); color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.empty .icon .msr { font-size: 30px; }
.empty h3 { color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.back-link { color: var(--text-2); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 20px; font-weight: 500; transition: color var(--t-fast) var(--ease); }
.back-link::before { font-family: "Material Symbols Rounded"; content: "arrow_back"; font-size: 18px; }
.back-link:hover { color: var(--text); }

.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; }
.link-more::after { font-family: "Material Symbols Rounded"; content: "chevron_right"; font-size: 18px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs button { background: none; border: none; color: var(--text-2); min-height: 44px; padding: 0 16px; cursor: pointer; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit; transition: color var(--t-fast) var(--ease); margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

.streak { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.streak .msr { font-size: 16px; color: var(--text-3); }

.divider-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 20px 0; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(140px);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 100; transition: transform var(--t) var(--ease);
  max-width: calc(100vw - 32px); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* Pop-up / modal (verificación de correo) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  background: rgba(20, 22, 26, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: fadein var(--t) var(--ease);
}
.modal {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px;
  box-shadow: var(--shadow-lg); animation: modalpop var(--t) var(--ease);
}
@keyframes modalpop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal .brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.modal .brand-mark .msr { font-size: 24px; }
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.modal .sub { color: var(--text-2); font-size: 14px; margin-bottom: 22px; }

.spinner { width: 28px; height: 28px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 80px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.mstatus { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .02em; font-weight: 600; }
.mstatus.live { color: var(--danger); }
.mstatus.done { color: var(--success); }
.match-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 90px; }

/* entrada suave de vistas */
.container > * { animation: fadein var(--t) var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, .container > * { animation: none !important; transition: none !important; } }

/* ===================== Responsive / móvil ===================== */
@media (max-width: 720px) {
  .container { padding: 24px 16px calc(88px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 14px; }
  .topbar nav button { padding: 0 10px; font-size: 13px; }
  .page-head h1 { font-size: 21px; }
  .card { padding: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 440px; }
  .table th, .table td { padding: 11px 8px; font-size: 13px; }
  .match { flex-wrap: wrap; }
  .match .kickoff { width: 100%; text-align: left; order: 9; }
  .winner-screen h1 { font-size: 26px; }
}
@media (max-width: 420px) {
  .page-head { flex-direction: column; }
  .page-head .btn { width: 100%; }
  .stat-box .v { font-size: 19px; }
}
