/* As cores vêm do logótipo (o verde #479B3C e o cinzento-escuro #29302B). Os
   verdes dos botões e do texto são versões mais escuras do mesmo verde, para se
   lerem bem: o texto branco em cima de --primary tem um contraste de 6,3:1. */
/* Inter (variável, 100 a 900), servida pelo próprio site — public/fonts */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* (1.14.2) Fraunces (variável, peso 100 a 900 e o eixo «suave»), só para os títulos e
   os preços — também servida pelo próprio site (public/fonts, licença SIL OFL) */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --white:#FFFFFF;
  /* (1.7) o fundo do site: branco */
  --bg:#FFFFFF;
  /* as caixinhas dentro dos cartões (estatísticas, campos, resultados do assistente) */
  --paper:#F6FAF5;
  --card:#FFFFFF;
  --ink:#29302B;
  --muted:#617564;
  --line:rgba(41,48,43,0.10);
  --line-strong:rgba(41,48,43,0.18);
  --primary:#2F6D26;
  --primary-dark:#224F1C;
  --primary-light:#479B3C;
  --mint:#DFF0DB;
  /* o texto em cima da cor principal (botões, escolhas, balões das mensagens) */
  --on-primary:#FFFFFF;
  /* o logótipo: o "bicho" e a pata a verde, o "meu" no cinzento-escuro */
  --logo-green:#479B3C;
  --logo-ink:#29302B;
  --danger:#B4453A;
  --warn:#B7791F;
  --gold:#D9A21B;
  --gold-ink:#7A5600;
  /* as mesmas cores em "r,g,b", para as versões transparentes (rgba) — funcionam em
     todos os browsers, ao contrário de color-mix(), que só existe nos mais recentes */
  --primary-rgb:47,109,38;
  --danger-rgb:180,69,58;
  --warn-rgb:183,121,31;
  --gold-rgb:217,162,27;
  --muted-rgb:97,117,100;
  --shadow: 0 1px 2px rgba(47,109,38,0.06), 0 6px 18px rgba(47,109,38,0.09);
  /* a letra Inter vem do próprio site (public/fonts, licença SIL OFL): nada é
     descarregado de outros sites, como o Google Fonts — nenhum endereço IP é
     enviado a terceiros */
  --font-display:'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* a faixa escura dos filtros e da ordenação */
  --forest:#173B1C;
  --forest-2:#21502A;
  --on-forest:#F1F8EF;
  box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --forest:#1E3F23;
    --forest-2:#2A5530;
    --on-forest:#EEF6EC;
    --white:#19241C;
    --bg:#0F1711;
    /* (1.8) no escuro, o fundo por trás das janelas escurece mais (para a janela se destacar) */
    --scrim:rgba(0,0,0,0.66);
    --paper:#0F1711;
    --card:#19241C;
    --ink:#EBF0EA;
    --muted:#A0B1A0;
    --line:rgba(235,240,234,0.10);
    --line-strong:rgba(235,240,234,0.20);
    --primary:#5FB654;
    --primary-dark:#9FD897;
    --primary-light:#80C577;
    --mint:rgba(95,182,84,0.18);
    --on-primary:#0F1711;
    --logo-green:#479B3C;
    --logo-ink:#EBF0EA;
    --danger:#E08478;
    --warn:#E0B25A;
    --gold:#E2B13C;
    --gold-ink:#F1D27E;
    --primary-rgb:95,182,84;
    --danger-rgb:224,132,120;
    --warn-rgb:224,178,90;
    --gold-rgb:226,177,60;
    --muted-rgb:160,177,160;
    color-scheme: dark;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 22px rgba(0,0,0,0.4);
  }
}
:root[data-theme="dark"] {
    --forest:#1E3F23;
    --forest-2:#2A5530;
    --on-forest:#EEF6EC;
  --white:#19241C;
  --bg:#0F1711;
  --scrim:rgba(0,0,0,0.66);
  --paper:#0F1711;
  --card:#19241C;
  --ink:#EBF0EA;
  --muted:#A0B1A0;
  --line:rgba(235,240,234,0.10);
  --line-strong:rgba(235,240,234,0.20);
  --primary:#5FB654;
  --primary-dark:#9FD897;
  --primary-light:#80C577;
  --mint:rgba(95,182,84,0.18);
  --on-primary:#0F1711;
  --logo-green:#479B3C;
  --logo-ink:#EBF0EA;
  --danger:#E08478;
  --warn:#E0B25A;
  --gold:#E2B13C;
  --gold-ink:#F1D27E;
  --primary-rgb:95,182,84;
  --danger-rgb:224,132,120;
  --warn-rgb:224,178,90;
  --gold-rgb:226,177,60;
  --muted-rgb:160,177,160;
  color-scheme: dark;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 22px rgba(0,0,0,0.4);
}
*, *::before, *::after { box-sizing: inherit; }
/* o atributo "hidden" esconde sempre, mesmo em elementos com display próprio (grelhas, flex) */
[hidden] { display: none !important; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); height: 100%; }
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; }
button, .card, .chat-row, .profile-ad-row { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Header ---------- */
header.top {
  position: -webkit-sticky;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-inner { max-width: 560px; margin: 0 auto; padding: 14px 16px 12px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo { margin: 0; line-height: 0; }
/* o logótipo vem escrito na própria página (e não como imagem), para as cores
   mudarem com o modo escuro: o "meu" passa a claro */
.logo { display: block; height: 34px; width: auto; max-width: 100%; }
.logo-verde { fill: #479B3C; fill: var(--logo-green); }
.logo-tinta { fill: #29302B; fill: var(--logo-ink); }
@media (max-width: 359px) { .brand-logo .logo { height: 29px; } }
/* texto só para leitores de ecrã (por exemplo, o nome do site por baixo do logótipo) */
/* inglês: a página fica escondida até o dicionário chegar (no máximo 4 s; ver i18n.js) */
html.i18n-pending body { visibility: hidden; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
/* a bandeira da outra língua (Reino Unido para o inglês, Portugal para o português) */
.lang-flag { display: block; width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
/* «Saltar para o conteúdo»: só aparece quando chega lá com o teclado (Tab) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--card); color: var(--ink); border: 2px solid var(--primary); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 10px; }
#main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.help-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.enter-btn { white-space: nowrap; }
.enter-btn {
  border: 1.5px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18); }
.search-wrap .magnifier { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .55; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.chip.selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- Main / tabs ---------- */
#main { max-width: 560px; margin: 0 auto; padding: 14px 16px calc(128px + env(safe-area-inset-bottom, 0px)); }
.result-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; font-size: 13px; color: var(--muted); }
.result-row select {
  border: none; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 600; text-align: right;
  -webkit-appearance: none; appearance: none; padding-right: 2px;
}

.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
}
.card:active { transform: scale(0.98); }
.tile { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.tile.small { flex: 0 0 52px; width: 52px; height: 52px; font-size: 22px; border-radius: 9px; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-breed { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-price { font-family: var(--font-display); font-weight: 600; font-size: 16.5px; color: var(--primary-dark); margin-top: 2px; }
.card-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.heart-btn { border: none; background: none; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px; flex: 0 0 auto; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty.small { padding: 18px 10px; text-align: left; }
.empty.small p { margin: 0; max-width: none; }
.empty .big { font-size: 34px; margin-bottom: 10px; }
.empty p { font-size: 14px; line-height: 1.5; margin: 0 auto; max-width: 260px; }

.login-prompt { text-align: center; padding: 56px 24px 20px; }
.login-prompt .big { font-size: 34px; margin-bottom: 12px; }
.login-prompt p { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.5; }
.login-prompt .btn-primary { margin-bottom: 10px; }

/* ---------- Profile ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 12px 4px 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.avatar-lg { width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.profile-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.profile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.section-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 4px 2px 10px; }
.profile-ad-row, .chat-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  width: 100%;
  text-align: left;
  position: relative;
}
button.chat-row { cursor: pointer; font-family: inherit; }
.chat-row-body { flex: 1; min-width: 0; }
.chat-row-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-row-name { font-weight: 600; font-size: 14.5px; }
.chat-row-time { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.chat-row-seller { font-size: 12px; color: var(--primary-dark); margin-top: 1px; }
.chat-row-preview { font-size: 13px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-preview.unread { color: var(--ink); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.mini-btn { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 9px; cursor: pointer; flex: 0 0 auto; }
.chat-list { display: flex; flex-direction: column; gap: 9px; }
.mine-badge { display: inline-block; font-size: 11px; font-weight: 600; background: var(--mint); color: var(--primary-dark); padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; }
.seller-row { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seller-row strong { color: var(--ink); }
.verify-check { color: var(--primary); font-weight: 700; }

.verify-badge { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.verify-badge.verified { background: var(--mint); border-color: transparent; color: var(--primary-dark); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.verify-text { font-size: 13.5px; margin-bottom: 10px; line-height: 1.5; color: var(--ink); }
.field-hint { font-size: 11.5px; color: var(--muted); margin: 6px 2px 0; line-height: 1.4; }
/* (1.4.1) animais da quinta: o aviso da detenção caseira e o da Madeira */
.farm-hint { margin-top: -4px; margin-bottom: 12px; }
.field-hint.warn { color: var(--danger); font-weight: 600; }
.species-note { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 10px 2px 0; }

/* ---------- FAB & bottom nav ---------- */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 8px 20px rgba(47,109,38,0.35);
  cursor: pointer;
}
.fab:active { transform: scale(0.96); }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  display: flex;
  max-width: 560px;
  margin: 0 auto;
}
.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: none;
  padding: 6px 4px 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.nav-icon { font-size: 20px; line-height: 1; filter: grayscale(1) opacity(.65); }
.nav-btn.active { color: var(--primary); }
.nav-btn.active .nav-icon { filter: none; }
/* (1.15) o número de mensagens por ler (como no ícone das apps do iPhone) */
.nav-dot {
  position: absolute; top: -2px; right: calc(50% - 24px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #C62828; color: #FFFFFF; border: 2px solid var(--card);
  font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center; font-variant-numeric: tabular-nums;
  display: none;
}
.nav-dot.show { display: block; }

/* ---------- Sheets ---------- */
.scrim {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40;
  background: var(--scrim, rgba(15,23,18,0.45));
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 41;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  /* fechada: escondida por baixo do ecrã, sem sombra (a sombra das folhas
     fechadas via-se como uma faixa escura no fundo) e fora do alcance do
     teclado (Tab); só fica invisível depois de acabar de descer */
  visibility: hidden;
  transition: transform .28s cubic-bezier(.32,.72,0,1), visibility 0s linear .28s;
  max-width: 560px;
  margin: 0 auto;
}
.sheet:focus { outline: none; }
.sheet.open {
  transform: translateY(0);
  visibility: visible;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.sheet-handle { width: 36px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 10px auto 4px; flex: 0 0 auto; }
.sheet-scroll { overflow-y: auto; padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 14px; }
.sheet-header h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0; }
.close-x { border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); width: 32px; height: 32px; border-radius: 10px; font-size: 15px; cursor: pointer; flex: 0 0 auto; }

.detail-tile { width: 100%; height: 190px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 68px; margin-bottom: 16px; }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.detail-breed { color: var(--muted); font-size: 14px; margin-top: 2px; }
.detail-price { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--primary-dark); margin: 12px 0 2px; }
.detail-meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 10px 0 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-meta-row span { display: flex; align-items: center; gap: 4px; }
.detail-desc { font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; white-space: pre-wrap; }

.btn-primary {
  width: 100%; padding: 14px; border: none; border-radius: 13px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 600; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
}
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  width: 100%; padding: 13px; border-radius: 13px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--muted); font-weight: 600; font-size: 14px;
  margin-top: 10px; cursor: pointer; font-family: inherit;
}
.btn-ghost.danger { color: var(--danger); border-color: rgba(var(--danger-rgb), 0.4); }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 14.5px; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.field select:disabled { opacity: .55; }
.field textarea { resize: vertical; min-height: 76px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pick .chip { font-size: 13px; }
.form-error { font-size: 12.5px; color: var(--danger); margin: -6px 0 14px; line-height: 1.5; display: none; }
.form-error.show { display: block; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.link-btn { background: none; border: none; color: var(--primary); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; font-family: inherit; }

/* ---------- Chat & Help sheets ---------- */
.chat-sheet { height: 88vh; max-height: 88vh; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 4px 18px 12px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.chat-tile { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 auto; }
.chat-title { flex: 1; min-width: 0; }
.chat-pet-name { font-weight: 600; font-size: 14.5px; }
.chat-seller-name { font-size: 12px; color: var(--muted); }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty-hint { margin: auto; text-align: center; color: var(--muted); font-size: 13px; padding: 20px; line-height: 1.5; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.mine { justify-content: flex-end; }
.msg-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--primary-dark); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.msg-bubble { max-width: 75%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.msg-row.their .msg-bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-row.mine .msg-bubble { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.msg-time { display: block; font-size: 10px; opacity: .8; margin-top: 3px; text-align: right; }
.chat-input-row { flex: 0 0 auto; display: flex; gap: 9px; align-items: center; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; padding: 11px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 14px; outline: none;
}
.chat-input-row input:focus { border-color: var(--primary); }
.chat-send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--on-primary); border: none; font-size: 16px; cursor: pointer; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.chat-send-btn:active { transform: scale(0.94); }
.help-quick { flex: 0 0 auto; display: flex; gap: 7px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.help-quick::-webkit-scrollbar { display: none; }
.help-quick .chip { font-size: 12.5px; padding: 7px 12px; }

.toast {
  /* por cima do botão "＋ Publicar", para não o tapar */
  position: fixed; left: 50%; bottom: calc(138px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .25s ease; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

::selection { background: var(--mint); color: var(--primary-dark); }

/* ================= novo: distrito no result-row ================= */
.result-row-selects { display: flex; gap: 8px; }
.result-row-selects select { max-width: 46vw; text-overflow: ellipsis; }

/* ================= novo: fotos no formulário ================= */
.field-hint-inline { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); flex: 0 0 auto; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .photo-remove-btn {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border-radius: 999px; border: none; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* (1.15) «Tirar foto» só nos ecrãs de toque (no computador, a câmara não faz sentido) */
@media (hover: hover) and (pointer: fine) { .photo-camera-btn { display: none !important; } }
.photo-add-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--line-strong); border-radius: 10px;
  padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; background: var(--card);
}

/* ================= novo: ligações secundárias ================= */
.forgot-link { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.danger-link { color: var(--danger); display: block; text-align: center; margin: 14px auto 0; font-size: 13px; }
.privacy-link { display: block; text-align: center; margin-top: 16px; font-size: 12.5px; text-decoration: none; }

/* ================= novo: denunciar ================= */
.report-icon-btn {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  width: 32px; height: 32px; border-radius: 10px; font-size: 14px; cursor: pointer; flex: 0 0 auto;
}

/* ================= novo: galeria de fotos no anúncio ================= */
.detail-photos { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0; -webkit-overflow-scrolling: touch; position: relative; perspective: 1000px; cursor: grab; }
.detail-photos[data-dragging='true'] { cursor: grabbing; }
.detail-photos::-webkit-scrollbar { display: none; }
.detail-photos img { width: 84%; max-width: 320px; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; flex: 0 0 auto; scroll-snap-align: center; transform-origin: center center; -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform; }
.detail-photos { scroll-snap-type: x mandatory; }
/* (1.18) efeito «tilt» do carrossel: as fotos ao lado inclinam-se em 3D ao deslizar (setupPhotoTilt, em public/js/app.js). Com «reduzir movimento», ficam direitas. */
@media (prefers-reduced-motion: reduce){ .detail-photos img { transform: none !important; opacity: 1 !important; } }
.card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ================= novo: avisos por email (🔔), termos, email por confirmar ================= */
/* em ecrãs muito estreitos, o 🔔 passa para a linha de baixo em vez de ficar cortado */
.alert-row { margin: -4px 2px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alert-btn {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--primary);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.filter-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.filter-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(var(--primary-rgb), 0.08); }
.filter-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 700;
}
.alert-btn:active { transform: scale(0.97); }
.terms-check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.45; cursor: pointer; }
.terms-check input { margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--primary); }
.terms-check a { color: var(--primary); font-weight: 600; }
.email-banner {
  background: linear-gradient(rgba(var(--warn-rgb), 0.12), rgba(var(--warn-rgb), 0.12)), var(--card);
  border: 1px solid rgba(var(--warn-rgb), 0.38);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; color: var(--ink);
}
.email-banner .link-btn { margin-top: 6px; display: inline-block; }
.section-gap { margin-top: 22px; }
.section-hint { margin: -4px 2px 10px; }
.saved-search-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.saved-search-row .ss-text { font-size: 13.5px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.legal-links { text-align: center; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.legal-links a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* os avisos no fundo do ecrã podem ser mais compridos do que a largura de um
   telemóvel: deixa-os quebrar linha em vez de saírem fora do ecrã */
.toast { white-space: normal; width: max-content; max-width: min(calc(100vw - 32px), 520px); text-align: center; border-radius: 18px; line-height: 1.4; }

/* ================= novo: destaques (pacotes pagos, como no OLX) ================= */
/* Top de Anúncios: primeiros lugares e a etiqueta ⭐ Destaque (.featured-pill);
   Sobressaído: a moldura dourada */
.card.highlighted {
  border-color: rgba(var(--gold-rgb), 0.6);
  background: linear-gradient(rgba(var(--gold-rgb), 0.07), rgba(var(--gold-rgb), 0.07)), var(--card);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.3), var(--shadow);
}
.featured-pill {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; vertical-align: 2px;
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  color: var(--gold-ink); background: linear-gradient(rgba(var(--gold-rgb), 0.18), rgba(var(--gold-rgb), 0.18)), var(--card);
  border: 1px solid rgba(var(--gold-rgb), 0.5);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.promo-status {
  display: block; font-size: 13px; font-weight: 600; line-height: 1.4;
  color: var(--gold-ink); background: linear-gradient(rgba(var(--gold-rgb), 0.14), rgba(var(--gold-rgb), 0.14)), var(--card);
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.btn-gold {
  width: 100%; padding: 13px; border: none; border-radius: 13px; margin-bottom: 10px;
  background: var(--gold); color: #2A1D00; font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit;
}
.btn-gold:active { transform: scale(0.98); }
.mini-btn.gold { border-color: rgba(var(--gold-rgb), 0.65); color: var(--gold-ink); }
.profile-ad-actions { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.profile-ad-promo { font-size: 11.5px; font-weight: 700; color: var(--gold-ink); margin-top: 3px; }
.promo-parts { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.promo-parts li { margin-top: 2px; }

/* a montra «Anúncios em destaque» (destaque "Página inicial") */
.showcase { margin: 0 0 16px; }
.showcase[hidden] { display: none; }
.showcase-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 2px 8px; color: var(--ink); }
.showcase-row {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.sc-card {
  flex: 0 0 148px; width: 148px; scroll-snap-align: start; cursor: pointer; color: inherit;
  background: linear-gradient(rgba(var(--gold-rgb), 0.07), rgba(var(--gold-rgb), 0.07)), var(--card);
  border: 1px solid rgba(var(--gold-rgb), 0.6); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.25), var(--shadow);
}
.sc-card:active { transform: scale(0.98); }
.sc-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sc-tile { height: 104px; display: flex; align-items: center; justify-content: center; font-size: 38px; }
.sc-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sc-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-breed, .sc-meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-price { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--primary-dark); margin: 2px 0 1px; }

.promo-intro { font-size: 13.5px; color: var(--muted); margin: -6px 2px 16px; line-height: 1.5; }
.pkg-list { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 16px; }
.pkg {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink); font-family: inherit;
  border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 14px;
}
.pkg.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2); }
.pkg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pkg-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.pkg-price { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--primary-dark); white-space: nowrap; }
.pkg-desc { font-size: 13px; color: var(--muted); margin: 3px 0 9px; line-height: 1.45; }
.pkg-desc:last-child { margin-bottom: 0; }
.pkg-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; line-height: 1.4; }
.pkg-features li { padding-left: 18px; position: relative; }
.pkg-features li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 800; }
.pkg-ribbon {
  position: absolute; top: -10px; right: 12px; background: var(--gold); color: #2A1D00;
  font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em;
}
.test-note { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; line-height: 1.45; }
.promo-skip { display: block; margin: 12px auto 0; font-size: 13px; }

.order-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.order-main { min-width: 0; font-size: 13px; line-height: 1.45; }
.order-main strong { font-weight: 600; }
.order-sub { color: var(--muted); font-size: 12px; }
.order-status { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.order-status.paid { background: var(--mint); color: var(--primary-dark); }
.order-status.failed, .order-status.cancelled { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.order-status.pending { background: rgba(var(--muted-rgb), 0.15); color: var(--muted); }

/* página de pagamento (modo de teste) */
.pay-wrap { max-width: 480px; margin: 0 auto; padding: calc(22px + env(safe-area-inset-top, 0px)) 16px 60px; }
.pay-brand { display: inline-block; text-decoration: none; margin: 0 2px 16px; line-height: 0; }
.pay-brand .logo { height: 30px; }
.pay-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.pay-loading, .pay-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
.pay-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 4px 0 10px; }
.test-banner {
  background: linear-gradient(rgba(var(--warn-rgb), 0.12), rgba(var(--warn-rgb), 0.12)), var(--card);
  border: 1px solid rgba(var(--warn-rgb), 0.4);
  border-radius: 12px; padding: 11px 13px; margin-bottom: 14px; font-size: 13px; line-height: 1.5;
}
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-row span { color: var(--muted); }
.pay-row strong { text-align: right; overflow-wrap: anywhere; }
.pay-features { list-style: none; padding: 10px 0 4px; margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.pay-features li { padding-left: 18px; position: relative; line-height: 1.4; }
.pay-features li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 800; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 16px; font-size: 15px; }
.pay-total strong { font-family: var(--font-display); font-size: 24px; color: var(--primary-dark); }
.pay-cancel { display: block; margin: 14px auto 2px; }
.pay-back { margin-top: 14px; text-decoration: none; }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .6; cursor: default; }
a.mini-btn { text-decoration: none; display: inline-block; text-align: center; }
.pkg:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ================= novo: estado do anúncio ================= */
.card.closed, .profile-ad-row.closed { opacity: .74; }
.status-pill {
  display: inline-flex; align-items: center; margin-left: 8px; vertical-align: 2px;
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.status-pill.reserved { color: var(--gold-ink); background: linear-gradient(rgba(var(--warn-rgb), 0.16), rgba(var(--warn-rgb), 0.16)), var(--card); border: 1px solid rgba(var(--warn-rgb), 0.45); }
.status-pill.sold, .status-pill.adopted { color: var(--primary-dark); background: var(--mint); }
.status-banner { border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.45; }
.status-banner.reserved { background: linear-gradient(rgba(var(--warn-rgb), 0.12), rgba(var(--warn-rgb), 0.12)), var(--card); border: 1px solid rgba(var(--warn-rgb), 0.38); }
.status-banner.closed { background: var(--mint); color: var(--primary-dark); }
.status-picker-wrap { margin: 2px 0 14px; }
.status-picker-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 2px 6px; }
.status-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.status-opt {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 9px 2px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.status-opt.selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ================= novo: estatísticas ================= */
.stats-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.stats-loading { font-size: 13px; color: var(--muted); margin: 0; }
.stats-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.stats-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats-tiles div { background: var(--paper); border-radius: 10px; padding: 8px 4px; text-align: center; font-size: 11.5px; color: var(--muted); }
.stats-tiles b { display: block; font-size: 19px; color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.stats-chart { display: flex; align-items: flex-end; gap: 3px; height: 56px; padding: 0 1px; border-bottom: 1px solid var(--line-strong); }
.stats-chart .bar { flex: 1; min-height: 2px; background: var(--primary-light); border-radius: 3px 3px 0 0; }
.stats-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 4px 0 6px; }
.profile-ad-stats { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ================= novo: quem anuncia e avaliações ================= */
.seller-link { width: 100%; background: none; border: none; padding: 0; text-align: left; cursor: pointer; font-family: inherit; }
.seller-rating { color: var(--gold-ink); font-weight: 700; }
.seller-more { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 12.5px; }
.seller-head { display: flex; gap: 14px; align-items: center; padding: 2px 2px 14px; }
.seller-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge-ok { font-size: 11px; font-weight: 700; color: var(--primary-dark); background: var(--mint); padding: 2px 8px; border-radius: 999px; }
.rating-summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.rating-summary strong { color: var(--ink); }
.stars-big, .review-stars { color: #E2A21B; letter-spacing: 1px; }
.stars-big { font-size: 17px; }
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-meta { font-size: 12px; color: var(--muted); text-align: right; }
.review-text { font-size: 13.5px; margin: 6px 0 2px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.review-report { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.empty-inline { font-size: 13px; color: var(--muted); margin: 0 2px; line-height: 1.5; }
.chat-review-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; color: var(--ink);
  background: linear-gradient(rgba(var(--gold-rgb), 0.09), rgba(var(--gold-rgb), 0.09)), var(--paper);
}
.star-pick { display: flex; gap: 4px; justify-content: center; margin: 2px 0 16px; }
.star-pick .star { font-size: 36px; line-height: 1; background: none; border: none; cursor: pointer; color: var(--line-strong); padding: 2px 4px; font-family: inherit; }
.star-pick .star.on { color: #E2A21B; }

/* ================= novo: instalar a app e notificações ================= */
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
#appBox .app-card { margin-top: 16px; }
.app-card .app-title { font-weight: 700; margin-bottom: 4px; }
.app-card .btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.app-card .btn-primary { margin-top: 12px; }

/* ================= telemóveis muito estreitos (320 px) ================= */
#resultCount { white-space: nowrap; }
@media (max-width: 359px) {
  .result-row { flex-wrap: wrap; row-gap: 4px; }
  .result-row-selects { margin-left: auto; }
}

/* ================= ecrãs maiores: tablets e computadores ================= */
/* Nos telemóveis fica tudo como estava. Com mais espaço, os anúncios
   aparecem em grelha (2 colunas num tablet, 3 num computador), as Mensagens
   e o Perfil ficam numa coluna confortável de ler, e as folhas (anúncio,
   conversa, formulários) abrem como janelas no meio do ecrã. */
@media (min-width: 760px) {
  .top-inner, #main { max-width: 720px; }
  #homeList, #favsList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #tab-messages, #tab-profile { max-width: 600px; margin: 0 auto; }
  .fab { right: max(18px, calc((100vw - 720px) / 2 + 12px)); }
  .bottom-nav { border: 1px solid var(--line); border-bottom: none; border-radius: 16px 16px 0 0; }

  .sheet {
    top: 50%; left: 50%; right: auto; bottom: auto;
    width: calc(100% - 48px); max-width: 560px; max-height: 88vh;
    margin: 0;
    border-radius: 20px;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 24px));
    transition: transform .22s ease, opacity .22s ease, visibility 0s linear .22s;
  }
  .sheet.open {
    opacity: 1;
    transform: translate(-50%, -50%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
    transition: transform .22s ease, opacity .22s ease;
  }
  .sheet-handle { visibility: hidden; height: 0; margin: 8px auto 0; }
  .chat-sheet { height: min(88vh, 780px); }
}
@media (min-width: 1120px) {
  .top-inner, #main { max-width: 1060px; }
  #homeList, #favsList { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fab { right: max(18px, calc((100vw - 1060px) / 2 + 12px)); }
}

/* ================= novo: venda ou adoção, filtros e a ficha legal do anúncio ================= */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg-opt {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 10px 6px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.seg-opt.selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.field input:disabled { opacity: .55; }

.legal-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; margin: 0 0 14px; }
.legal-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.legal-row:last-child { border-bottom: none; }
.legal-row span { color: var(--muted); }
.legal-row strong { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.legal-row strong.missing { color: var(--danger); }
.safety-box {
  background: linear-gradient(rgba(var(--primary-rgb), 0.07), rgba(var(--primary-rgb), 0.07)), var(--card);
  border: 1px solid rgba(var(--primary-rgb), 0.25); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px;
  font-size: 13px; line-height: 1.5;
}
.safety-title { font-weight: 700; margin-bottom: 4px; }
.safety-box ul { margin: 0 0 6px; padding-left: 18px; }
.safety-box li { margin-bottom: 3px; }
.safety-box a { color: var(--primary); font-weight: 700; text-decoration: none; }
.expiry-note { font-size: 12.5px; color: var(--muted); margin: -4px 2px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.status-banner.expired, .status-banner.hidden-ad {
  background: linear-gradient(rgba(var(--muted-rgb), 0.12), rgba(var(--muted-rgb), 0.12)), var(--card);
  border: 1px solid rgba(var(--muted-rgb), 0.35);
}
.status-banner .btn-primary { margin-top: 10px; }
.status-pill.expired { color: var(--muted); background: rgba(var(--muted-rgb), 0.14); }
.status-pill.hidden-ad { color: var(--danger); background: rgba(var(--danger-rgb), 0.12); }
.profile-ad-warn { font-size: 11.5px; font-weight: 700; color: var(--danger); margin-top: 3px; }
.profile-ad-expiry { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.site-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; padding-top: 26px; line-height: 1.9; }
/* com poucos anúncios, o rodapé fica no fim da página (por baixo do botão
   "＋ Publicar", que nunca o tapa depois de descer até ao fim) */
#tab-home { display: flex; flex-direction: column; min-height: calc(100vh - 200px); }
#tab-home > .site-foot { margin-top: auto; }
.site-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.chat-alert {
  flex: 0 0 auto; padding: 8px 14px; font-size: 12.5px; line-height: 1.45; color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(rgba(var(--primary-rgb), 0.07), rgba(var(--primary-rgb), 0.07)), var(--paper);
}
.chat-alert.danger { background: linear-gradient(rgba(var(--danger-rgb), 0.1), rgba(var(--danger-rgb), 0.1)), var(--paper); }
.chat-alert a { color: var(--primary); font-weight: 700; }
.msg-warn {
  align-self: flex-start; max-width: 85%; margin: -4px 0 2px 34px; font-size: 11.5px; line-height: 1.4; color: var(--danger);
  background: rgba(var(--danger-rgb), 0.08); border-radius: 10px; padding: 6px 9px;
}
/* o lembrete das adoções ("é sem custos") é um lembrete, não um alarme */
.msg-warn.calm { color: var(--primary-dark); background: rgba(var(--primary-rgb), 0.09); }
.chat-input-row input:disabled { opacity: .55; }

/* ---------- páginas por categoria / distrito (/caes/adocao/porto) ---------- */
.landing { margin: 2px 2px 12px; }
.landing-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0 0 4px; line-height: 1.25; }
.landing-text { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
/* os anúncios já escritos na página pelo servidor (aparecem até o site carregar) */
.ssr-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.ssr-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: var(--mint); }
.landing-links { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: 18px 2px 0; }
.landing-links p { margin: 0 0 6px; }
.landing-links a, .explore-links a { color: var(--primary); text-decoration: none; font-weight: 600; }
.explore-links { margin-bottom: 6px; }
.load-more { display: block; width: 100%; margin: 14px 0 0; }

/* ---------- filtros: sexo e saúde ---------- */
.seg.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 380px) { .seg.four { grid-template-columns: 1fr 1fr; } }
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex !important; align-items: center; gap: 9px; font-size: 13.5px !important; font-weight: 500 !important; color: var(--ink) !important; margin: 0 0 6px !important; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--primary); }

/* ---------- denúncias: motivos ---------- */
.radio-list { display: flex; flex-direction: column; gap: 7px; }
.radio-opt { text-align: left; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; gap: 2px; }
.radio-opt strong { font-size: 13.5px; }
.radio-opt span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.radio-opt.selected { border-color: var(--primary); background: var(--mint); box-shadow: inset 0 0 0 1px var(--primary); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.report-note { text-align: center; margin-top: 10px; }

/* ---------- a minha conta ---------- */
.profile-card-main { flex: 1; min-width: 0; }
.profile-card-main .profile-sub { overflow-wrap: anywhere; }
.form-section-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 4px 0 10px; }
.account-form { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.account-form:last-child { border-bottom: none; margin-bottom: 0; }
.account-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0 2px 18px; }
.account-links .check-row { font-size: 13px !important; line-height: 1.4; align-items: flex-start; }
.verify-badge.pending { border-color: rgba(var(--gold-rgb), 0.55); }
.verify-badge.rejected { border-color: rgba(var(--danger-rgb), 0.45); }
.verify-badge .verify-text + .link-btn, .verify-badge .verify-text + .btn-ghost { margin-top: 8px; }

/* ---------- avisos guardados: email / notificação ---------- */
.ss-actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.toggle-chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 9px; padding: 5px 8px; font-size: 14px; cursor: pointer; opacity: .45; filter: grayscale(1); }
.toggle-chip.on { opacity: 1; filter: none; border-color: var(--primary); background: var(--mint); }

/* ---------- conversas: não lidas, "visto", fotos, pedido de adoção ---------- */
.unread-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.seen-mark { font-weight: 400; color: var(--muted); }
.msg-seen { align-self: flex-end; font-size: 11px; color: var(--muted); margin: -4px 4px 6px 0; }
.msg-bubble.has-photo { padding: 5px; }
.msg-bubble.has-photo .msg-text { padding: 5px 7px 0; }
.msg-bubble.has-photo .msg-time { padding: 0 7px 3px; }
.msg-photo-link { display: block; }
.msg-photo { display: block; max-width: 100%; width: 220px; max-height: 260px; object-fit: cover; border-radius: 12px; background: rgba(var(--muted-rgb), 0.15); }
.msg-bubble.is-card { max-width: 88%; }
.adopt-card-title { font-weight: 700; margin-bottom: 6px; }
.adopt-q { font-size: 11.5px; opacity: .8; margin-top: 6px; }
.adopt-a { font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-photo-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; flex: 0 0 auto; }
.chat-photo-btn.busy { opacity: .5; pointer-events: none; }
.chat-photo-btn.disabled { opacity: .4; pointer-events: none; }

/* ---------- associações e respostas às avaliações ---------- */
.org-mini { font-weight: 600; color: var(--primary-dark); }
.verify-check.org { color: var(--primary-dark); }
.badge-ok.org { background: rgba(var(--gold-rgb), 0.22); color: var(--gold-ink); }
.org-about { font-size: 13.5px; line-height: 1.5; margin: 0 2px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-reply { margin: 8px 0 2px; padding: 8px 10px; border-left: 3px solid var(--mint); background: var(--paper); border-radius: 8px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-reply-who { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.review-actions { display: inline-flex; gap: 10px; align-items: center; }

/* ---------- Início: Anúncios / Perdidos e achados ---------- */
.section-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
}
.sec-opt {
  border: none; background: transparent; color: var(--muted); border-radius: 10px; padding: 9px 4px;
  font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; font-family: inherit;
}
.sec-opt.selected { background: var(--primary); color: var(--on-primary); }
.lost-intro {
  background: linear-gradient(rgba(var(--warn-rgb), 0.10), rgba(var(--warn-rgb), 0.10)), var(--card);
  border: 1px solid rgba(var(--warn-rgb), 0.35); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px;
  font-size: 13px; line-height: 1.5;
}
.lost-intro p { margin: 0 0 10px; }
.lost-intro a { color: var(--primary); font-weight: 700; }
.lost-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lost-actions .btn-ghost { margin: 0; padding: 11px 8px; color: var(--ink); background: var(--card); }
.card-price.lost { font-family: var(--font-body); font-size: 14px; font-weight: 700; }
.card-price.lost.perdido, .detail-price.lost.perdido { color: var(--danger); }
.card-price.lost.achado, .detail-price.lost.achado { color: var(--primary-dark); }
.detail-price.lost { font-family: var(--font-body); font-size: 19px; font-weight: 700; }
.status-pill.resolved { color: var(--primary-dark); background: var(--mint); }
.status-picker.two { grid-template-columns: 1fr 1fr; }
.safety-box.lost {
  background: linear-gradient(rgba(var(--warn-rgb), 0.09), rgba(var(--warn-rgb), 0.09)), var(--card);
  border-color: rgba(var(--warn-rgb), 0.35);
}
.btn-ghost.share-lost { margin: 0 0 14px; color: var(--ink); }
.seg-opt:disabled { opacity: .4; cursor: default; }
.lost-hint { margin-top: -6px; margin-bottom: 14px; }

/* ---------- entrar com a conta Google ---------- */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  border-radius: 13px; padding: 13px; font-size: 15px; font-weight: 600; text-decoration: none; font-family: inherit;
}
.google-btn:active { transform: scale(0.98); }
.google-btn img { width: 18px; height: 18px; display: block; }
.google-btn-logo { display: inline-flex; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 12px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-setup { margin: -4px 2px 14px; }

/* ---------- o questionário de adoção da associação ---------- */
.verify-badge.qe-box { margin-top: -8px; }
.qe-status { margin: -6px 2px 12px; }
.qe-item { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 4px; margin: 0 0 10px; background: var(--card); }
.qe-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qe-num { font-weight: 700; font-size: 13px; }
.qe-tools { display: inline-flex; gap: 4px; }
.qe-tools button {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: 8px;
  padding: 4px 9px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.qe-tools button:disabled { opacity: .35; cursor: default; }
.qe-item .field { margin-bottom: 10px; }
.qe-item textarea.qe-options { min-height: 92px; }
.qe-error { margin-top: 10px; }
#qeAddBtn { margin: 0 0 14px; }

/* =====================================================================
   Versão 1.4 — aspeto novo
   Telemóvel primeiro: cartões com a foto em cima (2 colunas), o topo do
   Início com o título e a pesquisa, a faixa escura dos filtros. No
   computador (≥ 1100 px): menu no topo, filtros fixos ao lado da lista e
   3–4 colunas. As animações só respondem ao que a pessoa faz, e desligam-se
   com "reduzir movimento".
   ===================================================================== */
body { font-feature-settings: "cv11", "ss01"; letter-spacing: -0.006em; }
h1, h2, h3, .detail-name, .profile-name, .sheet-header h2 { letter-spacing: -0.015em; }
.card-price, .detail-price, .sc-price, .pkg-price, .stats-tiles b { font-variant-numeric: tabular-nums; }

/* ---------- topo ---------- */
.top-nav, .top-publish { display: none; }
.help-btn { font-weight: 700; font-size: 16px; }
.help-btn:hover, .close-x:hover, .report-icon-btn:hover { border-color: var(--primary); }

/* ---------- o topo do Início: título e pesquisa ---------- */
.hero { padding: 6px 2px 14px; }
.hero-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--primary); }
.hero-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 29px; line-height: 1.08; letter-spacing: -0.03em; color: var(--ink); max-width: 15ch; }
.hero-text { margin: 10px 0 16px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.hero .search-wrap { margin-bottom: 12px; }
.hero .search-wrap input {
  padding: 15px 16px 15px 46px; font-size: 16px; border-radius: 16px;
  border: 1.5px solid var(--line-strong); box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.08);
  -webkit-appearance: none; appearance: none;
}
.hero .search-wrap input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hero .search-wrap .magnifier { left: 16px; color: var(--primary); opacity: 1; font-size: 0; }
.chip { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease; }
.chip:hover { border-color: var(--primary); }
.chip:active { transform: scale(0.96); }
.nlq-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -2px 0 12px; padding: 10px 12px;
  background: var(--mint); color: var(--primary-dark); border-radius: 14px; font-size: 13.5px; line-height: 1.45;
}
.nlq-box strong { font-weight: 700; }
.nlq-box .mini-btn { background: var(--card); color: var(--primary-dark); border-color: transparent; }

/* ---------- a faixa escura: filtros, avisos, total, distrito e ordenação ---------- */
.toolbar { background: var(--forest); color: var(--on-forest); border-radius: 18px; padding: 10px 12px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.toolbar .result-row { margin: 0; color: rgba(241,248,239,0.82); font-size: 13px; }
.toolbar #resultCount { font-weight: 600; color: var(--on-forest); }
.toolbar .result-row select {
  color: var(--on-forest); background: rgba(255,255,255,0.08); border-radius: 9px; padding: 6px 24px 6px 10px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  text-align: left; cursor: pointer;
}
.toolbar .result-row { flex-wrap: wrap; row-gap: 6px; }
.toolbar .result-row-selects { display: flex; gap: 6px; min-width: 0; margin-left: auto; }
.toolbar .result-row-selects select { max-width: 132px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-panel .two-col.stack { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.toolbar .result-row select option { color: #1B271E; background: #FFFFFF; }
.toolbar .filter-btn { background: var(--on-forest); color: var(--forest); border-color: transparent; padding: 8px 14px; font-size: 13px; }
.toolbar .filter-btn.active { background: var(--on-forest); color: var(--forest); box-shadow: 0 0 0 2px rgba(255,255,255,0.35); }
.toolbar .filter-count { background: var(--forest); color: var(--on-forest); }
.toolbar .alert-btn { background: transparent; color: var(--on-forest); border-color: rgba(255,255,255,0.28); padding: 8px 12px; }
.toolbar .alert-btn:hover, .toolbar .result-row select:hover { background-color: rgba(255,255,255,0.14); }
.toolbar .filter-btn:hover { background: #FFFFFF; }
.section-switch { margin-bottom: 14px; }

/* ---------- cartões: a foto em cima ---------- */
.list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
  position: relative; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(var(--primary-rgb), 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:active { transform: scale(0.985); }
.card .tile { position: relative; display: block; width: 100%; height: 0; padding-bottom: 78%; flex: none; border-radius: 0; font-size: 0; overflow: hidden; }
.card .tile .card-photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.card .tile .tile-emoji { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 44px; line-height: 1; }
.card .heart-btn {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.92); box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: center; padding: 0; color: #2F6D26;
}
.heart-btn svg { display: block; width: 20px; height: 20px; }
.heart-btn .heart-fill { fill: transparent; stroke: currentColor; stroke-width: 2; transition: fill .15s ease; }
.heart-btn.on .heart-fill { fill: currentColor; }
.heart-btn.pop svg { animation: heart-pop .38s cubic-bezier(.2,1.6,.4,1); }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
.tile-badges { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tile-badge { font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 7px; border-radius: 999px; background: rgba(255,255,255,0.94); color: #224F1C; white-space: nowrap; }
.tile-badge.gold { background: #F7E3A6; color: #5C4100; }
.tile-badge.drop { background: #DFF0DB; color: #224F1C; }
.tile-badge.match { background: #224F1C; color: #FFFFFF; }
.card .card-body { padding: 10px 12px 12px; gap: 1px; justify-content: flex-start; }
.card .card-price { order: -1; margin: 0 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--ink); line-height: 1.25; }
.card .card-price.lost { font-size: 13.5px; }
.card .featured-pill, .card .status-pill { margin-left: 6px; }
.card .card-name { font-size: 14px; font-weight: 600; }
/* a ligação do nome cobre o cartão todo (o coração fica por cima, à parte) */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 16px; }
.card .heart-btn { z-index: 2; }
.card .card-breed { font-size: 12.5px; }
.card .card-meta { font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.card .card-age { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
/* (1.19) quem anuncia, no fundo do cartão */
.card-seller { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); min-width: 0; }
.cs-av { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; background: var(--mint); color: var(--primary-dark); font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cs-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--ink); font-weight: 500; }
.cs-check { flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; }
.cs-check svg { width: 9px; height: 9px; }
.card.highlighted { box-shadow: 0 0 0 2px rgba(var(--gold-rgb), 0.55); }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.14); border-color: rgba(var(--primary-rgb), 0.22); }
  .card:hover .card-photo { transform: scale(1.03); }
  .card .card-photo { transition: transform .35s ease; }
  .sc-card:hover { transform: translateY(-2px); }
}
.sc-card { transition: transform .18s ease; }

/* "a carregar": cartões cinzentos a brilhar enquanto a lista chega */
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sk-card .sk-tile { height: 0; padding-bottom: 78%; border-radius: 0; }
.sk-card .sk-body { padding: 10px 12px 14px; }
.list.is-loading { opacity: .55; transition: opacity .15s ease; }
.sk { background: rgba(var(--muted-rgb), 0.14); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: sk-shine 1.2s ease-in-out infinite;
}
@keyframes sk-shine { to { left: 120%; } }
.sk-line { height: 12px; margin: 6px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w70 { width: 70%; } .sk-line.w55 { width: 55%; }

/* ---------- filas: vistos recentemente e recomendados ---------- */
.rail { margin: 0 0 16px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 8px; }
.rail-title { font-size: 16px; font-weight: 700; margin: 0; }
.rail .sc-card { background: var(--card); border-color: var(--line); box-shadow: none; }

/* ---------- estados vazios e de erro ---------- */
.empty { padding: 40px 20px 32px; }
.empty .big { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.empty p { max-width: 34ch; font-size: 14.5px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.empty-actions .btn-ghost, .empty-actions .btn-primary { width: auto; margin: 0; padding: 10px 16px; }
.empty.is-error .big { background: rgba(var(--danger-rgb), 0.12); }

/* ---------- botões: passar por cima, carregar, desativado ---------- */
.btn-primary, .btn-ghost, .btn-gold, .mini-btn, .seg-opt, .status-opt, .filter-btn, .alert-btn, .sec-opt, .pkg, .radio-opt, .link-btn, .top-nav-btn, .top-publish, .nav-btn {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease, opacity .15s ease;
}
.btn-primary:hover { background: var(--primary-dark); }
:root[data-theme="dark"] .btn-primary:hover { background: var(--primary-light); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-ghost:active, .mini-btn:active, .seg-opt:active, .status-opt:active { transform: scale(0.98); }
.mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.seg-opt:hover, .status-opt:hover { border-color: var(--primary); }
.pkg:hover { border-color: rgba(var(--primary-rgb), 0.6); }
.btn-primary:disabled, .btn-ghost:disabled, .mini-btn:disabled, .btn-gold:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary:disabled:hover { background: var(--primary); }
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; border: 2px solid var(--on-primary); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after, .mini-btn.is-busy::after { border-color: var(--primary); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
a:focus-visible, .chip:focus-visible, .link-btn:focus-visible, .seg-opt:focus-visible, .mini-btn:focus-visible, .nav-btn:focus-visible, .top-nav-btn:focus-visible, .sec-opt:focus-visible, .btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- mudar de separador: um fade curto (só opacidade, para não mexer nas folhas fixas) ---------- */
.tab-section.tab-enter { animation: tab-in .22s ease; }
@keyframes tab-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- avisos (toast) ---------- */
.toast { background: var(--forest); color: var(--on-forest); box-shadow: 0 10px 30px rgba(0,0,0,0.22); font-weight: 600; padding: 12px 18px; }

/* ---------- janela de confirmação (MB_UI) ---------- */
.mb-dialog-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 80; background: rgba(15,23,18,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .16s ease;
}
.mb-dialog-backdrop.open { opacity: 1; }
.mb-dialog {
  width: 100%; max-width: 400px; background: var(--card); color: var(--ink); border-radius: 20px; padding: 20px 20px 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3); transform: translateY(10px) scale(0.98); transition: transform .16s ease;
}
.mb-dialog-backdrop.open .mb-dialog { transform: none; }
.mb-dialog-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.mb-dialog-text { margin: 0 0 16px; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.mb-dialog-input { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; margin: -4px 0 16px; }
textarea.mb-dialog-input { min-height: 90px; resize: vertical; }
.mb-dialog-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.mb-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mb-dialog-btn { border: none; border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; background: var(--primary); color: var(--on-primary); }
.mb-dialog-btn:hover { background: var(--primary-dark); }
.mb-dialog-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.mb-dialog-btn.ghost:hover { border-color: var(--ink); background: transparent; }
.mb-dialog-btn.danger { background: var(--danger); color: #FFFFFF; }
.mb-dialog-btn.danger:hover { background: #963A30; }
.mb-dialog-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- filtros novos ---------- */
.chip-set { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-set .chip { padding: 7px 12px; font-size: 13px; }
/* (1.8) numa coluna estreita (os filtros ao lado da lista, no computador), a distância fica numa linha e o botão por baixo */
.near-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.near-row select { flex: 1 1 150px; min-width: 0; }
.near-btn { padding: 10px 12px; white-space: nowrap; }
.filter-panel .field label { color: var(--ink); }

/* ---------- rodapé ---------- */
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; text-align: left; margin: 18px auto 6px; max-width: 760px; line-height: 1.5; }
.foot-cols div { display: flex; flex-direction: column; gap: 4px; }
.foot-cols strong { color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.foot-cols a { font-weight: 500; }

/* ---------- Perfil: selos, painel do anunciante, vários anúncios, pagamentos ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--mint); color: var(--primary-dark); }
.badge.gold { background: rgba(var(--gold-rgb), 0.2); color: var(--gold-ink); }
.badge.muted { background: rgba(var(--muted-rgb), 0.14); color: var(--muted); }
.dash { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 18px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dash-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.dash .seg { width: auto; }
.dash .seg-opt { padding: 6px 10px; font-size: 12.5px; }
.dash-top { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; }
.dash-top li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.dash-top li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-bar { position: -webkit-sticky; position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--forest); color: var(--on-forest); border-radius: 14px; padding: 10px 12px; margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-bar .mini-btn { background: var(--on-forest); color: var(--forest); border-color: transparent; }
.bulk-bar .mini-btn.gold { background: #F7E3A6; color: #5C4100; }
.bulk-check { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--primary); margin: 0 2px 0 0; }
.credits-box { background: linear-gradient(rgba(var(--gold-rgb), 0.12), rgba(var(--gold-rgb), 0.12)), var(--card); border: 1px solid rgba(var(--gold-rgb), 0.45); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; }
.credits-box .btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.invoice-box { margin: 0 0 14px; font-size: 13.5px; }
.invoice-box summary { cursor: pointer; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.promo-discount { background: var(--mint); color: var(--primary-dark); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin: 0 0 12px; }
.pkg-old { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: 13px; margin-right: 6px; }
.order-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }

/* ---------- conversas ---------- */
.chat-safety { flex: 0 0 auto; margin: 0; padding: 7px 14px; font-size: 12px; line-height: 1.4; color: var(--primary-dark); background: var(--mint); }
.quick-replies { flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px 0; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }
.quick-replies .chip { font-size: 12.5px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.qr-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.qr-item { display: flex; gap: 8px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.qr-item p { flex: 1; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qr-item .qr-tools { display: flex; gap: 4px; flex: 0 0 auto; }

/* ---------- publicar: fotos por ordem, preço recomendado, ajuda a escrever ---------- */
.photo-thumb { cursor: grab; touch-action: none; }
.photo-thumb.dragging { opacity: .4; }
.photo-thumb.drop-target { outline: 2px dashed var(--primary); outline-offset: 2px; }
.photo-thumb .photo-cover { position: absolute; left: 3px; bottom: 3px; font-size: 10px; font-weight: 700; background: var(--primary); color: var(--on-primary); padding: 2px 5px; border-radius: 6px; }
.photo-thumb .photo-move { position: absolute; bottom: 2px; right: 2px; display: flex; gap: 2px; }
.photo-thumb .photo-move button { width: 20px; height: 20px; border: none; border-radius: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; cursor: pointer; padding: 0; line-height: 1; }
.price-hint { color: var(--primary-dark); }
.desc-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.desc-tools .field-hint { margin: 0; }
.suggest-box { margin-top: 8px; background: var(--mint); color: var(--primary-dark); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.suggest-box .mini-btn { background: var(--card); color: var(--primary-dark); border-color: transparent; }

/* ---------- o anúncio: selos, histórico de preço, SIAC, compatibilidade ---------- */
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.price-history { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.price-history s { color: var(--muted); }
.price-history strong { color: var(--primary-dark); }
.siac-link { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.compat-box { display: flex; align-items: center; gap: 10px; background: var(--mint); color: var(--primary-dark); border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; font-size: 13px; line-height: 1.4; }
.compat-box b { font-size: 20px; font-weight: 800; }
.posted-ago { font-size: 12.5px; color: var(--muted); }

/* ---------- perfil público ---------- */
.seller-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: 0 2px 12px; }
.social-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 14px; }
.social-links a { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px; }
.social-links a:hover { border-color: var(--primary); }

/* ---------- aviso de versão nova da app ---------- */
.update-banner { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.18); font-size: 13.5px; width: max-content; max-width: calc(100vw - 32px); }
.update-banner .mini-btn { background: var(--primary); color: var(--on-primary); border-color: transparent; }

/* ---------- tablets ---------- */
@media (min-width: 760px) {
  .list, #homeList, #favsList { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .hero { padding: 18px 2px 18px; }
  .hero-title { font-size: 38px; }
  .toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .toolbar .result-row { flex: 1; justify-content: flex-end; gap: 12px; }
  .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- computador ---------- */
@media (min-width: 1100px) {
  body { padding-bottom: 0; }
  .top-inner, #main { max-width: 1240px; }
  #main { padding: 18px 24px 40px; }
  .top-inner { padding: 12px 24px; }
  .brand-row { margin-bottom: 0; gap: 24px; }
  .top-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
  .top-nav-btn {
    position: relative; border: none; background: none; color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 600;
    padding: 9px 12px; border-radius: 10px; cursor: pointer; text-decoration: none;
  }
  .top-nav-btn:hover { color: var(--ink); background: rgba(var(--primary-rgb), 0.08); }
  .top-nav-btn.active { color: var(--primary); background: var(--mint); }
  .top-nav-btn .nav-dot { position: static; display: none; margin-left: 6px; vertical-align: 1px; }
  .top-nav-btn .nav-dot.show { display: inline-block; }
  .top-publish { display: inline-flex; align-items: center; border: none; border-radius: 12px; background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; }
  .top-publish:hover { background: var(--primary-dark); }
  .bottom-nav, .fab { display: none !important; }
  .toast { bottom: 28px; }
  .update-banner { bottom: 28px; }

  .hero { padding: 10px 0 22px; display: grid; grid-template-columns: minmax(0, 1fr); }
  .toolbar .result-row-selects select { max-width: 200px; }
  .hero-title { font-size: 46px; max-width: 18ch; }
  .hero-text { font-size: 17px; }
  .hero #searchChipsWrap { max-width: 760px; }

  .home-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
  .home-main { min-width: 0; }
  /* os filtros ficam sempre à vista, ao lado da lista */
  .sheet.filter-panel {
    position: -webkit-sticky; position: sticky; top: 84px; left: auto; right: auto; bottom: auto;
    width: auto; max-width: none; max-height: calc(100vh - 100px); margin: 0; z-index: 1;
    transform: none; opacity: 1; visibility: visible; transition: none; box-shadow: none;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  }
  .sheet.filter-panel.open { transform: none; box-shadow: none; }
  .filter-panel .sheet-handle, .filter-panel .close-x, .filter-panel #applyFiltersBtn { display: none; }
  .filter-panel .sheet-scroll { padding: 6px 18px 18px; }
  #filtersBtn { display: none; }
  .list, #homeList, #favsList { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  #tab-favs .list, #favsList { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #tab-messages, #tab-profile { max-width: 760px; }
}
@media (min-width: 1400px) {
  #homeList { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- listas do Perfil (uma coluna) ---------- */
#profileAdsList, #savedSearchesList, #ordersList { display: flex; flex-direction: column; gap: 9px; }
#sellerAdsList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-heart { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong) !important; display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--card) !important; }
.detail-heart svg { width: 22px; height: 22px; }
.seller-since { flex-basis: 100%; font-size: 12px; }
.sheet-body { min-width: 0; }

/* ---------- questionário «Qual é o animal ideal para mim?» ---------- */
.quiz-promo { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 18px 0 0; }
.quiz-promo h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.quiz-promo p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.quiz-promo-emoji { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.quiz-promo-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.quiz-promo-actions .btn-primary { width: auto; padding: 10px 18px; }
.quiz-progress { height: 6px; border-radius: 999px; background: rgba(var(--muted-rgb), 0.16); overflow: hidden; margin: 0 0 8px; }
.quiz-progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .25s ease; }
.quiz-count { margin: 0 2px 6px; }
.quiz-q { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; line-height: 1.25; }
.quiz-result { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 12px; }
.quiz-result.best { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.quiz-result-head { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.quiz-result-head strong { flex: 1; }
.quiz-emoji { font-size: 26px; }
.quiz-score { font-weight: 800; font-size: 18px; color: var(--primary-dark); }
.quiz-result p { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.quiz-breeds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.quiz-breeds .chip { font-size: 12.5px; padding: 6px 10px; }

/* ---------- Centro de informação ---------- */
#infoCentre { margin: 22px 0 0; }
.info-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.info-card { flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.info-card strong { font-size: 14px; line-height: 1.3; }
.info-card span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.info-emoji { font-size: 24px; }
@media (hover: hover) { .info-card:hover { border-color: var(--primary); transform: translateY(-2px); } }
@media (min-width: 1100px) {
  .info-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
}

/* ---------- Serviços ---------- */
.sponsored-label { display: inline-block; font-size: 11px; font-weight: 700; color: var(--gold-ink); background: rgba(var(--gold-rgb), 0.18); border-radius: 6px; padding: 2px 7px; margin-bottom: 4px; }
.biz-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 6px 0 14px; }
.biz-card, .sponsored-card { position: relative; display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; cursor: pointer; color: var(--ink); transition: border-color .15s ease; }
@media (hover: hover) { .biz-card:hover, .sponsored-card:hover { border-color: var(--primary); } }
.biz-photo { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.biz-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-body { flex: 1; min-width: 0; }
.biz-body h3 { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.biz-open { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.biz-open::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; border-radius: 16px; }
.biz-open:focus-visible { outline: none; }
.biz-open:focus-visible::after { outline: 2px solid var(--primary); outline-offset: -2px; }
.biz-card .biz-actions { position: relative; z-index: 2; }
.biz-meta { margin: 0 0 2px; font-size: 12.5px; color: var(--muted); }
.biz-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.biz-actions.big { flex-direction: column; gap: 8px; margin: 14px 0; }
.biz-actions.big .btn-ghost { margin: 0; text-align: center; text-decoration: none; }
.biz-actions .mini-btn { text-decoration: none; }
.biz-hero { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; margin: 4px 0 12px; display: block; }
.biz-desc { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.biz-own { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 10px; }
.biz-own-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: space-between; }
.biz-photo-edit img { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 8px; }
.sv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
.sv-tools select { padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.sv-cats { margin-top: 10px; }
.sv-back { margin: 0 0 10px; display: inline-block; }
.sv-note { text-align: center; }
#sponsoredSlot { margin: 14px 0 0; }
.sponsored-card { align-items: center; }
.sponsored-card > .mini-btn { flex: 0 0 auto; }
.sk-biz { pointer-events: none; }
.sk-biz .biz-photo { background: rgba(var(--muted-rgb), 0.14); }
@media (min-width: 760px) {
  .sheet.wide-sheet { max-width: 920px; }
  .biz-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; }
  .heart-btn.pop svg { animation: none; }
  .card:hover, .sc-card:hover { transform: none; }
  .card:hover .card-photo { transform: none; }
}
.dash-head { flex-wrap: wrap; }
.dash .seg { display: flex; gap: 4px; }
.dash .seg-opt { white-space: nowrap; }
/* em ecrãs estreitos, o 🔔 passa para a linha de baixo em vez de ficar cortado */
.toolbar-row:first-child { flex-wrap: wrap; justify-content: flex-start; }
.toolbar .alert-btn { max-width: 100%; }

/* ---------- o assistente: pesquisa por frase ---------- */
.hero-ask { display: inline-block; margin: -2px 0 12px; font-size: 13.5px; text-decoration: none; text-align: left; }
.hero-ask:hover { text-decoration: underline; }
.help-btn { font-size: 18px; }
#helpMessages .msg-bubble.is-card { max-width: 92%; }
/* (1.9) o menu do assistente: cada opção com o que faz */
.bot-options { display: grid; gap: 8px; margin-top: 10px; }
.bot-opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.bot-opt:hover { border-color: var(--primary); }
.bot-opt:focus-visible, .bot-faq:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bo-ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.bo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bo-text strong { font-size: 14px; }
.bo-text span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.bot-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bot-topics .chip { font-size: 13px; padding: 7px 11px; }
.bot-faqs { display: grid; gap: 6px; margin-top: 10px; }
.bot-faq { text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.bot-faq:hover { border-color: var(--primary); }
.help-quick .help-act { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.bot-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bot-examples .chip { font-size: 12.5px; padding: 6px 10px; white-space: normal; text-align: left; }
.bot-results { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.bot-ad { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 6px; cursor: pointer; font: inherit; color: var(--ink); }
.bot-ad:hover { border-color: var(--primary); }
.bot-ad-photo { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.bot-ad-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bot-ad-body { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.bot-ad-body strong { color: var(--ink); font-size: 13.5px; }
.bot-ad-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.msg-bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg-bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: typing 1s ease-in-out infinite; }
.msg-bubble.typing span:nth-child(2) { animation-delay: .15s; }
.msg-bubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 100% { opacity: .3; transform: none; } 50% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .msg-bubble.typing span { animation: none; } }

/* ======================================================================
   (1.4.3) As categorias numa barra com a largura da lista (como a escolha
   «Anúncios / Perdidos e achados»), e os Serviços como uma página
   ====================================================================== */
/* (1.8) a aparência (automático, claro, escuro), no fundo do Início */
.theme-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.theme-pick-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.theme-pick .seg-opt { flex: 0 0 auto; padding: 7px 12px; font-size: 13px; }
/* (1.8) no computador, o topo do Início tem à direita o que distingue o MeuBicho;
   (1.8.1) no telemóvel e no tablet, os mesmos 4 pontos numa grelha 2×2 compacta,
   por baixo da pesquisa (só o ícone e o título) */
.hero-panel { margin-top: 12px; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hero-panel li { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--mint); color: var(--ink); min-height: 44px; }
.hero-panel strong { font-size: 12.5px; line-height: 1.25; font-weight: 700; }
.hero-panel .hp-sub { display: none; }
/* em telemóveis muito pequenos (menos de 360 px), sem o ícone, para cada título caber em duas linhas */
@media (max-width: 359px) { .hero-panel .hp-ico { display: none; } .hero-panel li { padding: 8px 10px; } }
.hp-ico { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 15px; }
@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: center; }
  .hero-panel { margin-top: 0; background: var(--mint); border-radius: 20px; padding: 22px 22px 18px; }
  .hero-panel ul { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-panel li { gap: 12px; align-items: flex-start; padding: 0; border-radius: 0; background: none; min-height: 0; font-size: 13.5px; line-height: 1.4; }
  .hero-panel strong { display: block; font-size: 15px; line-height: 1.3; margin-bottom: 1px; }
  .hero-panel .hp-sub { display: block; }
  .hp-ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
}
/* (1.6.2) Serviços e Associações no telemóvel e no tablet (no computador estão no menu de cima) */
.quick-links { display: flex; gap: 8px; margin: 0 0 10px; }
.quick-link {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none;
}
.quick-link:hover { border-color: var(--primary); }
.quick-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 1100px) { .quick-links { display: none; } }
.cat-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.cat-bar .chip.cat-tile {
  flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 60px; padding: 8px 4px;
  border: none; border-radius: 10px; background: transparent; color: var(--ink);
  font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; white-space: normal; overflow-wrap: break-word;
}
.cat-bar .cat-ico { font-size: 21px; line-height: 1; }
.cat-bar .cat-lbl { display: block; max-width: 100%; }
@media (hover: hover) { .cat-bar .chip.cat-tile:hover { background: rgba(var(--primary-rgb), 0.08); } }
.cat-bar .chip.cat-tile.selected { background: var(--primary); color: var(--on-primary); }
.cat-bar.nine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .cat-bar { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cat-bar .chip.cat-tile { font-size: 12.5px; min-height: 66px; }
  .cat-bar.nine { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .cat-bar.nine { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}

/* a página dos Serviços (/servicos) */
.sv-hero { padding-bottom: 14px; }
.sv-hero .hero-title { max-width: none; }
.sv-hero .sv-back { margin: 0 0 12px; }
.sv-tools { margin: 4px 0 12px; }
.sv-tools-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sv-count { font-size: 13px; font-weight: 600; color: var(--muted); }
.btn-ghost.sv-join { width: auto; margin: 0; padding: 9px 14px; font-size: 13.5px; }
.services-page .biz-list { margin-top: 0; }
.services-page .biz-photo { flex-basis: 96px; width: 96px; height: 96px; }
.sv-note { text-align: center; max-width: 64ch; margin: 18px auto 0; }
.sv-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.sv-foot a { color: var(--muted); }
.page-title { margin: 2px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.sv-narrow { max-width: 760px; }
.biz-page { display: grid; gap: 18px; margin-top: 4px; }
.biz-page .biz-hero { max-height: none; aspect-ratio: 4 / 3; margin: 0; }
.biz-hero-empty { display: flex; align-items: center; justify-content: center; width: 100%; background: var(--mint); border-radius: 16px; font-size: 72px; }
.biz-page-info .biz-desc { margin: 12px 0 14px; }
@media (min-width: 760px) {
  .page-title { font-size: 32px; }
}
@media (min-width: 900px) {
  .biz-page { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
  .biz-page-media { position: sticky; top: 90px; }
  .biz-actions.big { flex-direction: row; flex-wrap: wrap; }
  .biz-actions.big > * { flex: 1 1 180px; text-align: center; }
}
@media (min-width: 1100px) {
  .services-page .biz-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sv-hero .sv-back { display: none; } /* no computador há o menu de cima */
  .sv-hero .search-wrap { max-width: 760px; }
}
.biz-list > .empty { grid-column: 1 / -1; }
.biz-actions.big a { text-decoration: none; }
.biz-page .biz-hero-empty { aspect-ratio: auto; height: 180px; font-size: 64px; }
/* na página dos Serviços não há o botão de publicar anúncio a flutuar */
body.on-services .fab { display: none; }
@media (min-width: 900px) {
  .biz-page .biz-hero-empty { height: 240px; }
}

/* (1.5) «Anúncios semelhantes», no fim do anúncio */
.similar-rail { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
/* (1.5) avisos de animais perdidos na minha zona */
.lost-alert-btn { display: inline-block; margin-top: 10px; text-align: left; }
.la-near { margin: -4px 0 12px; display: inline-block; }
.la-how { border: none; padding: 0; margin: 0 0 12px; }
.la-how legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; padding: 0; }

/* (1.5) visitas marcadas nas conversas */
button.chat-photo-btn { font: inherit; color: inherit; padding: 0; }
button.chat-photo-btn:disabled { opacity: .45; cursor: default; }
.visit-form { margin: 0 12px 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.visit-form-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.visit-form .field { margin-bottom: 8px; }
.visit-form .btn-primary { margin-top: 4px; }
.visit-card { min-width: 220px; }
.visit-card-title { font-weight: 700; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.visit-when { font-weight: 800; font-size: 15px; }
.visit-place, .visit-note { font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.visit-note { color: var(--muted); }
.visit-status { margin-top: 6px; font-size: 12.5px; font-weight: 700; }
.visit-card.st-aceite .visit-status { color: var(--primary); }
.visit-card.st-recusada .visit-status, .visit-card.st-cancelada .visit-status { color: var(--danger); }
.visit-card.st-cancelada .visit-when, .visit-card.st-recusada .visit-when, .visit-card.st-expirada .visit-when { text-decoration: line-through; opacity: .7; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.visit-actions .mini-btn { text-decoration: none; }
.mini-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.msg-system { align-self: center; margin: 6px auto; max-width: 92%; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink); background: rgba(var(--muted-rgb), .10); border-radius: 999px; padding: 5px 12px; }
.msg-system .msg-time { display: inline; margin: 0 0 0 4px; font-weight: 400; color: var(--ink); opacity: .72; }
.visit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.visit-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.visit-row-main span { color: var(--muted); overflow-wrap: anywhere; }

/* (1.5) ninhadas planeadas */
.rail-hint { margin: -4px 2px 8px; font-size: 12.5px; color: var(--muted); }
.litter-tile { position: relative; background: var(--mint); font-size: 34px; }
.litter-egg { position: absolute; right: 8px; bottom: 6px; font-size: 20px; }
.litter-card .sc-price { font-size: 13px; text-transform: none; }

/* (1.5) as páginas das associações */
.org-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 14px; }
.org-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .org-card:hover { border-color: var(--primary); } }
.org-card h3 { margin: 0 0 2px; font-size: 15.5px; }
.org-avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 14px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.org-avatar.big { flex-basis: 72px; width: 72px; height: 72px; font-size: 34px; border-radius: 18px; }
.org-card-body { min-width: 0; }
.org-card-about { margin: 4px 0; font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.org-card-stats { margin: 4px 0 0; font-size: 13px; }
.org-card-stats strong { color: var(--primary); }
.org-page-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.org-page-head .page-title { margin-bottom: 4px; }
.org-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 4px; max-width: 520px; }
.org-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.org-stats strong { font-size: 24px; font-family: var(--font-display); color: var(--primary); line-height: 1.1; }
.org-stats span { font-size: 12.5px; color: var(--muted); }
.org-help { white-space: pre-wrap; }
.org-page-link { display: inline-block; text-decoration: none; margin: 4px 0; }
@media (min-width: 760px) { .org-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .org-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ======================================================================
   (1.10) Menos cheio, no telemóvel e no computador
   ====================================================================== */
/* a barra dos resultados: clara, com uma linha à volta (era verde-escura) */
.toolbar { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.toolbar .result-row { color: var(--muted); }
.toolbar #resultCount { color: var(--ink); }
.toolbar .result-row select { color: var(--ink); background-color: var(--paper); border: 1px solid var(--line); }
.toolbar .result-row select option { color: var(--ink); background: var(--card); }
.toolbar .filter-btn, .toolbar .filter-btn.active { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.toolbar .filter-btn.active { box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25); }
.toolbar .filter-btn:hover { background: var(--primary); color: var(--on-primary); opacity: .92; }
.toolbar .filter-count { background: var(--on-primary); color: var(--primary); }
.toolbar .alert-btn { background: transparent; color: var(--primary); border-color: var(--line-strong); }
.toolbar .alert-btn:hover, .toolbar .result-row select:hover { background-color: var(--mint); }
/* as categorias sem a caixa à volta */
.cat-bar { background: transparent; border: 0; padding: 0; }
/* «Mais filtros» */
.more-filters-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 4px 0 12px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer;
}
.more-filters-btn:hover { border-color: var(--primary); }
.more-filters-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.more-filters-btn .mf-hint { flex: 1; min-width: 0; font-weight: 500; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-filters-btn .filter-count { position: static; }
.more-filters-btn .mf-arrow { transition: transform .15s ease; }
.more-filters-btn.open .mf-arrow { transform: rotate(180deg); }
/* os 4 pontos do MeuBicho no telemóvel: sem caixas, só o ícone */
.hero-panel li { background: none; padding: 2px 0; min-height: 36px; }
.hero-panel .hp-ico { background: var(--mint); }
@media (min-width: 1100px) { .hero-panel .hp-ico { background: var(--card); } }
/* no telemóvel, o topo só com o título e a pesquisa (o assistente está no botão redondo, por cima do «Publicar») */
@media (max-width: 699px) {
  .hero-kicker, .hero-text, .hero-ask { display: none; }
  .hero-title { margin-bottom: 14px; }
}

/* ======================================================================
   (1.10.1) Telemóvel menos cheio
   ====================================================================== */
/* uma barra só: Anúncios · Perdidos e achados · Serviços · Associações
   (no computador, Serviços e Associações estão no menu de cima e a barra fica como antes) */
.sec-row { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; }
.sec-row .section-switch { flex: 2 1 0; min-width: 0; margin: 0; padding: 0; border: 0; background: none; }
.sec-row .quick-links { flex: 2 1 0; min-width: 0; margin: 0; gap: 4px; }
.sec-row .quick-link {
  flex-direction: column; gap: 1px; min-height: 40px; padding: 5px 2px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center;
}
.sec-row .quick-link span { font-size: 15px; line-height: 1; }
.sec-row .quick-link:hover { background: rgba(var(--primary-rgb), 0.08); color: var(--ink); }
@media (max-width: 699px) {
  .sec-row .sec-opt { font-size: 12px; padding: 6px 2px; }
  /* o título mais pequeno */
  .hero-title { font-size: 25px; margin-bottom: 12px; }
  .hero { padding-bottom: 8px; }
  .hero .search-wrap { margin-bottom: 10px; }
  /* os 4 pontos mais juntos */
  .hero-panel { margin-top: 2px; }
  .hero-panel ul { row-gap: 4px; }
  .hero-panel li { min-height: 28px; gap: 6px; }
  .hero-panel strong { font-size: 12px; }
  .hero-panel .hp-ico { flex-basis: 22px; width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
  /* as categorias mais baixas */
  .cat-bar .chip.cat-tile { min-height: 50px; padding: 5px 2px; gap: 2px; font-size: 11.5px; }
  .cat-bar .cat-ico { font-size: 18px; }
}
/* a barra dos resultados em duas linhas (o número e os dois menus na mesma linha) */
@media (max-width: 699px) {
  .toolbar { padding: 8px 10px; gap: 6px; }
  .toolbar .result-row { flex-wrap: nowrap; gap: 6px; }
  .toolbar #resultCount { white-space: nowrap; font-size: 12.5px; }
  .toolbar .result-row-selects select { max-width: 116px; font-size: 12.5px; padding-top: 5px; padding-bottom: 5px; }
}

/* (1.11) a aparência passou do rodapé do Início para o Perfil */
.profile-appearance { text-align: left; margin: 4px 0 16px; }
.profile-appearance .theme-pick { margin-top: 8px; padding-top: 0; border-top: 0; }
.profile-appearance .theme-pick-label { display: none; }
.login-prompt .profile-appearance { max-width: 360px; margin: 20px auto 0; }

/* (1.11) raça potencialmente perigosa: as obrigações de quem fica com o cão */
.ppp-box { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid #c2410c; color: var(--ink); font-size: 13.5px; line-height: 1.5; }
.ppp-box a { font-weight: 700; }

/* (1.11) o questionário dentro do assistente */
.bot-quiz { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot-quiz .chip { white-space: normal; text-align: left; }
.bot-quiz .quiz-skip { color: var(--muted); }
.bot-quiz-res { display: grid; gap: 8px; margin-top: 8px; }
.bot-quiz-item { padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.bot-quiz-item.best { border-color: var(--primary); }
.bqi-head { display: flex; align-items: center; gap: 6px; }
.bqi-score { margin-left: auto; font-weight: 800; color: var(--primary); }
.bqi-why { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.bot-quiz-breeds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.bqi-show { width: 100%; }

/* (1.11) o localizador de animais abandonados */
.ab-open { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 4px; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
.ab-open > span:first-child { font-size: 24px; }
.ab-open strong { display: block; font-size: 14px; }
.ab-open span span { display: block; font-size: 12.5px; color: var(--muted); }
.ab-open:hover { border-color: var(--primary); }
.ab-new { width: 100%; margin: 4px 0 10px; }
.ab-map { display: block; width: 100%; max-width: 440px; margin: 0 auto; background: var(--paper); border-radius: 14px; }
.ab-map.real { touch-action: none; cursor: grab; }
.ab-map.real:active { cursor: grabbing; }
.ab-dot { fill: var(--muted); opacity: .35; }
.ab-dot.big { opacity: .6; }
.ab-inset { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.ab-inset-label, .ab-town { fill: var(--muted); font-size: 9px; font-family: inherit; }
.ab-pin { fill: #dc2626; stroke: #fff; stroke-width: 1.6; cursor: pointer; }
.ab-pin.sel { fill: #b91c1c; stroke-width: 2.4; }
.ab-pin:focus { outline: none; stroke: var(--ink); stroke-width: 3; }
.ab-me { fill: #2563eb; stroke: #fff; stroke-width: 1.6; }
.ab-acc { fill: rgba(220, 38, 38, .12); stroke: rgba(220, 38, 38, .5); }
.ab-scale { stroke: var(--ink); stroke-width: 2; }
.ab-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; margin: 6px 0 10px; font-size: 12.5px; color: var(--muted); }
.ab-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.ab-legend .lg-pin { background: #dc2626; } .ab-legend .lg-me { background: #2563eb; }
.ab-detail { margin: 6px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ab-detail-head { display: flex; gap: 10px; align-items: center; }
.ab-emoji { font-size: 28px; }
.ab-meta { display: block; font-size: 12.5px; color: var(--muted); }
.ab-photo { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin: 10px 0 0; }
.ab-desc { margin: 8px 0; }
.ab-zoom { display: block; width: 100%; margin: 8px 0 4px; background: var(--paper); border-radius: 10px; }
.ab-coords { font-size: 13px; margin: 4px 0 8px; }
.ab-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ab-links .btn-ghost { flex: 1 1 140px; text-align: center; text-decoration: none; }
.ab-list-title { font-size: 15px; margin: 14px 0 6px; }
.ab-list { display: grid; gap: 6px; }
.ab-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.ab-item.sel { border-color: #dc2626; }
.ab-item > span:first-child { font-size: 22px; }
.ab-item strong { display: block; font-size: 13.5px; }
.ab-item span span { display: block; font-size: 12.5px; color: var(--muted); }
.ab-help { margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: 13.5px; }
.ab-help summary { cursor: pointer; font-weight: 700; }
.ab-help ul { margin: 8px 0 0; padding-left: 18px; }
.ab-form h3 { margin: 6px 0 2px; }
.ab-loc-ok { margin: 4px 0; font-size: 13.5px; }

/* (1.11.1) o mapa com as fronteiras reais (CAOP), zoom e arrastar */
:root { --ab-sea: #e6f0f7; --ab-land: #ffffff; --ab-border: #c9d3cc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ab-sea: #10202b; --ab-land: #1d2621; --ab-border: #3b4a41; } }
:root[data-theme="dark"] { --ab-sea: #10202b; --ab-land: #1d2621; --ab-border: #3b4a41; }
.ab-map-wrap { position: relative; max-width: 440px; margin: 0 auto; }
.ab-sea { fill: var(--ab-sea); }
.ab-land { fill: var(--ab-land); stroke: var(--ab-border); stroke-width: .6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ab-map .ab-land:hover { fill: rgba(var(--primary-rgb), .08); }
.ab-map.real .ab-inset { stroke: var(--ab-border); }
.ab-label { display: none; fill: var(--ink); font-size: calc(9px * var(--ab-k, 1)); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--ab-land); stroke-width: calc(2px * var(--ab-k, 1)); font-family: inherit; }
.ab-map.zoomed .ab-label { display: inline; }
.ab-map .ab-pin, .ab-map .ab-me { stroke-width: calc(1.6px * var(--ab-k, 1)); }
.ab-zoom-ctl { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.ab-zoom-ctl button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.ab-zoom-ctl button:hover { border-color: var(--primary); }
.ab-source { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.ab-zoom .ab-town { fill: var(--ink); paint-order: stroke; stroke: var(--ab-land); stroke-width: 2px; }

/* (1.11.2) no país todo, só os distritos; ao aproximar, aparecem os concelhos */
:root { --ab-dborder: #8fa598; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ab-dborder: #6c8576; } }
:root[data-theme="dark"] { --ab-dborder: #6c8576; }
.ab-map .ab-land { stroke-opacity: 0; transition: stroke-opacity .25s ease; }
.ab-map.show-concelhos .ab-land { stroke-opacity: 1; }
.ab-dline { fill: none; stroke: var(--ab-dborder); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.ab-zoom .ab-dline { stroke-width: 1.8; }

/* (1.12) CAOP 2025: as áreas sem contorno; as linhas dos concelhos e das freguesias à parte */
.ab-map .ab-land, .ab-zoom .ab-land { stroke: none; }
.ab-cline { fill: none; stroke: var(--ab-border); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.ab-map .ab-cline { stroke-opacity: 0; transition: stroke-opacity .25s ease; }
.ab-map.show-concelhos .ab-cline { stroke-opacity: 1; }
.ab-fline { fill: none; stroke: var(--ab-border); stroke-width: .6; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.ab-map .ab-fline { display: none; }
.ab-map.zoomed-more .ab-fline { display: inline; }
.ab-flabel { display: none; fill: var(--muted); font-size: calc(7.5px * var(--ab-k, 1)); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--ab-land); stroke-width: calc(2px * var(--ab-k, 1)); font-family: inherit; }
.ab-map.zoomed-max .ab-flabel { display: inline; }
.ab-map.zoomed-max .ab-label { font-weight: 700; }
.ab-zoom .ab-flabel { display: inline; font-size: 8px; stroke-width: 2px; }
.ab-zoom .ab-town { font-weight: 700; }
/* (1.12) letras pequenas num mapa muito aproximado: sem isto, o Chrome arredonda mal e as letras encavalitam-se */
.ab-label, .ab-flabel, .ab-town { text-rendering: geometricPrecision; }
/* (1.12) os nomes no mapa: letra de tamanho normal, encolhida com a escala do zoom (o Chrome
   não desenha bem letras com menos de 1 píxel: encavalitava-as) */
.ab-map .ab-label { font-size: 9px; stroke-width: 2px; transform: scale(var(--ab-k, 1)); transform-box: fill-box; transform-origin: center; }
.ab-map .ab-flabel { font-size: 7.5px; stroke-width: 2px; transform: scale(var(--ab-k, 1)); transform-box: fill-box; transform-origin: center; }

/* (1.12) «Entrar com a Apple»: botão preto (no modo escuro, branco), como a Apple pede */
.apple-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; background: #000; color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid #000; }
.apple-btn:hover { background: #1c1c1e; }
.apple-btn-logo img { display: block; width: 16px; height: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .apple-btn { background: #fff; color: #000; border-color: #fff; } }
:root[data-theme="dark"] .apple-btn { background: #fff; color: #000; border-color: #fff; }

/* (1.14) os botões das lojas (quando as apps estiverem publicadas) */
.store-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.store-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px; background: #000; color: #fff; font-weight: 700; text-decoration: none; font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store-btn { background: #fff; color: #000; } }
:root[data-theme="dark"] .store-btn { background: #fff; color: #000; }

/* (1.14) o mapa melhor: ferramentas, avisos agrupados, os novos a pulsar, os distritos, ecrã inteiro */
.ab-tools { display: grid; gap: 8px; margin: 0 0 10px; }
.ab-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; }
.ab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-chips .chip { padding: 6px 12px; font-size: 13px; }
.ab-cluster { cursor: pointer; }
.ab-cluster circle { fill: #dc2626; fill-opacity: .88; stroke: #fff; stroke-width: calc(2px * var(--ab-k, 1)); }
.ab-cluster:focus { outline: none; }
.ab-cluster:focus circle { stroke: var(--ink); }
/* o tamanho do número vem do código (como o dos animais): com transform: scale, no zoom máximo, o número saía do círculo */
.ab-cnum { fill: #fff; font-size: 10px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: inherit; text-rendering: geometricPrecision; }
.ab-ring { fill: none; stroke: #dc2626; stroke-width: calc(1.5px * var(--ab-k, 1)); opacity: .6; transform-box: fill-box; transform-origin: center; animation: abRing 1.8s ease-out infinite; pointer-events: none; }
@keyframes abRing { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ab-ring { animation: none; } }
.ab-pin.novo { fill: #ef4444; }
.ab-dlabel { fill: var(--ink); opacity: .55; font-size: 8.5px; font-weight: 700; text-anchor: middle; pointer-events: none; font-family: inherit; paint-order: stroke; stroke: var(--ab-land); stroke-width: 2px; transform: scale(var(--ab-k, 1)); transform-box: fill-box; transform-origin: center; text-rendering: geometricPrecision; }
.ab-map.zoomed .ab-dlabel { display: none; }
.ab-legend .lg-new { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.ab-legend .lg-cluster { width: auto; height: auto; min-width: 16px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.ab-map:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ab-map-wrap.ab-full, .ab-map-wrap:fullscreen { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300; max-width: none; margin: 0; padding: 10px; background: var(--bg); display: flex; flex-direction: column; }
.ab-map-wrap.ab-full .ab-map, .ab-map-wrap:fullscreen .ab-map { max-width: none; flex: 1 1 auto; height: 100%; width: 100%; }
.ab-map-wrap.ab-full .ab-zoom-ctl, .ab-map-wrap:fullscreen .ab-zoom-ctl { top: 18px; right: 18px; }

/* (1.14) Finais felizes e feiras de adoção */
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rail-more { font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }
.sc-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px 12px 0 0; }
.story-tile, .fair-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; font-size: 30px; border-radius: 12px 12px 0 0; background: var(--paper); }
.fair-tile { flex-direction: column; gap: 0; background: rgba(var(--primary-rgb), .10); color: var(--primary); }
.fair-day { font-size: 30px; font-weight: 800; line-height: 1; }
.fair-month { font-size: 13px; font-weight: 700; text-transform: uppercase; }
.story-quote { font-style: italic; }
.story-list, .fair-list { display: grid; gap: 14px; margin-top: 14px; }
.story, .fair { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.story-photo { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.story-body, .fair { padding: 12px 14px; }
.story-body h3, .fair h3 { margin: 0 0 6px; font-size: 16px; }
.story-breed { font-size: 13px; font-weight: 600; color: var(--muted); }
.story-text, .fair-desc { margin: 0 0 8px; white-space: pre-line; line-height: 1.5; }
.story-meta, .fair-meta { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.fair-when { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.badge-now { color: #1f8a3a; }
.fair-map { margin-top: 12px; touch-action: auto; cursor: default; }
.fair-map .ab-land { stroke: none; }
.fair-pin { fill: #7c3aed; stroke: #fff; stroke-width: 1.6; cursor: pointer; }
.fair-pin.now { fill: #16a34a; }
.as-community { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
/* (1.14) importar os animais da associação */
.of-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.of-last { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; background: var(--paper); }
.of-last.bad { border-color: rgba(200, 60, 40, .45); }
.of-last p { margin: 4px 0 0; }
.of-last ul, .of-help ul { margin: 6px 0 0; padding-left: 18px; }
.of-help { font-size: 13.5px; line-height: 1.5; }
.of-help summary, .of-last summary { cursor: pointer; font-weight: 700; margin-top: 6px; }
.of-cols { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--paper); border-radius: 8px; padding: 6px 8px; word-break: break-word; }
.fair-map { max-height: 420px; }
.fair-map.mainland { display: block; width: auto; max-width: 100%; height: 360px; margin: 12px auto 0; }
.fair-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.fair-actions a.mini-btn { text-decoration: none; }
.fair-desc { font-size: 14px; }

/* ======================================================================
   (1.14.1) Acabamento do design — as regras de Emil Kowalski (movimento),
   do Impeccable (polish/adapt) e do Taste (redesign), sem mudar a identidade
   ====================================================================== */
:root {
  /* curvas fortes: as do CSS (ease, ease-in-out) são fracas demais */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
/* títulos sem uma palavra sozinha na última linha; parágrafos com quebras melhores
   (os browsers antigos ignoram e fica como antes) */
.hero-title, .page-title, .section-title, .showcase-title, .landing-title, .detail-name,
.sheet-header h2, .mb-dialog-title, .pay-title, .org-card h3, h1, h2, h3 { text-wrap: balance; }
.hero-text, .mb-dialog-text, .empty p, .detail-desc { text-wrap: pretty; }

/* carregar num botão tem de se sentir: encolhe um pouco (100–160 ms) */
.nav-btn, .top-nav-btn, .quick-link, .sec-opt, .close-x, .help-btn, .mb-dialog-btn,
.bot-opt, .bot-faq, .more-filters-btn, .theme-pick .seg-opt, .top-publish, .filter-btn {
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.quick-link, .close-x, .help-btn, .mb-dialog-btn, .bot-opt, .bot-faq, .more-filters-btn {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .16s var(--ease-out);
}
.nav-btn:active, .top-nav-btn:active, .quick-link:active, .sec-opt:active, .close-x:active,
.help-btn:active, .mb-dialog-btn:active, .bot-opt:active, .bot-faq:active, .more-filters-btn:active,
.top-publish:active, .filter-btn:active, .alert-btn:active { transform: scale(0.97); }
.btn-primary, .btn-ghost, .btn-gold, .chip, .seg-opt, .fab, .sec-opt, .nav-btn, .filter-btn, .alert-btn {
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}

/* cartões: a subida ao passar o rato com a curva certa (só em ecrãs com rato) */
.card { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s ease; }
.card .card-photo { transition: transform .4s var(--ease-out); }
.sc-card, .info-card { transition: transform .2s var(--ease-out), border-color .15s ease; }
.card:active, .sc-card:active { transition-duration: .12s; }

/* janelas: entram depressa (ease-out) e o fundo acompanha */
.mb-dialog { transition: transform .2s var(--ease-out); }
.mb-dialog-backdrop { transition: opacity .2s var(--ease-out); }
/* o aviso (toast): só a opacidade e a posição, nada de "all" */
.toast { transition: opacity .2s var(--ease-out), transform .25s var(--ease-out); }
.more-filters-btn .mf-arrow { transition: transform .2s var(--ease-out); }
.tab-section.tab-enter { animation: tab-in .18s var(--ease-out); }
@media (min-width: 760px) {
  .sheet { transition: transform .24s var(--ease-out), opacity .2s var(--ease-out), visibility 0s linear .24s; }
  .sheet.open { transition: transform .24s var(--ease-out), opacity .2s var(--ease-out); }
}

/* telemóvel: o que separa "um site no browser" de uma app */
/* no iPhone, um campo com letra menor do que 16 px faz zoom à página ao tocar */
@media (pointer: coarse) {
  .field input, .field textarea, .field select, .search-wrap input, .chat-input, .mb-dialog-input,
  .chat-input-row input, .chat-input-row textarea { font-size: 16px; }
}
/* deslizar dentro de uma janela não arrasta a página de trás */
.sheet-scroll, .chat-sheet, .sheet { overscroll-behavior: contain; }
/* imagens e ícones: carregar e manter não abre o menu de "guardar imagem" nos botões */
.nav-btn img, .chip img, .card-photo { -webkit-touch-callout: none; }

/* foco visível igual em todo o lado (teclado) */
.quick-link:focus-visible, .close-x:focus-visible, .help-btn:focus-visible, .heart-btn:focus-visible,
.info-card:focus-visible, .org-card:focus-visible, .top-publish:focus-visible, .fab:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
/* menos movimento: só a cor e a opacidade */
@media (prefers-reduced-motion: reduce) {
  .nav-btn:active, .top-nav-btn:active, .quick-link:active, .sec-opt:active, .close-x:active,
  .help-btn:active, .mb-dialog-btn:active, .bot-opt:active, .bot-faq:active, .more-filters-btn:active,
  .top-publish:active, .filter-btn:active, .alert-btn:active { transform: none; }
}
/* a categoria escolhida: verde suave com contorno, em vez de um segundo bloco verde
   cheio por cima de «Anúncios / Perdidos e achados» (um só destaque forte por zona) */
.cat-bar .chip.cat-tile { transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .16s var(--ease-out); }
.cat-bar .chip.cat-tile.selected { background: var(--mint); color: var(--primary-dark); box-shadow: inset 0 0 0 1.5px rgba(var(--primary-rgb), 0.5); }
@media (hover: hover) { .cat-bar .chip.cat-tile.selected:hover { background: var(--mint); } }
.cat-bar .cat-ico { font-size: 23px; }
@media (max-width: 699px) { .cat-bar .cat-ico { font-size: 21px; } }

/* (1.14.2) a letra dos títulos: Fraunces, com as curvas suaves (SOFT 100) e sem as
   letras «tortas» (WONK 0); a Inter ignora estes eixos. Pesos um pouco mais leves do
   que na Inter, porque a Fraunces já é forte. */
html { font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.hero-title { font-weight: 700; letter-spacing: -0.015em; }
.page-title { font-weight: 700; letter-spacing: -0.01em; }
.card .card-price { font-weight: 700; }
/* no telemóvel, o título cabe em duas linhas (a Fraunces é mais larga do que a Inter) */
@media (max-width: 699px) { .hero-title { max-width: none; } }

/* (1.15) partilhar: o ícone do iPhone (quadrado com seta), do tamanho do coração */
.share-btn { display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.share-btn svg { display: block; }
.mini-btn svg { vertical-align: -2px; }
/* (1.15) os passos para ativar as notificações no iPhone */
.push-ios-intro { margin: 0 0 6px; }
.push-ios-steps { margin: 0 0 8px; padding-left: 20px; line-height: 1.5; }
.push-ios-steps li { margin: 2px 0; }
.push-ios-icon { display: inline-flex; vertical-align: -2px; color: var(--primary); }
/* (1.15) as fotos de uma ficha de Serviços: miniaturas por baixo da foto grande */
.biz-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.biz-thumb { flex: 0 0 auto; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.biz-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-thumb[aria-current="true"] { border-color: var(--primary); }
.biz-thumb:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* (1.15) sem rede: o aviso no topo */
.offline-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--warn-rgb), 0.12); border: 1px solid rgba(var(--warn-rgb), 0.35); color: var(--ink); font-size: 13.5px; line-height: 1.45; }

/* (1.15.1) o botão do assistente: redondo, com um anel em gradiente (como o
   da Meta AI no WhatsApp, um pouco maior — 60 px), por cima do «Publicar» no
   telemóvel e no canto de baixo no computador; e o balão que diz o que é */
.ai-fab {
  position: fixed; right: 18px; bottom: calc(78px + 52px + 14px + env(safe-area-inset-bottom, 0px)); z-index: 25;
  width: 60px; height: 60px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  background: var(--card); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.28), 0 2px 6px rgba(0,0,0,0.12);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .16s var(--ease-out), box-shadow .2s var(--ease-out);
}
/* o anel: um gradiente que dá a volta (verde do logótipo, azul-esverdeado, dourado) */
.ai-fab-ring {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%;
  background: #479B3C;
  background: conic-gradient(from 200deg, #479B3C, #2BB3A6, #3E8FD8, #2BB3A6, #E2B23C, #479B3C);
  -webkit-mask: radial-gradient(circle, transparent 0 22px, #000 23px);
  mask: radial-gradient(circle, transparent 0 22px, #000 23px);
}
.ai-fab-paw { position: relative; fill: currentColor; }
.ai-fab:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .ai-fab:hover { transform: scale(1.05); box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.34), 0 2px 6px rgba(0,0,0,0.12); } }
.ai-fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ai-fab-tip {
  position: fixed; right: 18px; bottom: calc(78px + 52px + 14px + 60px + 12px + env(safe-area-inset-bottom, 0px)); z-index: 26;
  width: min(300px, calc(100vw - 36px)); padding: 12px 34px 12px 14px; border-radius: 16px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16); font-size: 13.5px; line-height: 1.45; cursor: pointer;
  animation: ai-tip-in .28s var(--ease-out);
}
.ai-fab-tip::after {
  content: ""; position: absolute; right: 24px; bottom: -7px; width: 12px; height: 12px;
  background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.ai-fab-tip-title { display: block; font-size: 14px; margin-bottom: 3px; }
.ai-fab-tip-text { display: block; color: var(--muted); }
.ai-fab-tip-close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.ai-fab-tip-close:hover { background: var(--paper); color: var(--ink); }
@keyframes ai-tip-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ai-fab-tip { animation: none; } .ai-fab:active, .ai-fab:hover { transform: none; } }
/* nos Serviços não há «Publicar»: o botão desce para o lugar dele */
body.on-services .ai-fab { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
body.on-services .ai-fab-tip { bottom: calc(78px + 60px + 12px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) {
  .ai-fab, .ai-fab-tip { right: max(18px, calc((100vw - 720px) / 2 + 12px)); }
}
@media (min-width: 1120px) {
  .ai-fab, .ai-fab-tip { right: max(18px, calc((100vw - 1060px) / 2 + 12px)); }
}
/* no computador não há menu de baixo nem «Publicar» flutuante: fica no canto */
@media (min-width: 1100px) {
  .ai-fab { bottom: 28px; right: 28px; }
  .ai-fab-tip { bottom: calc(28px + 60px + 12px); right: 28px; }
}
/* (1.15.1) o ícone do assistente dentro da conversa: o mesmo anel em gradiente
   do botão redondo, com a pata (40 px no topo, 26 px ao lado de cada resposta) */
.ai-avatar { position: relative; flex: 0 0 auto; border-radius: 50%; background: var(--card); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.ai-avatar svg { position: relative; fill: currentColor; }
.ai-avatar-ring { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; background: #479B3C; background: conic-gradient(from 200deg, #479B3C, #2BB3A6, #3E8FD8, #2BB3A6, #E2B23C, #479B3C); }
.ai-avatar.md { width: 40px; height: 40px; }
.ai-avatar.md svg { width: 20px; height: 20px; }
.ai-avatar.md .ai-avatar-ring { -webkit-mask: radial-gradient(circle, transparent 0 16px, #000 17px); mask: radial-gradient(circle, transparent 0 16px, #000 17px); }
.ai-avatar.sm { width: 26px; height: 26px; }
.ai-avatar.sm svg { width: 13px; height: 13px; }
.ai-avatar.sm .ai-avatar-ring { -webkit-mask: radial-gradient(circle, transparent 0 10px, #000 11px); mask: radial-gradient(circle, transparent 0 10px, #000 11px); }

/* (1.15.1) «Publicar» no meio da barra de baixo (telemóvel e tablet), como um
   botão redondo verde um pouco levantado; já não flutua por cima da página */
.nav-publish {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: none; padding: 0 4px 4px; cursor: pointer;
  color: var(--primary); font: inherit; font-size: 10.5px; font-weight: 700;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.nav-publish-circle {
  width: 48px; height: 48px; margin-top: -20px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); border: 3px solid var(--card);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
  transition: transform .16s var(--ease-out);
}
.nav-publish-circle svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.nav-publish:active .nav-publish-circle { transform: scale(0.94); }
.nav-publish:focus-visible { outline: none; }
.nav-publish:focus-visible .nav-publish-circle { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-publish:active .nav-publish-circle { transform: none; } }
/* o botão do assistente desce para por cima da barra (já não há «Publicar» a flutuar) */
.ai-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.ai-fab-tip { bottom: calc(84px + 60px + 12px + env(safe-area-inset-bottom, 0px)); }
body.on-services .ai-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.on-services .ai-fab-tip { bottom: calc(84px + 60px + 12px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1100px) {
  .ai-fab, body.on-services .ai-fab { bottom: 28px; right: 28px; }
  .ai-fab-tip, body.on-services .ai-fab-tip { bottom: calc(28px + 60px + 12px); right: 28px; }
}

/* ======================================================================
   (1.15.2) O mapa dos animais abandonados, melhor no telemóvel e no computador
   ====================================================================== */
/* os avisos: um círculo branco com o animal (🐶 🐱 🐾); os de mais de 7 dias mais suaves */
.ab-map .ab-pin { fill: var(--card); stroke: #dc2626; stroke-width: calc(2.2px * var(--ab-k, 1)); }
.ab-map .ab-pin.novo { fill: var(--card); stroke: #dc2626; stroke-width: calc(2.4px * var(--ab-k, 1)); }
.ab-map .ab-pin.antigo { stroke: #e9a3a3; }
.ab-map .ab-pin.sel { fill: var(--card); stroke: #b91c1c; stroke-width: calc(3.4px * var(--ab-k, 1)); }
.ab-map .ab-pin.hl { stroke: var(--primary); stroke-width: calc(3.4px * var(--ab-k, 1)); }
.ab-pin-emoji { text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.ab-pin-emoji.antigo { opacity: .55; }
/* os botões: uma coluna compacta em baixo à direita (não tapam os nomes nem as ilhas) */
.ab-map-wrap .ab-zoom-ctl { top: auto; bottom: 10px; right: 10px; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.14); overflow: hidden; }
.ab-map-wrap .ab-zoom-ctl button { width: 40px; height: 40px; border: none; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; }
.ab-map-wrap .ab-zoom-ctl button:last-child { border-bottom: none; }
.ab-map-wrap .ab-zoom-ctl button:hover { background: var(--paper); }
.ab-map-wrap.ab-full .ab-zoom-ctl, .ab-map-wrap:fullscreen .ab-zoom-ctl { top: auto; bottom: 18px; right: 18px; }
.ab-near { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.14); cursor: pointer; }
.ab-near:hover { border-color: var(--primary); }
.ab-near:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ab-map-wrap.ab-full .ab-near, .ab-map-wrap:fullscreen .ab-near { top: 18px; right: 18px; }
/* a escala (muda com o zoom) */
.ab-scale-bar { position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: 11.5px; font-weight: 700; color: var(--ink); pointer-events: none; text-shadow: 0 0 3px var(--card), 0 0 3px var(--card), 0 0 3px var(--card); }
.ab-scale-bar i { display: block; width: 60px; height: 5px; margin-top: 2px; border: 2px solid var(--ink); border-top: 0; }
.ab-map-wrap.ab-full .ab-scale-bar, .ab-map-wrap:fullscreen .ab-scale-bar { bottom: 20px; left: 18px; }
/* a legenda */
.ab-legend .lg-pin, .ab-legend .lg-old { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid #dc2626; font-style: normal; font-size: 10px; line-height: 14px; text-align: center; }
.ab-legend .lg-old { border-color: #e9a3a3; opacity: .7; }
.ab-item.hl { background: var(--mint); border-color: var(--primary); }
.ab-drawer-handle { display: none; }
.ab-source-short { display: none; }
/* computador: o mapa grande à esquerda e a lista ao lado */
@media (min-width: 900px) {
  #abandonedSheet { max-width: 1240px; width: calc(100% - 48px); }
  .ab-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 20px; align-items: start; }
  .ab-layout .ab-map-wrap { max-width: none; margin: 0; }
  .ab-layout .ab-map { max-width: none; height: calc(88vh - 330px); min-height: 380px; }
  .ab-side { max-height: calc(88vh - 290px); min-height: 400px; overflow-y: auto; padding-right: 4px; }
  .ab-side .ab-list-title { margin-top: 8px; }
}
/* telemóvel e tablet: o mapa de lado a lado, alto, e a lista numa gaveta por baixo */
@media (max-width: 899px) {
  .ab-map-col { margin: 0 -20px; }
  .ab-layout .ab-map-wrap { max-width: none; }
  .ab-layout .ab-map { max-width: none; height: 60vh; min-height: 320px; border-radius: 0; transition: height .25s var(--ease-out); }
  .ab-layout.list-open .ab-map { height: 32vh; min-height: 180px; }
  .ab-side { position: relative; z-index: 2; display: flex; flex-direction: column; margin: -26px -20px 0; padding: 6px 20px 8px; background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
  .ab-drawer-handle { display: block; order: 0; align-self: center; width: 56px; height: 22px; margin: 0 0 4px; padding: 0; border: none; background: none; cursor: pointer; }
  .ab-drawer-handle::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: 999px; background: var(--line-strong); }
  .ab-side > .ab-detail { order: 1; }
  .ab-side > #abListBox { order: 2; }
  .ab-side #abListBox > .ab-list-title { margin-top: 2px; }
  .ab-side > .ab-tools { order: 4; margin-top: 12px; }
  .ab-side > .ab-legend { order: 5; }
  .ab-side > .ab-help { order: 6; }
  .ab-source-long { display: none; }
  .ab-source-short { display: inline; }
  .ab-map-col .ab-source { padding: 0 20px 26px; }
}
@media (prefers-reduced-motion: reduce) { .ab-layout .ab-map { transition: none; } }

/* (1.16) a foto de perfil: no perfil, nas conversas, nos anúncios e nas associações */
.has-photo { padding: 0; overflow: hidden; background: var(--paper); }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-wrap { overflow: hidden; }
.avatar-fill { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 4px; }
.avatar-actions .field-hint { flex: 1 1 100%; margin: 0; }
.seller-row-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--primary-dark); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; vertical-align: middle; }
.chat-row-avatar { width: 18px; height: 18px; border-radius: 50%; background: var(--mint); color: var(--primary-dark); font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; vertical-align: -4px; margin-right: 6px; }
.avatar-btn.has-photo img { border-radius: 50%; }
/* (1.16) a lista do mapa dos abandonados: há quanto tempo e a que distância; «Ver todos» */
.ab-item-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ab-see-all { margin: -4px 0 8px; }
