/* Base comum a todos os layouts: fontes locais (SIL OFL), reset, faixa de proposta, seletor de
   layout e carrossel/abas estruturais. Cada layout pinta o resto em layouts/<nome>.css.
   @contraste ui-texto/ui-fundo ui-suave/ui-fundo ui-ativo-texto/ui-ativo ui-faixa-texto/ui-faixa */
@font-face { font-family: 'Inter'; src: url("fontes/inter.woff2") format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url("fontes/jetbrains-mono.woff2") format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'VT323'; src: url("fontes/vt323.woff2") format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ui-fundo: #111318;
  --ui-texto: #f4f5f7;
  --ui-suave: #b9bfcc;
  --ui-ativo: #ffd84d;
  --ui-ativo-texto: #111318;
  --ui-faixa: #ffd84d;
  --ui-faixa-texto: #111318;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); background: #ffffff; color: #111318; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ui-ativo); outline-offset: 2px; }

.pular { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ui-ativo); color: var(--ui-ativo-texto); padding: 10px 14px; font-weight: 700; }
.pular:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.proposta { margin: 0; padding: 8px 16px; background: var(--ui-faixa); color: var(--ui-faixa-texto); font: 600 .82rem/1.4 var(--sans); text-align: center; }
.proposta a { color: var(--ui-faixa-texto); }

/* Seletor de layout: mesma cara em todos (é a "moldura" da proposta). */
.seletor { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--ui-fundo); color: var(--ui-texto); font: 500 .85rem/1 var(--mono); border-bottom: 1px solid #2a2e37; }
.seletor[hidden] { display: none; }
.seletor-rotulo { color: var(--ui-suave); flex: none; }
.seletor-lista { display: flex; gap: 6px; margin: 0; padding: 2px; list-style: none; overflow-x: auto; scrollbar-width: thin; flex: 1; min-width: 0; }
.seletor button { cursor: pointer; border: 1px solid #3a3f4b; background: transparent; color: var(--ui-texto); border-radius: 999px; padding: 7px 12px; white-space: nowrap; font: inherit; }
.seletor button[aria-pressed="true"] { background: var(--ui-ativo); color: var(--ui-ativo-texto); border-color: var(--ui-ativo); font-weight: 700; }
.seletor .sorte { flex: none; border-color: var(--ui-ativo); }
@media (max-width: 600px) {
  .seletor { flex-wrap: wrap; gap: 6px 8px; }
  .seletor-lista { order: 3; flex-basis: 100%; }
  .seletor .sorte { margin-left: auto; }
}
.anuncio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Rodapé de créditos (fora do palco, igual para todos). */
.creditos { padding: 24px 16px 32px; background: var(--ui-fundo); color: var(--ui-suave); font: .8rem/1.6 var(--sans); }
.creditos p { max-width: 960px; margin: 0 auto 6px; }
.creditos a { color: var(--ui-texto); }

/* Estrutura de carrossel e abas (cores vêm do layout). */
.carrossel { position: relative; }
.carrossel-trilho { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 4px 2px 16px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.carrossel-trilho > .slide { flex: 0 0 min(86%, 560px); scroll-snap-align: start; }
.carrossel-controles { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 8px; }
.carrossel-controles[hidden] { display: none; }
.carrossel-controles button { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.abas [role=tablist] { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.abas [role=tablist][hidden] { display: none; }
.abas [role=tab] { cursor: pointer; }
.painel[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
