:root {
  --fundo: #36444f;
  --texto: #ffffff;
  --cinza: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  color: inherit;
  font: inherit;
  text-transform: inherit;
}

button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 7px;
}

[hidden] {
  display: none !important;
}

.oculto {
  display: none !important;
}

/* CABEÇALHO UNIVERSAL */

.topbar {
  height: 54px;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  position: sticky;
  top: 0;
  z-index: 100;

  background-color: #ffffff;
  border-bottom: 1px solid #000000;
}

.marca-topo {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28em;

  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(36px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -2.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.marca-topo span {
  width: auto;
  text-align: left;
}

.marca-topo .numero-marca {
  color: #93301e;
}

.acervo-shell {
  width: 100%;
  height: calc(100vh - 54px);
  height: calc(100dvh - 54px);

  display: grid;
  grid-template-rows: minmax(0, 1fr) 16dvh;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #36444f;
  text-transform: lowercase;
}

/* RUÍDO GLOBAL */

.acervo-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: url("./assets/ruido.gif");
  background-position: top left;
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.12;
  pointer-events: none;
}

/* IDENTIFICAÇÃO DA PÁGINA */

.identificacao-pagina {
  margin: 0;

  position: absolute;
  top: 14px;
  right: 20px;
  left: 20px;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 20px;
}

.relogio-sp,
.nome-pagina {
  margin: 0;

  display: block;
  flex-shrink: 0;

  color: #ffffff;

  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: lowercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

.separador-relogio {
  opacity: 1;
}

.separador-relogio.apagado {
  opacity: 0;
}

.palco {
  min-width: 0;
  min-height: 0;
  height: 100%;

  display: grid;
  place-items: center;
  padding: 96px clamp(24px, 6vw, 72px) 20px;

  position: relative;
  z-index: 2;
  overflow: hidden;
}

.conteudo {
  width: min(860px, 100%);
  max-height: 100%;
  overflow: auto;
  scrollbar-color: #ffffff transparent;
  overscroll-behavior: contain;
}

.palavra-central {
  display: block;
  margin: 0 auto;
  font-size: clamp(22px, 1.85vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.palavra-central:hover,
.opcoes button:hover,
.lista-simples button:hover,
.resultados-busca a:hover {
  opacity: 0.48;
}

/* CAMINHO DE ORIENTAÇÃO */

.trilha-arquivo {
  max-width: calc(100% - 40px);
  margin: 0;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 7px;

  position: absolute;
  top: 62px;
  left: 20px;
  z-index: 3;

  overflow: visible;
  color: rgba(255, 255, 255, 0.72);

  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: normal;
}

.link-trilha {
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

.link-trilha:hover {
  color: #ffffff;
}

.pasta-atual {
  color: #ffffff;
}

.separador-trilha {
  color: rgba(255, 255, 255, 0.46);
}

.opcoes {
  display: flex;
  align-items: center;
  justify-content: center;
}

.opcoes-anos {
  gap: clamp(30px, 6vw, 84px);
}

.opcoes-anos button {
  font-size: clamp(22px, 1.85vw, 30px);
}

.opcoes-categorias {
  flex-direction: column;
  gap: clamp(22px, 4vh, 42px);
}

.opcoes-categorias button {
  font-size: clamp(19px, 1.55vw, 25px);
  line-height: 1.25;
  text-align: center;
}

.painel-lista,
.painel-busca {
  width: min(720px, 100%);
  margin: 0 auto;
}

.painel-lista h1,
.painel-busca label {
  display: block;
  margin: 0 0 clamp(28px, 5vh, 52px);
  font-size: clamp(21px, 1.7vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.painel-rodadas {
  width: min(720px, 100%);
  margin: 0 auto;
}

.lista-rodadas {
  width: min(560px, 100%);
  max-height: 72dvh;
  margin: 0 auto;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  list-style: none;
  border-top: 1px solid #000000;
}

.lista-rodadas li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #000000;
}

.item-rodada {
  width: 100%;
  padding: 14px 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  text-align: center;
}

.item-rodada span {
  font-size: clamp(17px, 1.35vw, 21px);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}

.item-rodada small {
  color: var(--cinza);
  font-size: clamp(11px, 0.9vw, 14px);
}

.item-rodada:hover,
.item-rodada:focus-visible {
  opacity: 0.58;
}

.subtitulo {
  margin: calc(clamp(28px, 5vh, 52px) * -0.72) 0 clamp(28px, 5vh, 52px);
  color: var(--cinza);
  font-size: 14px;
  text-align: center;
}

.cabecalho-rodada-arquivo {
  margin: 0 0 clamp(18px, 3vh, 30px);
  text-align: center;
}

.cabecalho-rodada-arquivo h1 {
  margin: 0;
}

.cabecalho-rodada-arquivo p {
  margin: 10px 0 0;
  color: var(--cinza);
  font-size: 14px;
  font-weight: 400;
}

.cabecalho-perfil-mc {
  margin: 0 0 clamp(14px, 2vh, 22px);
  text-align: center;
}

.cabecalho-classificacao-final {
  margin: 0 0 clamp(18px, 3vh, 30px);
  text-align: center;
}

.cabecalho-classificacao-final h1 {
  margin: 0;
}

.cabecalho-classificacao-final p {
  margin: 10px 0 0;
  color: var(--cinza);
  font-size: 14px;
  font-weight: 400;
}

.cabecalho-perfil-mc h1 {
  margin: 0;
}

.arroba-perfil-mc,
.temporada-perfil-mc {
  margin: 0;
  color: var(--cinza);
  font-size: 14px;
  text-align: center;
}

.arroba-perfil-mc {
  margin-top: 8px;
}

.temporada-perfil-mc {
  margin-top: 12px;
}

.lista-simples {
  max-height: 66dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.lista-simples button {
  width: 100%;
  display: block;
  padding: 8px 12px;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.35;
  text-align: center;
}

.painel-busca input {
  width: 100%;
  padding: 10px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #000000;
  border-radius: 0;
  font-size: clamp(18px, 1.5vw, 24px);
  text-align: center;
  appearance: none;
}

.painel-busca input::placeholder {
  color: #888888;
  opacity: 1;
}

.conteudo[data-tela="busca-mc"] {
  height: 100%;
  overflow: hidden;
}

.conteudo[data-tela="busca-mc"] .painel-busca {
  height: 100%;
  padding-top: clamp(42px, 11vh, 104px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
}

.conteudo[data-tela="busca-mc"] .painel-busca label {
  margin-bottom: clamp(18px, 3vh, 32px);
}

.resultados-busca {
  margin-top: 20px;
  min-height: 0;
  padding-bottom: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.resultados-busca a {
  width: 100%;
  padding: 9px 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  text-decoration: none;
}

.resultados-busca small {
  color: var(--cinza);
  font-size: 13px;
}

.resultados-busca p,
.sem-registro {
  margin: 28px 0 0;
  color: var(--cinza);
  font-size: 14px;
  text-align: center;
}

.tabela-scroll {
  width: 100%;
  max-height: 62dvh;
  overflow: auto;
}

.tabela-arquivo {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.45;
  table-layout: fixed;
}

.tabela-arquivo th,
.tabela-arquivo td {
  padding: 12px clamp(12px, 2vw, 18px);
  border-bottom: 1px solid #000000;
  text-align: center;
  vertical-align: middle;
}

.tabela-arquivo thead th {
  border-top: 1px solid #000000;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.tabela-arquivo tbody td,
.tabela-arquivo tbody td * {
  font-weight: 400;
}

.tabela-arquivo th:last-child,
.tabela-arquivo td:last-child {
  text-align: center;
}

.tabela-rodada th:nth-child(1),
.tabela-rodada td:nth-child(1) {
  width: 42%;
}

.tabela-rodada th:nth-child(2),
.tabela-rodada td:nth-child(2) {
  width: 18%;
}

.tabela-rodada th:nth-child(3),
.tabela-rodada td:nth-child(3) {
  width: 40%;
}

.grupo-mcs-rodada {
  line-height: 1.75;
}

.tabela-mc th:nth-child(1),
.tabela-mc td:nth-child(1) {
  width: 32%;
}

.tabela-mc th:nth-child(2),
.tabela-mc td:nth-child(2) {
  width: 23%;
}

.tabela-mc th:nth-child(3),
.tabela-mc td:nth-child(3) {
  width: 17%;
}

.tabela-mc th:nth-child(4),
.tabela-mc td:nth-child(4) {
  width: 28%;
}

.tabela-classificacao-final caption {
  width: 1px;
  height: 1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tabela-classificacao-final .coluna-posicao-final,
.tabela-classificacao-final .posicao-classificacao-final {
  width: 9%;
  padding-right: 4px;
  padding-left: 2px;
  white-space: nowrap;
}

.tabela-classificacao-final th:nth-child(2),
.tabela-classificacao-final td:nth-child(2) {
  width: 31%;
}

.tabela-classificacao-final th:nth-child(n + 3),
.tabela-classificacao-final td:nth-child(n + 3) {
  width: 12%;
  padding-right: 5px;
  padding-left: 5px;
}

.tabela-classificacao-final .link-mc-classificacao-final {
  font-weight: 700;
}

.tabela-ranking-batalha .coluna-posicao-batalha,
.tabela-ranking-batalha .posicao-ranking-batalha {
  width: 54px;
  min-width: 54px;
  padding-right: 8px;
  padding-left: 2px;
  text-align: right;
  white-space: nowrap;
}

.tabela-ranking-batalha th:nth-child(2),
.tabela-ranking-batalha td:nth-child(2) {
  width: auto;
  padding-right: 5px;
  padding-left: 8px;
  text-align: left;
}

.tabela-ranking-batalha th:nth-child(3),
.tabela-ranking-batalha td:nth-child(3) {
  width: 22%;
}

.ranking-batalha {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #000000;
}

.ranking-batalha li {
  padding: 13px 4px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid #000000;
  font-size: 16px;
  text-align: center;
}

.ranking-batalha strong {
  font-weight: 400;
}

.link-mc-ranking,
.botao-titulos-ranking {
  font: inherit;
}

.link-mc-ranking {
  min-width: 0;
  text-align: center;
  text-decoration: none;
}

.link-mc-arquivo {
  color: inherit;
  text-decoration: none;
}

.link-mc-arquivo:hover {
  opacity: 0.55;
}

.botao-titulos-ranking {
  padding: 4px 7px;

  text-align: center;
  white-space: nowrap;

  border: 0;
}

.link-mc-ranking:hover,
.botao-titulos-ranking:hover {
  opacity: 0.55;
}

.rodada-arquivo {
  display: block;
  color: inherit;
  font: inherit;
  text-align: center;
  white-space: nowrap;
}

/* BALÃO DE EDIÇÕES */

.camada-edicoes {
  position: fixed;
  inset: 0;
  z-index: 300;

  display: grid;
  place-items: center;
  padding: 20px;

  background: rgba(255, 255, 255, 0.42);
}

.balao-edicoes {
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 16px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: none;
  overflow-x: auto;

  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.4px;
}

.topo-balao-edicoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #000000;
}

.topo-balao-edicoes strong {
  font-size: 13px;
  white-space: nowrap;
}

.topo-balao-edicoes button {
  width: 26px;
  height: 26px;
  padding: 0;

  cursor: pointer;

  background: transparent;
  border: 1px solid #000000;

  font-size: 18px;
  line-height: 1;
}

.lista-edicoes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lista-edicoes p {
  margin: 0;
  white-space: nowrap;
}

.marca-discreta {
  margin: 0;
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(16px, 2.5vw, 28px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  opacity: 0.48;
  z-index: 2;
}

/* ARTE FIXA NO LIMITE INFERIOR */

.arte-arquivo {
  width: 100%;
  height: 16vh;
  height: 16dvh;

  position: relative;
  z-index: 0;

  background-color: #36444f;
  background-image: url("./assets/arquivo.webp");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;

  pointer-events: none;
  user-select: none;
}

/* Apenas o conteúdo principal rola; listas e tabelas não criam uma segunda barra. */
.lista-rodadas,
.lista-simples,
.tabela-scroll {
  max-height: none;
  overflow: visible;
}

/* TEMA AZUL E TIPOGRAFIA DO ARQUIVO */

.acervo-shell,
.acervo-shell *,
.acervo-shell button,
.acervo-shell input,
.acervo-shell table {
  color: #ffffff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  text-transform: lowercase;
}

.subtitulo,
.resultados-busca small,
.resultados-busca p,
.sem-registro,
.item-rodada small,
.marca-discreta {
  color: rgba(255, 255, 255, 0.72);
}

.lista-rodadas,
.lista-rodadas li,
.tabela-arquivo th,
.tabela-arquivo td,
.tabela-arquivo thead th,
.ranking-batalha,
.ranking-batalha li,
.topo-balao-edicoes {
  border-color: #ffffff;
}

.painel-busca input {
  border-bottom-color: #ffffff;
}

.painel-busca input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.tabela-arquivo {
  background: transparent;
}

.tabela-arquivo thead th {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.tabela-arquivo tbody td,
.tabela-arquivo tbody td * {
  font-weight: 400;
  text-align: center;
}

.tabela-arquivo .link-mc-arquivo,
.tabela-arquivo .link-mc-ranking {
  font-weight: 700;
}

.conteudo button,
.conteudo a {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}

.conteudo .item-rodada {
  text-decoration: none;
}

.conteudo .resultados-busca a,
.conteudo .resultados-busca a * {
  text-decoration: none;
}

.trilha-arquivo button,
.trilha-arquivo a,
.topo-balao-edicoes button {
  text-decoration: none;
}

.link-mc-ranking,
.botao-titulos-ranking {
  color: #ffffff;
}

.ranking-batalha .link-mc-ranking {
  font-weight: 700;
}

.ranking-batalha .botao-titulos-ranking,
.ranking-batalha li > span,
.resultados-busca small {
  font-weight: 400;
}

.camada-edicoes {
  background: rgba(54, 68, 79, 0.42);
}

.balao-edicoes,
.balao-edicoes * {
  background: #ffffff;
  color: #000000;
}

.balao-edicoes {
  border-color: #000000;
  box-shadow: none;
}

.topo-balao-edicoes button {
  color: #000000;
  border-color: #000000;
}

@media (max-width: 720px) {
  .topbar {
    height: 48px;
    padding: 0 12px;
  }

  .marca-topo {
    font-size: 34px;
    letter-spacing: -2px;
  }

  .acervo-shell,
  .palco {
    height: auto;
  }

  .acervo-shell {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    grid-template-rows: minmax(0, 1fr) 16dvh;
  }

  .identificacao-pagina {
    top: 10px;
    right: 12px;
    left: 12px;
    gap: 12px;
  }

  .trilha-arquivo {
    max-width: calc(100% - 24px);
    top: 54px;
    left: 12px;
    font-size: 8px;
  }

  .relogio-sp,
  .nome-pagina {
    font-size: 10px;
    letter-spacing: 1.4px;
  }

  .arte-arquivo {
    height: 16vh;
    height: 16dvh;
  }

  .conteudo[data-tela="busca-mc"] .painel-busca {
    padding-top: clamp(24px, 7vh, 48px);
  }

  body.teclado-virtual .palco {
    width: 100%;
    height: calc(var(--altura-viewport-visual) - 48px);
    padding: 22px 12px 6px;
    position: fixed;
    top: 48px;
    right: 0;
    left: 0;
    z-index: 120;
    place-items: start center;
    background: var(--fundo);
  }

  body.teclado-virtual .identificacao-pagina,
  body.teclado-virtual .trilha-arquivo,
  body.teclado-virtual .arte-arquivo {
    display: none;
  }

  body.teclado-virtual .conteudo[data-tela="busca-mc"] .painel-busca {
    padding-top: 0;
  }

  body.teclado-virtual .painel-busca label {
    margin-bottom: 8px;
    font-size: 16px;
  }

  body.teclado-virtual .painel-busca input {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 18px;
  }

  body.teclado-virtual .resultados-busca {
    min-height: 54px;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .palco {
    padding: 88px 18px 12px;
  }

  .camada-edicoes {
    padding: 12px;
  }

  .balao-edicoes {
    max-width: calc(100vw - 24px);
    font-size: 9px;
  }

  .opcoes-categorias {
    gap: 28px;
  }

  .lista-rodadas {
    width: 100%;
    max-height: 72dvh;
  }

  .item-rodada {
    padding: 13px 4px;
    gap: 8px;
  }

  .item-rodada span {
    font-size: 16px;
  }

  .item-rodada small {
    font-size: 10px;
  }

  .tabela-arquivo {
    font-size: 11px;
  }

  .tabela-arquivo th,
  .tabela-arquivo td {
    padding: 10px 7px;
  }

  .tabela-arquivo thead th {
    font-size: 12px;
  }

  .tabela-mc {
    font-size: 9px;
  }

  .tabela-mc th,
  .tabela-mc td {
    padding-right: 5px;
    padding-left: 5px;
    text-align: center;
  }

  .tabela-mc thead th {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .tabela-mc th:nth-child(1),
  .tabela-mc td:nth-child(1) {
    width: 30%;
  }

  .tabela-mc th:nth-child(2),
  .tabela-mc td:nth-child(2) {
    width: 24%;
  }

  .tabela-mc th:nth-child(3),
  .tabela-mc td:nth-child(3) {
    width: 18%;
  }

  .tabela-mc th:nth-child(4),
  .tabela-mc td:nth-child(4) {
    width: 28%;
  }

  .tabela-mc .link-mc-arquivo,
  .tabela-mc .rodada-arquivo {
    width: 100%;
    display: block;
    text-align: center;
  }

  .tabela-classificacao-final {
    font-size: 8px;
  }

  .tabela-classificacao-final th,
  .tabela-classificacao-final td {
    padding-right: 3px;
    padding-left: 3px;
  }

  .tabela-classificacao-final thead th {
    font-size: 9px;
  }

  .ranking-batalha li {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    font-size: 14px;
  }

  .tabela-ranking-batalha {
    font-size: 11px;
  }

  .tabela-ranking-batalha .coluna-posicao-batalha,
  .tabela-ranking-batalha .posicao-ranking-batalha {
    width: 48px;
    min-width: 48px;
    padding-right: 6px;
  }

  .tabela-ranking-batalha th:nth-child(2),
  .tabela-ranking-batalha td:nth-child(2) {
    padding-left: 6px;
  }

  .tabela-ranking-batalha thead th {
    font-size: 12px;
  }

  .marca-discreta {
    display: none;
  }
}

/* APENAS UMA ROLAGEM INTERNA: A DO CONTEÚDO PRINCIPAL */

.lista-rodadas,
.lista-simples,
.tabela-scroll {
  max-height: none;
  overflow: visible;
}
