:root {
  --brand: #0f766e;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f8fafc;
  --card: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root { --ink: #e5e7eb; --muted: #9ca3af; --bg: #0b1220; --card: #111a2e; --brand: #2dd4bf; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

main { max-width: 760px; margin: 0 auto; padding: 16px; }

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

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.gallery .thumb:first-child { grid-column: 1 / -1; }
.thumb { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--card); }
.thumb img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumb:first-child img { aspect-ratio: 16 / 9; }

.info, .contact { background: var(--card); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.badge { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 600; }
h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; }
.price { margin: 0 0 4px; font-size: 2rem; font-weight: 700; color: var(--brand); }
.place { margin: 0 0 12px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--muted); font-size: .9rem; }

.broker { margin: 0; font-weight: 600; }
.creci { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.cta { display: block; text-align: center; padding: 14px; border-radius: 12px; background: #16a34a; color: #fff; font-weight: 700; text-decoration: none; }
.cta:focus-visible, .thumb:focus-visible, #lightbox-close:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

#lightbox { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; border-radius: 12px; background: #000; }
#lightbox::backdrop { background: rgba(0, 0, 0, .8); }
#lightbox img { display: block; max-width: 96vw; max-height: 96vh; object-fit: contain; }
#lightbox-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 1.1rem; cursor: pointer; }

.map { margin: 16px 0; }
.map h2 { font-size: 1.1rem; margin: 0 0 8px; }
.map img { width: 100%; height: auto; border-radius: 12px; display: block; background: #1f2937; }
.map-note { margin: 6px 0 0; font-size: .85rem; opacity: .8; }
.map-credit { margin: 6px 0 0; font-size: .75rem; opacity: .7; }
.map-credit a { color: inherit; }

/* Páginas legais (termos e privacidade) */
.doc h1 { font-size: 1.5rem; margin: 8px 0; }
.doc h2 { font-size: 1.1rem; margin: 24px 0 6px; color: var(--brand); }
.doc p, .doc li { font-size: 0.95rem; }
.doc .meta { color: var(--muted); font-size: 0.85rem; }
.doc .demo {
  background: #fef3c7; color: #78350f; border-radius: 8px; padding: 10px 12px;
  margin: 12px 0; font-size: 0.9rem;
}
.doc [data-legal] { font-weight: 600; }
