/* Esportes (pré-jogo): aba Esportes, tela do jogo e "Jogos principais" da home.
   Cores do tema do app. Fileiras laterais sem scroll-snap e sem touch-action: quem arrasta
   é o initArrasteLateral do app.js. */
#page-esportes { padding-bottom: 12px; }
#page-esportes [hidden], #home-row-esportes[hidden] { display: none !important; }

/* Filtros do topo */
.sb-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 12px 10px;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.sb-chips::-webkit-scrollbar, .sb-ligas::-webkit-scrollbar, .sb-abas::-webkit-scrollbar,
.sb-banners::-webkit-scrollbar, .sb-home-track::-webkit-scrollbar { display: none; }
.sb-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--bg-card);
  color: var(--text-primary); font-size: 13px; font-weight: 700; cursor: pointer;
}
.sb-chip em { font-style: normal; font-weight: 600; color: var(--text-secondary); }
.sb-chip.ativo { background: var(--accent-gold); border-color: var(--accent-gold); color: #000; }
.sb-chip.ativo em { color: rgba(0, 0, 0, .6); }

/* Banners */
.sb-banners { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
.sb-banner { flex: none; width: 86%; aspect-ratio: 43 / 20; padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); cursor: pointer; }
.sb-banner:only-child { width: 100%; }
.sb-banner img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* Ligas populares */
.sb-sub { margin: 4px 12px 10px; font-size: 15px; font-weight: 800; color: var(--text-primary); }
.sb-ligas {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: max-content;
  gap: 8px; overflow-x: auto; padding: 0 12px 6px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.sb-liga {
  display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 240px; height: 52px; padding: 0 12px 0 8px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card);
  color: var(--text-primary); font-size: 13px; font-weight: 700; cursor: pointer; text-align: left;
}
.sb-liga-img { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.sb-liga-img img { width: 24px; height: 24px; object-fit: contain; display: block; }
.sb-liga-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Lista de jogos */
.sb-lista-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 12px 10px; }
.sb-lista-head h2 { margin: 0; font-size: 19px; font-weight: 800; font-style: italic; text-transform: uppercase; color: var(--text-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sb-limpa { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); font-size: 12px; font-weight: 700; cursor: pointer; }
#sb-lista { padding: 0 12px; }
.sb-card {
  position: relative; margin-bottom: 12px; padding: 14px 12px 12px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); background: var(--bg-card); cursor: pointer;
}
.sb-tag {
  position: absolute; top: -1px; left: -1px; padding: 2px 10px; border-radius: var(--radius-md) 0 var(--radius-sm) 0;
  background: var(--accent-gold); color: #000; font-size: 10px; font-weight: 800; font-style: italic; text-transform: uppercase;
}
.sb-card-topo { display: flex; align-items: flex-start; gap: 10px; }
.sb-card-hora { flex: none; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.sb-card-hora b { font-size: 15px; color: var(--text-primary); }
.sb-card-hora span { font-size: 11px; line-height: 1.3; color: var(--text-secondary); }
.sb-card-info { flex: 1; min-width: 0; }
.sb-time { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.sb-time span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-esc, .sb-esc-ini { flex: none; width: 22px; height: 22px; }
.sb-esc { object-fit: contain; display: block; }
.sb-esc-ini {
  display: inline-grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12);
  color: var(--text-primary); font-size: 9px; font-weight: 800; font-style: normal;
}
.sb-esc-g.sb-esc, .sb-esc-g.sb-esc-ini { width: 54px; height: 54px; font-size: 18px; }
.sb-card-liga { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 4px; font-size: 12px; color: var(--text-secondary); }
.sb-card-liga span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bandeira { flex: none; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; display: block; }
.sb-card-mais { flex: none; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.sb-odds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.sb-odd {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; min-height: 42px; padding: 6px 10px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04);
  color: var(--text-primary); font-size: 13px; cursor: pointer; text-align: left;
}
.sb-odd span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-odd b { flex: none; color: var(--sb-odd, var(--accent-gold)); font-size: 14px; font-weight: 800; }
.sb-odd.marcada { background: var(--accent-gold); border-color: var(--accent-gold); color: #000; }
.sb-odd.marcada b { color: #000; }
#sb-mais { display: block; width: calc(100% - 24px); height: 44px; margin: 0 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 13px; font-weight: 700; cursor: pointer; }
.sb-vazio { padding: 34px 12px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Lista de campeonatos */
.sb-pais { margin: 14px 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--text-secondary); }
.sb-camp {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; margin-bottom: 6px; padding: 6px 12px 6px 8px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--text-primary); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.sb-camp-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-camp em { flex: none; font-style: normal; color: var(--text-secondary); font-weight: 700; }

/* Tela do jogo */
.sb-jogo-topo { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.sb-jogo-topo .sb-card-liga { margin: 0; font-size: 13px; }
.sb-voltar { flex: none; width: 32px; height: 32px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 20px; line-height: 1; cursor: pointer; }
.sb-placa { margin: 0 12px 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
.sb-placa-data { padding: 10px 12px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border-subtle); }
.sb-placa-times { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 14px 10px; }
.sb-placa-time { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.sb-placa-time b { max-width: 100%; font-size: 14px; color: var(--text-primary); overflow-wrap: anywhere; }
.sb-placa-time span { font-size: 12px; color: var(--text-secondary); }
.sb-placa-x { font-weight: 800; color: var(--text-secondary); }
.sb-abas {
  position: sticky; top: var(--header-height); z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  background: var(--bg-shell); border-bottom: 1px solid var(--border-subtle); scrollbar-width: none; overscroll-behavior-x: contain;
}
.sb-aba { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 700; cursor: pointer; }
.sb-aba.ativo { background: var(--bg-card-hover); color: var(--text-primary); }
#sb-mercados { padding: 10px 12px 0; }
.sb-merc { margin-bottom: 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
.sb-merc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border: 0; background: none; color: var(--text-primary); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.sb-merc-head i { flex: none; width: 8px; height: 8px; margin-right: 3px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(45deg); transition: transform .15s; }
.sb-merc.aberto .sb-merc-head i { transform: rotate(-135deg); }
.sb-merc-opts { display: none; gap: 8px; padding: 0 12px 12px; }
.sb-merc.aberto .sb-merc-opts { display: grid; }
.sb-merc-opts.col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sb-merc-opts.col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sb-merc-opts .sb-odd { align-items: center; }
.sb-merc-opts .sb-odd { padding: 6px 8px; }
.sb-merc-opts .sb-odd span { white-space: normal; overflow-wrap: break-word; line-height: 1.2; font-size: 12px; }

/* Jogos principais na home */
.sb-home-track { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.sb-home-track .sb-card { flex: none; width: 300px; max-width: 86%; margin-bottom: 0; }
.home-row-title svg.sb-ic-bola { color: var(--accent-gold); }

/* Barra de baixo */
.nav-esportes .nav-esp-ic { width: 28px; height: 28px; color: #777; }
.nav-esportes.active .nav-esp-ic, .nav-esportes:active .nav-esp-ic { color: var(--accent-gold); }
.nav-esportes.active .nav-tab-label { color: var(--accent-gold); }

/* Cupom */
.sb-fb-faixa { margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--accent-gold); border-radius: var(--radius-sm); background: rgba(255, 208, 0, .08); color: var(--accent-gold); font-size: 13px; font-weight: 700; }
#sb-cupom-btn {
  position: fixed; left: 50%; bottom: calc(var(--nav-height) + 8px); z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: calc(min(100%, var(--shell-width)) - 24px); height: 46px; padding: 0 14px;
  border: 0; border-radius: var(--radius-sm); background: var(--accent-gold); color: #000; font-size: 14px; font-weight: 800; cursor: pointer;
}
#sb-cupom-btn[hidden], #sb-cupom[hidden] { display: none !important; }
#sb-cupom-qtd { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #000; color: var(--accent-gold); font-size: 13px; }
#sb-cupom-resumo { margin-left: auto; }
#sb-cupom { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .65); }
.sb-cup-caixa { display: flex; flex-direction: column; width: 100%; max-width: var(--shell-width); max-height: 88dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--bg-surface); }
.sb-cup-topo { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); }
.sb-cup-topo b { flex: 1; font-size: 15px; }
.sb-cup-topo button { border: 0; background: none; color: var(--text-secondary); font-size: 13px; font-weight: 700; cursor: pointer; }
#sb-cupom-fecha { font-size: 24px; line-height: 1; }
#sb-cupom-itens { flex: 1; min-height: 60px; overflow-y: auto; padding: 4px 14px; overscroll-behavior: contain; }
.sb-cup-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.sb-cup-item.mudou .sb-cup-odd { color: var(--accent-orange); }
.sb-cup-tira { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--text-secondary); font-size: 16px; line-height: 1; cursor: pointer; }
.sb-cup-odd { flex: none; color: var(--accent-gold); font-size: 15px; }
.sb-bil-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-bil-nome b { color: var(--text-primary); font-size: 14px; }
.sb-bil-nome span { color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.sb-cup-base { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-subtle); }
.sb-cup-campo { display: block; margin-bottom: 10px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.sb-cup-campo input, .sb-cup-campo select {
  display: block; width: 100%; height: 44px; margin-top: 4px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); font-size: 16px; font-weight: 700;
}
.sb-cup-somas { display: flex; gap: 6px; margin-top: 6px; }
.sb-cup-somas button { flex: 1; height: 32px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 12px; font-weight: 700; cursor: pointer; }
.sb-cup-linha { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-secondary); font-size: 13px; }
.sb-cup-linha b { color: var(--text-primary); font-size: 15px; }
#sb-cupom-aviso { margin: 6px 0 8px; color: var(--accent-orange); font-size: 13px; font-weight: 700; }
#sb-cupom-aviso[hidden], #sb-cupom-fb-box[hidden], #sb-cupom-valor-box[hidden], #sb-fb-faixa[hidden] { display: none; }
#sb-cupom-enviar { width: 100%; height: 48px; margin-top: 4px; border: 0; border-radius: var(--radius-sm); background: var(--accent-gold); color: #000; font-size: 15px; font-weight: 800; cursor: pointer; }
#sb-cupom-enviar:disabled { opacity: .6; }
#sb-cupom-compartilhar { width: 100%; height: 40px; margin-top: 8px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: none; color: var(--text-primary); font-size: 13px; font-weight: 700; cursor: pointer; }
#sb-cupom-compartilhar:disabled { opacity: .6; }
#sb-cupom-compartilhar[hidden], #sb-cupom-link[hidden] { display: none; }
#sb-cupom-link { margin-top: 8px; }
#sb-cupom-link-url { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 13px; }
body.sb-cupom-aberto { overflow: hidden; }

/* Minhas apostas */
.sb-grupos { display: flex; gap: 6px; margin-bottom: 12px; }
.sb-grupos button { flex: 1; height: 36px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); font-size: 13px; font-weight: 700; cursor: pointer; }
.sb-grupos button.ativo { background: var(--accent-gold); border-color: var(--accent-gold); color: #000; }
.sb-bilhete { margin-bottom: 12px; padding: 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card); }
.sb-bil-topo { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.sb-bil-sel { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.sb-bil-odd { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--accent-gold); font-size: 14px; }
.sb-bilhete em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--text-secondary); }
.sb-bilhete em.st-ganho, .sb-bilhete em.st-ganha, .sb-bilhete em.st-meia_ganha { color: var(--accent-green); }
.sb-bilhete em.st-perdido, .sb-bilhete em.st-perdida, .sb-bilhete em.st-meia_perdida { color: var(--accent-red); }
.sb-bil-pe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.sb-bil-pe div { display: flex; flex-direction: column; gap: 2px; }
.sb-bil-pe span { color: var(--text-secondary); font-size: 11px; }
.sb-bil-pe b { color: var(--text-primary); font-size: 14px; }

/* Aba Esportes: estrutura do layout pedido, nas cores do tema do site */
body.sb-na-aba .bottom-nav-bar { display: none !important; }
.sb-lista-head h2 { flex: 1; font-size: 24px; font-weight: 900; font-style: italic; letter-spacing: -.3px; }
.sb-btn-prox { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 14px; cursor: pointer; }
.sb-esportes { display: flex; gap: 6px; padding: 0 12px 10px; }
.sb-esp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 88px; height: 74px; padding: 6px 12px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); font-size: 14px; cursor: pointer; }
.sb-esp.ativo { background: var(--bg-card); color: var(--text-primary); font-weight: 800; }
.sb-card { padding: 14px 16px 16px; }
.sb-card-hora b { font-size: 17px; }
.sb-card-hora span { font-size: 13px; }
.sb-time { min-height: 28px; font-size: 16px; font-weight: 500; }
.sb-card-liga { font-size: 13px; }
.sb-ic-liga { flex: none; width: 15px; height: 15px; color: var(--text-secondary); }
.sb-odd { min-height: 46px; padding: 6px 14px; }
.sb-odd b { font-size: 15px; }

/* Lupa e busca */
.sb-lupa { padding: 0 12px; }
.sb-busca { display: flex; gap: 8px; padding: 0 12px 10px; }
.sb-busca input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-size: 16px; }
.sb-busca button { flex: none; width: 42px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); font-size: 22px; cursor: pointer; }

/* Dicas */
.sb-stories { display: flex; gap: 10px; padding: 0 12px 12px; }
.sb-stories[hidden] { display: none; }
.sb-story { position: relative; display: flex; flex-direction: column; justify-content: flex-end; width: 104px; height: 124px; padding: 10px; border: 2px solid var(--accent-gold); border-radius: var(--radius-md); background: linear-gradient(160deg, var(--bg-card-hover), var(--bg-surface)); color: var(--text-primary); text-align: left; cursor: pointer; }
.sb-story i { position: absolute; top: 8px; left: 10px; font-style: italic; font-size: 26px; font-weight: 900; color: var(--accent-gold); }
.sb-story b { font-size: 13px; line-height: 1.2; }
.sb-dica { position: relative; margin-bottom: 12px; padding: 34px 14px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card); }
.sb-dica p { margin: 0 0 8px; color: var(--text-primary); font-size: 14px; line-height: 1.4; }
.sb-dica-tag { top: -1px; left: -1px; }
.sb-dica-sel { margin-bottom: 10px; color: var(--text-secondary); font-size: 13px; }
.sb-dica-sel b { color: var(--text-primary); }
.sb-dica-jogo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; cursor: pointer; color: var(--text-primary); font-size: 13px; }
.sb-dica-jogo span { width: 100%; color: var(--text-secondary); font-size: 12px; }
.sb-dica .sb-odd { width: 100%; }
.sb-sub-dicas { margin: 2px 0 10px; font-style: italic; text-transform: uppercase; }
.sb-dicas-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -12px 12px; padding: 0 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
.sb-dicas-row::-webkit-scrollbar { display: none; }
.sb-dicas-row .sb-dica { flex: none; width: 86%; margin-bottom: 0; }
.sb-dicas-row .sb-dica:only-child { width: 100%; }

/* Barra de baixo da aba */
.sb-nav {
  position: fixed; left: 50%; bottom: 0; z-index: 100; transform: translateX(-50%); display: flex; align-items: center; width: 100%; max-width: var(--shell-width);
  height: var(--nav-height); padding-bottom: env(safe-area-inset-bottom); background: #242424;
}
.sb-nav[hidden] { display: none; }
.sb-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: center; border: 0; background: none; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; }
.sb-nav button svg { width: 26px; height: 26px; }
.sb-nav button.ativo { color: var(--accent-gold); }
.sb-nav button.ativo svg { padding: 1px 12px; width: 50px; border-radius: 12px; background: rgba(255, 208, 0, .14); }
.sb-nav .sb-nav-apostas { font-size: 11px; white-space: nowrap; }
