/* Extracted from base.css: Player-specific styles */

/* ── Home Nav ───────────────────────────────────────────────── */
.home-header {
  text-align: center;
  background: transparent;
  margin: -24px -16px 16px;
  padding: 36px 16px 4px;
}

.home-logo {
  width: 280px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 4px 24px rgba(245,197,24,0.2)) drop-shadow(0 0 48px rgba(245,197,24,0.1));
  animation: login-drop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

.home-header h1 {
  font-size: 2rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}

.home-welcome {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.home-demo-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 14px auto 0;
  padding: 0 16px;
  border: 1px solid rgba(254, 202, 202, 0.45);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.82);
  color: #fff7ed;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(127, 29, 29, 0.26);
}

.home-demo-exit:hover {
  background: rgba(153, 27, 27, 0.92);
}

.app-kicker {
  margin: 2px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(134, 239, 172, 0.9);
  font-weight: 800;
}

.home-shell-card {
  margin: 0 0 18px;
  padding: 14px 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(56, 78, 56, 0.62);
  background: linear-gradient(180deg, rgba(10,18,10,0.72), rgba(7,12,7,0.56));
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}

/* ── Home Admin Message + Live Strip ─────────────────────────── */
.home-admin-msg {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(90, 120, 90, 0.35);
  background: rgba(8, 14, 9, 0.6);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-msg-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(245, 197, 24, 0.6);
}

#live-strip {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}

.live-card {
  border-radius: 14px;
  border: 1px solid rgba(90, 120, 90, 0.3);
  background: rgba(6, 10, 7, 0.6);
  padding: 10px 12px;
}

.live-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}

.live-badge {
  font-weight: 800;
  color: var(--gold);
}

.live-min {
  font-weight: 700;
  color: rgba(255,255,255,0.55);
}

.live-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}

.live-team {
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-team--away {
  justify-content: flex-end;
  text-align: right;
}

.live-score,
.live-clock {
  font-weight: 800;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* ── Countdown ──────────────────────────────────────────────── */
.countdown-card {
  padding: 8px 0 4px;
  margin: 0;
  text-align: center;
  position: relative;
}

.countdown-topline {
  display: flex;
  justify-content: center;
  padding-bottom: 10px;
}

.countdown-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  font-weight: 700;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  /* Sin fondo extra: las unidades flotan sobre el gradiente del header */
  padding: 4px 2px 2px;
}

.cd-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.cd-lbl {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.home-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 80px;
}

.app-nav-section {
  padding: 0 0 2px;
}

/* Etiqueta de sección */
.nav-section-lbl {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.92);
  padding: 0 2px 10px;
  margin: 0;
}

/* Filas de cards */
.nav-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.nav-row--primary { grid-template-columns: repeat(2, 1fr); }
.nav-row--info    { grid-template-columns: repeat(2, 1fr); }
.nav-row--util    { grid-template-columns: repeat(2, 1fr); }

/* Card base */
.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(17, 24, 17, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(36,48,36,0.8);
  border-radius: 14px;
  padding: 20px 10px 16px;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.13s, background 0.18s, box-shadow 0.18s;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}
.nav-card:active {
  transform: scale(0.93);
  background: rgba(36,48,36,0.85);
  box-shadow: none;
}
.nav-card:hover {
  border-color: rgba(245,197,24,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

@media (hover: none), (pointer: coarse) {
  .nav-card {
    background:
      linear-gradient(180deg, rgba(20, 31, 20, 0.96) 0%, rgba(12, 18, 12, 0.92) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  }

  .nav-card:active {
    transform: none;
    background: rgba(28, 40, 28, 0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  }

  .nav-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  }
}

/* Cards de info: más compactas, texto apagado */
.nav-card--info {
  padding: 14px 8px 12px;
  border-radius: 12px;
}
.nav-card--info .nav-icon  { font-size: 1.4rem; }
.nav-card--info .nav-label { color: var(--text-dim); font-size: 0.72rem; }
.nav-card--info .nav-status {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
  min-height: 1.2em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-card--info .nav-sub {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}
.nav-sub--scoring { color: var(--gold); }
.nav-sub--scoreboard { color: var(--gold); }
.nav-sub--social { color: #93c5fd; }
.nav-sub--matches { color: var(--text-dim); }
.nav-status.is-open { color: var(--green); }
.nav-status.is-closed { color: var(--red); }
.nav-status.is-soon { color: var(--gold); }
.nav-status--points {
  color: var(--gold) !important;
  font-size: 0.68rem;
}
.nav-sub.is-open { color: var(--green); }
.nav-sub.is-closed { color: var(--red); }
.nav-sub.is-soon { color: var(--gold); }

/* Cards de utilidad: mismo tamaño que info */
.nav-card--util {
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  padding: 14px 8px 12px;
  border-radius: 12px;
}
.nav-card--util .nav-icon  { font-size: 1.4rem; }
.nav-card--util .nav-label { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }

.nav-icon  { font-size: 1.8rem; line-height: 1; }
.nav-label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; }

/* ── Version footer ─────────────────────────────────────────────────────── */
.app-version-footer {
  text-align: center;
  padding: 16px 0 32px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.18);
  font-family: var(--font);
  letter-spacing: 0.04em;
  user-select: none;
}

/* ── Boleta ─────────────────────────────────────────────────── */
.ballot-loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-dim);
}

.ballot-header,
.sb-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin: calc(-1 * (var(--screen-pad-top, 24px) + env(safe-area-inset-top, 0px))) calc(-1 * var(--screen-pad-inline, 16px)) 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--screen-pad-inline, 16px) 12px;
  position: sticky;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  background: linear-gradient(
    to bottom,
    rgba(18, 52, 20, 0.97) 0%,
    rgba(12, 36, 14, 0.90) 100%
  );
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid rgba(70, 160, 70, 0.18);
  border-bottom: 1px solid rgba(70, 160, 70, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.ballot-header--app,
.sb-header--app {
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
}

@media (hover: none), (pointer: coarse) {
  .ballot-header,
  .sb-header {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: linear-gradient(
      to bottom,
      rgba(18, 52, 20, 0.985) 0%,
      rgba(12, 36, 14, 0.96) 100%
    );
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
  }
}

.ballot-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
}

.app-stage-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Wrapper derecho del ballot-header: save-status + dice */
.ballot-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-right: 8px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-back:hover { color: var(--text); }

.save-status {
  font-size: 0.85rem;
  color: var(--green);
  min-width: 24px;
  text-align: right;
}

/* ── Botón dado (llenar al azar) en el header ── */
.btn-header-dice {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.btn-header-dice:hover  { color: var(--text); transform: rotate(-15deg) scale(1.1); }
.btn-header-dice:active { transform: scale(0.9); }

/* ── Botón ❓ ayuda en el header ── */
.btn-header-help {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-header-help:hover  { color: var(--text); }
.btn-header-help:active { transform: scale(0.9); }

.group-pills-wrap {
  position: static;
  top: auto;
  background: transparent;
  z-index: auto;
  padding: 8px 12px 10px;
}

.group-pills {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 80px));
  justify-content: center;
  gap: 10px;
}

.group-pill {
  width: 80px;
  height: 80px;
  min-height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.group-pill.active,
.group-pill:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

@media (max-width: 860px) {
  .group-pills {
    grid-template-columns: repeat(6, minmax(0, 60px));
    gap: 8px;
  }
  .group-pill {
    width: 60px;
    height: 60px;
    min-height: 60px;
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .group-pills-wrap {
    padding: 6px 10px 8px;
  }

  .group-pills {
    grid-template-columns: repeat(6, minmax(0, 52px));
    gap: 6px;
  }

  .group-pill {
    width: 52px;
    height: 52px;
    min-height: 52px;
    font-size: 0.84rem;
  }

  .matches-list,
  .st-body {
    padding-top: 10px;
  }
}

@media (max-width: 420px) {
  .ballot-header,
  .sb-header {
    grid-template-columns: 40px 1fr 40px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .ballot-header--app,
  .sb-header--app {
    grid-template-columns: 40px 1fr auto;
    gap: 6px;
  }

  .ballot-title {
    font-size: 0.96rem;
    line-height: 1.2;
  }

  .ballot-header-right {
    gap: 2px;
    padding-right: 0;
  }

  .btn-back,
  .btn-header-help,
  .btn-header-dice,
  .sb-refresh {
    font-size: 1.15rem;
  }

  .group-pills-wrap {
    padding: 4px 0 6px;
  }

  .matches-list {
    gap: 10px;
    padding: 10px 0 72px;
  }

  .st-body {
    padding: 4px 0 72px;
  }

  .profile-body {
    padding: 10px 0 24px;
    gap: 14px;
  }

  .profile-summary-card,
  .profile-section {
    padding: 10px;
  }

  .prog-summary-card {
    padding: 14px 10px 12px;
  }

  .prog-total {
    font-size: 2.7rem;
  }

  .prog-mini-summary {
    gap: 5px;
  }

  .prog-mini-chip {
    padding: 7px 5px;
  }

  .prog-mini-k {
    font-size: 0.54rem;
  }

  .prog-mini-v {
    font-size: 0.88rem;
  }

  .prog-breakdown {
    font-size: 0.72rem;
  }

  .prog-sp-header {
    padding: 10px 12px 8px;
  }

  .prog-sp-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 12px;
  }

  .prog-sp-teams,
  .prog-extra-card .prog-sp-teams {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .prog-sp-row-pts {
    justify-self: flex-start;
  }

  .sp-card {
    padding: 12px 12px 8px;
  }

  .sp-selector-btn {
    padding: 10px 12px;
  }

  .sp-overlay-header {
    padding: 14px 14px 10px;
  }

  .sp-search {
    margin: 10px 12px 8px;
  }

  .sp-team-row {
    padding: 11px 12px;
    gap: 10px;
  }

  .profile-share-actions {
    gap: 6px;
    flex-wrap: nowrap;
    width: 100%;
  }

.profile-share-actions .profile-btn,
.profile-share-actions .profile-whatsapp-btn {
  flex: 1 1 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 56px;
  padding: 12px 10px;
  border-radius: 12px;
  border-width: 1px;
  line-height: 1.2;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  }

  .profile-section .admin-edition-code-wrap {
    gap: 8px;
    padding: 10px 12px;
  }

  .profile-section .admin-edition-code {
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    word-break: break-word;
  }

  .cal-body {
    padding: 4px 0 24px;
  }

  .sb-body--app {
    gap: 10px;
  }

  .sb-progress-wrap {
    padding: 6px 0 6px;
  }

  .sb-progress-meta {
    gap: 8px;
  }

  .sb-progress-lbl,
  .sb-progress-pct {
    font-size: 0.68rem;
  }

  .sb-meta-strip {
    gap: 6px;
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .sb-meta-chip {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .sb-row {
    column-gap: 10px;
    padding: 10px 12px;
  }

  .sb-rank {
    min-width: 34px;
    font-size: 1.08rem;
  }

  .sb-row:nth-child(-n+3) .sb-rank {
    font-size: 1.72rem;
  }

  .sb-name {
    font-size: 1.06rem;
  }

  .sb-pts {
    font-size: 1.9rem;
  }
}

/* Match list */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px 80px;
}

.match-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.match-card:not(.locked):hover {
  border-color: var(--gold-dim);
  box-shadow: 0 2px 12px rgba(245,197,24,0.06);
}

/* Partido cerrado: score visible pero apagado, sin botones */
.match-card.locked              { border-color: transparent; }
.match-card.locked .mc-score   { color: var(--text-dim); }
.match-card.locked .mc-name    { opacity: 0.5; }
.match-card.locked .mc-flag    { opacity: 0.5; }
.match-card.locked .mc-meta    { opacity: 0.4; }

/* Si el partido cerrado tiene predicción, el score se mantiene visible */
.match-card.locked .mc-score.has-val { color: var(--text); opacity: 0.7; }

/* Equipos + marcador */
.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}

.home-team { align-items: flex-start; }
.away-team { align-items: flex-end;   }

.team-flag { font-size: 1.5rem; line-height: 1; }

.team-name {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Match card ────────────────────────────────────── */
.mc-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* Columna de equipo */
.mc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* Bandera + score juntos */
.mc-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-flag  { font-size: 1.8rem; line-height: 1; }

.mc-score {
  font-size: 1.6rem;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
  color: var(--text-dim);   /* sin valor: gris */
}

.mc-score.has-val { color: var(--gold); }  /* con valor: dorado */

.mc-name {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Fila [−][⚽] o [⚽][−] */
.mc-ball-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Botón − para restar gol */
.mc-minus {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mc-minus:active:not(:disabled) {
  background: rgba(248, 113, 113, 0.18);
  color: #f87171;
  transform: scale(0.88);
}
.mc-minus:disabled { opacity: 0.15; cursor: not-allowed; }

/* Botón ⚽ para sumar gol */
.mc-ball {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;   /* evita zoom por doble-tap en iOS/Android */
}

.mc-ball:active:not(:disabled) {
  background: var(--gold);
  transform: scale(0.88);
}

.mc-ball:disabled { opacity: 0.2; cursor: not-allowed; }

/* Columna central: confirm + reset */
.mc-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Modo edición: ✓ alineado con el score, ↺ alineado con los balones */
.mc-row--edit {
  align-items: stretch;
}
.mc-row--edit .mc-center {
  justify-content: space-between;
  gap: 0;
  padding: 3px 0;
}
/* Ocupa el espacio del mc-name entre ✓ y ↺ */
.mc-center-mid {
  flex: 1;
}

/* Botón ✓ confirmar predicción (guarda 0-0 si no se tocó el marcador) */
.mc-confirm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.30);
  background: none;
  color: rgba(74, 222, 128, 0.75);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mc-confirm:hover { color: #4ade80; border-color: rgba(74, 222, 128, 0.65); }

.mc-reset {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: none;
  color: rgba(248, 113, 113, 0.65);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mc-reset:hover { color: #f87171; border-color: rgba(248, 113, 113, 0.55); }

/* Separador central en partido terminado ("3 – 0") */
.mc-result-sep {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dim);
}

/* Badge central cuando el partido está cerrado */
.mc-lock-badge {
  font-size: 1.1rem;
  opacity: 0.5;
}

/* Meta info */
.mc-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.locked-tag { margin-left: 4px; }

/* Match meta */
.match-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.match-meta .sep   { opacity: 0.4; }
.locked-tag        { margin-left: auto; }

/* ── Partido terminado: scores reales grandes (no dimmed) ───── */
.match-card.finished .mc-score.has-val { color: var(--green); opacity: 1; }
.match-card.finished .mc-name          { opacity: 0.6; }
.match-card.finished .mc-flag          { opacity: 0.75; }

/* ── Fila de predicción del usuario (bajo el resultado real) ── */
.mc-pred-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 6px;
}

.mc-pred-label {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.mc-pred-label strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Badges de puntos ───────────────────────────────────────── */
.mc-pts {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.pts-exact { background: #14532d; color: #4ade80; }   /* verde — exacto */
.pts-good  { background: #713f12; color: #fbbf24; }   /* amarillo — resultado correcto */
.pts-miss  { background: #450a0a; color: #f87171; }   /* rojo — fallo */

/* ── Utility ────────────────────────────────────────────────── */
.text-dim { color: var(--text-dim); font-size: 0.85rem; }

.app-view-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.app-view-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(134, 239, 172, 0.9);
  font-weight: 800;
}

.sb-refresh {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s, transform 0.3s;
}

.sb-refresh:hover { color: var(--text); }
.sb-refresh:active { transform: rotate(180deg); }

.sb-body {
  padding-bottom: 80px;
}

.sb-body--app {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Barra de progreso del Mundial ── */
.sb-progress-wrap {
  padding: 8px 0 8px;
}

.sb-progress-track {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.sb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 99px;
  transition: width 0.5s ease;
  min-width: 4px;
}

.sb-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sb-progress-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.sb-progress-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.sb-subtitle {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0 0 12px;
}

.sb-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 2px 0 10px;
}

.sb-meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
}

.sb-empty {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.sb-empty-icon { font-size: 2.5rem; }

.sb-dim {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.sb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 5px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 15px 11px;
  transition: border-color 0.2s;
}

/* Resaltar jugador actual */
.sb-row.sb-me {
  border-color: var(--gold-dim);
  background: #1c1900;
}

.sb-rank {
  grid-column: 1;
  grid-row: 1;
  font-size: 1.32rem;
  line-height: 1;
  min-width: 42px;
  color: var(--text-dim);
  font-weight: 800;
}

/* Los emojis de medalla son más grandes */
.sb-row:nth-child(-n+3) .sb-rank {
  font-size: 2rem;
}

.sb-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

.sb-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}

.sb-you-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--gold);
  color: #000;
  padding: 1px 5px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 4px;
}

.sb-detail {
  font-size: 0.74rem;
  line-height: 1.15;
  color: var(--text-dim);
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}

.sb-bottomline {
  display: contents;
}

.sb-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.sb-score--top {
  grid-column: 3;
  grid-row: 1;
  min-width: 58px;
  flex-shrink: 0;
}

.sb-pts {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sb-row.sb-me .sb-pts { color: var(--gold); }

.sb-pts-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Racha en vivo ────────────────────────────────────────────── */
.sb-streak {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 120, 0, 0.18);
  color: #ff8c00;
  padding: 1px 6px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 5px;
}
.sb-trend {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  vertical-align: middle;
}
.sb-trend--up {
  color: var(--green);
  background: rgba(34,197,94,0.14);
}
.sb-trend--down {
  color: var(--red);
  background: rgba(248,113,113,0.14);
}
.sb-trend--same {
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
}

@media (max-width: 560px) {
  .sb-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 13px 10px;
    column-gap: 10px;
    row-gap: 4px;
  }

  .sb-rank {
    font-size: 1.1rem;
    min-width: 36px;
  }

  .sb-row:nth-child(-n+3) .sb-rank {
    font-size: 1.75rem;
  }

  .sb-name {
    font-size: 1.18rem;
  }

  .sb-detail {
    font-size: 0.7rem;
  }

  .sb-pts {
    font-size: 1.85rem;
  }
}

/* ── Toast de cambio de posición ─────────────────────────────── */
.sb-rank-toast {
  margin: 0 0 10px;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  animation: sb-toast-in 0.3s ease;
}
.sb-rank-toast--up   { background: rgba(0,200,80,0.15);  color: var(--green); border: 1px solid rgba(0,200,80,0.3); }
.sb-rank-toast--down { background: rgba(220,50,50,0.12); color: var(--red);   border: 1px solid rgba(220,50,50,0.25); }
@keyframes sb-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Filtro de equipo favorito ───────────────────────────────── */
.sb-team-filter-wrap {
  padding: 6px 12px 2px;
}
.sb-team-filter-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.sb-team-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sb-team-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sb-team-pill--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── Home nav (override for all screens) ────────────────────── */
.nav-card {
  padding: 18px 8px 14px;
}

.nav-icon  { font-size: 1.6rem; }
.nav-label { font-size: 0.78rem; }

/* ── Mi Progreso ────────────────────────────────────────────── */
.prog-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.prog-total-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.prog-total {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.prog-total-lbl {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 600;
}

.prog-breakdown {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.prog-mini-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.prog-mini-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.prog-mini-chip--good {
  border-color: rgba(34,197,94,0.24);
  background: rgba(34,197,94,0.08);
}
.prog-mini-chip--bad {
  border-color: rgba(248,113,113,0.2);
  background: rgba(248,113,113,0.06);
}
.prog-mini-chip--gold {
  border-color: rgba(245,197,24,0.24);
  background: rgba(245,197,24,0.08);
}
.prog-mini-chip--pickgood {
  border-color: rgba(245,158,11,0.28);
  background: rgba(245,158,11,0.12);
}
.prog-mini-k {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.prog-mini-v {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.prog-mini-chip--good .prog-mini-v { color: var(--green); }
.prog-mini-chip--bad .prog-mini-v { color: var(--red); }
.prog-mini-chip--gold .prog-mini-v { color: var(--gold); }
.prog-mini-chip--pickgood .prog-mini-v { color: #fbbf24; }

.prog-stat      { color: var(--text); }
.prog-stat-sep  { color: var(--text-dim); }

.prog-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  margin: 12px 0 4px;
  overflow: hidden;
}

.prog-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.prog-bar-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.prog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 80px;
}

.prog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px 8px;
  border-left: 3px solid var(--border);
}

.prog-card.prog-exact  { border-left-color: #4ade80; }
.prog-card.prog-good   { border-left-color: #fbbf24; }
.prog-card.prog-miss   { border-left-color: #f87171; }

.prog-teams {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}

.prog-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.prog-team-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prog-score-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
  min-width: 18px;
  text-align: right;
}

.prog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.prog-pred-text {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.prog-pred-text strong {
  color: var(--text);
}

.prog-stage-tag {
  font-size: 0.65rem;
  background: var(--border);
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: 99px;
}

/* ── Especiales ─────────────────────────────────────────────── */
.sp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.sp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
}

.sp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sp-emoji { font-size: 1.5rem; }

.sp-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sp-card-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.sp-pts-tag {
  font-size: 0.7rem;
  color: var(--gold-dim);
}

.sp-selector-btn {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  text-align: left;
}

.sp-selector-btn:not([disabled]):hover { border-color: var(--gold-dim); }
.sp-selector-btn[disabled] { opacity: 0.6; cursor: default; }

.sp-placeholder { color: var(--text-dim); font-style: italic; }
.sp-flag        { font-size: 1.3rem; line-height: 1; }
.sp-teamcode    { font-size: 0.75rem; color: var(--text-dim); font-weight: 700; }
.sp-teamname    { font-weight: 600; }
.sp-arrow       { margin-left: auto; color: var(--text-dim); font-size: 1.2rem; }

.sp-locked-msg {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 8px 0 16px;
}

/* Estado de espera — equipos no clasificados aún */
.sp-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  gap: 12px;
  text-align: center;
}
.sp-pending-icon { font-size: 3rem; }
.sp-pending-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.sp-pending-msg {
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 300px;
  line-height: 1.5;
  margin: 0;
}

/* Overlay — oculto por defecto, visible con clase .open */
.sp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.sp-overlay.open {
  display: flex;
}

.sp-overlay-content {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
}

.sp-overlay-header {
  display: flex;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.sp-overlay-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
}

.sp-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.sp-search {
  margin: 12px 16px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  flex-shrink: 0;
}

.sp-search:focus { border-color: var(--gold-dim); }

/* Lista de equipos (dropdown estilo lista) */
.sp-teams-list {
  overflow-y: auto;
  padding: 4px 0 0;
  flex: 1;
}

.sp-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.sp-team-row:last-child { border-bottom: none; }

.sp-team-row:active,
.sp-team-row.selected {
  background: #1c1900;
}

.sp-tr-flag { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.sp-tr-code { font-size: 0.75rem; color: var(--text-dim); font-weight: 700; min-width: 36px; }
.sp-tr-name { font-size: 0.92rem; font-weight: 500; flex: 1; }
.sp-team-row.selected .sp-tr-name { color: var(--gold); }
.sp-tr-check { color: var(--gold); font-size: 1rem; margin-left: auto; }

.sp-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ── Knockout / Eliminatorias ───────────────────────────────── */
/* Pills en grid 3×2 con nombres completos, igual de grandes que grupo pills */
.ko-stage-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ko-stage-pill {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 6px;
}

.ko-stage-pill.active,
.ko-stage-pill:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

#prog-pills.group-pills,
#prog-stage-pills.group-pills {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  justify-content: stretch;
}

.ko-tbd-note {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 2px 0 4px;
}

.match-card.tbd { opacity: 0.75; }

/* ── Home Guide (instrucciones) ─────────────────────────────── */
.home-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.home-guide-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.home-guide-title::-webkit-details-marker { display: none; }
.home-guide-title::after {
  content: '›';
  margin-left: auto;
  font-size: 1rem;
  color: var(--text-dim);
  transform: rotate(90deg);
  transition: transform 0.2s;
}
details.home-guide[open] .home-guide-title::after {
  transform: rotate(270deg);
}
details.home-guide[open] .home-guide-title {
  margin-bottom: 10px;
}

.home-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hg-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.home-guide-step.urgent .hg-num {
  background: var(--gold);
  color: #000;
}

.hg-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hg-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hg-urgent-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--gold);
  color: #000;
  padding: 1px 6px;
  border-radius: 99px;
}

.hg-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   PERFIL
══════════════════════════════════════════════════════════════ */
.profile-body {
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-summary-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.profile-summary-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-summary-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.profile-summary-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-field + .profile-field {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.profile-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.profile-info-section {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.profile-setup-banner {
  border: 1px solid rgba(255,215,0,.28);
  background: rgba(255,215,0,.08);
}

.profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.profile-label--gold {
  color: var(--gold);
}
.profile-banner-copy {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.profile-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.profile-input:focus { border-color: #3b82f6; outline: none; }

.profile-pin-row {
  display: flex;
  gap: 8px;
}
.profile-share-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
.profile-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.profile-btn {
  background: rgba(245,197,24,.14);
  color: var(--gold);
  border: 1px solid rgba(245,197,24,.35);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-btn:hover { background: rgba(245,197,24,.22); }
.profile-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.profile-btn--secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  border-color: rgba(255,255,255,0.12);
}
.profile-btn--secondary:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.profile-btn-logout {
  background: rgba(245,198,24,.14);
  color: #fcd34d;
  border: 1px solid rgba(245,198,24,.35);
  width: 100%;
}
.profile-btn-logout:hover { background: rgba(245,198,24,.22); }
.profile-btn-danger {
  background: transparent;
  color: var(--red, #ef4444);
  border: 1px solid var(--red, #ef4444);
  width: 100%;
}
.profile-btn-danger:hover { background: rgba(239,68,68,.1); }
.profile-whatsapp-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin-top: 0;
  align-self: stretch;
  align-items: center;
  justify-content: center;
}

.profile-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
}

.profile-uid {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════════════════════
   BRACKET — pills de navegación + columnas árbol visual
══════════════════════════════════════════════════════════════ */

/* ── Pills de segmento (2×2) ── */
.br-pills-wrap {
  padding: 4px 0 12px;
}

.br-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.br-pill {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}

.br-pill.active             { background: var(--gold); color: #000; border-color: var(--gold); }
.br-pill:not(.active):hover { border-color: var(--gold-dim); }

/* ── Stage wrapper ── */
#br-stage { padding-bottom: 80px; }

/* ── Columnas del bracket (estructura original, 2 a la vez) ──
   flex: 1 en cada .bracket-round hace que las 2 columnas llenen
   el ancho disponible sin scroll horizontal.
   justify-content: space-around crea la alineación visual del árbol.
────────────────────────────────────────────────────────────── */
.bracket-scroll {
  display: flex;
  gap: 0;
  padding: 4px 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 110px;
}
.bracket-round + .bracket-round {
  border-left: 1px solid var(--border);
}

.bracket-round-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0 10px 10px;
  white-space: nowrap;
  text-align: center;
}

.bracket-round-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around; /* alineación visual del árbol */
  flex: 1;
  gap: 6px;
  padding: 0 6px;
}

/* ── Bloque de 3er lugar (debajo de Semis→Final) ── */
.br-third-block {
  margin: 0 0 16px;
  padding: 16px 16px 4px;
  border-top: 1px solid var(--border);
}
.br-third-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-align: center;
}
.br-third-matches {
  display: flex;
  justify-content: center;
}
.br-third-matches .br-match {
  width: 100%;
  max-width: 280px;
}

/* ── Match card ── */
.br-match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.8rem;
}
.br-match.br-finished { border-color: #374151; }

.br-match-meta {
  padding: 6px 8px 5px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.br-team {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}
.br-team:last-child { border-bottom: none; }

.br-team.br-winner { background: rgba(20,83,45,0.18); }
.br-team.br-loser  { opacity: 0.4; }

.br-flag { font-size: 0.88rem; flex-shrink: 0; }
.br-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.br-seed {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.28);
  border-radius: 999px;
  padding: 2px 6px;
}
.br-score {
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  margin-left: 4px;
}

.bracket-tbd-round {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 20px 8px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   POSICIONES — Tabla de grupos
   ═══════════════════════════════════════════════════════════════ */
.st-body {
  padding: 4px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;  /* más espacio entre grupos para respirar */
}

.st-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0 0 4px;
  margin: 0;
}

.st-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 16px;
  font-size: 0.9rem;
}

/* ── Tarjeta de grupo — diseño ligero ── */
.st-group-card {
  /* Sin fondo pesado — solo separador entre grupos consecutivos */
}
/* Línea divisoria solo entre grupos, no antes del primero */
.st-group-card + .st-group-card {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.st-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
}

.st-group-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);            /* blanco, no dorado — el oro se reserva para lo más importante */
  letter-spacing: -0.01em;
}

/* Letra del grupo en dorado como acento puntual */
.st-group-title em {
  font-style: normal;
  color: var(--gold);
}

.st-group-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.st-group-done    { background: rgba(34,197,94,.12);  color: #4ade80; }
.st-group-live    { background: rgba(245,197,24,.10); color: var(--gold); }
.st-group-pending { color: var(--text-dim); }  /* sin fondo — es el estado neutro */

/* ── Header de columnas ── */
.st-table-hdr {
  display: grid;
  grid-template-columns: 22px 26px 1fr 28px 34px 34px 28px 28px;
  align-items: center;
  padding: 3px 4px 6px;
  border-bottom: 1px solid var(--border);
}

.st-hdr {
  font-size: 0.62rem !important;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ── Fila de equipo ── */
.st-row {
  display: grid;
  grid-template-columns: 22px 26px 1fr 28px 34px 34px 28px 28px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid #1b2b1b;  /* línea más sutil que --border */
  gap: 0;
}
.st-row:last-child { border-bottom: none; }

/* Indicador de posición */
.st-pos-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-dim);  /* por defecto: sin color de clasificación */
}
/* Colores solo cuando hay partidos jugados (aplicados desde JS) */
.st-qual  { background: rgba(34,197,94,.22);  color: #4ade80; }
.st-third { background: rgba(251,191,36,.18); color: #fbbf24; }
.st-out   { background: rgba(107,114,128,.15); color: #6b7280; }

.st-team-flag { font-size: 1.1rem; line-height: 1; }

.st-team-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

/* Números de stats */
.st-num {
  font-size: 0.78rem;
  text-align: center;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.st-pts {
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem !important;
}
.st-gd { color: var(--text); }

/* Palomita de equipo confirmado en r32 */
.st-confirmed-check {
  font-size: 0.65rem;
  color: #4ade80;
  font-weight: 700;
  margin-left: 4px;
  opacity: 0.85;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   PROGRESS / MIS RESULTADOS
   ═══════════════════════════════════════════════════════════════ */

/* Especiales card */
.prog-extra-card,
.prog-sp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.prog-extra-card {
  border-color: rgba(245,197,24,.22);
}
.prog-sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}
.prog-sp-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.prog-sp-pts {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.prog-sp-pts.pts-good  { color: var(--green); }
.prog-sp-pts.pts-miss  { color: var(--red); }
.prog-sp-pts.pts-exact { color: var(--gold); }

.prog-sp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.prog-sp-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prog-sp-cat  { font-weight: 600; }
.prog-sp-val  { color: var(--text-dim); font-size: 0.72rem; }
.prog-sp-teams {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.prog-extra-card .prog-sp-teams {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.prog-sp-pred    { color: var(--text-dim); }
.prog-sp-arrow   { color: var(--text-dim); margin: 0 2px; }
.prog-sp-actual  { color: var(--text); }
.prog-sp-match   { color: var(--gold); font-weight: 700; }
.prog-sp-pending { color: var(--text-dim); font-style: italic; }
.prog-sp-row-pts { font-weight: 700; flex-shrink: 0; font-size: 0.8rem; }
.prog-answer-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
}
.prog-answer-line--correct { color: var(--text); }
.prog-answer-line--mine { color: var(--text); }
.prog-answer-k {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prog-answer-v--pos { color: var(--green); font-weight: 800; }
.prog-answer-v--neg { color: var(--red); font-weight: 800; }
.prog-answer-v--neutral { color: var(--text-dim); font-weight: 700; }

.prog-sp-hit  { background: rgba(34,197,94,0.06); }
.prog-sp-miss { opacity: 0.7; }
.prog-extra-card .prog-sp-hit {
  background: transparent;
}
.prog-extra-card .prog-sp-miss {
  opacity: 1;
}
.prog-extra-card .prog-sp-pts {
  background: none !important;
  color: var(--gold) !important;
  padding: 0;
  border-radius: 0;
}
.prog-extra-card .prog-sp-row-pts {
  background: none;
  color: var(--gold);
  padding: 0;
  border-radius: 0;
}



/* ── Pantalla de gate (pago / fecha apertura) ───────────────────────────── */
.gate-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 32px;
  gap: 14px;
}
.gate-icon  { font-size: 3.5rem; }
.gate-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.gate-msg   { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }

/* ── Calendario de partidos ──────────────────────────────────────────────── */
/* ── Tabs Ayer / Hoy / Próximos ──────────────────────────────────────────── */
.cal-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.cal-tab {
  padding: 11px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s, font-weight .15s;
  position: relative;
}
.cal-tab--active {
  color: var(--gold);
  font-weight: 800;
}
.cal-tab--active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
}

/* ── Cuerpo ──────────────────────────────────────────────────────────────── */
.cal-body {
  padding: 4px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Bloque de día (Próximos) */
.cal-day-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.cal-date-hdr {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--gold);
  padding: 4px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

/* Tarjeta */
.cal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-card--done { opacity: 0.7; }

.cal-card-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cal-team--away  { justify-content: flex-end; }
.cal-team--winner .cal-name { color: var(--text); font-weight: 700; }

.cal-flag { font-size: 1.3rem; flex-shrink: 0; }
.cal-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-center {
  flex-shrink: 0;
  text-align: center;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.cal-time     { font-size: 1rem; font-weight: 700; color: var(--text); }
.cal-score    { display: flex; align-items: baseline; gap: 4px; }
.cal-score span { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.cal-score-sep  { color: var(--muted) !important; font-weight: 400 !important; font-size: 1rem !important; }
.cal-score-win  { color: var(--text) !important; }
.cal-score-lose { color: var(--muted) !important; font-weight: 500 !important; }
.cal-fin-tag {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cal-stage-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bg);
  background: var(--text-dim);
  border-radius: 4px;
  padding: 1px 5px;
}
.cal-stadium {
  font-size: 0.66rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 1px;
}

/* ── Help screen ─────────────────────────────────────────────────────────── */
.help-body {
  padding: 16px 16px 40px;
  max-width: 520px; margin: 0 auto;
}
.help-section {
  margin-bottom: 24px;
}
.help-section-title {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold); margin-bottom: 10px;
}
.help-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.help-step:last-child { border-bottom: none; }
.help-step-num {
  font-size: 1.3rem; line-height: 1; flex-shrink: 0; width: 28px; text-align: center;
}
.help-step-info { flex: 1; }
.help-step-label {
  display: block; font-size: 0.95rem; font-weight: 700; color: var(--text);
  margin-bottom: 3px;
}
.help-step-desc {
  display: block; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5;
}
.help-pts-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 8px;
}
.help-pts-table td {
  padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.help-pts-table td:last-child { text-align: right; color: var(--gold); font-weight: 700; }
.help-contact-section { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 8px; }
.help-admin-emails { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.help-admin-email-link {
  color: var(--accent); font-size: 0.88rem; font-weight: 600;
  text-decoration: none; word-break: break-all;
}
.help-admin-email-link:hover { text-decoration: underline; }
.help-tiebreak-list {
  margin: 6px 0 0 16px; padding: 0; font-size: 0.82rem; color: var(--text-dim);
  line-height: 1.7;
}

/* ── Calendar: botón ciudad ───────────────────────────────────────────────── */
.cal-city-btn {
  font-size: 0.78rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Calendar: city picker desplegable ───────────────────────────────────── */
.cal-city-picker {
  margin: 6px 0 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeIn 0.12s ease;
}
.cal-city-picker-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  max-height: 140px;
  overflow-y: auto;
}
.cal-city-option {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  transition: background 0.12s, color 0.12s;
  touch-action: manipulation;
}
.cal-city-option.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cal-city-option:not(.active):hover { background: var(--surface); color: var(--text); }

/* ── Calendar: filter row (pills + ⭐) ───────────────────────────────────── */
.cal-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cal-top-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cal-top-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-top-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}
.cal-top-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
}
.cal-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cal-secondary-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cal-top-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}
.cal-top-chip.active {
  background: rgba(245,197,24,0.18);
  border-color: rgba(245,197,24,0.34);
  color: var(--gold);
}
.cal-top-chip--soft {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-dim);
}
.cal-secondary-toggle {
  margin-top: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.cal-secondary-toggle.active {
  border-color: rgba(245,197,24,0.25);
  color: var(--gold);
}
.cal-secondary-filters {
  margin-top: 8px;
}

/* ── Calendar: month nav + grid ─────────────────────────────────────────── */
.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 12px 8px;
}

.cal-month-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.cal-month-label {
  flex: 1;
  text-align: center;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  text-transform: capitalize;
}

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 8px;
}

.cal-dow {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 14px;
}

.cal-cell,
.cal-cell--empty {
  min-height: 46px;
}

.cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}

.cal-cell--empty {
  border-radius: 10px;
  background: transparent;
}

.cal-cell-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}

.cal-cell-indicator {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(245,197,24,0.18);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.35;
}

.cal-cell--selected {
  border-color: rgba(245,197,24,0.42);
  box-shadow: inset 0 0 0 1px rgba(245,197,24,0.14);
}

.cal-cell--selected .cal-cell-num {
  color: var(--gold);
}

.cal-cell--today {
  border-color: rgba(74,222,128,0.38);
}

.cal-cell--today .cal-cell-num {
  color: #86efac;
}

.cal-cell--past {
  opacity: 0.82;
}

.cal-cell--nomatch {
  background: rgba(255,255,255,0.02);
}

.cal-day-detail {
  padding: 0 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cal-detail-header {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
  text-transform: lowercase;
  padding: 2px 2px 0;
}

/* ── Calendar: favorite highlight en tarjetas ────────────────────────────── */
.cal-card--fav {
  border-left: 3px solid var(--gold) !important;
}
.cal-state-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
.cal-state-tag--done {
  color: var(--text-dim);
  background: rgba(255,255,255,0.08);
}
.cal-state-tag--closed {
  color: var(--red);
  background: rgba(248,113,113,0.12);
}
.cal-fav-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 8px 12px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245,197,24,0.12);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
}
.cal-cell--busy {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
}
.cal-cell--busy .cal-cell-num {
  color: rgba(255,255,255,0.78);
  font-weight: 800;
}
.cal-cell--busy .cal-cell-indicator--fav {
  filter: drop-shadow(0 0 3px rgba(74,222,128,0.45));
}
.cal-team--fav .cal-name {
  color: var(--gold) !important;
  font-weight: 700;
}

/* ── Calendar: list view container (legacy, no usado) ────────────────────── */
#cal-list-view {
  padding: 0 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Calendar: list view sections ────────────────────────────────────────── */
.cal-list-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 12px 16px 4px;
}
.cal-list-day-header {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: capitalize;
  padding: 8px 16px 3px;
  letter-spacing: 0.04em;
}

/* ── Profile: favorite team grid ─────────────────────────────────────────── */
.fav-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
  transition: max-height 0.2s ease;
}
.fav-team-btn {
  background: var(--surface2);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 6px;
  transition: border-color 0.15s, background 0.15s;
}
.fav-team-btn:hover  { border-color: var(--border); background: var(--surface); }
.fav-team-btn--selected {
  border-color: var(--gold);
  background: rgba(255,200,0,0.08);
  color: var(--text);
}
.fav-team-btn--hidden { display: none; }
.fav-team-change-btn {
  margin-top: 8px;
  font-size: 0.82rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-dim);
}
.fav-team-flag { font-size: 1.5rem; line-height: 1; }
.fav-team-name {
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  color: inherit;
}

/* ── Mini-retos (challenges) ─────────────────────────────────────────────── */
.ch-body {
  padding: 8px 0 40px;
  overflow-y: auto;
  height: calc(100vh - 56px);
}
.ch-summary {
  background: rgba(255,200,0,0.10);
  border: 1px solid rgba(255,200,0,0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
}
.ch-list { display: flex; flex-direction: column; gap: 12px; }
.ch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.ch-card--scoring {
  border-color: rgba(245,197,24,.28);
  box-shadow: inset 0 0 0 1px rgba(245,197,24,.06);
}
.ch-card--social {
  border-color: rgba(59,130,246,.24);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.06);
}
.ch-filter-pills {
  margin-bottom: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ch-filter-pills .ko-stage-pill {
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 14px;
  min-width: 0;
  width: 100%;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.ch-filter-pill-label,
.ch-filter-pill-count {
  display: block;
  width: 100%;
}
.ch-filter-pill-label {
  line-height: 1.1;
}
.ch-filter-pill-count {
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.9;
}
.ch-card--win      { border-color: rgba(0,200,80,0.35);  background: rgba(0,200,80,0.05);  }
.ch-card--lose     { border-color: rgba(220,50,50,0.3);  background: rgba(220,50,50,0.04); }
.ch-card--skip     { border-color: var(--border); opacity: 0.7; }
.ch-card--inactive { opacity: 0.45; filter: grayscale(0.5); pointer-events: none; }
.ch-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 99px;
}
.ch-admin-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 2px;
}
.ch-result--inactive { background: var(--surface2); color: var(--text-dim); font-weight: 500; }
.ch-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ch-pts-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
}
.ch-filter-pills .ko-stage-pill[data-filter="social"].active {
  background: rgba(59,130,246,.16);
  border-color: rgba(59,130,246,.3);
  color: #fff;
}
.ch-filter-pills .ko-stage-pill[data-filter="extra"].active {
  background: rgba(245,197,24,.16);
  border-color: rgba(245,197,24,.3);
  color: #fff;
}

@media (max-width: 640px) {
  .prog-summary-card {
    padding: 16px 12px 14px;
    margin-bottom: 12px;
  }

  .prog-total {
    font-size: 3rem;
  }

  .prog-mini-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .prog-mini-chip {
    padding: 8px 6px;
    border-radius: 10px;
  }

  .prog-mini-k {
    font-size: 0.58rem;
    letter-spacing: 0.03em;
  }

  .prog-mini-v {
    font-size: 0.92rem;
  }

  .prog-breakdown {
    gap: 4px;
    margin-top: 7px;
    font-size: 0.75rem;
  }

  .prog-bar-wrap {
    margin: 10px 0 4px;
  }

  #prog-pills.group-pills,
  #prog-stage-pills.group-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #prog-stage-pills .ko-stage-pill,
  #prog-pills .ko-stage-pill {
    min-height: 38px;
    white-space: nowrap;
    line-height: 1;
    padding: 8px 6px;
    font-size: 0.7rem;
  }

  .ko-stage-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ko-stage-pills .ko-stage-pill {
    white-space: normal;
    line-height: 1.15;
    padding: 10px 8px;
  }
}
.ch-deadline {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.ch-deadline--expired { color: var(--red); }
.ch-question {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 12px;
}
.ch-answer-row {
  display: flex;
  gap: 10px;
}
.ch-btn-yes, .ch-btn-no {
  flex: 1;
  min-width: 0;
  min-height: 74px;
  padding: 12px 10px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.ch-btn-yes,
.ch-btn-no {
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.ch-bin-label--pos,
.ch-bin-label--neg {
  color: #fff;
  font-weight: 800;
}
.ch-btn-yes:active, .ch-btn-no:active { opacity: 0.7; }
.ch-btn-yes:disabled, .ch-btn-no:disabled,
.ch-btn-change:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ch-answered-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
}
.ch-my-answer { color: var(--text-dim); }
.ch-state-label { font-size: 0.75rem; color: var(--text-dim); }
.ch-btn-change {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  cursor: pointer;
}
.ch-result {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 2px;
}
.ch-result--win  { background: rgba(0,200,80,0.12);  color: var(--green); font-weight: 700; }
.ch-result--lose { background: rgba(220,50,50,0.08); color: var(--text); padding: 0; overflow: hidden; }
.ch-result--skip { background: var(--surface2); color: var(--text); padding: 0; overflow: hidden; }
.ch-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ch-result-head--lose { color: var(--red); background: rgba(220,50,50,0.1); }
.ch-result-head--skip { color: var(--gold); background: rgba(245,197,24,0.08); }
/* Filas dentro del bloque de resultado (wrong / skip) */
.ch-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 0.84rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ch-result-row:last-child { border-bottom: none; }
.ch-result-lbl {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
/* Primera fila (respuesta correcta) resalta en verde/rojo según el caso */
.ch-result--lose .ch-result-row:first-child { background: rgba(0,200,80,0.08); }
.ch-result--skip .ch-result-row:first-child { background: rgba(0,200,80,0.06); }
/* Segunda fila (tu respuesta) más apagada */
.ch-result-row--mine { opacity: 0.7; }
.ch-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}
.ch-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.ch-dim { font-size: 0.82rem; margin-top: 6px; }
.ch-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.ch-intro strong { color: var(--text); }
