/* MobilyTech · <mobily-assistant> (docs/express/CHATBOT-FRONT.md). Vidro + pílulas, como o configurador; sem dependências.
   Variáveis: --ma-acc, --ma-alt (altura do painel), --ma-raio. Partes: painel, bolha, chip, compositor. */
mobily-assistant { --ma-acc: var(--blue-cta, #0F60D9); --ma-acc-2: #0A4FB8; --ma-ink: var(--ink, #0B1220); --ma-ink-2: var(--ink-2, #3A4250); --ma-ink-3: var(--ink-3, #5A6270);
  --ma-linha: var(--line, #E3E8F0); --ma-linha-2: var(--line-2, #CBD5E3); --ma-suave: #F2F6FC; --ma-raio: 26px; --ma-alt: min(640px, 72vh);
  display: block; position: relative; color: var(--ma-ink); font: 400 15px/1.5 var(--f-text, system-ui, sans-serif); text-align: left; }
mobily-assistant *, mobily-assistant *::before, mobily-assistant *::after { box-sizing: border-box; }
.ma-cx { position: relative; display: flex; flex-direction: column; height: var(--ma-alt); min-height: 300px; border-radius: var(--ma-raio); isolation: isolate; background: none; box-shadow: none; overflow: hidden; overflow: clip; }
/* B23: chat SEM bordas (nenhum contorno nem box-shadow de 1 px): mensagens flutuam; só a caixa de entrada (.ma-comp) é um card. Fundo = tom mais escuro que esmaece nas 4 bordas (máscara radial, sem linha de corte). */
.ma-cx::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ma-fundo, #D9E2F2); -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 48%, #000 34%, #000c 56%, #00000070 78%, transparent 100%); mask-image: radial-gradient(ellipse closest-side at 50% 48%, #000 34%, #000c 56%, #00000070 78%, transparent 100%); pointer-events: none; }
.ma-sr, .ma-hp { position: absolute !important; top: 0; left: 0; pointer-events: none; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ma-hp { left: -9999px; }

/* cabeçalho */
.ma-cab { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; }
/* Beto: avatar redondo (SVG original, cabeça de sol); o brilho é drop-shadow âmbar, nunca borda */
.ma-av { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.ma-av img { display: block; width: 36px; height: 36px; }
.ma-tit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; flex: 1; min-width: 0; margin: 0; }
.ma-tit b { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.ma-tag { padding: 3px 8px; border-radius: 999px; background: #EEF4FF; color: var(--ma-acc-2); font: 500 11px/1 var(--f-mono, ui-monospace, monospace); letter-spacing: .04em; text-transform: uppercase; }
.ma-lnk { flex: none; min-height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ma-acc-2); font: 600 13.5px/1 var(--f-text, inherit); cursor: pointer; }
.ma-lnk:hover { background: #EEF4FF; }
.ma-volta { display: none; }
.ma-mb { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ma-ink-2); cursor: pointer; }
.ma-mb:hover, .ma-mb[aria-expanded="true"] { background: var(--ma-suave); }
.ma-mb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.ma-menu { position: absolute; z-index: 5; right: 10px; top: calc(100% - 4px); display: grid; min-width: 210px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 24px 48px -24px #0b1a3a73; }
.ma-menu button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ma-ink); font: 500 14px/1 var(--f-text, inherit); text-align: left; cursor: pointer; }
.ma-menu button:hover, .ma-menu button:focus-visible { background: var(--ma-suave); }

/* aviso de privacidade */
.ma-aviso { box-shadow: 0 12px 26px -20px #0b1a3a59; display: flex; align-items: flex-start; gap: 10px; max-width: none; padding: 10px 12px; border-radius: 14px; background: #ffffffb3;  color: var(--ma-ink-2); font-size: 13px; line-height: 1.45; }
.ma-aviso[hidden] { display: none; }
.ma-aviso p { margin: 0; flex: 1; }
.ma-aviso a { color: var(--ma-acc-2); font-weight: 600; }
.ma-aviso .ma-chip { flex: none; height: 32px; }

/* histórico */
.ma-log { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 10px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; outline: none; }
.ma-log:focus-visible { box-shadow: inset 0 0 0 2px var(--ma-acc); }
.ma-i { max-width: min(88%, 600px); }
.ma-b { padding: 6px 2px; border-radius: 0; background: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.ma-b--u { align-self: flex-end; padding: 10px 16px; border-radius: 20px; background: var(--ma-user, #C3D7F7); color: var(--ma-ink); box-shadow: 0 12px 26px -18px #0b1a3a73; }
.ma-b.is-stream .ma-t::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--ma-acc); animation: ma-cursor 1.1s ease-in-out infinite; }
.ma-b.is-cortada .ma-t::after { content: " …"; color: var(--ma-ink-3); }
/* PENSANDO: rede 3x3 de losangos em onda orbital + brilho (LatticeLoader do kit, reimplementado). Só opacity/transform animam. */
.ma-pens { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: 40px; padding: 6px 2px; background: none; }
.ma-lat { position: relative; flex: none; width: 23px; height: 23px; color: var(--ma-acc); }
.ma-lat::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; background: radial-gradient(circle, #3B82FF80 0, #2F7BFF33 42%, #3B82FF00 70%); opacity: .6; animation: ma-aura 2.6s ease-in-out infinite; }
.ma-lat svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1; opacity: .2; }
.ma-lat__c { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 5px); gap: 4px; }
.ma-lat__c i { display: block; width: 5px; height: 5px; border-radius: 1.4px; background: linear-gradient(135deg, #2B7CF3, #15D8CC); opacity: .18; transform: rotate(45deg) scale(.7); }
.ma-lat__run { transition: opacity .2s ease; }
.ma-lat__run i { box-shadow: 0 0 7px 1px #2F7BFFb3; animation: ma-lat 1.4s cubic-bezier(.77, 0, .175, 1) infinite; }
.ma-lat__run i[data-v] { animation: none; box-shadow: none; opacity: .08; }
.ma-lat__mk i { opacity: 0; transform: rotate(45deg) scale(.4); transition: opacity .2s ease, transform .26s cubic-bezier(.23, 1, .32, 1); }
.ma-pens:not([data-status="working"]) .ma-lat__run { opacity: 0; }
.ma-pens:not([data-status="working"]) .ma-lat__run i { animation-play-state: paused; }
.ma-pens[data-status="done"] .ma-lat__mk i[data-on] { opacity: 1; transform: rotate(45deg) scale(1.08); background: #16A34A; box-shadow: 0 0 7px 1px #16a34a99; }
.ma-pens[data-status="error"] .ma-lat__mk i[data-on] { opacity: 1; transform: rotate(45deg) scale(1.08); background: #D9480F; box-shadow: 0 0 7px 1px #d9480f80; }
.ma-pens:not([data-status="working"]) .ma-lat::before { animation: none; opacity: .18; }
.ma-pens__t { font-weight: 500; font-size: 14px; color: var(--ma-ink-2); animation: ma-respira-t 1.7s ease-in-out infinite; }
.ma-pens__s { min-width: 4ch; color: var(--ma-ink-2); font: 500 12px/1 var(--f-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.ma-pens:not([data-status="working"]) .ma-pens__t { animation: none; font-size: 13px; color: var(--ma-ink-2); }
.ma-pens[data-status="error"] .ma-pens__t { color: #8A4B05; }

/* ferramentas (estado do cliente) */
.ma-ferr { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-tool { box-shadow: 0 6px 16px -10px #0b1a3a59; display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 12px 4px 9px; border-radius: 999px; background: #fff;  color: var(--ma-ink-2); font-size: 13px; font-weight: 500; }
.ma-tool__i { flex: none; display: block; width: 18px; height: 18px; }
.ma-tool__i svg { display: block; width: 18px; height: 18px; overflow: visible; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ma-sm__t { stroke: #CFDDF5; }
.ma-sm__r { stroke: var(--ma-acc); stroke-dasharray: .68 .32; transform: rotate(-90deg); transform-origin: 12px 12px; transition: stroke-dasharray .3s cubic-bezier(.77, 0, .175, 1), stroke .2s; }
.ma-sm__ok, .ma-sm__x { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .24s ease .1s; }
.ma-tool[data-estado="aplicando"] .ma-tool__i svg { animation: ma-gira .9s linear infinite; }
.ma-tool[data-estado="ok"] { color: #12603A;  background: #F2FBF6; }
.ma-tool[data-estado="ok"] .ma-sm__r { stroke: #16A34A; stroke-dasharray: 1 0; }
.ma-tool[data-estado="ok"] .ma-sm__ok { stroke: #16A34A; stroke-dashoffset: 0; }
.ma-tool[data-estado="falha"] { color: #8A4B05;  background: #FFF8EE; }
.ma-tool[data-estado="falha"] .ma-sm__r { stroke: #D9480F; stroke-dasharray: 1 0; }
.ma-tool[data-estado="falha"] .ma-sm__x { stroke: #D9480F; stroke-dashoffset: 0; }
.ma-tool.tem-amostra::after { content: ""; width: 14px; height: 14px; border-radius: 5px; background: var(--ma-amostra);  }

/* cartões */
.ma-card { padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 14px 30px -26px #0b1a3a59; }
.ma-card p { margin: 0; }
.ma-card__h { font-weight: 600; margin-bottom: 6px !important; }
.ma-card--erro { background: #FFF9F2;  }
.ma-card--volta { align-self: center; padding: 8px 14px; border-radius: 999px; background: var(--ma-suave); box-shadow: none; color: var(--ma-ink-2); font-size: 13.5px; }
.ma-acs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ma-lista { margin: 4px 0 6px; padding-left: 18px; }
.ma-nota { color: var(--ma-ink-3); font-size: 12.5px; }
.ma-nav b { font-weight: 600; }
.ma-res dl { display: grid; gap: 6px; margin: 4px 0 0; }
.ma-res dl > div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; padding: 6px 0; }
.ma-res dt { color: var(--ma-ink-3); font: 500 11.5px/1.6 var(--f-mono, ui-monospace, monospace); letter-spacing: .04em; text-transform: uppercase; }
.ma-res dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.ma-amostra { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 5px;  }

/* fotos inline */
.ma-card--fotos { max-width: min(96%, 620px); }
.ma-card--efeitos { width: 100%; max-width: min(100%, 640px); padding: 12px; contain: inline-size; } /* a faixa rola por dentro: não pode alargar o chat nem a página */
mobily-assistant[data-efx] { --ma-alt: max(min(70dvh, 520px), 380px) !important; }
@media (max-width: 600px) { mobily-assistant[data-efx] { --ma-alt: max(min(88dvh, 720px), 440px) !important; } } /* celular: faixa + Ver mais + galeria + chips cabem sem cortar */
@media (prefers-reduced-motion: no-preference) { .ma-cx { transition: height .25s ease; } }
.ma-up__t { color: var(--ma-ink-2); font-size: 14px; }
.ma-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; padding: 16px; border-radius: 16px; background: var(--ma-suave); color: var(--ma-ink-3); font-size: 12.5px; text-align: center; cursor: pointer; transition: box-shadow .2s, background-color .2s; }
.ma-drop b { color: var(--ma-acc-2); font-size: 14.5px; }
.ma-drop:hover { background: #E8F0FD; }
.ma-drop.is-sobre { background: #EEF4FF; box-shadow: inset 0 0 0 2px var(--ma-acc); }
.ma-drop:focus-within { box-shadow: inset 0 0 0 2px var(--ma-acc), 0 0 0 3px #0f60d933; }
.ma-drop.is-lendo { opacity: .6; pointer-events: none; }
.ma-up__e { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #FFF8EE; color: #7A4304; font-size: 13px; }
.ma-up__e[hidden] { display: none; }
.ma-up__l { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 6px; padding: 0; list-style: none; }
.ma-up__l:empty { display: none; }
.ma-foto { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 14px; background: var(--ma-suave); }
.ma-foto img { width: 100%; height: 84px; border-radius: 10px; object-fit: cover; background: #E3E8F0; }
.ma-orig { box-shadow: 0 4px 12px -8px #0b1a3a4d; display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: #fff;  }
.ma-orig label { position: relative; flex: 1; }
.ma-orig input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ma-orig span { display: block; padding: 6px 4px; border-radius: 999px; color: var(--ma-ink-2); font-size: 11.5px; font-weight: 500; text-align: center; white-space: nowrap; }
.ma-orig input:checked + span { background: var(--ma-ink); color: #fff; }
.ma-orig input:focus-visible + span { outline: 2px solid var(--ma-acc); outline-offset: 1px; }
.ma-x { position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #0b1220b3; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }

/* chips e compositor */
.ma-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 10px; }
.ma-chips:empty { display: none; }
html[data-mt-beto] .ma-chips { padding-left: 56px; min-height: 44px; box-sizing: border-box; } html[data-mt-beto] .ma-chips:empty { display: block; }
.ma-chip { box-shadow: 0 6px 16px -10px #0b1a3a59; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff;  color: var(--ma-ink); font: 500 13.5px/1.2 var(--f-text, inherit); text-decoration: none; cursor: pointer; transition: background-color .2s, box-shadow .2s, transform .15s; }
.ma-chip:hover { background: #EEF4FF; box-shadow: 0 8px 18px -10px #0f60d98c; }
.ma-chip:active { transform: scale(.97); }
.ma-chip:disabled { opacity: .55; cursor: default; transform: none; }
.ma-chip--p { background: var(--ma-acc); box-shadow: 0 8px 18px -12px var(--ma-acc); color: #fff; }
.ma-chip--p:hover { background: var(--ma-acc-2); box-shadow: 0 8px 18px -12px var(--ma-acc); }
/* caixa de entrada (base do ai-input do kit): barra arredondada, texto que cresce, [+ menu] … [microfone] [enviar] e a "onda" ao enviar */
.ma-comp { position: relative; display: flex; flex-direction: column; margin: 0 10px 10px; padding: 4px 8px 6px 16px; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ma-linha-2), 0 10px 26px -22px #0b1a3a40; transition: box-shadow .2s; }
.ma-comp:focus-within { box-shadow: inset 0 0 0 1.5px var(--ma-acc), 0 0 0 4px #0f60d91f; }
.ma-comp textarea { display: block; width: 100%; min-width: 0; height: 40px; max-height: 132px; margin: 0; padding: 9px 4px 4px 0; border: 0; outline: none; resize: none; background: none; color: var(--ma-ink); font: 400 16px/1.4 var(--f-text, inherit); }
mobily-assistant .ma-comp textarea:focus, mobily-assistant .ma-comp textarea:focus-visible { outline: none; box-shadow: none; } /* o anel de foco é da barra inteira (.ma-comp:focus-within), não do campo (a página em volta também estiliza textarea:focus) */
.ma-comp textarea::placeholder { color: var(--ma-ink-3); }
.ma-comp__b { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.ma-comp__g { flex: 1; }
.ma-ctr { color: var(--ma-ink-3); font: 500 11px/1 var(--f-mono, monospace); margin-right: 4px; }
.ma-ctr:empty { display: none; }
.ma-ib { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--ma-ink-2); cursor: pointer; transition: background-color .2s, transform .15s, opacity .2s; }
.ma-ib[hidden] { display: none; }
.ma-ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ma-mais:hover, .ma-mic:hover { background: var(--ma-suave); }
.ma-mais svg { transition: transform .2s cubic-bezier(.23, 1, .32, 1); }
.ma-mais[aria-expanded="true"] { background: var(--ma-suave); }
.ma-mais[aria-expanded="true"] svg { transform: rotate(45deg); }
.ma-env { background: var(--ma-acc); color: #fff; box-shadow: 0 8px 16px -10px var(--ma-acc); }
.ma-env:hover { background: var(--ma-acc-2); }
.ma-env:active { transform: scale(.94); }
.ma-env:disabled { background: #B8C2D3; box-shadow: none; cursor: default; transform: none; }
.ma-env svg { stroke-width: 2.4; }
/* onda ao enviar: faixa de gradiente que sobe pela caixa (transform/opacity) */
.ma-onda { position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden; pointer-events: none; opacity: 0; }
.ma-onda i { position: absolute; left: 0; right: 0; top: 0; height: 150%; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .16), rgba(59, 130, 246, .2), rgba(217, 70, 239, .2), rgba(244, 63, 94, .17), rgba(249, 115, 22, .15), transparent); filter: blur(14px); transform: translateY(55%); }
.ma-onda.is-on { animation: ma-onda-o .9s ease-out both; }
.ma-onda.is-on i { animation: ma-onda-y .7s ease-out both; }
/* menu "+": só itens que funcionam */
.ma-mais__m { position: absolute; z-index: 6; left: 4px; bottom: calc(100% + 8px); display: grid; min-width: 232px; max-width: calc(100% - 8px); padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 24px 48px -24px #0b1a3a73; transform-origin: 12px 100%; }
.ma-mais__m[hidden] { display: none; }
.ma-mais__i { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--ma-ink); font: 500 14px/1.2 var(--f-text, inherit); text-align: left; text-decoration: none; cursor: pointer; }
.ma-mais__i svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ma-ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ma-mais__i:hover, .ma-mais__i:focus-visible { background: var(--ma-suave); }
mobily-assistant:not([data-estado="ocioso"]):not([data-estado="erro"]):not([data-estado="limite"]):not([data-estado="desligado"]) .ma-env { opacity: .45; pointer-events: none; }
mobily-assistant button:focus-visible, mobily-assistant a:focus-visible { outline: 2px solid var(--ma-acc); outline-offset: 2px; }
.ma-destaque { outline: 3px solid var(--ma-acc, #0F60D9); outline-offset: 6px; border-radius: 12px; animation: ma-pulso 2s ease-out; }

/* celular: alvos de 44 px, teclado aberto = chat em tela cheia (visualViewport) */
@media (pointer: coarse), (max-width: 600px) {
  .ma-chip, .ma-lnk, .ma-menu button, .ma-mais__i { min-height: 44px; }
  .ma-mb, .ma-ib { width: 44px; height: 44px; }
  .ma-comp textarea { height: 44px; padding-top: 11px; }
  .ma-orig span { padding: 12px 4px; }
  .ma-x { width: 40px; height: 40px; top: 0; right: 0; }
  .ma-menu button { min-height: 44px; }
}
@media (max-width: 440px) {
  .ma-av, .ma-av img { width: 32px; height: 32px; }
  .ma-tit b { white-space: nowrap; }
  .ma-lnk { padding: 0 6px; font-size: 13px; }
}
@media (max-width: 600px) {
  .ma-cab { padding-left: 12px; gap: 6px; }
  .ma-tit b { font-size: 14.5px; }
  .ma-log { padding: 14px 12px 8px; }
  .ma-chips { padding: 2px 12px 10px; }
  .ma-comp { margin: 0 8px 8px; }
  .ma-i { max-width: 92%; }
}
mobily-assistant.is-tela { position: fixed; z-index: 95; left: 0; right: 0; top: var(--ma-vv-t, 0); height: var(--ma-vv-h, 100dvh); }
mobily-assistant.is-tela .ma-cx { height: 100%; min-height: 0; border-radius: 0; background: #fff; }
mobily-assistant.is-tela .ma-volta { display: inline-flex; align-items: center; }
mobily-assistant.is-tela .ma-form, mobily-assistant.is-tela .ma-aviso { display: none; }
mobily-assistant.is-tela .ma-comp { margin-bottom: max(8px, env(safe-area-inset-bottom)); }

@keyframes ma-entra { from { opacity: 0; transform: translateY(6px); } }
@keyframes ma-cursor { 50% { opacity: .15; } }
@keyframes ma-lat { 0%, 100% { opacity: .18; transform: rotate(45deg) scale(.7); } 18%, 42% { opacity: 1; transform: rotate(45deg) scale(1.08); } 62% { opacity: .18; transform: rotate(45deg) scale(.7); } }
@keyframes ma-aura { 50% { opacity: .9; transform: scale(1.12); } }
@keyframes ma-respira-t { 50% { opacity: .55; } }
@keyframes ma-onda-y { from { transform: translateY(55%); } to { transform: translateY(-105%); } }
@keyframes ma-onda-o { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ma-pisca { 50% { opacity: 0; } }
@keyframes ma-respira { 50% { transform: scale(.6); opacity: .45; } }
@keyframes ma-brilho { from { background-position: 100% 0; } to { background-position: -40% 0; } }
@keyframes ma-gira { to { transform: rotate(360deg); } }
@keyframes ma-pulso { 0% { outline-color: #0f60d9; outline-offset: 2px; } 100% { outline-color: #0f60d900; outline-offset: 10px; } }
.ma-entra { animation: ma-entra .32s cubic-bezier(.22, 1, .36, 1) both; }
@media (prefers-reduced-motion: reduce) {
  mobily-assistant *, mobily-assistant *::before, mobily-assistant *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ma-lat__run i { opacity: .6 !important; transform: rotate(45deg) scale(.9) !important; }
  .ma-lat__run i[data-v] { opacity: .08 !important; }
  .ma-onda { display: none; }
  .ma-destaque { outline-color: var(--ma-acc); }
}

/* tema ESCURO (opt-in: data-tema="escuro" no <mobily-assistant> ou em qualquer ancestral). Só cores; bordas e formas não mudam. */
[data-tema="escuro"] mobily-assistant, mobily-assistant[data-tema="escuro"] { --ma-fundo: #050A14; --ma-user: #223656; --ma-ink: #E8EDF6; --ma-ink-2: #C0C9D8; --ma-ink-3: #93A0B4; --ma-linha: #26334A; --ma-linha-2: #34445F; --ma-suave: #1A2438; --ma-acc: #5B9DFF; --ma-acc-2: #8DBBFF; color-scheme: dark; }
[data-tema="escuro"] .ma-cx, mobily-assistant[data-tema="escuro"] .ma-cx { background: none; }
[data-tema="escuro"] .mtf .ma-cx, [data-tema="escuro"] .ma-cx.is-tela, mobily-assistant[data-tema="escuro"].is-tela .ma-cx { background: #0F1626; }
[data-tema="escuro"] .ma-tag { background: #1B2A47; }
[data-tema="escuro"] .ma-lnk:hover { background: #1B2A47; }
[data-tema="escuro"] .ma-menu, [data-tema="escuro"] .ma-mais__m, [data-tema="escuro"] .ma-card, [data-tema="escuro"] .ma-comp, [data-tema="escuro"] .ma-tool, [data-tema="escuro"] .ma-chip, [data-tema="escuro"] .ma-orig { background: #131D31; }
[data-tema="escuro"] .ma-aviso { background: #14213A;  }
[data-tema="escuro"] .ma-chip:hover { background: #1B2A47; }
[data-tema="escuro"] .ma-chip--p, [data-tema="escuro"] .ma-env { background: #1F6FEB; color: #fff; }
[data-tema="escuro"] .ma-env:disabled { background: #34445F; }
[data-tema="escuro"] .ma-card--erro { background: #2A1F12;  }
[data-tema="escuro"] .ma-tool[data-estado="ok"] { background: #10281C;  color: #8EE0B0; }
[data-tema="escuro"] .ma-tool[data-estado="falha"] { background: #2A1F12;  color: #F0C58A; }
[data-tema="escuro"] .ma-sm__t { stroke: #34445F; }
[data-tema="escuro"] .ma-pens[data-status="error"] .ma-pens__t { color: #F0C58A; }
[data-tema="escuro"] .ma-ctr, [data-tema="escuro"] .ma-comp textarea { color: var(--ma-ink); }
[data-tema="escuro"] .ma-orig input:checked + span { background: #E8EDF6; color: #0F1626; }

/* ---- assistente FLUTUANTE (modo="flutuante"; docs/express/CHATBOT-FRONT.md). O botão (FAB) e as variáveis --mtf-b vêm do assistente-loader.js ---- */
.mtf { position: fixed; z-index: 1001; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--mtf-b, 16px) + 68px); display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - var(--mtf-b, 16px) - 84px)); min-height: 320px; }
.mtf[hidden] { display: none; }
.mtf mobily-assistant { flex: 1; min-height: 0; height: 100%; --ma-alt: 100%; --ma-raio: 22px; }
.mtf .ma-cx { min-height: 0; background: #fff; box-shadow: 0 28px 60px -22px #0b1a3a8c, 0 2px 10px -4px #0b1a3a33; }
.mtf .ma-cx::before, mobily-assistant.is-tela .ma-cx::before { display: none; }
.mtf mobily-assistant.is-tela { position: static; height: 100%; z-index: auto; }
.mtf .ma-cab { padding-right: 8px; gap: 6px; }
.mtf .ma-tit b { font-size: 14.5px; }
.mtf .ma-aviso { font-size: 13px; }
.mtf[data-min] { height: auto; min-height: 0; }
.mtf[data-min] .ma-cx { height: auto; min-height: 0; }
.mtf[data-min] .ma-log, .mtf[data-min] .ma-chips, .mtf[data-min] .ma-comp { display: none; }
.ma-card--nav b { font-weight: 650; color: var(--ma-acc-2); }
.mtf .ma-log { overscroll-behavior: contain; }
.mtf-destaque { outline: 3px solid #1478FF; outline-offset: 6px; border-radius: 6px; animation: mtf-pulso 2.2s ease-out 1; }
@keyframes mtf-pulso { 0% { outline-color: #1478ff40; outline-offset: 14px; } 25% { outline-color: #1478ff; outline-offset: 6px; } 100% { outline-color: #1478ff; } }
@media (prefers-reduced-motion: no-preference) { .mtf:not([hidden]) { animation: mtf-entra .22s ease-out; } @keyframes mtf-entra { from { opacity: 0; transform: translateY(10px); } } }
@media (prefers-reduced-motion: reduce) { .mtf-destaque { animation: none; } }
@media (max-width: 700px) {
  .mtf { inset: 0; width: 100%; height: 100dvh; min-height: 0; }
  .mtf .ma-cx { border-radius: 0; }
  .mtf .ma-mini { display: none; }
  .mtf .ma-cab { padding-top: max(8px, env(safe-area-inset-top)); }
  .mtf .ma-comp { margin-bottom: max(8px, env(safe-area-inset-bottom)); }
}
[data-tema="escuro"] .ma-b--u { color: #fff; }
/* voz (F5b-front): o botão do microfone vive aqui; o resto (gravação, aviso, erros) está em voz.css, carregado junto com voz.js */
.ma-mic:disabled { opacity: .4; cursor: default; }

/* ---- Beto: glow azul pontual, sem avatar por mensagem (sem bordas; gradiente que esmaece até 0 antes da borda da caixa) ---- */
.ma-b--a { position: relative; isolation: isolate; }
.ma-b--glow::before { content: ""; position: absolute; z-index: -1; inset: -10px -14px; pointer-events: none; background: radial-gradient(ellipse closest-side, rgba(47, 123, 255, .13) 0, rgba(47, 123, 255, .085) 55%, rgba(47, 123, 255, 0) 100%); }
@media (prefers-reduced-motion: no-preference) {
  .ma-b--glow::before { animation: ma-glow-in 1.4s ease-out both; }
@keyframes ma-glow-in { from { opacity: 0; } }
[data-tema="escuro"] .ma-b--glow::before, mobily-assistant[data-tema="escuro"] .ma-b--glow::before { background: radial-gradient(ellipse closest-side, rgba(47, 123, 255, .12) 0, rgba(47, 123, 255, .075) 55%, rgba(47, 123, 255, 0) 100%); }
