:root {
  color-scheme: dark;
  --fundo: #0e1016;
  --fundo-2: #151822;
  --cartao: #181b26;
  --cartao-hover: #1e2230;
  --borda: #262b3a;
  --texto: #eceef4;
  --texto-2: #9aa1b4;
  --texto-3: #6b7288;
  --destaque: #e8b04a;
  --verde: #7bd88f;
  --raio: 14px;
  --gutter: 16px;
  --largura: 1200px;
  --fonte: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(232, 176, 74, .08), transparent 70%),
    var(--fundo);
  color: var(--texto);
  font: 16px/1.5 var(--fonte);
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }

/* ---------- topo ---------- */
.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 16, 22, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borda);
}
.topo__linha {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}
.marca { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--texto); flex-shrink: 0; }
.marca__icone { width: 26px; height: 26px; align-self: center; }
.marca__nome { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.marca__sub { color: var(--texto-2); font-size: 15px; }

.busca {
  margin-left: auto;
  flex: 0 1 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  height: 40px;
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  transition: border-color .15s;
}
.busca:focus-within { border-color: var(--destaque); }
.busca svg { width: 18px; height: 18px; fill: none; stroke: var(--texto-3); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.busca input { flex: 1; min-width: 0; background: none; border: 0; outline: none; height: 100%; }
.busca input::placeholder { color: var(--texto-3); }
.busca input::-webkit-search-cancel-button { filter: invert(.6); }
.busca kbd {
  font: 12px/1 var(--fonte);
  color: var(--texto-3);
  border: 1px solid var(--borda);
  border-radius: 5px;
  padding: 3px 6px;
}
.busca:focus-within kbd { display: none; }

/* ---------- conteúdo ---------- */
.conteudo {
  flex: 1;
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}
.intro { padding: 36px 0 20px; }
.intro h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
.intro p { margin: 8px 0 0; color: var(--texto-2); }

.rotulo { margin: 0 0 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); }

.recentes { margin: 8px 0 24px; }
.recentes__lista { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.recente {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 14px 6px 6px;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: 12px;
  text-decoration: none;
  color: var(--texto);
  font-weight: 600;
  font-size: 14px;
  transition: background .15s, border-color .15s;
}
.recente:hover { background: var(--cartao-hover); border-color: var(--cor, var(--destaque)); }
.recente img { width: 56px; height: 32px; object-fit: cover; border-radius: 7px; }

.barra { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.filtros { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filtros::-webkit-scrollbar { display: none; }
.filtros.rola { mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--borda);
  background: transparent;
  color: var(--texto-2);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--texto); border-color: var(--texto-3); }
.chip[aria-pressed="true"] { background: var(--texto); border-color: var(--texto); color: var(--fundo); font-weight: 600; }
.chip small { opacity: .6; margin-left: 4px; font-size: 12px; }
.ordem select {
  height: 34px;
  padding: 0 30px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--borda);
  background: var(--fundo-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1b4' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  appearance: none;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- grade ---------- */
.grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 18px;
}
.cartao {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.cartao:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cor, var(--destaque)) 60%, var(--borda));
  box-shadow: 0 14px 40px -18px color-mix(in srgb, var(--cor, var(--destaque)) 55%, transparent);
}
.cartao__abrir {
  all: unset;
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  border-radius: var(--raio);
}
.cartao__abrir:focus-visible { outline: 2px solid var(--destaque); outline-offset: -2px; }
.cartao__capa { position: relative; aspect-ratio: 16 / 9; background: var(--fundo-2); overflow: hidden; }
.cartao__capa img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.cartao:hover .cartao__capa img { transform: scale(1.04); }
.cartao__capa .selos { position: absolute; top: 10px; left: 10px; }
.capa-vazia {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 800;
  color: var(--cor, var(--destaque));
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--cor, var(--destaque)) 22%, transparent), transparent 70%);
}
.cartao__corpo { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.cartao__nome { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.cartao__resumo {
  margin: 0;
  color: var(--texto-2);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cartao__rodape { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.cartao__meta { display: flex; gap: 12px; color: var(--texto-3); font-size: 13px; min-width: 0; }
.cartao__meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cartao__meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cartao .botao { position: relative; z-index: 2; margin-left: auto; }

.selos { display: flex; flex-wrap: wrap; gap: 6px; }
.selo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(14, 16, 22, .78);
  color: var(--texto);
  backdrop-filter: blur(6px);
}
.selo--novo { background: var(--verde); color: #0b1a10; }
.selo--beta { background: var(--destaque); color: #2a1c02; }
.selo--breve { background: #3a3f52; color: var(--texto-2); }

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--cor, var(--destaque));
  color: #15120a;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s, transform .1s;
}
.botao:hover { filter: brightness(1.1); }
.botao:active { transform: scale(.97); }
.botao svg { width: 16px; height: 16px; fill: currentColor; }
.botao--grande { height: 46px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.botao--sec { background: transparent; border-color: var(--borda); color: var(--texto); }
.botao--sec svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.botao--sec:hover { background: var(--cartao-hover); filter: none; }
.botao[aria-disabled="true"] { background: #2a2e3c; color: var(--texto-3); pointer-events: none; }

.vazio { text-align: center; color: var(--texto-2); padding: 48px 0; }
.vazio button { background: none; border: 0; color: var(--destaque); cursor: pointer; text-decoration: underline; padding: 0; }

.rodape {
  max-width: var(--largura);
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid var(--borda);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--texto-3);
  font-size: 13px;
}

/* ---------- detalhe ---------- */
.detalhe {
  width: min(860px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 1px solid var(--borda);
  border-radius: 18px;
  background: var(--cartao);
  color: var(--texto);
  overflow: auto;
  overscroll-behavior: contain;
}
.detalhe::backdrop { background: rgba(5, 6, 10, .72); backdrop-filter: blur(4px); }
.detalhe[open] { animation: surgir .2s ease; }
@keyframes surgir { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.detalhe__caixa { position: relative; }
.detalhe__fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 16, 22, .7);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.detalhe__fechar svg { width: 18px; height: 18px; stroke: var(--texto); stroke-width: 2.2; stroke-linecap: round; }
.detalhe__midia { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--fundo-2); }
.detalhe__midia::-webkit-scrollbar { display: none; }
.detalhe__midia img, .detalhe__midia .capa-vazia { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; scroll-snap-align: start; }
.detalhe__corpo { padding: 20px 24px 28px; }
.detalhe__corpo h2 { margin: 10px 0 6px; font-size: clamp(22px, 3.5vw, 28px); letter-spacing: -.02em; line-height: 1.2; }
.detalhe__descricao { margin: 0; color: var(--texto-2); }
.detalhe__acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.detalhe__colunas { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 16px; }
.detalhe__colunas:has(> section:only-of-type:not([hidden])) { grid-template-columns: 1fr; }
.detalhe h3 { margin: 12px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); }
.detalhe ol { margin: 0; padding-left: 20px; color: var(--texto-2); font-size: 15px; }
.detalhe ol li { margin-bottom: 8px; padding-left: 4px; }
.detalhe ol li::marker { color: var(--cor, var(--destaque)); font-weight: 700; }
.detalhe dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.detalhe dt { color: var(--texto); font-weight: 600; white-space: nowrap; }
.detalhe dd { margin: 0; color: var(--texto-2); }
.pontos { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.pontos button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--borda); cursor: pointer; }
.pontos button[aria-current="true"] { background: var(--texto-2); }

.aviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--texto);
  color: var(--fundo);
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.aviso.visivel { opacity: 1; transform: translate(-50%, 0); }

/* ---------- celular ---------- */
@media (max-width: 640px) {
  .marca__sub { display: none; }
  .busca kbd { display: none; }
  .intro { padding: 24px 0 14px; }
  .barra { flex-direction: column; align-items: stretch; }
  .ordem select { width: 100%; }
  .detalhe { width: 100%; max-width: 100%; max-height: 92%; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .detalhe__corpo { padding: 16px var(--gutter) 24px; }
  .detalhe__colunas { grid-template-columns: 1fr; gap: 4px; }
  .detalhe__acoes .botao { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.botao svg.traco { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
