.app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.screen { flex: 1; display: flex; flex-direction: column; }
.screen.center { justify-content: center; padding: 32px; gap: 8px; }
/* altura da tela, sem crescer com a conversa: quem rola é a lista de mensagens, e o topo com as abas fica parado
   (com flex: 1, a tela crescia do tamanho da conversa e quem rolava era a página) */
.screen.chat { height: 100dvh; flex: none; }
.screen.chat .messages { min-height: 0; }
.pad { padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 { margin: 2px 0 0; font-size: 28px; }
/* tela de entrada (CPF e senha) */
.login-head { margin-bottom: 0; }
.login-form { padding-top: 24px; }
.login-hint { font-weight: 400; font-size: 13px; }
.login-first { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.login-first strong { font-size: 16px; }
.login-help { padding-bottom: 24px; line-height: 1.45; }
.login-help a { color: inherit; font-weight: 700; }
/* tela de Funcionário e Cooperado */
.login-colab { margin: 6px 0 0; text-align: center; }
.colab-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.colab-tipo { display: block; margin: 0; cursor: pointer; }
.colab-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.colab-tipo span { display: block; padding: 10px 8px; border-radius: 999px; text-align: center; font-weight: 700; color: var(--muted); }
.colab-tipo input:checked + span { background: var(--verde); color: #fff; }
.colab-tipo input:focus-visible + span { outline: 2px solid var(--verde); outline-offset: 2px; }
.colab-farm { margin: 0; padding: 10px 12px; border-radius: 10px; background: #E6F5E1; color: #1E5E2C; font-size: 14.5px; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .colab-farm { background: #1C3A26; color: #B9E8C4; } }
:where(:root[data-theme="dark"]) .colab-farm { background: #1C3A26; color: #B9E8C4; }
/* saldo do Convênio (funcionário e cooperado) no início */
.conv-box { margin: 0 16px 8px; padding: 16px 18px; border-radius: var(--box); background: var(--surface); border: 1px solid var(--line); }
.conv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.conv-head h2 { margin: 0; font-size: 16px; }
.conv-dir { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.conv-olho { color: var(--ink); margin: -8px -10px -8px 0; }
/* valores escondidos: a barra de uso também, porque ela mostra quanto do limite já foi usado */
.conv-box.oculto .conv-barra { visibility: hidden; }
.conv-valores { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.conv-disp { font-size: 28px; line-height: 1.1; color: var(--verde-escuro); }
.conv-barra { height: 8px; margin: 6px 0 2px; border-radius: 999px; background: var(--line); overflow: hidden; }
.conv-barra span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--verde); }
.conv-barra span.alto { background: #E37222; }
.conv-aviso { margin: 10px 0 0; line-height: 1.45; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .conv-disp { color: var(--citrico); } }
:where(:root[data-theme="dark"]) .conv-disp { color: var(--citrico); }
.sair-row { padding-bottom: 24px; }

/* cartões já confirmados, salvos na conta */
.salvas { padding-bottom: 0; }
.salvas-list { display: flex; flex-direction: column; gap: 10px; }
.salva { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px 14px 0 14px;
  background: var(--surface); padding: 6px 6px 6px 0; }
.salva-usar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  border: none; background: none; padding: 8px 14px; color: var(--ink); font: inherit; cursor: pointer; }
.salva-usar strong { font-size: 16px; max-width: 100%; }
.salva-usar span { font-size: 14px; color: var(--muted); }
.salva:hover { border-color: var(--verde); }
.salva-esquecer { flex-shrink: 0; font-size: 14px; padding: 8px 12px; }

/* topo verde-escuro com o logo, como as capas do manual da marca */
.home-head { background: var(--verde-escuro); color: #fff; padding: 22px 20px 26px; margin-bottom: 22px;
  border-radius: 0 0 0 28px; display: flex; flex-direction: column; gap: 2px; }
.home-brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.home-acoes { display: flex; align-items: center; gap: 10px; }
.home-head .avatar { width: 44px; height: 44px; background: var(--verde); color: #fff; }
.home-sub { color: var(--apoio-verde); font-size: 15px; }
.home-head h1 { font-size: 30px; }
.section-title { margin: 0; padding: 0 20px 10px; font-size: 17px; color: var(--verde-escuro); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .section-title { color: var(--ink); } }
:where(:root[data-theme="dark"]) .section-title { color: var(--ink); }

.stories { display: flex; gap: 12px; padding: 0 20px 24px; overflow-x: auto; }
.story-chip { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 76px; flex-shrink: 0;
  background: none; border: none; padding: 0; }
.story-ring { width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--verde);
  display: flex; align-items: center; justify-content: center; }
.story-chip.seen .story-ring { border-color: var(--line); }
.story-dot { width: 54px; height: 54px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.story-dot.light { color: var(--verde-escuro); }
.story-label { font-size: 13px; line-height: 1.25; text-align: center; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.card-btn { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px 18px 0 18px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.card-icon { width: 48px; height: 48px; border-radius: var(--box); background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-text strong { font-size: 17px; }
.badge { min-width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }

.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 6px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.chat-head .icon-btn { color: var(--ink); }
/* Loja Farmácia e Conversar com a Farmácia, lado a lado; sem um dos dois, o outro ocupa a linha */
.consult-cards.farm-cards { grid-template-columns: 1fr 1fr; margin: 0 0 10px; }
.farm-cards:not(:has(> .card-btn:not(.hidden))) { display: none; }
.farm-cards:has(> .card-btn.hidden) > .card-btn { grid-column: 1 / -1; }
/* Atendimento e Farmácia: duas conversas separadas, uma aba para cada */
.chat-tabs { display: flex; gap: 6px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-tab { flex: 1; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.chat-tab[aria-selected="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
.tab-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.chat-tab[aria-selected="true"] .tab-dot { background: #fff; }

.story-dot.has-thumb { background-size: cover; background-position: center; }
.story-dot svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }

/* visualizador de publicações */
.story { position: fixed; inset: 0; z-index: 10; color: #fff; background: #000; overflow: hidden; outline: none; }
.story-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.story-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
.story-bars { display: flex; gap: 4px; }
.story-bars .bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-bars .fill { display: block; height: 100%; width: 0; background: #fff; }
.story-head { display: flex; align-items: center; gap: 4px; }
.story-author { flex: 1; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); padding-left: 4px; display: flex; align-items: center; gap: 8px; }
.story-tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #FFE196; color: var(--verde-escuro); text-shadow: none; }
.story-icon { color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.story-tap { flex: 1; display: flex; }
.tap-zone { background: none; border: none; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tap-zone.prev { flex: 0 0 35%; }
.tap-zone.next { flex: 1; }
.tap-zone:focus-visible { outline-offset: -6px; }
.story-paused { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  background: rgba(0,0,0,.6); padding: 8px 14px; border-radius: 10px; font-size: 14px; pointer-events: none; }

/* texto da publicação: centralizado quando é só texto, faixa embaixo quando há foto ou vídeo */
.story-content { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.story-content h2 { margin: 0; line-height: 1.15; }
.story-content p { margin: 0; line-height: 1.5; white-space: pre-wrap; }
.story.text-only .story-content { top: 50%; transform: translateY(-50%); padding: 0 28px; display: flex;
  flex-direction: column; gap: 18px; max-width: 560px; margin: 0 auto; }
.story.text-only .story-content h2 { font-size: 34px; }
.story.text-only .story-content p { font-size: 19px; }
.story.with-media .story-content { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); margin: 0 12px;
  background: rgba(0,0,0,.6); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.story.with-media .story-content h2 { font-size: 20px; }
.story.with-media .story-content p { font-size: 16px; }
.story-content:empty, .story.with-media .story-content.blank { display: none; }
.story-overlay { z-index: 2; }

/* autorizações e boletos */
.consult-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.consult-cards .wide { grid-column: 1 / -1; }
a.card-btn { color: inherit; text-decoration: none; }
.card-out { flex-shrink: 0; color: var(--muted); }
/* Botões ainda sem função: aparecem apagados, com a etiqueta "Em breve" */
.card-btn.soon { cursor: default; }
.card-btn.soon .card-icon { background: var(--muted); }
.card-btn.soon strong { color: var(--muted); }
.soon-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px 6px 0 6px; background: var(--line); color: var(--ink); }
/* Gestão de botões: offline e em breve ficam cinza; em manutenção, amarelo. Nenhum dos três abre a tela. */
.card-btn.botao-offline, .card-btn.botao-embreve { cursor: default; }
.card-btn.botao-offline .card-icon, .card-btn.botao-embreve .card-icon { background: var(--muted); }
.card-btn.botao-offline strong, .card-btn.botao-embreve strong, .card-btn.botao-offline .muted { color: var(--muted); }
.card-btn.botao-offline { opacity: .7; }
.card-btn.botao-manutencao { cursor: default; background: color-mix(in srgb, var(--apoio-amarelo) 45%, var(--surface)); border-color: var(--apoio-amarelo); }
.card-btn.botao-manutencao .card-icon { background: var(--apoio-amarelo); color: #5A4300; }
.botao-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px 6px 0 6px; background: var(--line); color: var(--ink); }
.botao-manutencao .botao-tag { background: var(--apoio-amarelo); color: #5A4300; }
.home-benef { margin-bottom: 12px; padding: 14px 16px; border-radius: 14px 14px 0 14px; background: color-mix(in srgb, var(--apoio-azul) 55%, var(--surface));
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.home-benef span { font-size: 14px; line-height: 1.4; }
.home-benef .btn-sm { margin-top: 4px; height: 40px; padding: 0 14px; font-size: 14px; }
.home-aviso { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--box-sm); background: var(--apoio-amarelo); color: #5A4300; font-size: 14px; line-height: 1.4; }
.su-benef { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.su-benef legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.su-opcoes { display: flex; gap: 10px; }
.su-opcao { flex: 1; display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--box-sm); background: var(--surface); font-weight: 600; cursor: pointer; }
.su-opcao:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.su-opcao input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.notif-banner { margin: 14px 20px 0; padding: 14px 16px; border-radius: 14px 14px 0 14px; background: color-mix(in srgb, var(--apoio-azul) 55%, var(--surface));
  display: flex; align-items: center; gap: 12px; }
.notif-banner > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.notif-banner .btn-sm { height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.guia-filters { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 0; }
.guia-filters input, .guia-filters select { height: 46px; border-radius: 10px 10px 0 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 16px; color: var(--ink); width: 100%; min-width: 0; }
.guia-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guia-selects #guia-esp { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 3px 9px; border-radius: 6px 6px 0 6px; background: var(--apoio-verde); color: var(--verde-escuro); font-weight: 600; }
.local { padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.local.destaque { border-top-color: var(--verde); }
.local-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.local-actions .btn-sm { height: 38px; padding: 0 12px; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .chip { color: var(--verde-escuro); } }
:where(:root[data-theme="dark"]) .chip { color: var(--verde-escuro); }
.consult-cards .card-btn { padding: 14px; gap: 10px; }
.consult-cards .card-icon { width: 40px; height: 40px; }
.consult-cards .card-text strong { font-size: 16px; }
.verify { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.verify h2 { margin: 0; font-size: 20px; color: var(--verde-escuro); }
.verify p { margin: 0; line-height: 1.45; }
.verify label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.verify input { height: 48px; border-radius: 10px 10px 0 10px; border: 1px solid var(--line); padding: 0 14px; background: var(--surface); font-size: 18px; color: var(--ink); }
.verify .error { margin: 0; color: var(--danger); }
.tabs-row { display: flex; gap: 0; margin: 12px 16px 0; border: 1.5px solid var(--line); border-radius: 10px 10px 0 10px; overflow: hidden; }
.tabs-row button { flex: 1; height: 42px; border: none; background: var(--surface); font-weight: 700; color: var(--muted); }
.tabs-row button[aria-selected="true"] { background: var(--verde-escuro); color: #fff; }
.consulta-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 20px; }
.consulta-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 0 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.consulta-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.consulta-top .money { font-size: 20px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.status-tag { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px 6px 0 6px; white-space: nowrap; }
.status-tag.ok { background: var(--apoio-verde); color: var(--verde-escuro); }
.status-tag.warn { background: var(--apoio-amarelo); color: #5A4300; }
.status-tag.bad { background: var(--apoio-rosa); color: #6B2B2B; }
.status-tag.wait { background: var(--apoio-azul); color: #0D3B3E; }
.consulta-card details summary { cursor: pointer; font-weight: 700; color: var(--verde-escuro); font-size: 14px; }
.proc-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.proc-list li > strong { white-space: nowrap; }
.proc-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.linha { margin: 0; font-family: Consolas, ui-monospace, monospace; font-size: 13.5px; background: var(--ground); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.motivo { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px 10px 0 10px; background: var(--ground); }
.motivo-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.motivo p { margin: 0; line-height: 1.45; font-size: 15px; }
.consulta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consulta-actions .btn-sm { height: 40px; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.link-inline { border: none; background: none; padding: 0; color: var(--verde-escuro); font-weight: 700; text-decoration: underline; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .verify h2, :where(:root:not([data-theme="light"])) .consulta-card details summary, :where(:root:not([data-theme="light"])) .link-inline { color: var(--ink); } }
:where(:root[data-theme="dark"]) .verify h2, :where(:root[data-theme="dark"]) .consulta-card details summary, :where(:root[data-theme="dark"]) .link-inline { color: var(--ink); }

/* respostas rápidas (ex.: avaliação de 1 a 5) */
.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; }
.quick-reply { min-width: 48px; height: 48px; padding: 0 14px; border-radius: 14px 14px 0 14px; border: 1.5px solid var(--verde);
  background: var(--surface); color: var(--verde-escuro); font-size: 18px; font-weight: 700; }
.quick-reply:hover, .quick-reply:focus-visible { background: var(--verde); color: #fff; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .quick-reply { color: var(--ink); } }
:where(:root[data-theme="dark"]) .quick-reply { color: var(--ink); }

/* menu de equipes antes da primeira conversa */
.team-picker { padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--surface);
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.team-picker h2 { margin: 0; font-size: 19px; color: var(--verde-escuro); }
.team-picker p { margin: 0 0 6px; }
.team-choices { display: flex; flex-direction: column; gap: 8px; max-height: 50dvh; overflow-y: auto; }
.team-choice { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 14px 14px 0 14px; background: var(--surface); }
.team-choice strong { color: var(--verde-escuro); font-size: 17px; }
.team-choice:hover, .team-choice:focus-visible { border-color: var(--verde); }
.closed-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px 6px 0 6px;
  background: var(--apoio-amarelo); color: #5A4300; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .team-picker h2, :where(:root:not([data-theme="light"])) .team-choice strong { color: var(--ink); }
}
:where(:root[data-theme="dark"]) .team-picker h2, :where(:root[data-theme="dark"]) .team-choice strong { color: var(--ink); }

/* publicação só de texto em cor clara (cítrico ou cores de apoio): texto e controles em verde-escuro */
.story.light-bg { color: var(--verde-escuro); }
.story.light-bg .story-icon { color: var(--verde-escuro); filter: none; }
.story.light-bg .story-author { text-shadow: none; }
.story.light-bg .story-tag { background: var(--verde-escuro); color: #fff; }
.story.light-bg .story-bars .bar { background: rgba(0, 78, 76, .22); }
.story.light-bg .story-bars .fill { background: var(--verde-escuro); }

/* ------------------------------------------------ computador e tablet
   O WhatsApp Web abre o link no computador: a tela aproveita a largura em vez de ficar numa coluna de celular. */
@media (min-width: 760px) {
  .app { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
  .home-head { margin-top: 16px; border-radius: 28px 28px 0 28px; padding: 26px 32px 30px; }
  .home-head h1 { font-size: 34px; }
  .section-title, .stories { padding-left: 4px; padding-right: 4px; }
  #screen-home > .pad { padding: 0 4px; }
  .notif-banner { margin-left: 4px; margin-right: 4px; }
  /* serviços em grade: cada cartão ocupa uma célula */
  .consult-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
  .consult-cards .wide { grid-column: auto; }
  .consult-cards .card-btn { height: 100%; align-items: flex-start; padding: 16px; }
  .card-btn:not(.soon):hover { border-color: var(--verde); }

  /* conversa, consultas e guia: coluna de leitura com bordas, como uma janela */
  .screen.chat, #screen-consulta, #screen-guia { width: 100%; max-width: 960px; margin: 0 auto;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--ground); }
  .screen.chat { height: 100dvh; }
  .app .bubble { max-width: min(640px, 72%); }
  .team-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-height: 46dvh; }

  .verify { max-width: 480px; margin: 24px auto 0; }
  .guia-filters { padding: 16px 20px 0; }
  .guia-selects { grid-template-columns: 1fr 1.2fr 1.6fr; }
  .guia-selects #guia-esp { grid-column: auto; }
  .tabs-row { margin: 16px 20px 0; max-width: 420px; }
  .consulta-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; gap: 12px; padding: 16px 20px 24px; }
  .consulta-list > p { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .guia-filters { flex-direction: row; }
  .guia-filters input { flex: 2; }
  .guia-selects { flex: 3; }
}

/* Carteirinha virtual: o cartão é sempre verde Unimed, nos dois temas */
/* carteirinha no padrão Unimed (modelos da marca em public/marca/cartao-frente.png e cartao-verso.png, 1070x683).
   Posições e tamanhos em % do cartão (cqw = 1% da largura), para ficar igual em qualquer tela. */
.vc { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; }
.vc-cartao { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1070 / 683; perspective: 1400px; cursor: pointer; container-type: inline-size;
  font-family: 'Unimed Sans', var(--font, sans-serif); }
.vc-face { position: absolute; inset: 0; background: center / 100% 100% no-repeat; backface-visibility: hidden; transition: transform .5s ease;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22)); color: #1A1A1A; }
.vc-frente { background-image: url(/marca/cartao-frente.png); }
.vc-verso { background-image: url(/marca/cartao-verso.png); transform: rotateY(180deg); }
.vc-cartao.virado .vc-frente { transform: rotateY(-180deg); }
.vc-cartao.virado .vc-verso { transform: rotateY(0deg); }
@media (prefers-reduced-motion: reduce) { .vc-face { transition: none; } }
.vc-numero { position: absolute; left: 7.4%; top: 37.6%; font-size: 5.6cqw; font-weight: 600; letter-spacing: .02em; white-space: nowrap; line-height: 1; }
.vc-campo { position: absolute; display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.vc-campo strong { font-size: 2.55cqw; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-campo span { font-size: 1.6cqw; white-space: nowrap; }
/* linha 1 */
.vc-nasc { left: 7.6%; top: 47.4%; } .vc-contr { left: 29.2%; top: 47.4%; max-width: 30%; } .vc-acom { left: 61.8%; top: 47.4%; max-width: 15%; } .vc-valid { left: 80.2%; top: 47.4%; }
/* nome e rede */
.vc-nome { left: 7.6%; top: 55.4%; max-width: 64%; } .vc-nome strong { font-size: 4.5cqw; font-weight: 600; }
.vc-rede { left: 72.6%; top: 57.6%; max-width: 22%; }
/* linha 3 */
.vc-atend { left: 7.6%; top: 66.2%; max-width: 11%; } .vc-plano { left: 19.2%; top: 66.2%; max-width: 30%; } .vc-abr { left: 49.6%; top: 66.2%; max-width: 22.6%; } .vc-abr strong { font-size: 2.05cqw; } /* "Grupo de municípios" cabe antes da Via */ .vc-via { left: 72.6%; top: 66.2%; }
/* linha 4 e 5 */
.vc-cpt { left: 7.6%; top: 75.2%; max-width: 41%; } .vc-contrat { left: 49.6%; top: 75.2%; max-width: 44%; }
.vc-seg { left: 7.6%; top: 84.2%; max-width: 86%; }
/* verso */
.vc-avisos { position: absolute; left: 8%; right: 10%; top: 36%; display: flex; flex-direction: column; gap: 1.6cqw; font-size: 2.1cqw; line-height: 1.25; color: #333; }
.vc-avisos p { margin: 0; }
.vc-sac { position: absolute; left: 33.8%; width: 24.2%; top: 76.4%; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.vc-sac span { font-size: 2.3cqw; } .vc-sac strong { font-size: 3.6cqw; font-weight: 600; white-space: nowrap; }
.vc-ans { position: absolute; right: 9%; top: 76%; max-width: 32%; display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 1.7cqw; line-height: 1.25; }
.vc-ans strong { font-size: 2.1cqw; font-weight: 600; }
.vc-lateral { position: absolute; right: 4.6%; bottom: 10%; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.45cqw; text-transform: uppercase; color: #555; white-space: nowrap; }
.vc-virar { min-height: 40px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.plan-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-item.wide { grid-column: 1 / -1; }
.plan-item dt { font-size: 13px; color: var(--muted); }
.plan-item dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

/* ------------------------------------------------ Farmácia (loja) */
.farm-head-text { flex: 1; min-width: 0; }
.farm-cart-btn { position: relative; }
.farm-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.farm-shop { display: flex; flex-direction: column; padding-bottom: 12px; }
.farm-search { position: sticky; top: 61px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 0 14px;
  height: 48px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--muted); }
.farm-search:focus-within { border-color: var(--verde); }
.farm-search input { flex: 1; min-width: 0; height: 100%; border: none; background: none; font-size: 16px; color: var(--ink); outline: none; }
.farm-deps { display: flex; gap: 6px; overflow-x: auto; padding: 14px 12px 2px; scrollbar-width: none; }
.farm-deps::-webkit-scrollbar { display: none; }
/* departamentos em bolinhas com ilustração, como nos apps de farmácia; cada um com sua cor */
.farm-dep { --c: #00995D; --fundo: #E3F4EC; flex-shrink: 0; min-width: 72px; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0 2px; border: none; background: none; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.farm-dep-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--fundo); color: var(--c);
  box-shadow: 0 0 0 2.5px transparent; transition: box-shadow .15s, transform .15s; }
.farm-dep-ico svg .d { fill: var(--c); fill-opacity: .22; }
.farm-dep-nome { text-align: center; }
.farm-dep:hover .farm-dep-ico { transform: translateY(-2px); }
.farm-dep:focus-visible { outline: none; }
.farm-dep:focus-visible .farm-dep-ico { box-shadow: 0 0 0 3px var(--verde); }
.farm-dep[aria-pressed="true"] .farm-dep-ico { box-shadow: 0 0 0 2.5px var(--ground), 0 0 0 5px var(--c); }
.farm-dep[aria-pressed="true"] .farm-dep-nome { color: var(--c); font-weight: 800; }
.farm-dep[data-dep="ofertas"] { --c: #D9620B; --fundo: #FDEBDD; }
.farm-dep[data-dep="vencimento"] { --c: #B23A2E; --fundo: #FBE6E2; }
.farm-dep[data-dep="medicamentos"] { --c: #1F6FB8; --fundo: #E1EEFB; }
.farm-dep[data-dep="dermo"] { --c: #A63D8F; --fundo: #F6E6F3; }
.farm-dep[data-dep="beleza"] { --c: #C2364F; --fundo: #FBE4E8; }
.farm-dep[data-dep="infantil"] { --c: #A86A12; --fundo: #FFF1D2; }
.farm-dep[data-dep="saude"] { --c: #3E8E2F; --fundo: #E6F5E1; }
.farm-dep[data-dep="conveniencia"] { --c: #6A4BB0; --fundo: #EDE7F8; }
.farm-dep[data-dep="outros"] { --c: #55636B; --fundo: #ECEFF1; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .farm-dep-ico { background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: color-mix(in srgb, var(--c) 45%, #fff); }
  :where(:root:not([data-theme="light"])) .farm-dep[aria-pressed="true"] .farm-dep-nome { color: color-mix(in srgb, var(--c) 45%, #fff); }
}
:where(:root[data-theme="dark"]) .farm-dep-ico { background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: color-mix(in srgb, var(--c) 45%, #fff); }
:where(:root[data-theme="dark"]) .farm-dep[aria-pressed="true"] .farm-dep-nome { color: color-mix(in srgb, var(--c) 45%, #fff); }
.farm-alert { margin: 12px 16px 0; padding: 10px 14px; border-radius: var(--box-sm); background: var(--apoio-amarelo); color: #5A4300; font-size: 14px; line-height: 1.4; }
.farm-list-title { margin: 16px 16px 8px; font-size: 17px; color: var(--verde-escuro); }
.farm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.farm-empty, .farm-grid > p { grid-column: 1 / -1; padding: 8px 0; }
.farm-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px 14px 0 14px; min-width: 0; }
.farm-img { aspect-ratio: 1; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.farm-img img, .farm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.farm-img.sem-foto, .farm-thumb.sem-foto { background: var(--ground) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%2300995D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 20.5a4.95 4.95 0 0 1-7-7l6-6a4.95 4.95 0 0 1 7 7z'/%3E%3Cpath d='M8.5 8.5l7 7'/%3E%3C/svg%3E") center / 40% no-repeat; }
.farm-off { position: absolute; top: 14px; left: 14px; padding: 2px 8px; border-radius: 6px 6px 0 6px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; }
.farm-nome { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; min-height: 3.9em; }
.farm-lab { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.farm-precos { display: flex; flex-direction: column; margin-top: auto; }
.farm-precos strong { font-size: 19px; color: var(--verde-escuro); }
.farm-de { font-size: 13px; color: var(--muted); }
.farm-acao { min-height: 42px; display: flex; }
.farm-add { flex: 1; height: 42px; font-size: 15px; }
.farm-stepper { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 42px; border: 1.5px solid var(--verde); border-radius: 21px; overflow: hidden; }
.farm-step { width: 44px; height: 100%; border: none; background: none; color: var(--verde-escuro); font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.farm-step:hover:not(:disabled) { background: var(--ground); }
.farm-step:disabled { color: var(--line); cursor: default; }
.farm-qtd { font-weight: 700; font-size: 16px; min-width: 24px; text-align: center; }
.farm-more { display: flex; justify-content: center; padding: 14px 16px 0; }
.farm-more .btn-sm { height: 42px; padding: 0 18px; font-size: 15px; }
.farm-legal { padding: 14px 20px 0; margin: 0; line-height: 1.45; }
/* barra da cesta, presa no rodapé enquanto há itens */
.farm-bar { position: sticky; bottom: 0; z-index: 3; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--ground) 70%, transparent); margin-top: auto; }
.farm-bar-btn { width: 100%; height: 54px; border: none; border-radius: 14px 14px 0 14px; background: var(--verde); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px; box-shadow: 0 4px 14px rgba(0, 78, 76, .25); }
.farm-bar-btn:hover { background: var(--verde-escuro); }
.farm-bar-qtd { font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .2); padding: 3px 9px; border-radius: 10px; }
/* cesta e finalização */
.farm-checkout { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.farm-h2 { margin: 0; font-size: 20px; color: var(--verde-escuro); }
.farm-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.farm-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 0 14px; }
.farm-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; background: #fff; overflow: hidden; display: flex; }
.farm-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.farm-item-nome { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.farm-item-text .farm-stepper { flex: none; width: 132px; height: 38px; margin-top: 4px; }
.farm-item-text .farm-step { width: 40px; }
.farm-item-valor { white-space: nowrap; font-size: 15px; }
.farm-vazia { padding: 12px 0; }
/* item que acabou ou não tem a quantidade escolhida (conferido antes de finalizar) */
.farm-item-falta { border-color: #C62828; background: color-mix(in srgb, #C62828 7%, var(--surface)); }
.farm-item-falta .farm-item-nome, .farm-item-falta .farm-item-valor, .farm-falta-msg { color: #B71C1C; }
.farm-falta-msg { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.farm-tirar { align-self: flex-start; margin-top: 4px; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) :is(.farm-item-falta .farm-item-nome, .farm-item-falta .farm-item-valor, .farm-falta-msg) { color: #FF8A80; } }
:where(:root[data-theme="dark"]) :is(.farm-item-falta .farm-item-nome, .farm-item-falta .farm-item-valor, .farm-falta-msg) { color: #FF8A80; }
/* convites: instalar o aplicativo e ativar as notificações */
.convite { width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 24px 20px 16px; border: 0; border-radius: 20px 20px 0 20px;
  background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); text-align: center; }
.convite[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.convite::backdrop { background: rgba(0, 30, 29, .6); }
.convite h2 { margin: 0; font-size: 21px; color: var(--verde-escuro); }
.convite p { margin: 0; line-height: 1.45; }
.convite-icone { border-radius: 16px; }
.convite-sino { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--verde) 14%, var(--surface)); color: var(--verde); }
.convite-btn { width: 100%; min-height: 48px; font-size: 16px; }
.convite-passos { margin: 0; padding: 12px 12px 12px 32px; text-align: left; display: flex; flex-direction: column; gap: 8px; line-height: 1.4;
  background: color-mix(in srgb, var(--verde) 8%, var(--surface)); border-radius: 12px; width: 100%; box-sizing: border-box; }
.convite-depois { font-size: 14px; padding: 6px; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .convite h2 { color: var(--ink); } }
:where(:root[data-theme="dark"]) .convite h2 { color: var(--ink); }
/* histórico de compras */
.farm-historico { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
.fh-intro { margin: -6px 0 0; line-height: 1.45; }
.fh-lista { display: flex; flex-direction: column; gap: 12px; }
.fh-pedido { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.fh-cab, .fh-rodape { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fh-rodape { border-top: 1px solid var(--line); padding-top: 8px; }
.fh-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fh-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.fh-item + .fh-item { border-top: 1px dashed var(--line); }
.fh-acao { flex-shrink: 0; }
.fh-acao .farm-stepper { width: 120px; height: 36px; }
.fh-subiu { color: #b42318; font-weight: 600; }
.fh-caiu { color: var(--verde); font-weight: 600; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .fh-subiu { color: #FF8A80; } }
:where(:root[data-theme="dark"]) .fh-subiu { color: #FF8A80; }
.farm-add-more { align-self: flex-start; font-size: 15px; }
.farm-box { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px 14px 0 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.farm-box legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 16px; color: var(--verde-escuro); }
.farm-hint { margin: 0; line-height: 1.45; }
.farm-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px 12px 0 12px; cursor: pointer; }
.farm-opt:has(input:checked) { border-color: var(--verde); background: color-mix(in srgb, var(--apoio-verde) 35%, var(--surface)); }
.farm-opt input { width: 20px; height: 20px; accent-color: var(--verde); flex-shrink: 0; margin: 0; }
.farm-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.farm-opt-price { font-weight: 700; white-space: nowrap; }
.farm-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.farm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 4px; }
.farm-fields .span2 { grid-column: 1 / -1; }
.farm-fields label { justify-content: flex-end; } /* rótulo que quebra a linha não desalinha o campo ao lado */
.farm-fields label, .farm-obs { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--muted); min-width: 0; }
.farm-fields input, .farm-obs textarea { height: 46px; border-radius: 10px 10px 0 10px; border: 1px solid var(--line); padding: 0 12px; background: var(--surface); font-size: 16px; color: var(--ink); width: 100%; box-sizing: border-box; font-family: inherit; }
.farm-obs textarea { height: auto; padding: 10px 12px; resize: vertical; }
.farm-resumo { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; padding: 14px; border-radius: 14px 14px 0 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.farm-resumo dd { margin: 0; text-align: right; font-weight: 600; }
.farm-resumo .farm-total { font-size: 19px; font-weight: 800; color: var(--verde-escuro); padding-top: 6px; border-top: 1px solid var(--line); }
.farm-finalizar { height: 54px; font-size: 17px; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .farm-list-title, :where(:root:not([data-theme="light"])) .farm-h2, :where(:root:not([data-theme="light"])) .farm-box legend, :where(:root:not([data-theme="light"])) .farm-precos strong, :where(:root:not([data-theme="light"])) .farm-resumo .farm-total, :where(:root:not([data-theme="light"])) .farm-step { color: var(--ink); }
  :where(:root:not([data-theme="light"])) .farm-opt:has(input:checked) { background: color-mix(in srgb, var(--verde) 18%, var(--surface)); }
}
:where(:root[data-theme="dark"]) .farm-list-title, :where(:root[data-theme="dark"]) .farm-h2, :where(:root[data-theme="dark"]) .farm-box legend, :where(:root[data-theme="dark"]) .farm-precos strong, :where(:root[data-theme="dark"]) .farm-resumo .farm-total, :where(:root[data-theme="dark"]) .farm-step { color: var(--ink); }
:where(:root[data-theme="dark"]) .farm-opt:has(input:checked) { background: color-mix(in srgb, var(--verde) 18%, var(--surface)); }
@media (max-width: 359px) { .farm-pay, .farm-fields { grid-template-columns: 1fr; } }
@media (min-width: 760px) {
  #screen-farmacia { width: 100%; max-width: 1180px; margin: 0 auto; }
  .farm-search { margin: 16px 20px 0; top: 63px; }
  .farm-deps { padding: 18px 20px 4px; gap: 10px; }
  .farm-dep { min-width: 88px; max-width: 120px; font-size: 13.5px; }
  .farm-dep-ico { width: 76px; height: 76px; }
  .farm-dep-ico svg { width: 40px; height: 40px; }
  .farm-list-title { margin: 18px 20px 10px; }
  .farm-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 0 20px; }
  .farm-card:hover { border-color: var(--verde); }
  .farm-bar { display: flex; justify-content: flex-end; padding: 12px 20px; }
  .farm-bar-btn { width: 380px; }
  .farm-checkout { max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; padding-top: 24px; }
}

/* Imposto de Renda: no papel (ou PDF) sai só o demonstrativo */
.ir-print { justify-content: center; }
@media print {
  /* no papel, sempre as cores claras e uma coluna só, mesmo com o celular no modo escuro */
  :root { --ink: #14302E; --muted: #4D6462; --ground: #FFFFFF; --surface: #FFFFFF; --line: #BBBBBB; color-scheme: light; }
  body { background: #fff !important; }
  .screen:not(#screen-consulta), #consulta-back, #ir-tabs, #consulta-foot, #salvas-box, .ir-print, .install-banner { display: none !important; }
  #screen-consulta .chat-head { background: #fff; border: none; }
  .consulta-list { display: flex !important; flex-direction: column; align-items: stretch !important; padding: 0; }
  .consulta-list > * { width: 100%; max-width: none; }
  .consulta-card { break-inside: avoid; }
}

/* Banner da farmácia: publicações da categoria Farmácia sobre os modelos da marca.
   Posições em % do modelo (caixa laranja de preço, área da foto e do texto); fontes em cqw para escalar com o banner. */
.farm-banner { margin: 14px 0 0; }
.fb-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 16px; scroll-padding: 0 16px; }
.fb-track::-webkit-scrollbar { display: none; }
.fb-slide { position: relative; flex: 0 0 min(66%, 290px); scroll-snap-align: start; aspect-ratio: 472 / 595; container-type: inline-size;
  border: none; padding: 0; margin: 0; overflow: hidden; border-radius: 16px 16px 0 16px; text-align: left; font: inherit; color: #004E4C; cursor: pointer;
  background: #EFEFEF url("/marca/farmacia-vertical-sem-preco.png") center / 100% 100% no-repeat; }
.fb-slide.preco { background-image: url("/marca/farmacia-vertical-com-preco.png"); }
.fb-track:has(> .fb-slide:only-child) { justify-content: center; }
.fb-track > .fb-slide:only-child { flex-basis: min(78%, 320px); }
.fb-slide:focus-visible { outline: 3px solid var(--verde); outline-offset: -3px; }
/* produto centralizado; multiply some com o fundo branco da foto sobre o cinza do modelo */
.fb-foto { position: absolute; left: 15%; top: 12%; width: 70%; height: 40%; object-fit: contain; mix-blend-mode: multiply; }
.fb-texto { position: absolute; left: 7%; right: 7%; top: 55%; bottom: 17%; display: flex; flex-direction: column; gap: 1.6cqw; overflow: hidden; }
.fb-slide.preco .fb-texto { bottom: 20%; }
.fb-slide.sem-foto .fb-texto { top: 22%; justify-content: center; }
.fb-tag { position: absolute; left: 5%; top: 5%; padding: .8cqw 3cqw; border-radius: 999px; font-size: 3.6cqw; font-weight: 700; color: #fff; background: #00995D;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.fb-tag.oferta { background: #E37222; }
.fb-tag.vencimento { background: #B23A2E; }
.fb-titulo { font-size: 6.6cqw; line-height: 1.1; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-corpo { font-size: 4.2cqw; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-slide.sem-foto .fb-titulo { font-size: 8.5cqw; -webkit-line-clamp: 3; }
.fb-slide.sem-foto .fb-corpo { -webkit-line-clamp: 4; }
.fb-preco { position: absolute; left: 5.9%; width: 31.4%; top: 81.8%; height: 13.5%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-size: 5.4cqw; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.fb-de { font-size: 3.5cqw; font-weight: 600; opacity: .9; }
/* setas para passar os banners (somem com um banner só) */
.fb-palco { position: relative; }
.fb-seta { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; display: grid; place-items: center;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  transition: background .15s, opacity .15s; }
.fb-seta:hover, .fb-seta:focus-visible { background: rgba(0, 0, 0, .8); outline: 2px solid #fff; outline-offset: 2px; }
.fb-seta.ant { left: 4px; }
.fb-seta.prox { right: 4px; }
.farm-banner:has(.fb-dots.hidden) .fb-seta { display: none; }
@media (hover: none) { .fb-seta { width: 34px; height: 34px; background: rgba(0, 0, 0, .4); } }
/* Black November com o fundo branco mantido: a foto inteira, com o próprio fundo branco virando um cartão com sombra */
.fb-slide.bn.fundo-branco .fb-foto { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.fb-dots { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.fb-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: var(--line); position: relative; }
.fb-dot::after { content: ""; position: absolute; inset: -8px; } /* área de toque maior que o ponto */
.fb-dot[aria-current="true"] { background: var(--verde); width: 20px; border-radius: 4px; }
/* tela larga: o banner usa o modelo horizontal (a publicação aberta continua no vertical) */
@media (min-width: 760px) {
  .farm-banner { margin-top: 16px; }
  .fb-track { padding: 0 20px; scroll-padding: 0 20px; }
  .fb-track .fb-slide, .fb-track > .fb-slide:only-child { flex-basis: 100%; aspect-ratio: 2882 / 824;
    background-image: url("/marca/farmacia-horizontal-sem-preco.png"); }
  .fb-track .fb-slide.preco { background-image: url("/marca/farmacia-horizontal-com-preco.png"); }
  .fb-track .fb-foto { left: 34%; top: 8%; width: 30%; height: 84%; }
  .fb-track .fb-texto { left: 4%; right: 67%; top: 48%; bottom: 8%; justify-content: center; gap: .5cqw; }
  .fb-track .fb-slide.preco .fb-texto { bottom: 8%; }
  .fb-track .fb-slide.sem-foto .fb-texto { left: 30%; right: 37%; top: 18%; bottom: 12%; }
  .fb-track .fb-slide.sem-foto:not(.preco) .fb-texto { right: 25%; }
  .fb-track .fb-tag { left: 1.6%; top: 7%; padding: .3cqw 1cqw; font-size: 1.15cqw; }
  .fb-track .fb-titulo, .fb-track .fb-slide.sem-foto .fb-titulo { font-size: 2.3cqw; }
  .fb-track .fb-corpo { font-size: 1.3cqw; -webkit-line-clamp: 3; }
  .fb-track .fb-preco { left: 65.65%; width: 13.2%; top: 66.6%; height: 25.9%; font-size: 2.3cqw; }
  .fb-track .fb-de { font-size: 1.15cqw; }
}

/* Black November: modelo da campanha (fundo preto). Foto sobre o pedestal, preço no quadrado verde-limão e o título
   abaixo de "Black November"; a descrição fica de fora (o modelo já traz o texto da campanha). */
.fb-slide.bn { aspect-ratio: 1080 / 1350; color: #fff; background: #0E0E0E url("/marca/farmacia-vertical-black-november.jpg") center / 100% 100% no-repeat; }
.fb-slide.bn .fb-foto { left: 20%; top: 41%; width: 50%; height: 36%; mix-blend-mode: normal; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.fb-slide.bn .fb-texto { left: 6.5%; right: 30%; top: 34.5%; bottom: auto; }
.fb-slide.bn .fb-titulo { font-size: 4.6cqw; -webkit-line-clamp: 2; }
.fb-slide.bn .fb-corpo { display: none; }
.fb-slide.bn.sem-foto .fb-texto { right: 6.5%; top: 42%; }
.fb-slide.bn.sem-foto .fb-titulo { font-size: 7cqw; -webkit-line-clamp: 3; }
.fb-slide.bn .fb-preco { left: 71.67%; width: 26.39%; top: 61.04%; height: 14.07%; color: #111; font-size: 5cqw; }
.fb-slide.bn .fb-de { font-size: 3cqw; }
@media (min-width: 760px) {
  .fb-track .fb-slide.bn { aspect-ratio: 2882 / 824; background-image: url("/marca/farmacia-horizontal-black-november.jpg"); }
  .fb-track .fb-slide.bn .fb-foto { left: 39%; top: 8%; width: 24%; height: 76%; }
  .fb-track .fb-slide.bn .fb-texto { left: 5.2%; right: 68%; top: 84%; bottom: 3%; justify-content: flex-start; }
  .fb-track .fb-slide.bn .fb-titulo { font-size: 1.45cqw; -webkit-line-clamp: 1; }
  .fb-track .fb-slide.bn.sem-foto .fb-texto { left: 37%; right: 36%; top: 30%; bottom: 30%; justify-content: center; }
  .fb-track .fb-slide.bn.sem-foto .fb-titulo { font-size: 2.6cqw; -webkit-line-clamp: 3; }
  .fb-track .fb-slide.bn .fb-preco { left: 66.17%; width: 12.11%; top: 61.04%; height: 28.4%; font-size: 2.1cqw; }
  .fb-track .fb-slide.bn .fb-de { font-size: 1.1cqw; }
}

/* publicação da farmácia aberta: o mesmo cartão do banner, no modelo vertical, centralizado */
.story.farm-modelo { background: var(--verde-escuro); }
.story.farm-modelo .story-media { padding: calc(72px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.story-media > .fb-slide { flex: none; width: min(100%, calc((100dvh - 110px) * 472 / 595), 520px); cursor: default;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.story-media > .fb-slide .fb-foto { width: 70%; height: 40%; object-fit: contain; }
.story-media > .fb-slide.bn { width: min(100%, calc((100dvh - 110px) * 1080 / 1350), 520px); }
.story-media > .fb-slide.bn .fb-foto { width: 50%; height: 36%; }
.story.farm-modelo .story-content, .story.farm-modelo #story-tag { display: none; } /* o cartão já mostra título, preço e tag */
.farm-receita { align-self: flex-start; margin: 0; padding: 2px 8px; border-radius: 6px; background: #FBE4E8; color: #A3172F; font-size: 12px; font-weight: 700; line-height: 1.4; }
.fd-receita { font-size: 13.5px; font-weight: 600; padding: 6px 10px; }
/* Próximo ao vencimento: data de validade e desconto, no cartão e na tela do produto */
.farm-venc { align-self: flex-start; margin: 0; padding: 2px 8px; border-radius: 6px; background: #FBE6E2; color: #8E2A20; font-size: 12px; font-weight: 700; line-height: 1.4; }
.fd-venc { font-size: 13.5px; font-weight: 600; padding: 6px 10px; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .farm-venc { background: #4A231D; color: #FFB8AC; } }
:where(:root[data-theme="dark"]) .farm-venc { background: #4A231D; color: #FFB8AC; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .farm-receita { background: #4A1C25; color: #FFB3BF; } }
:where(:root[data-theme="dark"]) .farm-receita { background: #4A1C25; color: #FFB3BF; }

/* cartão: a foto e o nome abrem a tela do produto */
.farm-card .farm-img { cursor: pointer; }
.farm-nome-btn { all: unset; cursor: pointer; }
.farm-nome-btn:hover { text-decoration: underline; }
.farm-nome-btn:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; border-radius: 4px; }
/* tela do produto */
.farm-detalhe { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 24px; }
.fd-topo { display: flex; flex-direction: column; gap: 16px; }
.fd-img { width: 100%; max-width: 420px; align-self: center; aspect-ratio: 1; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.fd-img img { width: 100%; height: 100%; object-fit: contain; }
.fd-img.sem-foto { background: var(--ground) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%2300995D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 20.5a4.95 4.95 0 0 1-7-7l6-6a4.95 4.95 0 0 1 7 7z'/%3E%3Cpath d='M8.5 8.5l7 7'/%3E%3C/svg%3E") center / 30% no-repeat; }
.fd-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fd-nome { margin: 0; font-size: 21px; line-height: 1.3; color: var(--ink); }
.fd-lab { margin: 0; }
.fd-precos { display: flex; flex-direction: column; gap: 2px; }
.fd-precos > div { display: flex; align-items: center; gap: 8px; }
.fd-precos strong { font-size: 26px; color: var(--verde-escuro); }
.fd-off { position: static; }
.fd-acao { max-width: 320px; margin-top: 4px; }
.fd-sec { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fd-sec h3 { margin: 0; font-size: 17px; color: var(--verde-escuro); }
.fd-texto { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 72ch; }
.fd-texto p, .fd-texto h4 { margin: 0; }
.fd-texto h4 { margin-top: 8px; font-size: 15px; color: var(--verde-escuro); }
.fd-item { position: relative; padding-left: 18px; }
.fd-item::before { content: ''; position: absolute; left: 4px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--verde); }
.fd-aviso { margin: 0; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .fd-sec h3, :where(:root:not([data-theme="light"])) .fd-texto h4, :where(:root:not([data-theme="light"])) .fd-precos strong { color: var(--ink); }
}
:where(:root[data-theme="dark"]) .fd-sec h3, :where(:root[data-theme="dark"]) .fd-texto h4, :where(:root[data-theme="dark"]) .fd-precos strong { color: var(--ink); }
@media (min-width: 760px) {
  .farm-detalhe { padding: 24px 20px 32px; }
  .fd-topo { flex-direction: row; align-items: flex-start; gap: 32px; }
  .fd-img { width: 380px; flex: none; align-self: flex-start; }
  .fd-nome { font-size: 24px; }
}

/* arte pronta no banner da farmácia (ex.: Dia do Genérico): a imagem ocupa o slide todo, sem o modelo da marca */
.fb-slide.arte { background: #fff; }
.fb-slide.arte picture, .fb-slide.arte img { display: block; width: 100%; height: 100%; }
.fb-slide.arte img { object-fit: cover; }
@media (min-width: 760px) {
  .fb-track .fb-slide.arte { aspect-ratio: 2882 / 824; background: #fff; }
}
