:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #22302a;
  --muted: #6b7a72;
  --line: #e7eee9;
  --accent: #418756;
  --accent-strong: #356f47;
  --accent-soft: #edf5ef;
  --btn: #418756;
  --shadow: 0 1px 2px rgba(34, 48, 42, .04), 0 4px 16px rgba(34, 48, 42, .05);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --surface: #1c211e;
    --text: #e8eee9;
    --muted: #97a59c;
    --line: #28302b;
    --accent: #6fbf87;
    --accent-strong: #3b7d4f;
    --accent-soft: #1d2b22;
    --btn: #3b7d4f;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

header, .barra, .meu-predio, .horarios, main, .vazio, footer, .aviso-topo, .previa-faixa { position: relative; z-index: 1; }

/* ---------- Faixa de pré-visualização e aviso ---------- */
.previa-faixa {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #7a4d00;
  background: #fff3d6;
}
.aviso-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  margin: 12px auto 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff6e0;
  border: 1px solid #f3dca4;
  color: #5c4100;
  font-size: 15px;
  width: calc(100% - 32px);
}
.aviso-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0b429;
  color: #fff;
  font-weight: 700;
}
.aviso-texto { flex: 1; }
.aviso-texto a { color: inherit; font-weight: 700; }
.aviso-fechar {
  flex: none;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  padding: 4px;
}
@media (prefers-color-scheme: dark) {
  .previa-faixa { background: #3a2c10; color: #f5d58a; }
  .aviso-topo { background: #2c2413; border-color: #4a3b18; color: #f5dfa8; }
}

/* ---------- Idiomas ---------- */
.idiomas {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.idiomas button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.idiomas button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- Seu prédio ---------- */
.meu-predio {
  max-width: 680px;
  margin: 20px auto 0;
  padding: 0 16px;
}
.meu-predio-titulo { font-size: 18px; margin: 0 0 2px; }
.meu-predio-dica { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.predio-atual {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.predio-atual .predio-texto { flex: 1; }
.predio-atual .label { display: block; margin-bottom: 1px; }
.predio-icone.cheio { background: var(--accent); color: #fff; }
.btn-trocar {
  flex: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.predio-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-predio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.btn-escolher {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--btn);
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}

/* ---------- Fotos ---------- */
.fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.fotos.uma { grid-template-columns: 1fr; }
.foto {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.fotos.uma .foto { aspect-ratio: auto; max-height: 420px; }
.foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto-grande {
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #000;
  overflow: hidden;
}
.foto-grande::backdrop { background: rgba(0, 0, 0, .8); }
.foto-grande img { display: block; max-width: 100%; max-height: 92vh; object-fit: contain; }
.foto-fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Topo ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 56px 16px 28px;
}
.logo { display: block; width: min(260px, 68vw); height: auto; margin: 0 auto 28px; }
.hero h1 {
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.subtitulo { margin: 0 auto; max-width: 360px; color: var(--muted); font-size: 16px; }

/* ---------- Horários ---------- */
.horarios {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 680px;
  margin: 24px auto 0;
  padding: 0 16px;
}
.horario {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.horario div { display: flex; flex-direction: column; line-height: 1.3; }
.horario-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.horario strong { font-size: 20px; line-height: 1.25; }
.horario small { font-size: 12px; color: var(--muted); margin-top: 2px; }

.btn-whats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--btn);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  transition: background .2s, transform .2s;
}
.btn-whats:hover { filter: brightness(.92); }
.btn-whats:active { transform: scale(.98); }

/* ---------- Busca + navegação ---------- */
.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.busca-wrap {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
}
.busca-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
#busca {
  display: block;
  width: 100%;
  padding: 13px 16px 13px 44px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  -webkit-appearance: none;
}
#busca:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

#nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 0;
  scrollbar-width: none;
}
#nav::-webkit-scrollbar { display: none; }
#nav a {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
#nav a:hover, #nav a.ativo { background: var(--accent-soft); color: var(--accent); }

/* ---------- Conteúdo ---------- */
main { max-width: 680px; margin: 0 auto; padding: 8px 16px 24px; }

.secao { scroll-margin-top: 130px; margin-top: 40px; }
.secao h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}
.secao h2 span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 20px;
}

/* ---------- Prédios ---------- */
.secao-intro { margin: -4px 0 14px; color: var(--muted); font-size: 15px; }
.predios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.predio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.predio:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.predio[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.predio-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.predio[aria-selected="true"] .predio-icone { background: var(--accent); color: #fff; }
.predio-icone.predio-foto { width: 56px; height: 56px; overflow: hidden; }
.predio-foto img { width: 100%; height: 100%; object-fit: cover; }
.predio-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.predio-texto strong { font-size: 15px; }
.predio-texto small { font-size: 13px; color: var(--muted); }
.predio-areas { animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } }

.item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  transition: border-color .2s;
}
.item[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 17px 52px 17px 20px;
  font-weight: 700;
  font-size: 15px;
  position: relative;
}
.item summary::-webkit-details-marker { display: none; }
.item summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.item[open] summary::after { transform: translateY(-30%) rotate(-135deg); border-color: var(--accent); }

.tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: 1px;
  white-space: nowrap;
}

.corpo { padding: 0 20px 20px; }
.corpo p { margin: 0 0 10px; }
.corpo ol, .corpo ul { margin: 0 0 10px; padding-left: 20px; }
.corpo li { margin-bottom: 6px; }
.corpo li::marker { color: var(--accent); font-weight: 700; }
.corpo blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 14px;
}
.corpo blockquote p { margin: 0; }
/* Tipos dentro de um item (ex.: indução / elétrico / a gás) */
.tipos { margin: 6px 0 10px; }
.tipos-pergunta { font-weight: 700; font-size: 14px; margin: 0 0 8px !important; }
.tipos-opcoes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tipo {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.tipo:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tipo[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tipo-painel {
  padding: 14px 16px 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  animation: aparecer .25s ease;
}
.topicos { list-style: none; padding: 0 !important; margin: 4px 0 12px; }
.topicos li {
  position: relative;
  padding: 8px 0 8px 34px;
  border-bottom: 1px solid var(--line);
  margin: 0 !important;
}
.topicos li:last-child { border-bottom: 0; }
.topicos li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23418756' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.link-mapa {
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.video {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  margin-bottom: 14px;
  background: #000;
  cursor: pointer;
}
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  padding-left: 3px;
}

.vazio { text-align: center; color: var(--muted); padding: 0 16px; }

footer {
  text-align: center;
  padding: 24px 16px 48px;
}
.ajuda {
  position: relative;
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px;
  background: var(--accent-soft);
  border-radius: 20px;
}
.ajuda h2 { margin: 0 0 4px; font-size: 20px; }
.ajuda p { margin: 0 0 18px; color: var(--muted); }
.despedida { margin: 28px 0 0; color: var(--muted); font-size: 14px; }

@media (max-width: 360px) {
  .horarios { grid-template-columns: 1fr; }
}
.nav-icone { margin-right: 6px; }
.nav-icone:empty { display: none; }

/* ---------- Mascote ---------- */
.mascote-area {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.mascote-area > * { pointer-events: auto; }
.mascote {
  width: 116px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: chegar 1.1s cubic-bezier(.22, 1.15, .36, 1) both .3s;
  -webkit-tap-highlight-color: transparent;
}
/* Robô: animação do vídeo desenhada num canvas */
.robo {
  display: block;
  aspect-ratio: 300 / 263;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .14));
}
.robo-tela { display: block; width: 100%; height: 100%; }
@keyframes chegar { from { transform: translateY(60%) scale(.85); opacity: 0; } }

/* Balão de fala */
.mascote-balao {
  position: relative;
  max-width: 230px;
  margin: 0 18px 8px 0;
  padding: 14px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 8px 28px rgba(34, 48, 42, .16);
  font-size: 14px;
  line-height: 1.45;
  animation: aparecer .3s ease;
}
.mascote-balao p { margin: 0 18px 10px 0; }
.mascote-balao p:last-of-type:has(+ .balao-btn[hidden]) { margin-bottom: 0; }
/* mascote do lado esquerdo: balão e alinhamento espelhados */
.mascote-area[data-posicao$="esquerdo"] { align-items: flex-start; }
.mascote-area[data-posicao$="esquerdo"] .mascote-balao { margin: 0 0 8px 18px; border-radius: 16px 16px 16px 4px; }
.balao-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.balao-fechar {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
footer { padding-bottom: 170px; }

@media (max-width: 600px) {
  .mascote { width: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascote { animation: none !important; }
}
@media print { .mascote-area { display: none; } }

/* ---------- Seu apartamento ---------- */
.secao-apto h2 span { background: var(--accent); }
.wifi {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.wifi-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.wifi-texto { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; min-width: 0; }
.wifi-texto small { color: var(--muted); font-size: 12px; }
.wifi-texto strong { font-size: 16px; overflow-wrap: anywhere; }
.btn-copiar {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--btn);
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}
@media (max-width: 480px) {
  .wifi-texto { flex-basis: calc(100% - 60px); }
  .btn-copiar { width: 100%; }
}

/* Fotinha no canto do título do item */
.titulo-item { flex: 1; min-width: 0; }
.miniatura {
  flex: none;
  width: 46px;
  height: 46px;
  margin: -8px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 0 0 2px var(--surface), 0 1px 4px rgba(0, 0, 0, .15);
  cursor: zoom-in;
}
.miniatura img { display: block; width: 100%; height: 100%; object-fit: cover; }
