:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16202c;
  --muted: #5d6b7a;
  --border: #e2e6eb;
  --accent: #0f6fde;
  --good: #16803c;
  --good-soft: #e6f4ea;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --surface: #1a2129;
    --text: #e8edf2;
    --muted: #9aa8b6;
    --border: #2b3540;
    --accent: #5aa2ff;
    --good: #4cc274;
    --good-soft: #17301f;
    --warn: #f0b75a;
    --warn-soft: #33270f;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { margin: 0; font-size: 1.6rem; }
h2 { margin: 0 0 4px; font-size: 1.05rem; }
.sub { margin: 4px 0 16px; color: var(--muted); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

form { position: relative; display: flex; gap: 8px; }
input[type=search] { flex: 1; min-width: 0; padding: 12px 14px; font-size: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
button { font: inherit; cursor: pointer; }
form > button { padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
#sugestoes { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 60vh; overflow-y: auto; }
#sugestoes li { display: flex; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; }
#sugestoes li[aria-selected=true], #sugestoes li:hover { background: var(--bg); }
#sugestoes .preco { color: var(--muted); white-space: nowrap; }

#aviso { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }

.bloco { margin-top: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.tag { display: inline-block; margin: 0 0 8px; padding: 1px 8px; font-size: .78rem; border-radius: 99px; background: var(--good-soft); color: var(--good); }
.tag.cinza { background: var(--bg); color: var(--muted); }
.linhas { margin: 0; padding: 0; list-style: none; }
.linhas li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.linhas li:first-child { border-top: 0; }
.esq { min-width: 0; }
.esq .nome { overflow-wrap: anywhere; }
.esq .det { font-size: .82rem; color: var(--muted); }
.dir { text-align: right; white-space: nowrap; }
.dir a { color: var(--text); font-weight: 700; text-decoration: none; }
.dir a:hover { text-decoration: underline; }
.dir s { display: block; font-size: .78rem; color: var(--muted); }
.dir .cond { display: block; font-size: .78rem; color: var(--muted); }
.melhor .dir a, .melhor .nome { color: var(--good); }
.estado { color: var(--muted); font-size: .9rem; }
.dir a.externo { font-size: .9rem; font-weight: 500; color: var(--accent); }
.link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent); }
footer { margin-top: 24px; font-size: .8rem; color: var(--muted); }
