/* Site público do evento — mobile-first. Quase todo mundo abre pelo celular. */
:root {
  --preto-950: #000000; --preto-900: #0a0a0a; --preto-800: #1c1c1c; --preto-700: #333333;
  --laranja: #ff6600; --laranja-600: #b84700; --laranja-100: #fff0e5;
  --ink: #161616; --muted: #5c5c5c; --bg: #f5f5f4; --line: #e5e3e0;
  --silver: #cfccc8; --bronze: #d59a6a; --ok: #157f4b;
  --font-title: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 16px; --wrap: 760px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.5 var(--font-body); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--laranja-600); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: .3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Topo */
.topo { background: var(--preto-900); color: #fff; border-bottom: 3px solid var(--laranja); position: sticky; top: 0; z-index: 30; }
.topo__linha { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.marca img { width: 38px; height: 38px; flex: none; }
.marca strong { font-family: var(--font-title); font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Navegação inferior fixa (polegar) */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom); }
.nav ul { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0 auto; padding: 0; max-width: var(--wrap); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; }
.nav svg { width: 24px; height: 24px; }
.nav a[aria-current] { color: var(--preto-900); }
.nav a[aria-current] svg { color: var(--laranja-600); }
main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .nav { position: static; box-shadow: none; border: 0; background: transparent; }
  .nav ul { display: flex; gap: 4px; }
  .nav a { flex-direction: row; min-height: 40px; padding: 0 12px; border-radius: 10px; color: #d6d3d0; font-size: .92rem; }
  .nav a[aria-current] { color: #fff; background: rgba(255,255,255,.12); }
  .nav svg { width: 18px; height: 18px; }
  .topo__linha { justify-content: space-between; }
  main { padding-bottom: 40px; }
}

/* Capa */
.capa { background: radial-gradient(120% 90% at 50% 0%, var(--preto-700), var(--preto-950)); color: #fff; padding: 26px 0 30px; text-align: center; }
.capa img { width: 176px; height: 176px; margin: 0 auto 10px; }
.capa h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); margin-bottom: 6px; }
.capa p { margin: 0; color: #d6d3d0; }
.capa .quando { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-weight: 600; color: var(--laranja); }
.aviso-site { background: var(--laranja); color: var(--preto-950); font-weight: 700; text-align: center; padding: 10px 16px; }

.secao { padding: 22px 0 6px; }
.secao__cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.secao__cabeca h2 { font-size: 1.4rem; margin: 0; }
.secao__cabeca a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.titulo-pagina { padding: 18px 0 8px; }
.titulo-pagina h1 { font-size: 1.8rem; margin: 0; }
.titulo-pagina p { color: var(--muted); margin: 4px 0 0; }

/* Cartões de prova (início) */
.provas { display: grid; gap: 12px; }
.prova-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.prova-card__topo { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--preto-900); color: #fff; text-decoration: none; }
.prova-card__topo strong { font-family: var(--font-title); font-size: 1.15rem; }
.prova-card__topo span { color: var(--laranja); font-weight: 700; font-size: .9rem; }
.podio { list-style: none; margin: 0; padding: 6px 0; }
.podio li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; }
.podio li + li { border-top: 1px solid var(--line); }
.podio .vazio-p { display: block; color: var(--muted); text-align: center; padding: 10px; }

/* Ranking */
.abas { display: flex; gap: 4px; background: #e8e6e3; padding: 4px; border-radius: 14px; margin: 6px 0 12px; position: sticky; top: 64px; z-index: 10; }
.abas a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; font-weight: 700; color: var(--muted); text-decoration: none; }
.abas a[aria-current] { background: #fff; color: var(--preto-900); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.buscar { width: 100%; min-height: 50px; padding: 10px 14px 10px 44px; font: 17px var(--font-body); border: 2px solid #d6d3d0; border-radius: 12px; margin-bottom: 10px; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235c5c5c' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E") 14px 50% no-repeat; }
.buscar:focus { outline: none; border-color: var(--laranja); }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.linha { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.linha--trofeu { border-color: #ffc499; }
.pos { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 600 1.05rem var(--font-title); background: var(--bg); color: var(--ink); }
.pos--1 { background: var(--laranja); color: var(--preto-950); } .pos--2 { background: var(--silver); } .pos--3 { background: var(--bronze); color: #fff; }
.pos--sem { font-size: .8rem; color: var(--muted); }
.nome { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.polo { color: var(--muted); font-size: .86rem; }
.selo { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--bg); color: var(--muted); }
.selo--trofeu { background: var(--laranja-100); color: #8a3a00; }
.selo--aguardando { background: #efedea; color: var(--preto-700); }
.nota { text-align: right; font: 600 1.25rem var(--font-title); white-space: nowrap; }
.nota small { display: block; font: 500 .78rem var(--font-body); color: var(--muted); }
.atualizado { color: var(--muted); font-size: .85rem; text-align: center; margin: 12px 0; }
.atualizado button { font: inherit; color: var(--preto-700); font-weight: 700; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; }
.vazio { padding: 20px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #d6d3d0; border-radius: 14px; }
.oculto { display: none !important; }

/* Fotos */
.galeria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 560px) { .galeria { grid-template-columns: repeat(3, 1fr); } }
.galeria a { display: block; border-radius: 10px; overflow: hidden; background: #e0deda; aspect-ratio: 1; }
.galeria img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 12px; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; }
.lightbox::backdrop { background: rgba(0,0,0,.94); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; margin: 0 auto; }
.lightbox p { color: #e0deda; text-align: center; margin: 10px 0 0; }
.lightbox__fechar, .lightbox__ant, .lightbox__prox { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 1.5rem; cursor: pointer; }
.lightbox__fechar { top: 12px; right: 12px; }
.lightbox__ant { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__prox { right: 10px; top: 50%; transform: translateY(-50%); }

/* Transparência */
.resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.caixa-num { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.caixa-num small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.caixa-num strong { font: 600 1.4rem var(--font-title); }
.caixa-num--saldo { grid-column: 1 / -1; background: var(--preto-900); color: #fff; border-color: var(--preto-900); }
.caixa-num--saldo small { color: #d6d3d0; } .caixa-num--saldo strong { font-size: 2rem; color: var(--laranja); }
.bloco { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; }
.bloco h2 { font-size: 1.15rem; }
.itens { list-style: none; margin: 0; padding: 0; }
.itens li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.itens li:first-child { border-top: 0; }
.itens .v { font-weight: 700; white-space: nowrap; }
.itens small { display: block; color: var(--muted); }
.barra { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: 6px 0 2px; }
.barra span { display: block; height: 100%; background: var(--laranja); }
details.cat summary { cursor: pointer; list-style: none; padding: 8px 0; }
details.cat summary::-webkit-details-marker { display: none; }
.linha-cat { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }

.botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px; border-radius: 12px; background: var(--preto-800); color: #fff; font-weight: 700; text-decoration: none; text-align: center; }
.btn--ouro { background: var(--laranja); color: var(--preto-950); }
.btn--claro { background: #fff; color: var(--preto-800); border: 2px solid var(--preto-800); }
.rodape { text-align: center; color: var(--muted); font-size: .85rem; padding: 26px 16px 10px; }
.rodape a { color: inherit; }
.texto { background: #fff; border-radius: 14px; padding: 16px; border: 1px solid var(--line); }

/* Premiação e categorias */
.premio summary { cursor: pointer; list-style: none; min-height: 52px; }
.premio summary::-webkit-details-marker { display: none; }
.premio__lista { list-style: none; margin: 0; padding: 4px 14px; }
.premio__lista li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; }
.premio__lista li + li { border-top: 1px solid var(--line); }
.categoria { font-size: 1.35rem; margin: 18px 0 8px; padding-left: 10px; border-left: 4px solid var(--laranja); }
.categoria small { font: 600 .85rem var(--font-body); color: var(--muted); }
.faixa-info { background: var(--laranja-100); color: #8a3a00; border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; font-size: .92rem; }
