:root {
  --papel: #fbfaf8;
  --tinta: #23201d;
  --suave: #6f6a64;
  --linha: #e4e0da;
  --brasa: #b3261e;
  --sombra: 0 2px 14px rgba(35, 32, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--tinta);
}

button,
input {
  font: inherit;
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brasa);
  outline-offset: 2px;
}

#map {
  position: absolute;
  inset: 0;
  background: #e9e6e1;
}


/*Painel lateral*/

#painel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  width: 310px;
  max-height: calc(100% - 150px);
  overflow: auto;
  padding: 14px 16px;
  background: var(--papel);
  border-radius: 10px;
  box-shadow: var(--sombra);
}

#painel h1 {
  margin: 0 28px 4px 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

#painel .sub {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--suave);
}

#painel.fechado {
  width: auto;
  max-width: 250px;
}

#painel.fechado .corpo {
  display: none;
}

#recolher {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--linha);
  border-radius: 6px;
  cursor: pointer;
}


.grupo {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--linha);
}

.grupo h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.aviso {
  font-size: 12.5px;
  color: var(--suave);
}

.link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--brasa);
  text-decoration: underline;
  cursor: pointer;
}

/* botões de modo */
.seg {
  display: flex;
  background: #fff;
  border: 1px solid var(--linha);
  border-radius: 8px;
  overflow: hidden;
}

.seg button {
  flex: 1;
  padding: 7px 4px;
  font-size: 13px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.seg button + button {
  border-left: 1px solid var(--linha);
}

.seg button[aria-pressed="true"] {
  background: var(--tinta);
  color: #fff;
}

#nota-modo {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--suave);
}

/* caixinhas de opção */
.opcao {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
}

.opcao input {
  margin: 0;
}

.opcao.off {
  color: #aaa;
  cursor: default;
}

/* lista de itens */
#lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

#lista li button {
  display: block;
  width: 100%;
  padding: 6px 4px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--linha);
  cursor: pointer;
}

#lista li button:hover {
  background: #f1eee9;
}

#lista .nome {
  font-weight: 600;
}

#lista .det {
  font-size: 12.5px;
  color: var(--suave);
}



#barra {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(660px, calc(100% - 20px));
  padding: 10px 16px 12px;
  background: var(--papel);
  border-radius: 10px;
  box-shadow: var(--sombra);
}

#barra.inativa #mes,
#barra.inativa .ticks {
  opacity: 0.35;
}

.topo-barra {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

#mes-nome {
  font-size: 17px;
  font-weight: 700;
}

#mes-info {
  font-size: 12.5px;
  text-align: right;
  color: var(--suave);
}

#mes-info.pouco {
  color: var(--brasa);
}

#mes {
  width: 100%;
  margin: 8px 0 0;
  accent-color: var(--brasa);
}

.ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 11.5px;
  color: var(--suave);
}

.ticks span {
  width: 1.6em;
  text-align: center;
}

#grad {
  height: 10px;
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

.leg {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 12px;
  color: var(--suave);
}


/* escolas e saúde */

.poi {
  font-size: 13px;
  line-height: 19px;
  text-align: center;
  background: #fff;
  border: 2px solid var(--tinta);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.poi.saude {
  border-color: #0b7a62;
}

.poi.escola {
  border-color: #1c5aa6;
}



.pop {
  min-width: 210px;
}

.pop b.t {
  font-size: 15px;
}

.pop .grande {
  margin: 2px 0;
  font-size: 22px;
  font-weight: 700;
}

.pop .peq {
  font-size: 12.5px;
  color: var(--suave);
}

.grafico {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 56px;
  margin-top: 8px;
}

.grafico div {
  flex: 1;
  min-height: 4px;
  border-radius: 2px 2px 0 0;
}

.grafico div.atual {
  outline: 2px solid var(--tinta);
}

.rotulos {
  display: flex;
  gap: 3px;
  font-size: 10.5px;
  color: var(--suave);
}

.rotulos span {
  flex: 1;
  text-align: center;
}


#intro {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(35, 32, 29, 0.62);
}

#intro.oculta {
  display: none;
}

#intro .cartao {
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  padding: 26px 28px;
  overflow: auto;
  background: var(--papel);
  border-radius: 12px;
  box-shadow: var(--sombra);
}

#intro h1 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.15;
}

#intro .gancho {
  margin: 0 0 16px;
  font-size: 17px;
}

#intro .gancho b {
  color: var(--brasa);
}

#intro ul {
  margin: 0 0 16px;
  padding-left: 18px;
}

#intro li {
  margin-bottom: 6px;
}

#intro .entrar {
  padding: 10px 18px;
  font-weight: 600;
  color: #fff;
  background: var(--brasa);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

#intro .rodape {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--suave);
}


.erro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3000;
  max-width: 420px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--sombra);
}


@media (max-width: 640px) {
  #painel {
    width: calc(100% - 20px);
    max-height: 52%;
  }

  #painel.fechado {
    width: auto;
  }

  #intro h1 {
    font-size: 23px;
  }
}