/*
 * Páginas de conteúdo LBR no mesmo layout da página de Extrações (extracoes-lbr.css):
 * Modalidades, Histórico, Jogo Responsável, Termos e Livro dos Sonhos (assets/lbr/loterias/*.html),
 * Inversões (módulo tabela_inversao) e o modal do Palpite do Dia (módulo navigation).
 * As duas últimas só usam estas classes com BuildTag.LayoutPaginasLBR.
 *
 * Depende de extracoes-lbr.css: as páginas usam .rlbr (variáveis, largura, espaçamento),
 * .rlbr__header, .rlbr__group, .rlbr__count e .rlbr-regras__header. Carregar depois dele.
 */

.lbrp {
  --lbrp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lbrp-text: rgba(255, 255, 255, 0.86);
  --lbrp-danger: #ff6b6b;
  --lbrp-danger-soft: rgba(255, 107, 107, 0.14);
  --lbrp-danger-border: rgba(255, 107, 107, 0.42);
  --lbrp-success: var(--success, #00e240);
  --lbrp-success-soft: rgba(0, 230, 64, 0.12);
}

.lbrp p,
.lbrp ul,
.lbrp ol,
.lbrp dl,
.lbrp dd,
.lbrp h4 {
  margin: 0;
}

.lbrp h4 {
  font-family: inherit;
}

/* ---------- Entrada da página ---------- */
/* Os blocos sobem em sequência sempre que a página aparece (display: none -> visível reinicia). */

.lbrp > :not(.go-top) {
  animation: lbrp-rise 0.6s var(--lbrp-ease) both;
}

.lbrp > :nth-child(2) {
  animation-delay: 0.07s;
}

.lbrp > :nth-child(3) {
  animation-delay: 0.14s;
}

.lbrp > :nth-child(4) {
  animation-delay: 0.21s;
}

.lbrp > :nth-child(5) {
  animation-delay: 0.28s;
}

.lbrp > :nth-child(n + 6) {
  animation-delay: 0.35s;
}

/* Itens de grade com --i (índice no HTML) entram um depois do outro. */
.lbrp-stagger > * {
  animation: lbrp-rise 0.5s var(--lbrp-ease) both;
  animation-delay: calc(0.25s + var(--i, 0) * 0.045s);
}

/* ---------- Painéis (mesmo cartão dos grupos de extrações) ---------- */

.lbrp .rlbr__group {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lbrp .rlbr__group:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.lbrp-panel-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lbrp-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--lbrp-text);
  font-size: 15px;
  line-height: 1.65;
}

.lbrp-text strong,
.lbrp-text b {
  color: var(--accent-300, var(--rlbr-accent));
}

.lbrp-lead {
  color: var(--accent-100, #fff3c2);
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  line-height: 1.45;
}

.lbrp-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rlbr-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lbrp-label i {
  color: var(--rlbr-accent);
}

.lbrp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Cartão simples (Histórico, Jogo Responsável). */
.lbrp-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius);
  background: var(--rlbr-surface);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.lbrp-card:hover {
  border-color: var(--rlbr-accent-border);
  box-shadow: 0 18px 40px -30px var(--rlbr-accent-glow);
}

.lbrp-card__title {
  color: var(--accent-100, #fff3c2);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.lbrp-card__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 13px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 18px;
}

.lbrp-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Etiqueta pequena (faixa de prêmios, "Exclusiva"). */
.lbrp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 999px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.lbrp-tag--solid {
  border-color: transparent;
  background: var(--rlbr-accent);
  color: var(--accent-text, #151b1d);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Modalidades: cotações ---------- */

.lbrp-odds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lbrp-odd {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lbrp-odd:hover {
  border-color: var(--rlbr-accent-border);
  box-shadow: 0 12px 28px -18px var(--rlbr-accent-glow);
  transform: translateY(-2px);
}

.lbrp-odd__value {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.lbrp-odd__value small {
  margin-left: 4px;
  color: var(--rlbr-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.lbrp-odd__name {
  color: var(--accent-300, var(--rlbr-accent));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

.lbrp-odd--text .lbrp-odd__value {
  font-size: 18px;
}

.lbrp-odd--wide {
  grid-column: span 2;
  border-color: var(--rlbr-accent-border);
  background: linear-gradient(135deg, var(--rlbr-accent-soft), var(--rlbr-sunken) 70%);
}

.lbrp-odd__tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.lbrp-odd__tier {
  display: flex;
  flex-direction: column;
  color: var(--rlbr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lbrp-odd__tier b {
  color: var(--rlbr-text);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-transform: none;
}

.lbrp-odd__tier b small {
  margin-left: 3px;
  color: var(--rlbr-muted);
  font-size: 12px;
}

.lbrp .rlbr-regra__note {
  color: var(--lbrp-text);
}

.lbrp .rlbr-regra__note b,
.lbrp .rlbr-regra__note strong {
  color: var(--accent-300, var(--rlbr-accent));
}

.lbrp .rlbr-regra__note > i {
  margin-right: 4px;
  color: var(--rlbr-accent);
}

/* ---------- Modalidades: regras ---------- */

.lbrp-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lbrp-rule {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lbrp-rule:hover {
  border-color: var(--rlbr-accent-border);
  box-shadow: 0 14px 30px -22px var(--rlbr-accent-glow);
  transform: translateY(-2px);
}

.lbrp-rule--wide {
  grid-column: 1 / -1;
}

.lbrp-rule__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lbrp-rule__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.lbrp-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lbrp-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.lbrp-step__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--rlbr-surface-2);
  color: var(--rlbr-accent);
  font-size: 14px;
}

.lbrp-step--win .lbrp-step__icon {
  background: var(--lbrp-success-soft);
  color: var(--lbrp-success);
}

.lbrp-step__label {
  display: block;
  margin-bottom: 2px;
  color: var(--rlbr-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lbrp-step p {
  color: var(--lbrp-text);
  font-size: 14px;
  line-height: 1.6;
}

.lbrp-step p strong,
.lbrp-rule p strong {
  color: var(--accent-300, var(--rlbr-accent));
}

/* Terno cruzado: diagrama + tabela de linhas/colunas/diagonais. */
.lbrp-cross {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 16px;
  border: 1px dashed var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.lbrp-cross img {
  flex: 0 0 auto;
  width: 150px;
  max-width: 40%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.lbrp-cross table {
  flex: 1 1 240px;
  border: 1px solid var(--rlbr-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.lbrp-cross th,
.lbrp-cross td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.lbrp-cross tr:last-child td {
  border-bottom: 0;
}

.lbrp-cross th {
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lbrp-cross tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.03);
}

/* HakTri e destaque com brilho atravessando o cartão. */
.lbrp-feature {
  position: relative;
  overflow: hidden;
  border-color: var(--rlbr-accent-border) !important;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--rlbr-accent-soft), transparent 60%),
    var(--rlbr-surface);
  box-shadow: 0 18px 44px -26px var(--rlbr-accent-glow);
}

.lbrp-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.07) 50%, transparent 62%);
  transform: translateX(-110%);
  animation: lbrp-sheen 7s ease-in-out 1.2s infinite;
  pointer-events: none;
}

.lbrp-feature > * {
  position: relative;
  z-index: 1;
}

.lbrp-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lbrp-tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lbrp-tier:hover {
  border-color: var(--rlbr-accent-border);
  transform: translateY(-2px);
}

.lbrp-tier__emoji {
  font-size: 22px;
  line-height: 1;
}

.lbrp-tier__name {
  color: var(--accent-300, var(--rlbr-accent));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lbrp-tier__hits {
  color: var(--rlbr-muted);
  font-size: 13px;
}

.lbrp-tier__pay {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lbrp-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lbrp-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rlbr-border);
  border-radius: 10px;
  background: var(--rlbr-surface-2);
  font-size: 14px;
  line-height: 1.45;
}

.lbrp-checks li > span:first-child {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.3;
}

/* ---------- Histórico: linha do tempo ---------- */

.lbrp-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0 0 0 52px;
  list-style: none;
  counter-reset: lbrp-tl;
}

.lbrp-timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 17px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--rlbr-accent), var(--rlbr-accent-border) 60%, transparent);
  transform-origin: top;
  animation: lbrp-grow 1.2s var(--lbrp-ease) 0.3s both;
}

.lbrp-timeline__item {
  position: relative;
  counter-increment: lbrp-tl;
}

.lbrp-timeline__item::before {
  content: counter(lbrp-tl, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: -52px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--rlbr-accent);
  border-radius: 50%;
  background: var(--secondary, #000);
  color: var(--rlbr-accent);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 5px var(--rlbr-accent-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.lbrp-timeline__item:hover::before {
  background: var(--rlbr-accent);
  color: var(--accent-text, #151b1d);
}

/* ---------- Jogo Responsável ---------- */

.lbrp-tips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lbrp-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  color: var(--lbrp-text);
  font-size: 14px;
  line-height: 1.55;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lbrp-tip:hover {
  border-color: var(--rlbr-accent-border);
  transform: translateY(-2px);
}

.lbrp-tip__n {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 10px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lbrp-tips--alert .lbrp-tip:hover {
  border-color: var(--lbrp-danger-border);
}

.lbrp-tips--alert .lbrp-tip__n {
  border-color: var(--lbrp-danger-border);
  background: var(--lbrp-danger-soft);
  color: var(--lbrp-danger);
}

.lbrp-win {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 230, 64, 0.28);
  border-radius: var(--rlbr-radius-sm);
  background: var(--lbrp-success-soft);
  color: var(--lbrp-text);
  font-size: 14px;
  line-height: 1.55;
}

.lbrp-win > i {
  margin-top: 3px;
  color: var(--lbrp-success);
}

.lbrp-win strong {
  color: var(--lbrp-success);
}

.lbrp-myths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lbrp-myth {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lbrp-myth:hover {
  border-color: var(--rlbr-accent-border);
  transform: translateY(-2px);
}

.lbrp-myth p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--lbrp-text);
  font-size: 14px;
  line-height: 1.55;
}

.lbrp-myth__mito {
  color: var(--rlbr-text) !important;
  font-weight: 700;
}

.lbrp-myth__tag {
  flex: 0 0 auto;
  min-width: 46px;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.lbrp-myth__tag--mito {
  background: var(--lbrp-danger-soft);
  color: var(--lbrp-danger);
}

.lbrp-myth__tag--fato {
  background: var(--lbrp-success-soft);
  color: var(--lbrp-success);
}

.lbrp-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--lbrp-danger-border);
  border-radius: var(--rlbr-radius);
  background: linear-gradient(135deg, var(--lbrp-danger-soft), rgba(255, 107, 107, 0.03));
}

.lbrp-alert > i {
  flex: 0 0 auto;
  color: var(--lbrp-danger);
  font-size: 24px;
  animation: lbrp-blink 2.4s ease-in-out infinite;
}

.lbrp-alert p {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ---------- Termos de uso ---------- */

.lbrp-docs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lbrp-doc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius);
  background: var(--rlbr-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lbrp-doc:hover {
  border-color: var(--rlbr-accent-border);
  box-shadow: 0 18px 40px -32px var(--rlbr-accent-glow);
}

.lbrp-doc--sub {
  margin-left: 28px;
  border-left: 3px solid var(--rlbr-accent-border);
  background: var(--rlbr-sunken);
}

.lbrp-doc__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.lbrp-doc__num {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 11px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lbrp-doc .lbrp-text {
  font-size: 14px;
  line-height: 1.7;
}

.lbrp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 0 !important;
  list-style: none;
}

.lbrp-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rlbr-border);
  border-radius: 10px;
  background: var(--rlbr-surface-2);
  color: var(--rlbr-text);
  font-size: 14px;
}

.lbrp-list li::before {
  content: "\2713";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 11px;
  font-weight: 800;
}

.lbrp-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lbrp-limit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius-sm);
  background: var(--rlbr-sunken);
  color: var(--rlbr-muted);
  font-size: 13px;
  font-weight: 600;
}

.lbrp-limit b {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lbrp-limit strong {
  color: var(--rlbr-text);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Livro dos Sonhos ---------- */

/* Índice de letras. Não é sticky: o topo fixo do portal muda de altura (faixa amarela e mensagens). */
.lbrp-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius);
  background: var(--rlbr-surface);
}

.lbrp-letter {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rlbr-border);
  border-radius: 12px;
  background: var(--rlbr-surface);
  color: var(--rlbr-text) !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lbrp-letter:hover,
.lbrp-letter:focus-visible {
  border-color: transparent;
  background: var(--rlbr-accent);
  color: var(--accent-text, #151b1d) !important;
  outline: none;
  transform: translateY(-2px);
}

.lbrp-dreams {
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 150px;
}

.lbrp-dreams + .lbrp-dreams {
  padding-top: 8px;
}

.lbrp-dreams__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.lbrp-dreams__letter {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--rlbr-accent);
  color: var(--accent-text, #151b1d);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 12px 26px -14px var(--rlbr-accent-glow);
}

.lbrp-dreams__title {
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: 800;
}

.lbrp-dreams__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.lbrp-dream {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--rlbr-border);
  border-radius: var(--rlbr-radius);
  background: var(--rlbr-surface);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lbrp-dream::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rlbr-accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lbrp-dream:hover {
  border-color: var(--rlbr-accent-border);
  box-shadow: 0 18px 38px -24px var(--rlbr-accent-glow);
  transform: translateY(-3px);
}

.lbrp-dream:hover::before {
  opacity: 1;
}

.lbrp-dream > * {
  position: relative;
}

.lbrp-dream__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lbrp-dream__img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rlbr-surface-2);
  box-shadow: 0 0 0 3px var(--rlbr-accent-soft), 0 10px 20px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s var(--lbrp-ease), box-shadow 0.3s ease;
}

.lbrp-dream:hover .lbrp-dream__img {
  box-shadow: 0 0 0 3px var(--rlbr-accent), 0 12px 24px -10px var(--rlbr-accent-glow);
  transform: scale(1.07) rotate(-4deg);
}

.lbrp-dream__title {
  color: var(--accent-100, #fff3c2);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.lbrp-dream__bicho {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px !important;
  color: var(--rlbr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lbrp-dream__bicho strong {
  color: var(--accent-300, var(--rlbr-accent));
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.lbrp-dream__desc {
  flex: 1 1 auto;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.55;
}

.lbrp-dream__nums {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.lbrp-dream__nums > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
  border: 1px solid var(--rlbr-border);
  border-radius: 10px;
  background: var(--rlbr-sunken);
  transition: border-color 0.2s ease;
}

.lbrp-dream:hover .lbrp-dream__nums > div {
  border-color: rgba(255, 255, 255, 0.14);
}

.lbrp-dream__nums dt {
  color: var(--rlbr-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lbrp-dream__nums dd {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Os cartões aparecem conforme entram na tela (onde o navegador suporta). */
@supports (animation-timeline: view()) {
  .lbrp-dream {
    animation: lbrp-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

.lbrp .go-top {
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: var(--rlbr-accent);
  color: var(--accent-text, #151b1d);
  font-size: 18px;
  box-shadow: 0 14px 30px -12px var(--rlbr-accent-glow);
  transition: transform 0.2s ease, filter 0.2s ease;
  z-index: 20;
}

.lbrp .go-top:hover {
  background: var(--rlbr-accent);
  filter: brightness(1.08);
  transform: translateY(-3px);
}

/* ---------- Inversões (tabelas vindas do SSR) ---------- */

/* A aba de Inversões é "w3-content tab-main" (as outras são "tab-main results__tab", sem esse recuo):
   tira o recuo extra para o título ficar na mesma altura das outras páginas. */
.tab-main:has(> .lbrp-inv) {
  padding-top: 0 !important;
}

.lbrp-inv__tabelas {
  display: flex;
  flex-direction: column;
}

.lbrp-inv .tabela_inversao {
  width: 100% !important;
  margin: 0 0 18px !important;
  border: 1px solid var(--rlbr-border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--rlbr-radius) !important;
  overflow: hidden;
  background: var(--rlbr-surface);
  color: var(--rlbr-text);
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}

/* A 2ª tabela é só o cabeçalho da 3ª: as duas formam um cartão só. */
.lbrp-inv .tabela_inversao:nth-of-type(2) {
  margin-bottom: 0 !important;
  border-bottom: 0 !important;
  border-radius: var(--rlbr-radius) var(--rlbr-radius) 0 0 !important;
}

.lbrp-inv .tabela_inversao:nth-of-type(3) {
  border-top: 0 !important;
  border-radius: 0 0 var(--rlbr-radius) var(--rlbr-radius) !important;
}

.lbrp-inv .tabela_inversao > tbody > tr,
.lbrp-inv .tabela_inversao > tbody > tr:nth-child(odd),
.lbrp-inv .tabela_inversao > tbody > tr:nth-child(even) {
  background: transparent;
}

.lbrp-inv .tabela_inversao > tbody > tr > td {
  padding: 9px 8px;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-size: 14px;
  line-height: 1.35;
  transition: background 0.15s ease;
}

.lbrp-inv .tabela_inversao > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.lbrp-inv .tabela_inversao > tbody > tr > td[align="left"] {
  padding-left: 16px;
  font-weight: 600;
  text-align: left;
}

/* Cabeçalhos: 1ª linha da 1ª tabela e a tabela de cabeçalho. */
.lbrp-inv .tabela_inversao:nth-of-type(1) > tbody > tr:first-child > td,
.lbrp-inv .tabela_inversao:nth-of-type(2) > tbody > tr > td {
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lbrp-inv .tabela_inversao:nth-of-type(2) > tbody > tr:first-child > td {
  border-bottom: 1px solid var(--rlbr-accent-border) !important;
}

.lbrp-inv .tabela_inversao > tbody > tr > td > strong {
  color: inherit;
}

.lbrp-inv .tabela_inversao:nth-of-type(1) > tbody > tr:not(:first-child):hover > td,
.lbrp-inv .tabela_inversao:nth-of-type(3) > tbody > tr:hover > td {
  background: rgba(255, 255, 255, 0.05);
}

/* 3ª tabela: a linha com a quantidade de algarismos abre cada bloco, em destaque. */
.lbrp-inv .tabela_inversao:nth-of-type(3) > tbody > tr:has(> td:first-child > strong) > td {
  border-top: 1px solid var(--rlbr-accent-border) !important;
  background: var(--rlbr-accent-soft);
  color: var(--accent-300, var(--rlbr-accent));
  font-weight: 800;
}

.lbrp-inv .tabela_inversao:nth-of-type(3) > tbody > tr:first-child > td {
  border-top: 0 !important;
}

.lbrp-inv__skeleton {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lbrp-inv__skeleton .rlbr__skeleton {
  height: 180px;
  border-radius: var(--rlbr-radius);
}

.lbrp-inv__skeleton .rlbr__skeleton + .rlbr__skeleton {
  height: 420px;
}

/* ---------- Palpite do Dia (modal) ---------- */

.lbrp-palpite-overlay {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: lbrp-fade 0.25s ease both;
}

.lbrp-palpite {
  --rlbr-accent: var(--accent, #e5b500);
  --rlbr-accent-soft: rgba(255, 211, 1, 0.12);
  --rlbr-accent-border: rgba(255, 211, 1, 0.42);
  --rlbr-accent-glow: rgba(255, 211, 1, 0.35);
  --rlbr-border: rgba(255, 255, 255, 0.09);
  --rlbr-muted: rgba(255, 255, 255, 0.64);
  --rlbr-sunken: rgba(0, 0, 0, 0.32);

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 22px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 211, 1, 0.16), transparent 70%),
    linear-gradient(180deg, #161616, #0b0b0b);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  color: var(--white, #fff);
  font-family: inherit;
  line-height: 1.5;
  animation: lbrp-pop 0.45s var(--lbrp-ease, cubic-bezier(0.2, 0.7, 0.2, 1)) both;
}

.lbrp-palpite *,
.lbrp-palpite *::before,
.lbrp-palpite *::after {
  box-sizing: border-box;
}

.lbrp-palpite p,
.lbrp-palpite dl,
.lbrp-palpite dd,
.lbrp-palpite h2 {
  margin: 0;
}

.lbrp-palpite h2,
.lbrp-palpite button {
  font-family: inherit;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
  .lbrp-palpite {
    --rlbr-accent-soft: color-mix(in srgb, var(--rlbr-accent) 14%, transparent);
    --rlbr-accent-border: color-mix(in srgb, var(--rlbr-accent) 45%, transparent);
    --rlbr-accent-glow: color-mix(in srgb, var(--rlbr-accent) 35%, transparent);
  }
}

.lbrp-palpite__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lbrp-palpite__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rlbr-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lbrp-palpite__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success, #00e240);
  animation: rlbr-pulse 2s ease-out infinite;
}

.lbrp-palpite__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--rlbr-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.2s ease;
}

.lbrp-palpite__close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.lbrp-palpite__close i {
  color: var(--white, #fff);
  font-size: 16px;
  pointer-events: none;
}

.lbrp-palpite__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

/* Foto do bicho com anel girando e flutuação leve. */
.lbrp-palpite__photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  animation: lbrp-float 4s ease-in-out 0.5s infinite;
}

.lbrp-palpite__photo::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--rlbr-accent), transparent 30%, var(--rlbr-accent) 50%, transparent 80%, var(--rlbr-accent));
  animation: lbrp-spin 6s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}

.lbrp-palpite__photo::after {
  content: "";
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 50%;
  box-shadow: 0 0 60px 10px var(--rlbr-accent-glow);
}

.lbrp-palpite__photo img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.lbrp-palpite__bicho {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.lbrp-palpite__grupo {
  color: var(--rlbr-muted);
  font-size: 14px;
  font-weight: 600;
}

.lbrp-palpite__grupo b {
  color: var(--rlbr-accent);
}

.lbrp-palpite__section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--rlbr-border);
  border-radius: 16px;
  background: var(--rlbr-sunken);
}

.lbrp-palpite__label {
  color: var(--rlbr-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lbrp-palpite__balls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.lbrp-palpite__ball {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff6b8, var(--rlbr-accent) 45%, #b38f00);
  box-shadow: 0 10px 20px -8px var(--rlbr-accent-glow), inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  color: var(--accent-text, #151b1d);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  animation: lbrp-ball 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.lbrp-palpite__ball:nth-child(1) {
  animation-delay: 0.25s;
}

.lbrp-palpite__ball:nth-child(2) {
  animation-delay: 0.35s;
}

.lbrp-palpite__ball:nth-child(3) {
  animation-delay: 0.45s;
}

.lbrp-palpite__ball:nth-child(4) {
  animation-delay: 0.55s;
}

.lbrp-palpite__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lbrp-palpite__stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--rlbr-border);
  border-radius: 12px;
  background: var(--rlbr-sunken);
  animation: lbrp-rise 0.45s var(--lbrp-ease, ease) both;
}

.lbrp-palpite__stats > div:nth-child(1) {
  animation-delay: 0.3s;
}

.lbrp-palpite__stats > div:nth-child(2) {
  animation-delay: 0.38s;
}

.lbrp-palpite__stats > div:nth-child(3) {
  animation-delay: 0.46s;
}

.lbrp-palpite__stats > div:nth-child(4) {
  animation-delay: 0.54s;
}

.lbrp-palpite__stats dt {
  color: var(--rlbr-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lbrp-palpite__stats dd {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lbrp-palpite__dezenas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lbrp-palpite__dezenas span {
  padding: 5px 12px;
  border: 1px solid var(--rlbr-accent-border);
  border-radius: 999px;
  background: var(--rlbr-accent-soft);
  color: var(--rlbr-accent);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Animações ---------- */

@keyframes lbrp-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lbrp-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lbrp-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lbrp-sheen {
  0%,
  70% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(110%);
  }
}

@keyframes lbrp-grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes lbrp-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes lbrp-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes lbrp-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lbrp-ball {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lbrp *,
  .lbrp *::before,
  .lbrp *::after,
  .lbrp > *,
  .lbrp-palpite-overlay,
  .lbrp-palpite,
  .lbrp-palpite *,
  .lbrp-palpite *::before,
  .lbrp-palpite *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1000px) {
  .lbrp-pair,
  .lbrp-rules,
  .lbrp-myths {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .lbrp .rlbr__group,
  .lbrp-card,
  .lbrp-doc {
    padding: 16px;
  }

  .lbrp-odds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lbrp-odd {
    min-height: 0;
    padding: 12px;
  }

  .lbrp-odd__value {
    font-size: 21px;
  }

  .lbrp-odd--text .lbrp-odd__value {
    font-size: 16px;
  }

  .lbrp-odd__name {
    font-size: 11px;
  }

  .lbrp-rule {
    padding: 14px;
  }

  .lbrp-tiers,
  .lbrp-limits {
    grid-template-columns: minmax(0, 1fr);
  }

  .lbrp-cross img {
    max-width: 100%;
    margin: 0 auto;
  }

  .lbrp-timeline {
    padding-left: 44px;
  }

  .lbrp-timeline::before {
    left: 15px;
  }

  .lbrp-timeline__item::before {
    left: -44px;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .lbrp-doc--sub {
    margin-left: 12px;
  }

  .lbrp-doc__title {
    font-size: 16px;
  }

  /* No celular o índice de letras rola de lado, como o filtro de dias. */
  .lbrp-letters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0 -12px;
    padding: 8px 12px;
    overflow-x: auto;
    border-width: 1px 0;
    border-radius: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .lbrp-letters::-webkit-scrollbar {
    display: none;
  }

  .lbrp-letter {
    width: 36px;
    height: 36px;
  }

  .lbrp-dreams {
    scroll-margin-top: 130px;
  }

  .lbrp-dreams__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .lbrp-dream__img {
    width: 56px;
    height: 56px;
  }

  .lbrp-inv .tabela_inversao > tbody > tr > td {
    padding: 8px 3px;
    font-size: 12px;
  }

  .lbrp-inv .tabela_inversao > tbody > tr > td[align="left"] {
    padding-left: 8px;
  }

  .lbrp-inv .tabela_inversao:nth-of-type(1) > tbody > tr:first-child > td,
  .lbrp-inv .tabela_inversao:nth-of-type(2) > tbody > tr > td {
    font-size: 11px;
    letter-spacing: 0;
  }

  .lbrp-palpite {
    gap: 14px;
    padding: 18px 16px;
  }

  .lbrp-palpite__photo {
    width: 136px;
    height: 136px;
  }

  .lbrp-palpite__bicho {
    font-size: 26px;
  }

  .lbrp-palpite__ball {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .lbrp-palpite__stats dd {
    font-size: 16px;
  }
}
