/* Quiniela Mundial — estilos (móvil primero) */

/* The `hidden` attribute must always win. Class/id selectors below set
   `display: flex/grid` on screens, tab panels and modals, which would
   otherwise out-specify the UA [hidden] rule and leave every screen stacked
   and visible at once. This single rule keeps the JS `el.hidden = true`
   toggling authoritative. */
[hidden] { display: none !important; }

:root {
  --blue-900: #1226c2;
  --blue-700: #2138e8;
  --blue-600: #2f4bff;
  --blue-500: #3d5afe;
  --blue-grad-top: #2b41f0;
  --blue-grad-bottom: #1322ad;
  --ink: #1b2440;
  --ink-soft: #5b6485;
  --line: #e7eaf3;
  --green: #16a34a;
  --green-bg: #e7f7ee;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(8, 18, 90, 0.18);
  --shadow-sm: 0 4px 14px rgba(8, 18, 90, 0.12);
  --tabbar-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-grad-top) 0%, var(--blue-grad-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

/* ===== Carga ===== */
.loading-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 44px; height: 44px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Botones / inputs comunes ===== */
.q-btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  transition: transform 0.06s ease, opacity 0.15s ease, background 0.15s ease;
}
.q-btn:active { transform: scale(0.98); }
.q-btn:disabled { opacity: 0.55; cursor: default; }
.q-btn-primary { background: var(--blue-600); color: #fff; }
.q-btn-secondary { background: #eef1ff; color: var(--blue-700); }
.q-btn-icon {
  width: auto; padding: 10px 14px;
  background: #eef1ff; color: var(--blue-700);
  font-size: 18px;
}

.q-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.q-input:focus { border-color: var(--blue-500); }
.q-input-code {
  text-align: center;
  letter-spacing: 6px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 22px;
}

.icon-btn {
  border: 0;
  background: rgba(255,255,255,0.18);
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Onboarding ===== */
.onboarding {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 32px 18px calc(32px + env(safe-area-inset-bottom));
}
.ob-hero { text-align: center; color: #fff; margin: 16px 0 28px; max-width: 420px; }
.ob-emoji { font-size: 56px; }
.ob-title { font-size: 30px; margin: 8px 0 6px; font-weight: 800; }
.ob-sub { margin: 0; opacity: 0.9; font-size: 15px; line-height: 1.45; }

.ob-cards { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.ob-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.ob-card h2 { margin: 0; font-size: 18px; }
.ob-hint { margin: 0; color: var(--ink-soft); font-size: 14px; }
.ob-error { margin: 0; color: #d92d20; font-size: 14px; font-weight: 600; }
.ob-divider {
  text-align: center; color: rgba(255,255,255,0.8);
  font-size: 13px; position: relative; margin: 2px 0;
}
.ob-foot { margin-top: 26px; color: rgba(255,255,255,0.85); font-size: 14px; }
.ob-link { color: #fff; text-decoration: underline; }
.ob-dot { margin: 0 8px; opacity: 0.6; }

/* ===== Código compartir ===== */
.code-share {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.cs-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 24px;
  max-width: 400px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column; gap: 14px;
}
.cs-emoji { font-size: 48px; }
.cs-card h2 { margin: 0; font-size: 22px; }
.cs-hint { margin: 0; color: var(--ink-soft); font-size: 15px; }
.cs-code-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.cs-code {
  font-size: 30px; font-weight: 800; letter-spacing: 6px;
  color: var(--blue-700);
  background: #eef1ff;
  padding: 10px 18px; border-radius: var(--radius-sm);
}
.cs-copied { margin: 0; color: var(--green); font-weight: 700; font-size: 14px; }

/* ===== Shell ===== */
.app {
  min-height: 100vh;      /* respaldo para navegadores sin dvh */
  min-height: 100dvh;     /* sigue la altura visible real (sin barra fantasma en iOS) */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.q-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 12px;
  color: #fff;
}
.q-header-title { margin: 0; font-size: 20px; font-weight: 800; }
.q-header-right { display: flex; align-items: center; gap: 8px; }
.code-chip {
  border: 0;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.tab-panel { padding: 0 14px; }

/* ===== Banner de premios ===== */
.prize-banner {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  margin-bottom: 16px;
}
.pb-intro { margin: 0 0 12px; text-align: center; font-size: 14px; opacity: 0.92; }
.pb-prizes { display: flex; gap: 10px; }
.pb-prize {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.pb-prize-rank { font-size: 13px; font-weight: 700; opacity: 0.9; }
.pb-prize-pct { font-size: 12px; opacity: 0.8; margin: 2px 0; }
.pb-prize-amt { font-size: 15px; font-weight: 800; }
.pb-pot { margin: 14px 0 0; text-align: center; font-size: 15px; }
.pb-pot strong { font-size: 17px; }

.rk-prize-banner { margin: 14px 0 18px; }
.rk-pot { margin: 0 0 14px; order: -1; }

/* ===== Texto de cuenta (multilínea, respeta saltos) ===== */
.pre-line {
  white-space: pre-line;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== CTA de pagos (sobre Próximos, estilo prize-banner) ===== */
.settlement-cta {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 18px 16px;
  color: #fff;
  margin-bottom: 16px;
}
.sc-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.sc-title strong { font-weight: 800; }
.sc-note { margin: 0 0 10px; font-size: 14px; opacity: 0.92; line-height: 1.4; }
.sc-thanks { margin: 12px 0 0; font-size: 16px; font-weight: 800; text-align: center; }
.sc-confirm-text { margin: 12px 0 10px; font-size: 14px; opacity: 0.95; }
.sc-account {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 0 0 12px;
}
.sc-account-label { display: block; font-size: 12px; font-weight: 700; opacity: 0.85; margin-bottom: 4px; }
.settlement-cta .pre-line { color: #fff; }
.sc-btn { background: var(--blue-600); color: #fff; }
.sc-actions { display: flex; gap: 8px; }
.sc-actions .q-btn { flex: 1; width: auto; }
.sc-textarea {
  width: 100%; resize: vertical; margin-bottom: 10px;
  font-family: inherit; line-height: 1.4;
}
.sc-save { width: 100%; }

/* ===== Toggle ===== */
.toggle {
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.toggle-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 11px 0;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.toggle-btn.is-active { background: var(--blue-600); color: #fff; }

/* ===== Lista de partidos ===== */
.matches { display: flex; flex-direction: column; gap: 14px; }
.day-header {
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin: 8px 0 2px;
  text-transform: capitalize;
}
.match-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.match-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.match-stage { font-size: 14px; font-weight: 700; color: var(--ink); }
.match-time { font-size: 13px; font-weight: 700; color: var(--blue-600); }
.match-status-note { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.team-flag { font-size: 30px; line-height: 1; }
.team-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 30px; padding: 0 8px;
  background: #eef1ff; color: var(--blue-700);
  border-radius: 8px; font-weight: 800; font-size: 13px;
}
.team-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.match-center { text-align: center; min-width: 56px; }

/* marcador final */
.final-score { font-size: 30px; font-weight: 800; color: var(--ink); }
.vs-dash { font-size: 22px; font-weight: 700; color: var(--ink-soft); }
.pen-note { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }

/* inputs de pronóstico */
.score-inputs {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.score-input {
  width: 48px; height: 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 22px; font-weight: 800; color: var(--ink);
  outline: none;
}
.score-input:focus { border-color: var(--blue-500); }
.score-input:disabled { background: #f4f5fa; color: var(--ink-soft); }
.score-sep { font-size: 20px; font-weight: 700; color: var(--ink-soft); }

.bet-area { margin-top: 4px; }
.bet-btn {
  background: var(--blue-600);
  color: #fff;
}

/* confirmación de costo (primera apuesta) */
.bet-confirm-text {
  margin: 2px 0 10px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.bet-confirm-text strong { color: var(--ink); }

/* dos acciones lado a lado (confirmar/cancelar · guardar/cancelar) */
.bet-actions { display: flex; gap: 8px; }
.bet-actions .q-btn { flex: 1; width: auto; }

/* apostado: estado fijo + botón editar */
.bet-locked {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.bet-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green); font-weight: 800; font-size: 15px;
}
.bet-locked-actions { display: flex; gap: 8px; }
.bet-edit {
  width: auto; padding: 10px 22px; font-size: 15px;
  background: #eef1ff; color: var(--blue-700);
}

/* retirar apuesta (acción destructiva, disponible hasta 15 min antes) */
.bet-delete {
  width: auto; padding: 10px 18px; font-size: 15px;
  background: #fdecec; color: #c92a2a;
}
.bet-delete-confirm { background: #e03131; color: #fff; }

.locked-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
  margin-top: 6px;
}

/* resultado finalizado */
.match-divider { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.result-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px;
}
.your-pred { color: var(--ink-soft); }
.your-pred strong { color: var(--ink); }
.points-pill {
  background: var(--green-bg);
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
}
.no-pred { color: var(--ink-soft); font-size: 14px; }

.q-empty {
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: 32px 12px;
  font-size: 15px;
}

/* ===== Ranking ===== */
.ranking-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.rank-num {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eef1ff; color: var(--blue-700);
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.rank-row.is-first .rank-num { background: transparent; font-size: 22px; }
.rank-name { flex: 1; font-weight: 700; font-size: 16px; }
.rank-exacts { display: block; font-weight: 600; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.rank-points { text-align: right; }
.rank-points-num { color: var(--blue-600); font-size: 22px; font-weight: 800; line-height: 1; }
.rank-points-label { color: var(--ink-soft); font-size: 12px; }

/* ===== Perfil ===== */
.profile-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 18px;
  margin-bottom: 14px;
  text-align: center;
}
.pf-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  object-fit: cover; background: #eef1ff;
  margin-bottom: 8px;
}
.pf-name { margin: 0 0 16px; font-size: 20px; }
.pf-stats { display: flex; justify-content: space-around; }
.pf-stat { display: flex; flex-direction: column; gap: 2px; }
.pf-stat-num { font-size: 22px; font-weight: 800; color: var(--blue-600); }
.pf-stat-label { font-size: 12px; color: var(--ink-soft); }
.pf-section-title { margin: 0 0 12px; font-size: 16px; }
.profile-links { text-align: left; display: flex; flex-direction: column; gap: 4px; }
.pf-link {
  display: block; padding: 12px 4px;
  color: var(--blue-700); text-decoration: none; font-weight: 600;
}
.pf-link-danger { color: #d92d20; }

/* ===== Pagos ===== */
.pg-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 14px;
}
.pg-card-title { margin: 0 0 6px; font-size: 16px; }
.pg-card-hint { margin: 0 0 10px; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }

/* caja / tesorería */
.pg-treasury { text-align: center; }
.pg-treasury-lead { margin: 0; color: var(--ink-soft); font-size: 14px; }
.pg-treasury-hold { margin: 4px 0 14px; font-size: 30px; font-weight: 800; color: var(--blue-600); }
.pg-treasury-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-treasury-grid > div {
  background: #f4f5fa; border-radius: var(--radius-sm);
  padding: 10px 8px; display: flex; flex-direction: column; gap: 2px;
}
.pg-t-label { font-size: 12px; color: var(--ink-soft); }
.pg-t-val { font-size: 16px; font-weight: 800; color: var(--ink); }

/* tablero de miembros */
.pg-board { display: flex; flex-direction: column; gap: 10px; }
.pg-row { padding: 14px 16px; }
.pg-row.is-me { border: 2px solid var(--blue-500); }
.pg-row-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.pg-rank {
  width: 28px; height: 28px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eef1ff; color: var(--blue-700);
  font-weight: 800; font-size: 13px;
}
.pg-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pg-name { font-weight: 700; font-size: 15px; }
.pg-meta { font-size: 12px; color: var(--ink-soft); }
.pg-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pg-amt { font-weight: 800; font-size: 14px; white-space: nowrap; }
.pg-amt-debt { color: #c92a2a; }
.pg-amt-win { color: var(--green); }
.pg-amt-neutral { color: var(--ink-soft); }
.pg-pill {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.pg-pill-ok { background: var(--green-bg); color: var(--green); }
.pg-pill-pending { background: #fff3cd; color: #92680a; }
.pg-row-owner {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.pg-override {
  width: auto; align-self: flex-start;
  padding: 8px 16px; font-size: 14px;
  background: #eef1ff; color: var(--blue-700);
}
.pg-pay-details { font-size: 13px; }
.pg-pay-details .sc-account-label { color: var(--ink-soft); }
.pg-pay-details .pre-line { color: var(--ink); }

/* ===== Tab bar ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  display: flex;
  box-shadow: 0 -4px 20px rgba(8, 18, 90, 0.10);
  z-index: 50;
}
.tabbar-btn {
  flex: 1; border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--ink-soft);
  font-size: 12px; font-weight: 600;
}
.tabbar-icon { font-size: 20px; filter: grayscale(1) opacity(0.7); }
.tabbar-btn.is-active { color: var(--blue-600); }
.tabbar-btn.is-active .tabbar-icon { filter: none; }

/* ===== Modales ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 18, 60, 0.5);
  z-index: 90;
}
.modal-menu {
  position: fixed; right: 14px; top: 60px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 100;
  overflow: hidden;
  min-width: 250px;
}
.modal-menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; border: 0; background: #fff;
  padding: 14px 16px; text-align: left;
  font-size: 15px; color: var(--ink);
}
.modal-menu-item + .modal-menu-item { border-top: 1px solid var(--line); }
.modal-menu-item small { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.modal-menu-item span > strong { font-weight: 700; }

.modal {
  position: fixed; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  padding: 0;
}
/* The `hidden` attribute must win over `.modal { display: flex }` (a class
   selector otherwise out-specifies the UA [hidden] rule, leaving the modal
   permanently open). */
.modal[hidden] { display: none; }
.modal-card {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { background: #eef1ff; color: var(--ink); }
.modal-body { padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; line-height: 1.5; }
.modal-body p { margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.rules-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.rules-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rules-pts {
  background: var(--green-bg); color: var(--green);
  font-weight: 800; font-size: 14px;
  padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
}
.rules-note { color: var(--ink-soft); font-size: 13px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 120;
  max-width: 90vw;
}

/* ===== Tablet angosta: centra la columna teléfono ===== */
@media (min-width: 560px) and (max-width: 899px) {
  .app, .tab-panel { max-width: 480px; margin-left: auto; margin-right: auto; }
  .tab-panel { padding-left: 0; padding-right: 0; }
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 480px; }
}

/* ===== Escritorio (laptop y mayor): layout ancho de verdad ===== */
@media (min-width: 900px) {
  /* Contenedor centrado más cómodo */
  .app {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 48px; /* ya no hay tab bar fija; nav inline bajo el header */
    display: flex;
    flex-direction: column;
  }
  /* Orden visual: header, nav inline, luego el panel activo */
  .q-header { order: 0; }
  .tabbar { order: 1; }
  #tab-predecir, #tab-ranking, #tab-pagos, #tab-perfil { order: 2; }

  .q-header {
    padding: 28px 8px 20px;
  }
  .q-header-title { font-size: 26px; }
  .code-chip { font-size: 14px; padding: 8px 14px; }
  .icon-btn { width: 38px; height: 38px; font-size: 18px; }

  .tab-panel { padding: 0 8px; }

  /* Banner de premios más grande y aireado */
  .prize-banner { padding: 24px 28px; margin-bottom: 24px; }
  .pb-intro { font-size: 16px; margin-bottom: 18px; }
  .pb-prizes { gap: 16px; }
  .pb-prize { padding: 18px 12px; }
  .pb-prize-rank { font-size: 15px; }
  .pb-prize-pct { font-size: 13px; }
  .pb-prize-amt { font-size: 19px; }
  .pb-pot { font-size: 17px; margin-top: 18px; }
  .pb-pot strong { font-size: 20px; }

  /* Toggle: no estirado de borde a borde */
  .toggle { max-width: 360px; margin-left: auto; margin-right: auto; margin-bottom: 24px; }
  .toggle-btn { font-size: 16px; padding: 12px 0; }

  /* Lista de partidos: rejilla de 2 columnas */
  .matches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    row-gap: 18px;
    align-items: start;
  }
  /* Los encabezados de día abarcan toda la fila de la rejilla */
  .day-header {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 16px;
    margin: 14px 4px 4px;
  }
  .match-card { padding: 20px; }
  .match-stage { font-size: 15px; }
  .team-flag { font-size: 34px; }
  .team-name { font-size: 14px; }
  .final-score { font-size: 32px; }

  /* Ranking: tarjetas centradas, no tan anchas */
  .ranking-list, .rk-prize-banner {
    max-width: 640px; margin-left: auto; margin-right: auto;
  }
  .rk-prize-banner { padding: 24px 28px; }
  .rank-row { padding: 18px 22px; }
  .rank-name { font-size: 17px; }

  /* Perfil: tarjetas centradas */
  .profile-card {
    max-width: 560px; margin-left: auto; margin-right: auto;
    padding: 26px 28px;
  }
  .pf-avatar { width: 88px; height: 88px; }
  .pf-name { font-size: 22px; }
  .pf-stat-num { font-size: 26px; }

  /* La barra inferior se convierte en navegación inline en el header */
  .tabbar {
    position: static;
    left: auto; right: auto; bottom: auto;
    transform: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 8px auto 28px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: none;
    overflow: hidden;
  }
  .tabbar-btn {
    flex-direction: row;
    gap: 8px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
  }
  .tabbar-icon { font-size: 18px; filter: none; }
  .tabbar-btn.is-active {
    color: var(--blue-700);
    background: #fff;
  }
  .tabbar-btn.is-active .tabbar-icon { filter: none; }

  /* El toast se ancla al borde inferior real, sin tab bar fija */
  .toast { bottom: 28px; }

  /* Onboarding ancho: hero arriba, dos tarjetas lado a lado */
  .ob-hero { max-width: 640px; }
  .ob-title { font-size: 38px; }
  .ob-sub { font-size: 17px; }
  .ob-cards {
    max-width: 760px;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
  }
  .ob-card { flex: 1; padding: 28px 24px; }
  .ob-divider {
    display: flex; align-items: center;
    align-self: center;
    margin: 0;
  }
}
