:root {
  --ink: #1f2a2e; --muted: #6b7678; --line: #e4e0d8; --bg: #fbf9f5; --card: #fff;
  --sea: #1f6f78; --sea-soft: #e3f0ef; --gold: #b8893b; --gold-soft: #f6eedd; --warn: #a8552f; --warn-soft: #f7e7df;
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Figtree", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --chat-w: 400px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.link:hover { color: var(--ink); background: #f0eee9; }
em { color: var(--gold); }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 24px; display: grid; gap: 14px; text-align: center; }
.login-title { font-family: var(--serif); font-size: 32px; line-height: 1.1; }
.login-sub { margin: 0; color: var(--muted); }
.quem { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quem input { position: absolute; opacity: 0; }
.quem span { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.quem input:checked + span { border-color: var(--sea); background: var(--sea-soft); color: var(--sea); font-weight: 600; }
.quem input:focus-visible + span { outline: 2px solid var(--sea); }
.login-box input[type=password] { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.login-box button { padding: 12px; border: 0; border-radius: 10px; background: var(--sea); color: #fff; font-weight: 600; }
.erro { color: var(--warn); margin: 0; min-height: 1.2em; font-size: 14px; }

/* layout */
.app { display: grid; grid-template-columns: 1fr var(--chat-w); min-height: 100dvh; }
.conteudo { padding: 24px 32px 64px; min-width: 0; }
.topo { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 24px; }
.marca { font-family: var(--serif); font-size: 26px; line-height: 1; }
.abas { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.abas a { color: var(--muted); text-decoration: none; padding: 5px 12px; border-radius: 99px; border: 1px solid transparent; font-size: 14px; }
.abas a.ativa, .abas a:hover { color: var(--ink); border-color: var(--line); background: #fff; }
section { scroll-margin-top: 16px; }
#plano { margin-top: 48px; }

.sec-head h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; }
.sub { color: var(--muted); margin: 6px 0 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.card.best { border: 2px solid var(--gold); box-shadow: 0 6px 18px rgba(184,137,59,.16); }
.tag { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; margin-bottom: 8px; background: #f0eee9; color: var(--muted); }
.card.best .tag { background: var(--gold); color: #fff; }
.nome { font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.cidade { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.cidade svg { width: 12px; height: 12px; }
.fotos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 150px 92px; gap: 5px; margin-top: 10px; }
.fotos img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; display: block; background: #f0eee9; cursor: zoom-in; }
.fotos img:first-child { grid-column: 1 / 3; }
.quarto { margin-top: 10px; font-weight: 600; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.quarto svg { width: 15px; height: 15px; color: var(--sea); flex: none; }
.quarto span { font-weight: 400; color: var(--muted); font-size: 13px; }
.linhas { margin-top: 8px; border-top: 1px solid var(--line); }
.linha { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ico { width: 26px; height: 26px; border-radius: 50%; background: var(--sea-soft); color: var(--sea); display: grid; place-items: center; }
.ico svg { width: 15px; height: 15px; }
.lbl { font-size: 13px; line-height: 1.3; }
.lbl small { display: block; color: var(--muted); font-size: 12px; }
.val { font-weight: 600; font-size: 14px; white-space: nowrap; text-align: right; }
.nota { font-size: 12.5px; color: var(--muted); margin: 8px 0 12px; }
.nota b, .nota strong { color: var(--ink); }
.total { margin-top: auto; padding: 10px 12px; border-radius: 9px; background: var(--sea-soft); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.best .total { background: var(--gold-soft); }
.t1 { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.t2 { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.fit { font-size: 12px; font-weight: 600; text-align: right; color: var(--sea); max-width: 140px; }
.fit.alerta, .fit.ruim { color: var(--warn); }
.rodape { color: var(--muted); font-size: 12.5px; margin-top: 16px; }

/* markdown do plano */
.md h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 32px 0 10px; }
.md h2:first-child { margin-top: 0; }
.md h3 { font-size: 17px; margin: 20px 0 6px; }
.md ul { padding-left: 20px; }
.md li { margin: 4px 0; }
.md li:has(> input[type=checkbox]) { list-style: none; margin-left: -20px; }
.md input[type=checkbox] { accent-color: var(--sea); margin-right: 6px; }
.md table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; font-size: 14px; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.md th { background: #f4f1ea; font-weight: 600; }
.md a { color: var(--sea); }
.md img { max-width: 100%; border-radius: 10px; }

/* chat */
.chat { position: sticky; top: 0; height: 100dvh; border-left: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-title { font-weight: 600; }
.chat-status { font-size: 12.5px; color: var(--muted); }
.chat-status.on { color: var(--sea); }
.chat-acoes { display: flex; gap: 2px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; word-wrap: break-word; }
.msg .autor { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.msg.eu { align-self: flex-end; background: var(--sea); color: #fff; border-bottom-right-radius: 4px; }
.msg.eu .autor { color: #d5ecea; }
.msg.outro { align-self: flex-end; background: var(--gold-soft); border-bottom-right-radius: 4px; }
.msg.claude { align-self: flex-start; background: #f4f1ea; border-bottom-left-radius: 4px; }
.msg.sistema { align-self: center; background: none; color: var(--muted); font-size: 12px; padding: 2px; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0; padding-left: 18px; }
.msg a { color: var(--sea); }
.msg table { border-collapse: collapse; font-size: 12.5px; display: block; overflow-x: auto; }
.msg th, .msg td { border: 1px solid var(--line); padding: 3px 6px; }
.passos { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.passos summary { cursor: pointer; }
.passos li { margin: 1px 0; }
.trabalhando { align-self: flex-start; font-size: 13px; color: var(--sea); background: var(--sea-soft); padding: 8px 12px; border-radius: 14px; max-width: 88%; }
.trabalhando .ult { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pontos::after { content: "…"; animation: pisca 1.2s infinite; }
@keyframes pisca { 50% { opacity: .2; } }
.compor { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.compor textarea { flex: 1; font: inherit; font-size: 16px; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; max-height: 160px; outline: none; }
.compor textarea:focus { border-color: var(--sea); }
.compor button { width: 42px; border: 0; border-radius: 12px; background: var(--sea); color: #fff; font-size: 16px; }
.compor button:disabled { opacity: .4; cursor: default; }

.so-mobile { display: none; }
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); border: 0; background: var(--sea); color: #fff; padding: 12px 18px; border-radius: 99px; font-weight: 600; box-shadow: 0 6px 18px rgba(31,111,120,.35); z-index: 5; }

/* foto ampliada */
.zoom { position: fixed; inset: 0; background: rgba(20,24,26,.88); display: grid; place-items: center; z-index: 20; cursor: zoom-out; padding: 16px; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .conteudo { padding: 16px 16px 96px; }
  .chat { position: fixed; inset: 0; height: 100dvh; z-index: 10; border: 0; transform: translateY(100%); transition: transform .25s ease; }
  .chat.aberto { transform: none; }
  .so-mobile { display: inline-block; }
  .sec-head h1 { font-size: 28px; }
  .cards { grid-template-columns: 1fr; }
}
