/* ===== Tokens de tema =====
   Paleta do Manual de Marca LedWave: ciano #0DDDFF → lilás #7A7AFF → rosa #EE11FF (degradê "wave").
   Fonte oficial: Poppins (títulos em Semibold, textos em Regular). */
:root {
  --g1: #0dddff; --g2: #7a7aff; --g3: #ee11ff;
  --erro: #ff6b81; --link: var(--g1); --on-accent: #0b0a0d;
  /* Degradê "em loop" (começa e termina na mesma cor) para deslizar sem emenda */
  --accent-gradient: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g2), var(--g1));
  --gradient-speed: 6s;
  --bg: #0b0a0d;
  --surface: #17151b;
  --surface-2: #221f27;
  --text: #ecebef;
  --text-2: #a9a6b0;
  --border: #35313c;
  --bubble-user: #26222c;
  --input-bg: #17151b;
  --chip-hover: rgba(122, 122, 255, .1);
  --glow-opacity: .2;
  --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  --wa1: #25d366; --wa2: #128c7e;
  --radius: 12px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f2f7;
  --surface-2: #ebe7f0;
  --text: #1d1b20;
  --text-2: #615d68;
  --border: #ddd8e3;
  --bubble-user: #eee9f3;
  --input-bg: #f4f2f7;
  --chip-hover: rgba(122, 122, 255, .08);
  --link: #0a6f86; --erro: #c4153a;
  --glow-opacity: .13;
  --shadow: 0 10px 30px rgba(60, 50, 70, .15);
  color-scheme: light;
}
/* Tudo que usa o degradê da marca fica em movimento */
.gradient-move {
  background-image: var(--accent-gradient);
  background-size: 300% 100%;
  animation: gradient-slide var(--gradient-speed) linear infinite;
}
#led-logo-grad stop:nth-child(1) { stop-color: var(--g1); }
#led-logo-grad stop:nth-child(2) { stop-color: var(--g2); }
#led-logo-grad stop:nth-child(3) { stop-color: var(--g3); }
#led-logo-grad stop:nth-child(4) { stop-color: var(--g3); }
#led-logo-grad stop:nth-child(5) { stop-color: var(--g3); }

/* ===== Logo (W em LEDs) ===== */
.led-logo { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-logo { display: inline-block; width: 26px; height: 26px; flex-shrink: 0; }

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  /* --app-h/--app-top acompanham a área visível (encolhe quando o teclado do celular abre; ver app.js) */
  position: fixed;
  left: 0;
  right: 0;
  top: var(--app-top, 0px);
  height: var(--app-h, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  transition: background-color .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
svg.sprite { position: absolute; width: 0; height: 0; }

/* Brilho degradê no rodapé da tela: dois blobs com as cores da marca, em movimento contínuo */
body::before, body::after {
  content: '';
  position: fixed;
  bottom: -32vh;
  width: 80vw;
  height: 60vh;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--glow-opacity);
  pointer-events: none;
  z-index: 0;
  transition: opacity .6s;
}
body::before {
  left: -10vw;
  background: radial-gradient(closest-side, var(--g1), var(--g2) 55%, transparent);
  animation: glow-drift-a 14s ease-in-out infinite alternate;
}
body::after {
  right: -10vw;
  background: radial-gradient(closest-side, var(--g3), var(--g2) 55%, transparent);
  animation: glow-drift-b 17s ease-in-out infinite alternate;
}
body.thinking::before, body.thinking::after { opacity: calc(var(--glow-opacity) * 2); animation-duration: 5s, 6s; }

/* ===== Topbar ===== */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.brand-name {
  font-size: 18px;
  font-weight: 500;
  background: var(--accent-gradient);
  background-size: 300% 100%;
  animation: gradient-slide var(--gradient-speed) linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.mode-switch {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.mode-switch button {
  border: 0;
  background: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  transition: background .2s, color .2s;
}
.mode-switch button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.actions { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: flex-end; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--text-2);
  padding: 8px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn.specialist { padding: 8px 12px; font-size: 13px; }
.icon-btn.specialist svg { color: var(--wa1); }
.menu-anchor { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
}
.menu.open { display: flex; animation: pop .15s ease-out; }
.menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.menu button:hover, .menu button[aria-current="true"] { background: var(--surface-2); }

/* ===== Layout principal ===== */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.chatting .main { justify-content: flex-start; }

.hero {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 28px;
}
.hero-title { font-size: clamp(28px, 4.6vw, 36px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.gradient-text {
  background: var(--accent-gradient);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-slide var(--gradient-speed) linear infinite;
}
.hero > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: .12s; }
.hero.leaving > * { animation: none; }
.hero.leaving { position: fixed; z-index: 0; pointer-events: none; animation: hero-out .35s ease-in forwards; }

.thread { display: none; flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
body.chatting .thread { display: block; }
body.chatting .hero, body.chatting .starters { display: none; }
.thread-inner { max-width: 760px; margin: 0 auto; padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 22px; }

/* ===== Composer ===== */
.composer-area { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px calc(10px + env(safe-area-inset-bottom)); }
.composer {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(var(--input-bg), var(--input-bg)) padding-box, linear-gradient(var(--border), var(--border)) border-box;
  transition: box-shadow .3s, border-color .3s;
}
.composer::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--accent-gradient);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .35;
  transition: opacity .3s;
  animation: gradient-slide var(--gradient-speed) linear infinite;
  pointer-events: none;
}
.composer:focus-within::after, body.thinking .composer::after { opacity: 1; }
.composer:focus-within { box-shadow: 0 0 28px -8px var(--g2); }
.composer textarea {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  padding: 8px 0;
  max-height: 160px;
}
.composer textarea::placeholder { color: var(--text-2); }
.send-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--on-accent);
  background: var(--accent-gradient);
  background-size: 300% 100%;
  animation: gradient-slide var(--gradient-speed) linear infinite;
  transition: transform .2s, filter .2s, opacity .2s;
}
.send-btn:hover { transform: scale(1.06); filter: brightness(1.1); }
.send-btn:disabled { opacity: .45; transform: none; cursor: default; }
.send-btn svg { width: 18px; height: 18px; }
.legal { text-align: center; font-size: 11.5px; color: var(--text-2); margin-top: 10px; }
.legal a { color: inherit; }

.starters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.starters .chip { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }

/* ===== Mensagens ===== */
.msg { display: flex; gap: 14px; animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  max-width: 80%;
  background: var(--bubble-user);
  padding: 12px 18px;
  border-radius: 22px 22px 6px 22px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.bot .body { flex: 1; min-width: 0; padding-top: 3px; }
.content { line-height: 1.65; font-size: 15.5px; word-wrap: break-word; }
.content p + p, .content p + ul, .content ul + p, .content p + ol, .content ol + p { margin-top: 10px; }
.content ul, .content ol { padding-left: 22px; }
.content li + li { margin-top: 4px; }
.content strong { font-weight: 600; }
.content code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.content a { color: var(--link); }
.msg.streaming .content > :last-child::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
  background-size: 300% 100%;
  vertical-align: middle;
  animation: blink 1s ease-in-out infinite;
}
.content.error { color: var(--text-2); }

/* Shimmer antes do primeiro token */
.shimmer { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.shimmer span {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--g1) 15%, var(--g2) 30%, var(--g3) 45%, var(--surface-2) 75%);
  background-size: 300% 100%;
  opacity: .55;
  animation: shimmer 1.6s linear infinite;
}
.shimmer span:nth-child(1) { width: 92%; }
.shimmer span:nth-child(2) { width: 78%; animation-delay: .15s; }
.shimmer span:nth-child(3) { width: 54%; animation-delay: .3s; }

/* ===== Chips ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  transition: background .2s, border-color .2s, transform .15s;
}
.chip { position: relative; }
.chip::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--accent-gradient);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s;
  animation: gradient-slide var(--gradient-speed) linear infinite;
  pointer-events: none;
}
.chip:hover:not(:disabled) { background: var(--chip-hover); }
.chip:hover:not(:disabled)::before, .chip.selected::before { opacity: 1; }
.chip:active:not(:disabled) { transform: scale(.97); }
.chip:disabled { opacity: .45; cursor: default; }
.chip.selected { opacity: 1; }

/* ===== Cards estruturados ===== */
.card {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 16px;
  max-width: 460px;
}
.card h4 { font-size: 14px; font-weight: 500; margin-bottom: 12px; color: var(--text-2); }
.dims { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dims label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.dims input {
  width: 96px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.dims input:focus { outline: 0; border-color: var(--g1); }
.dims .x { color: var(--text-2); padding-top: 16px; }
.field {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.field:focus { outline: 0; border-color: var(--g2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g2) 18%, transparent); }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field-row .field { flex: 1; min-width: 0; letter-spacing: .02em; }
.field-row .btn-primary { flex-shrink: 0; }
.fields { display: grid; gap: 10px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.field-error { margin-top: 8px; font-size: 13px; color: var(--erro); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card-ou { margin: 12px 0 -6px; font-size: 13px; color: var(--text-2); }
.btn-primary {
  border: 0;
  padding: 10px 18px;
  border-radius: 6px;
  color: var(--on-accent);
  background: var(--accent-gradient);
  background-size: 300% 100%;
  animation: gradient-slide var(--gradient-speed) linear infinite;
  font-size: 14px;
  font-weight: 500;
}
.btn-primary:disabled { opacity: .45; cursor: default; }
.card.done { opacity: .6; pointer-events: none; }

.handoff .summary { white-space: pre-line; font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  background: linear-gradient(135deg, var(--wa1), var(--wa2));
  box-shadow: 0 6px 20px -6px var(--wa1);
  transition: transform .2s, filter .2s;
  animation: wa-pulse 2.4s ease-in-out infinite;
}
.wa-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ===== Animações ===== */
@keyframes gradient-slide { to { background-position: 300% 0; } }
@keyframes glow-drift-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(25vw, -6vh) scale(1.15); } 100% { transform: translate(45vw, 2vh) scale(.95); } }
@keyframes glow-drift-b { 0% { transform: translate(0, 0) scale(1.05); } 50% { transform: translate(-30vw, -8vh) scale(.9); } 100% { transform: translate(-45vw, 0) scale(1.1); } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hero-out { to { opacity: 0; transform: translateY(-24px) scale(.97); filter: blur(4px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes wa-pulse { 50% { box-shadow: 0 6px 28px -4px var(--wa1); } }

@media (prefers-reduced-motion: reduce) {
  /* Sem deslocamentos (entrada de mensagens, giro, flutuação); o degradê continua mudando de cor, mais devagar */
  .hero > *, .msg, .starters .chip, .chips .chip, .menu.open, .modal-backdrop, .modal { animation: none !important; }
  .wa-btn { animation: none !important; }
  body::before, body::after { animation: none !important; }
  :root { --gradient-speed: 12s; }
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand-name { display: none; }
  .brand { flex: none; }
  .icon-btn.specialist span { display: none; }
  .icon-btn.specialist { padding: 8px; }
  .hero { padding: 0 20px 22px; }
  .thread-inner { padding: 12px 16px 20px; }
  .msg { gap: 10px; }
  .msg.user .bubble { max-width: 88%; }
  .starters { justify-content: flex-start; }
}

/* ===== Teclado aberto no celular: menos elementos, mais espaço para a conversa ===== */
body.teclado .legal { display: none; }
body.teclado .topbar { padding-top: 6px; padding-bottom: 6px; }
body.teclado.idle .hero { display: none; }
body.teclado .composer-area { padding-bottom: 8px; }

/* ===== Jornada IA livre ===== */
.progresso { margin-top: 10px; font-size: 12px; color: var(--text-2); letter-spacing: .01em; }
.seg { display: inline-flex; gap: 4px; padding: 3px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.seg-btn { border: 0; background: none; padding: 7px 12px; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.seg-btn[aria-checked="true"] { background: var(--surface-2); color: var(--text); font-weight: 500; }

/* ===== Nome da assistente no cabeçalho ===== */
.brand-name small { font-size: .62em; font-weight: 400; opacity: .75; }

/* ===== Embutido em outra página (janela do embed.js, ~380 px) ===== */
.embed .topbar { padding: 8px 10px; gap: 6px; }
.embed .brand { flex: none; }
.embed .brand-name { display: inline; font-size: 16px; }
.embed .brand-name small { display: none; }
.embed .brand-logo { width: 22px; height: 22px; }
.embed .mode-switch button { padding: 5px 10px; font-size: 12px; }
.embed .actions { gap: 0; }
.embed .icon-btn { padding: 7px; }
.embed .icon-btn.specialist { padding: 7px; }
.embed .icon-btn.specialist span { display: none; }
.embed .hero { padding: 0 18px 18px; }
.embed .hero-title { font-size: clamp(22px, 7vw, 28px); }
.embed .thread-inner { padding: 12px 14px 18px; }
.embed .composer-area { padding: 0 12px calc(8px + env(safe-area-inset-bottom)); }
.embed .legal { font-size: 10.5px; margin-top: 6px; }
.embed .starters { justify-content: flex-start; margin-top: 12px; }

/* ===== ID do atendimento (rodapé, discreto) ===== */
.protocolo { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 10.5px; color: var(--text-2); opacity: .7;
  font-variant-numeric: tabular-nums; letter-spacing: .04em; cursor: copy; white-space: nowrap; }
.protocolo:hover { opacity: 1; text-decoration: underline dotted; }
.protocolo[data-copiado]::after { content: ' copiado ✓'; }

/* Logo do cliente em arquivo (tenants/<cliente>/logo.svg ou logo.png): mantém a proporção, inclusive logos largos. */
.brand-logo:has(.logo-img) { width: auto; }
.logo-img { display: block; width: auto; height: 100%; }

/* ===== Pesquisa de satisfação (modal) ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: rgba(8, 6, 12, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fade-in .2s ease-out;
}
.modal {
  position: relative; width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto;
  padding: 26px 24px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow);
  animation: rise .3s cubic-bezier(.2, .8, .2, 1) both;
}
.modal-close { position: absolute; top: 10px; right: 10px; }
.modal h2 { margin: 0 32px 6px 0; font-size: 19px; font-weight: 600; line-height: 1.3; }
.modal-sub { margin: 0 0 18px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.notas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.nota {
  aspect-ratio: 1; min-height: 48px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 18px; font-weight: 500;
  transition: background .2s, border-color .2s, transform .15s, color .2s;
}
.nota:hover { border-color: var(--g3); transform: translateY(-1px); }
.nota[aria-checked="true"] { color: var(--on-accent); font-weight: 700; border-color: transparent; background: var(--accent-gradient); background-size: 300% 100%; }
.nota:focus-visible, .modal .chip:focus-visible, .modal .btn-primary:focus-visible, .modal-close:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; }
.notas-legenda { display: flex; justify-content: space-between; margin: 8px 2px 0; font-size: 12px; color: var(--text-2); }
#pesquisaJust { margin-top: 16px; }
#pesquisaTexto { resize: vertical; min-height: 84px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.modal-obrigado { margin: 18px 0 6px; padding-right: 0; font-size: 16px; text-align: center; }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 420px) {
  .modal { padding: 22px 18px 18px; border-radius: 16px; }
  .notas { gap: 6px; }
}

/* ===== Modo Ilustrado: galeria de produtos na primeira tela ===== */
body.tela-ilustrado .hero { max-width: 1000px; }
/* Com a galeria a primeira tela pode passar da altura da janela: a área principal rola, centralizada quando cabe. */
body.tela-ilustrado.idle .main { overflow-y: auto; justify-content: safe center; }
.produtos { margin-top: 18px; display: grid; gap: 16px; }
.produtos-dica { font-size: 14px; color: var(--text-2); }
.produtos-grupo h3 { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.produtos-grupo h3::before { content: ''; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--g1); }
.produtos-grupo.outdoor h3::before { background: var(--g3); }
.produtos-grupo h3 small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.produtos-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.produto {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.produtos-lista .produto:nth-child(2) { animation-delay: .06s; }
.produtos-lista .produto:nth-child(3) { animation-delay: .12s; }
.produto img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.produto-info { display: grid; gap: 3px; padding: 10px 12px 12px; }
.produto-info strong { font-size: 14px; font-weight: 600; }
.produto-info > span { font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.produto:hover { transform: translateY(-3px); border-color: var(--g3); box-shadow: var(--shadow); }
.produto:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; border-color: var(--g3); }
@media (max-width: 760px) {
  /* Celular e janela embutida: cada grupo vira uma faixa que rola para o lado, com o próximo cartão à vista. */
  .produtos-lista { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(74%, 280px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .produto { scroll-snap-align: start; }
  /* Primeira tela no celular: só Indoor × Outdoor; tocar mostra os produtos daquele grupo. */
  .produtos-escolha { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .produtos-escolha-btn { position: relative; display: block; padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--border, color-mix(in srgb, currentColor 18%, transparent)); background: var(--surface-2, #1b1936); color: #fff; font: inherit; text-align: left; cursor: pointer; aspect-ratio: 16 / 7; box-shadow: var(--shadow); }
  .produtos-escolha-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .produtos-escolha-btn .rotulo { position: absolute; inset: auto 0 0 0; display: grid; gap: 2px; padding: 26px 14px 12px; background: linear-gradient(to top, rgba(8, 7, 20, .82), rgba(8, 7, 20, 0)); }
  .produtos-escolha-btn strong { font-size: 19px; font-weight: 600; }
  .produtos-escolha-btn .rotulo span { font-size: 12.5px; opacity: .85; }
  .produtos-escolha-btn.indoor { border-left: 4px solid var(--g1); }
  .produtos-escolha-btn.outdoor { border-left: 4px solid var(--g3); }
  .produtos-escolha-btn:active { transform: scale(.985); }
  .produtos-escolha-btn:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; }
  .so-desktop { display: none; }
  .produtos:not([data-grupo]) .produtos-grupo, .produtos:not([data-grupo]) .produtos-voltar { display: none; }
  .produtos[data-grupo] .produtos-escolha { display: none; }
  .produtos[data-grupo="indoor"] .produtos-grupo.outdoor, .produtos[data-grupo="outdoor"] .produtos-grupo.indoor { display: none; }
  .produtos-voltar { justify-self: start; background: none; border: 0; padding: 4px 0; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
}
@media (min-width: 761px) { .produtos-escolha, .produtos-voltar, .so-celular { display: none; } }
/* Ilustrado: a primeira tela não tem os botões de exemplo; o cliente escolhe pelas imagens. */
body.tela-ilustrado #starters { display: none; }
@media (max-width: 520px) {
  /* Com três abas a barra não cabe numa linha: logo e ícones em cima, abas embaixo, ocupando a largura toda. */
  body.abas-3 .topbar { flex-wrap: wrap; row-gap: 8px; }
  body.abas-3 .actions { margin-left: auto; }
  body.abas-3 .mode-switch { order: 3; width: 100%; }
  body.abas-3 .mode-switch button { flex: 1; white-space: nowrap; text-align: center; padding: 7px 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .produto { animation: none !important; transition: none; } }
.embed .produtos { margin-top: 12px; gap: 12px; }

/* ===== Modo Áudio ===== */
.audio-cta { margin-top: 26px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.mic-grande {
  position: relative; width: 88px; height: 88px; border-radius: 50%; border: 0; color: var(--on-accent);
  display: grid; place-items: center;
  background: var(--accent-gradient); background-size: 300% 100%; animation: gradient-slide var(--gradient-speed) linear infinite;
  box-shadow: 0 10px 30px -8px var(--g3); transition: transform .2s;
}
.mic-grande svg { width: 38px; height: 38px; }
.mic-grande::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--g3); opacity: .35; animation: mic-pulso 2.4s ease-out infinite; }
.mic-grande:hover { transform: scale(1.05); }
.mic-grande:focus-visible, .mic-btn:focus-visible, .audio-arquivo:focus-visible { outline: 2px solid var(--g2); outline-offset: 3px; }
.audio-titulo { margin-top: 10px; font-size: 18px; font-weight: 500; }
.audio-dica { max-width: 440px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.audio-arquivo { border: 0; background: none; padding: 6px 8px; font-size: 14px; color: var(--text-2); text-decoration: underline dotted; text-underline-offset: 3px; }
.audio-arquivo:hover { color: var(--text); }
.audio-privacidade { max-width: 440px; font-size: 12px; line-height: 1.5; color: var(--text-2); opacity: .8; }
@keyframes mic-pulso { from { transform: scale(.92); opacity: .5; } to { transform: scale(1.3); opacity: 0; } }
/* Botões de microfone e de arquivo dentro do campo de mensagem */
.mic-btn { flex-shrink: 0; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--text-2); display: grid; place-items: center; transition: background .2s, color .2s; }
.mic-btn:hover { background: var(--surface-2); color: var(--text); }
.mic-btn svg { width: 20px; height: 20px; }
/* Barra de gravação / transcrição, logo acima do campo de mensagem */
.gravacao {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  animation: pop .2s ease-out;
}
.gravacao-ponto { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--erro); animation: blink 1.1s ease-in-out infinite; }
.gravacao-texto { flex: 1; min-width: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.gravacao.transcrevendo .gravacao-ponto { background: var(--g2); }
.gravacao.transcrevendo .chip, .gravacao.transcrevendo .btn-primary { display: none; }
.gravacao .btn-primary { border-radius: 999px; padding: 8px 16px; }
.audio-aviso { margin-bottom: 10px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 13.5px; line-height: 1.45; animation: pop .2s ease-out; }
.msg.user .bubble svg.bubble-mic { width: 15px; height: 15px; margin: -2px 6px -2px 0; vertical-align: middle; opacity: .7; }
.msg.user.transcrevendo .bubble { color: var(--text-2); font-style: italic; }
body.tela-audio.idle .main { overflow-y: auto; justify-content: safe center; }
@media (prefers-reduced-motion: reduce) { .mic-grande::after, .gravacao, .audio-aviso, .gravacao-ponto { animation: none !important; } }
@media (max-width: 520px) { .gravacao { flex-wrap: wrap; border-radius: 18px; } .gravacao-texto { flex: 1 1 calc(100% - 24px); } }

.audio-exemplos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.audio-aviso .chip { margin-left: 10px; }
/* Gravando/transcrevendo: só a barra de gravação fica; some o campo de texto, o microfone e o clipe */
body:has(#gravacao:not([hidden])) .composer, body:has(#gravacao:not([hidden])) .starters, body:has(#gravacao:not([hidden])) .audio-cta { display: none; }
/* Modo Áudio: o microfone é o destaque colorido; o enviar fica monocromático */
body.tela-audio .mic-btn#micBtn { color: var(--on-accent); background: var(--accent-gradient); background-size: 300% 100%; animation: gradient-slide var(--gradient-speed) linear infinite; }
body.tela-audio .mic-btn#micBtn:hover { background-color: transparent; color: var(--on-accent); filter: brightness(1.1); }
body.tela-audio .send-btn { background: var(--surface-2); color: var(--text-2); animation: none; }
body.tela-audio .send-btn:hover { color: var(--text); filter: none; }
/* Tela inicial do Áudio: o microfone grande faz o papel do pequeno; nas telas seguintes o pequeno volta para dentro da caixa de texto */
body.tela-audio.idle #micBtn { display: none; }

/* Especificação v0.3: andamento em %, aviso LGPD e agenda */
.progresso-barra { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-size: .78rem; opacity: .85; }
.progresso-barra .trilho { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); overflow: hidden; }
.progresso-barra .preenchido { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--g1, #0dddff), var(--g3, #ee11ff)); transition: width .4s ease; }
.progresso-barra .pct { min-width: 2.6em; text-align: right; font-variant-numeric: tabular-nums; }
.card .lgpd { margin: 10px 0 6px; font-size: .8rem; opacity: .8; line-height: 1.4; }
.card .lgpd a { color: inherit; text-decoration: underline; }
.card .check { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; margin: 6px 0 10px; cursor: pointer; }
.card .check input { width: auto; margin-top: 3px; }
.card .field-error .chip { margin: 4px 4px 0 0; }
