.help-chat-open{display:inline-flex;align-items:center;gap:8px;box-sizing:border-box;width:auto;font:500 14px/1.4 "Work Sans",system-ui,sans-serif;position:fixed;right:18px;bottom:18px;z-index:110;background:#A8492F;color:white;border:0;border-radius:24px;padding:12px 18px;box-shadow:0 3px 12px #0003;cursor:pointer}
.help-chat{position:fixed;right:18px;bottom:74px;width:min(370px,calc(100vw - 24px));height:min(550px,calc(100dvh - 100px));max-height:calc(100dvh - 100px);z-index:111;background:#F7F1E6;color:#2A2118;border:1px solid #E3D8C4;border-radius:16px;box-shadow:0 6px 30px #0003;display:flex;flex-direction:column;overflow:hidden;padding:0;margin:0;font:400 14px/1.45 "Work Sans",system-ui,sans-serif;text-align:left}
.help-chat[hidden],.help-chat-open[hidden],.help-chat [hidden]{display:none}
.help-chat header{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin:0;background:#A8492F;color:#fff;border:0;box-shadow:none;flex-shrink:0;backdrop-filter:none}
.help-chat h2{font:600 15px/1.3 "Work Sans",system-ui,sans-serif;margin:0;color:inherit}
.help-chat-actions{display:flex;gap:6px;align-items:center}
.help-chat header button{padding:0;width:28px;height:28px;border:0;background:transparent;color:#fff;font:400 22px/1 system-ui;cursor:pointer;border-radius:6px}
.help-chat header button:first-child{font-size:16px;border:1px solid #ffffff70;border-radius:50%;width:22px;height:22px}
.help-chat-privacy{padding:10px 14px;background:var(--surface);border-bottom:1px solid #E3D8C4;flex-shrink:0;max-height:45%;overflow:auto}
.help-chat .help-chat-privacy-short,.help-chat .help-chat-notice{font:400 11px/1.45 "Work Sans",system-ui,sans-serif;margin:0 0 6px;color:#55503F}
.help-chat-privacy-short a{color:#A8492F;text-decoration:underline;font:inherit}
.help-chat-privacy-details{font-size:11px;margin-bottom:8px;color:#55503F}
.help-chat-privacy-details summary{cursor:pointer;color:#A8492F}
.help-chat .help-chat-notice{margin-top:8px}
.help-chat-privacy button,.help-chat form button,.help-chat-log button{width:auto;border:0;border-radius:8px;background:#A8492F;color:#fff;padding:8px 12px;font:500 13px/1.3 "Work Sans",system-ui,sans-serif;cursor:pointer}
.help-chat-log{flex:1;overflow:auto;min-height:0;display:flex;flex-direction:column;gap:10px;padding:14px;scroll-behavior:smooth}
.help-chat-log:empty::before{content:"Pergunte sobre cadastro, planos ou configuração da família.";font-size:12px;color:#55503F;margin:auto;text-align:center;max-width:240px}
.help-chat .help-chat-message{box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:9px 11px;max-width:88%;font:400 14px/1.45 "Work Sans",system-ui,sans-serif;box-shadow:0 1px 2px #0000000c;flex-shrink:0}
.help-chat .help-chat-answer{align-self:flex-start;background:var(--surface);border-radius:3px 12px 12px 12px}
.help-chat .help-chat-question{align-self:flex-end;background:#F1DDD0;border-radius:12px 3px 12px 12px}
.help-chat-message strong{font-weight:700}
.help-chat form{display:flex;align-items:flex-end;gap:8px;padding:12px;background:var(--surface);border-top:1px solid #E3D8C4;flex-shrink:0;margin:0}
.help-chat textarea{box-sizing:border-box;flex:1;min-width:0;resize:none;margin:0;width:100%;font:400 14px/1.4 "Work Sans",system-ui,sans-serif;padding:9px;border:1px solid #E3D8C4;border-radius:10px;background:var(--surface);color:#2A2118}
.help-chat form button{flex-shrink:0;margin:0;min-height:38px}
.help-chat button:disabled{opacity:.6;cursor:wait}
.help-chat-log button{display:block;margin-top:8px;background:#F1DDD0;color:#A8492F}
.help-chat button:focus-visible,.help-chat summary:focus-visible{outline:2px solid #C1573A;outline-offset:2px}

.help-chat.show-notice .help-chat-privacy{flex:1;max-height:none;padding:20px;display:flex;flex-direction:column;gap:12px;overflow:auto}
.help-chat.show-notice .help-chat-privacy-short{display:none}
.help-chat.show-notice .help-chat-privacy-details{font-size:14px}
.help-chat.show-notice .help-chat-notice{font-size:14px;line-height:1.6}
.help-chat.show-notice .help-chat-privacy-details summary{display:none}
.help-chat.show-notice .help-chat-privacy-details .help-chat-notice{display:block}
.help-chat.show-notice .help-chat-privacy-details:not([open]) > :not(summary){display:block}
.help-chat.show-notice #helpChatAcknowledge{min-height:44px;margin-top:auto;align-self:stretch}
.help-chat-accepted{font-size:12px;color:#55503F;margin:0}
@media(max-width:480px){.help-chat.show-notice header{padding-top:max(12px,env(safe-area-inset-top))}.help-chat.show-notice .help-chat-privacy{padding-bottom:max(20px,env(safe-area-inset-bottom))}}
@media(max-width:480px){.help-chat{right:12px;bottom:70px}.help-chat-open{right:12px;bottom:12px}.help-chat textarea{font-size:16px}}

.help-chat textarea:focus{outline:2px solid #C1573A;outline-offset:1px}
.help-chat-close .close-back{display:none}
/* Celular: o chat ocupa a tela toda (barra própria com ‹, campo preso embaixo acima do teclado). */
@media(max-width:860px){
html.help-chat-full,html.help-chat-full body{overflow:hidden;overscroll-behavior:none}
.help-chat{left:0;right:0;top:var(--hc-top,0);bottom:auto;width:100%;height:var(--hc-h,100dvh);max-height:none;border:0;border-radius:0;box-shadow:none;z-index:1000}
.help-chat header{justify-content:flex-start;padding:max(8px,env(safe-area-inset-top)) 12px 8px 4px}
.help-chat h2{flex:1;font-size:17px}
.help-chat-actions{display:contents}
.help-chat header .help-chat-close{order:-1;width:44px;height:44px;font-size:32px}
.help-chat header .help-chat-close .close-x{display:none}.help-chat header .help-chat-close .close-back{display:inline}
.help-chat header button:first-child{width:28px;height:28px}
.help-chat form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.help-chat.show-notice .help-chat-privacy{padding-bottom:max(20px,env(safe-area-inset-bottom))}
.help-chat textarea{font-size:16px}
}
/* Tema escuro (P3): mesmas peças, cores do escuro. */
:root[data-theme="dark"] .help-chat {background:#1A1511;color:#F3ECE0;border-color:#3D342B}
:root[data-theme="dark"] .help-chat-privacy, :root[data-theme="dark"] .help-chat form {background:#231D18;border-color:#3D342B}
:root[data-theme="dark"] .help-chat .help-chat-privacy-short, :root[data-theme="dark"] .help-chat .help-chat-notice, :root[data-theme="dark"] .help-chat-privacy-details, :root[data-theme="dark"] .help-chat-accepted {color:#C2B7A4}
:root[data-theme="dark"] .help-chat-privacy-short a, :root[data-theme="dark"] .help-chat-privacy-details summary {color:#F0A487}
:root[data-theme="dark"] .help-chat .help-chat-answer {background:#2A231D;color:#F3ECE0}
:root[data-theme="dark"] .help-chat .help-chat-question {background:#4A2C21;color:#F3ECE0}
:root[data-theme="dark"] .help-chat-log:empty::before {color:#C2B7A4}
:root[data-theme="dark"] .help-chat textarea {background:#1A1511;color:#F3ECE0;border-color:#3D342B}
:root[data-theme="dark"] .help-chat-log button {background:#4A2C21;color:#F3ECE0}
:root[data-theme="dark"] { color-scheme: dark; }
/* Mascote (14/10/2026): o rosto do "Fale com o Remedinho". O botão continua com o texto escrito, para o idoso. */
.help-chat-open{padding:6px 16px 6px 6px}
.help-chat-mascot{width:40px;height:40px;border-radius:50%;flex:none;background:#F7F1E6;box-shadow:0 0 0 2px #F7F1E6}
.help-chat-open:hover .help-chat-mascot{animation:help-chat-ring .6s ease-in-out}
@keyframes help-chat-ring{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}
@media (prefers-reduced-motion: reduce){.help-chat-open:hover .help-chat-mascot{animation:none}}

/* Mascote sozinho (14/10/2026): botão redondo; o texto fica para leitores de tela (aria-label). */
.help-chat-open.help-chat-open--mascot{padding:0;width:64px;height:64px;border-radius:50%;justify-content:center;overflow:visible;background:#A8492F}
.help-chat-open--mascot > span:not(.help-chat-tease){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.help-chat-open--mascot .help-chat-mascot{width:52px;height:52px}
.help-chat-tease{position:absolute;right:72px;bottom:12px;background:#FFFDF8;color:#2A2118;border:1px solid #E3D8C4;border-radius:14px 14px 4px 14px;padding:8px 12px;font:600 14px/1.3 "Work Sans",system-ui,sans-serif;white-space:nowrap;box-shadow:0 3px 12px #0002;opacity:0;transform:translateY(4px);transition:opacity .3s,transform .3s;pointer-events:none}
.help-chat-open.show-tease .help-chat-tease{opacity:1;transform:none}
.help-chat-open.ring .help-chat-mascot{animation:help-chat-ring .7s ease-in-out 2}
@media (prefers-reduced-motion: reduce){.help-chat-open.ring .help-chat-mascot{animation:none}.help-chat-tease{transition:none}}
:root[data-theme="dark"] .help-chat-tease{background:#231D18;color:#F3ECE0;border-color:#3D342B}

/* Aviso da ajuda: a caixa inteira rola (barra fina) e o botão fica preso no rodapé, sempre visível. 23/10/2026: com os
   campos de contato do site acima, a área própria do texto era espremida a ~19px — nenhum bloco encolhe agora. */
.help-chat.show-notice .help-chat-privacy{overflow:auto}
.help-chat.show-notice .help-chat-privacy>*{flex-shrink:0}
.help-chat.show-notice .help-chat-privacy-details{flex:0 0 auto;overflow:visible}
.help-chat.show-notice #helpChatAcknowledge{position:sticky;bottom:0;box-shadow:0 0 0 20px var(--surface,#F7F1E6),0 -20px 14px 6px var(--surface,#F7F1E6)}
.help-chat-privacy-details,.help-chat-log,.help-chat-privacy{scrollbar-width:thin;scrollbar-color:#E3D8C4 transparent}
.help-chat ::-webkit-scrollbar{width:6px}.help-chat ::-webkit-scrollbar-thumb{background:#E3D8C4;border-radius:6px}.help-chat ::-webkit-scrollbar-track{background:transparent}
/* Aviso "Instale o app" como balão do mascote (pwa.js, 15/10/2026): acima do botão, com rabinho apontando para ele. */
.rm-install-banner.rm-install-mascot{left:auto;right:12px;bottom:100px;width:min(300px,calc(100vw - 24px));grid-template-columns:1fr;z-index:112;border-radius:16px 16px 4px 16px;background:#FFFDF8;border-color:#E3D8C4}
.rm-install-banner.rm-install-mascot::after{content:"";position:absolute;right:26px;bottom:-9px;width:16px;height:16px;background:#FFFDF8;border-right:1px solid #E3D8C4;border-bottom:1px solid #E3D8C4;transform:rotate(45deg)}
.rm-install-banner.rm-install-mascot .rm-install-actions{justify-content:flex-start}
.help-chat-open.rm-install-speaking .help-chat-tease{display:none}
.help-chat-contact{display:grid;gap:5px;margin:10px 0}
.help-chat-contact label{font:500 13px/1.4 "Work Sans",system-ui,sans-serif;color:var(--text,#312b22)}
.help-chat .help-chat-contact input:not([type=checkbox]){box-sizing:border-box;width:100%;min-width:0;padding:9px;border:1px solid #d8c6af;border-radius:7px;font:400 16px/1.3 "Work Sans",system-ui,sans-serif;background:var(--surface,#fff);color:inherit}
.help-chat-contact .help-chat-terms{display:flex;align-items:flex-start;gap:8px;margin-top:6px}
.help-chat-contact input[type=checkbox]{width:18px;height:18px;flex:none;margin:2px 0}
.help-chat-contact a{color:#A8492F;text-decoration:underline}
.help-chat .help-chat-contact-purpose{font:400 11px/1.4 "Work Sans",system-ui,sans-serif;margin:5px 0;color:#55503F}
/* O estilo de details das páginas (FAQ do site: fundo branco, borda) não vale no chat; sem texto, o bloco some (16/10/2026). */
.help-chat details.help-chat-privacy-details{background:none;border:0;border-radius:0;padding:0;margin:0 0 8px}
.help-chat details.help-chat-privacy-details[hidden]{display:none!important}
/* Recuo do mascote quando há controle embaixo dele (04/11/2026, help-chat.js): só os últimos 22 px da tela ficam à vista e abrem o chat. */
.help-chat-open.help-chat-open--peek{transform:translateX(var(--help-peek,42px));transition:transform .2s ease-out}
.help-chat-open{transition:transform .2s ease-out}
@media (prefers-reduced-motion: reduce){.help-chat-open,.help-chat-open.help-chat-open--peek{transition:none}}
