/* ==========================================================================
   Curador — CSS público do Chat de Curadoria [curador_ia]

   REGRA: este ficheiro NÃO redefine nenhuma classe do CSS Definitivo V.12
   (.mm-product-section, .compare-table, .btn-amazon, .t-tip, ...). Esses
   estilos vêm do tema Wolf WP. Aqui só existem classes .cmm-* (interface do
   chat) e pequenos ajustes de CONTEXTO dentro de .cmm-curador.

   Cor principal: variável --cmm-primary, injetada pelo shortcode a partir do
   painel. Variações (hover, fundo suave, foco) derivam dela com color-mix().

   ⚠️ TOOLTIPS: o .t-tip-text do tema usa position:fixed. Nenhum ancestral do
   chat pode ter transform/filter/contain/backdrop-filter PERMANENTES (isso
   prende o tooltip dentro do balão). Por isso as animações de entrada não
   usam fill-mode: ao terminar, o transform volta a "none".

   CAMADA (0.5.0): tudo fica em @layer curador, declarada DEPOIS das camadas
   do iAfiliado Theme (foundation, layout, components). Assim:
     · o Curador vence o tema sem precisar de !important;
     · CSS sem camada (CSS adicional do Personalizador, outros plugins) vence
       o Curador sem !important;
     · a linha @layer abaixo fixa a ordem mesmo que um plugin de cache junte
       os arquivos com o curador.css antes do CSS do tema.
   Os !important que ficaram protegem campos e textos contra CSS de plugins
   sem camada (ex.: estilos globais de formulário).

   Estados (data-state na .cmm-curador):
     idle → boas-vindas + caixa de mensagem grande + sugestões.
     chat → painel com altura fixa, barra no topo, rolagem e caixa fixa embaixo.
   ========================================================================== */

@layer foundation, layout, components, curador;

@layer curador {

	.cmm-curador {
		--cmm-primary: #667eea;
		--cmm-primary-dark: color-mix(in srgb, var(--cmm-primary) 82%, #000);
		--cmm-primary-soft: color-mix(in srgb, var(--cmm-primary) 10%, #fff);
		--cmm-primary-ring: color-mix(in srgb, var(--cmm-primary) 28%, transparent);
		--cmm-ink: #2c3e50;
		--cmm-muted: #5a6877;
		--cmm-line: #e2e8f0;
		--cmm-canvas: #f7f8fb;
		--cmm-chat-h: clamp(540px, 82vh, 860px);
		max-width: 980px;
		margin: 30px auto;
		scroll-margin-top: 90px;
	}

	.cmm-curador *,
	.cmm-curador *::before,
	.cmm-curador *::after { box-sizing: border-box; }

	.cmm-sr-only {
		position: absolute !important;
		width: 1px; height: 1px;
		padding: 0; margin: -1px;
		overflow: hidden; clip: rect(0, 0, 0, 0);
		white-space: nowrap; border: 0;
	}

	/* --------------------------------------------------------------------------
	   1. PAINEL
	   ------------------------------------------------------------------------ */
	.cmm-chat {
		position: relative;
		display: flex;
		flex-direction: column;
		border: 1px solid var(--cmm-line);
		border-radius: 24px;
		background:
			radial-gradient(120% 70% at 50% 0%, var(--cmm-primary-soft) 0%, #ffffff 60%),
			#ffffff;
		box-shadow: 0 10px 40px rgba(44, 62, 80, 0.07);
		overflow: hidden;
	}

	/* Modo conversa: altura fixa, a rolagem acontece dentro do painel. */
	.cmm-curador[data-state="chat"] .cmm-chat {
		height: var(--cmm-chat-h);
		background: var(--cmm-canvas);
	}

	/* --------------------------------------------------------------------------
	   2. BARRA DO CURADOR (só no modo conversa)
	   ------------------------------------------------------------------------ */
	.cmm-chat__bar {
		display: none;
		align-items: center;
		gap: 12px;
		padding: 12px 16px 12px 18px;
		background: #fff;
		border-bottom: 1px solid var(--cmm-line);
		flex-shrink: 0;
	}
	.cmm-curador[data-state="chat"] .cmm-chat__bar { display: flex; }

	.cmm-avatar {
		flex-shrink: 0;
		width: 40px;
		height: 40px;
		border-radius: 50%;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		font-size: 1.15rem;
		line-height: 1;
		color: #fff;
		background: linear-gradient(135deg, var(--cmm-primary) 0%, var(--cmm-primary-dark) 100%);
		box-shadow: 0 4px 12px var(--cmm-primary-ring);
	}
	.cmm-avatar--sm { width: 32px; height: 32px; font-size: .95rem; margin-top: 22px; }

	.cmm-chat__id { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
	.cmm-chat__name { font-size: 1rem; font-weight: 800; color: var(--cmm-ink); }
	.cmm-chat__status { font-size: .78rem; color: var(--cmm-muted); }
	.cmm-chat__status::before {
		content: "";
		display: inline-block;
		width: 7px; height: 7px;
		margin-right: 6px;
		border-radius: 50%;
		background: #22c55e;
		vertical-align: 1px;
	}

	.cmm-curador .cmm-reset {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		cursor: pointer;
		font-size: .85rem;
		font-weight: 700;
		line-height: 1;
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		border: 1px solid var(--cmm-primary-ring);
		border-radius: 50px;
		padding: 9px 14px;
		transition: background .2s, color .2s;
	}
	.cmm-curador .cmm-reset:hover,
	.cmm-curador .cmm-reset:focus-visible { background: var(--cmm-primary); color: #fff; outline: none; }

	/* --------------------------------------------------------------------------
	   3. ÁREA DE ROLAGEM + BOAS-VINDAS
	   ------------------------------------------------------------------------ */
	.cmm-chat__scroll {
		position: relative; /* offsetParent das mensagens (scrollToMessage). */
		padding: 48px 28px 6px;
		overscroll-behavior: contain;
	}
	.cmm-curador[data-state="chat"] .cmm-chat__scroll {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		padding: 22px 22px 12px;
		scroll-behavior: auto;
	}

	.cmm-welcome { text-align: center; }
	.cmm-curador[data-state="chat"] .cmm-welcome { display: none; }

	.cmm-welcome__eyebrow {
		display: inline-block;
		font-size: .78rem;
		font-weight: 800;
		letter-spacing: 1.5px;
		text-transform: uppercase;
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		border: 1px solid var(--cmm-primary-ring);
		padding: 6px 14px;
		border-radius: 50px;
		margin-bottom: 14px;
	}

	/* Neutraliza a sublinha 3px do h2 global do tema apenas aqui. */
	.cmm-curador .cmm-welcome__title {
		font-size: clamp(1.7rem, 3.6vw, 2.4rem);
		font-weight: 800;
		letter-spacing: -0.5px;
		line-height: 1.15;
		margin: 0 0 10px;
		padding: 0;
		border: 0;
		display: block;
		width: auto;
	}

	.cmm-curador .cmm-welcome__subtitle {
		max-width: 620px;
		margin: 0 auto 8px;
		font-size: 1.05rem;
		color: var(--cmm-muted) !important;
	}

	.cmm-thread { display: flex; flex-direction: column; gap: 18px; }
	.cmm-curador[data-state="idle"] .cmm-thread { display: none; }

	/* --------------------------------------------------------------------------
	   4. MENSAGENS
	   ------------------------------------------------------------------------ */
	.cmm-msg {
		display: flex;
		gap: 10px;
		align-items: flex-start;
		animation: cmm-in .32s ease-out; /* sem fill-mode — ver aviso dos tooltips. */
	}
	.cmm-msg.no-anim { animation: none; }

	/* Visitante — à direita */
	.cmm-msg--user { justify-content: flex-end; }
	.cmm-msg--user .cmm-msg__bubble {
		max-width: min(78%, 620px);
		padding: 12px 16px;
		border-radius: 18px 18px 4px 18px;
		color: #fff;
		background: linear-gradient(135deg, var(--cmm-primary) 0%, var(--cmm-primary-dark) 100%);
		box-shadow: 0 6px 16px var(--cmm-primary-ring);
		font-size: 1rem;
		line-height: 1.55;
		white-space: pre-wrap;
		overflow-wrap: anywhere;
	}

	/* Curador — à esquerda */
	.cmm-msg__col { flex: 1 1 auto; min-width: 0; }

	.cmm-msg__meta {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		margin: 0 0 6px 4px;
		font-size: .78rem;
		color: var(--cmm-muted);
	}
	.cmm-msg__meta strong { color: var(--cmm-ink); font-size: .85rem; }
	.cmm-msg__mode {
		font-weight: 700;
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		border-radius: 50px;
		padding: 2px 10px;
	}
	.cmm-msg__cached { font-weight: 700; }

	.cmm-msg--bot .cmm-msg__bubble {
		background: #fff;
		border: 1px solid var(--cmm-line);
		border-radius: 4px 18px 18px 18px;
		padding: 20px 22px;
		box-shadow: 0 4px 15px rgba(0, 0, 0, .04);
		max-width: 100%;
	}

	/* Tipografia do balão (o tema usa 1.1rem nos <p> de artigo). */
	.cmm-curador .cmm-answer__body p,
	.cmm-curador .cmm-answer p { font-size: 1rem; line-height: 1.75; }
	.cmm-answer__body > :last-child { margin-bottom: 0; }
	.cmm-curador .cmm-answer__list { margin: 0 0 15px 1.2em; padding: 0; }
	.cmm-curador .cmm-answer__list li { margin-bottom: 8px; line-height: 1.7; }
	.cmm-curador .cmm-answer__h { margin: 24px 0 12px; font-size: 1.12rem; color: var(--cmm-ink) !important; }
	.cmm-curador .cmm-answer__body code { background: #f1f4f8; padding: 2px 6px; border-radius: 4px; font-size: .92em; }

	/* O 1º parágrafo/callout não herda margem superior do navegador. */
	.cmm-curador .cmm-answer p { margin-top: 0; }
	.cmm-answer__body > :first-child { margin-top: 0 !important; }

	/* Componentes do Motor dentro do balão: margens mais compactas
	   (o tema usa margin:30px 0 !important na .compare-table-wrapper). */
	.cmm-curador .cmm-answer .compare-table-wrapper { margin: 12px 0 26px !important; }
	.cmm-answer .compare-table th img { box-shadow: none; }
	.cmm-answer .pros-cons-grid { margin-top: 18px !important; gap: 22px !important; }
	.cmm-answer .pros-cons-grid li { font-size: .95rem; line-height: 1.6; }
	.cmm-answer > :last-child { margin-bottom: 0 !important; }

	/* Citações [1] estilo Perplexity. */
	.cmm-curador a.cmm-cite {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 1.35em;
		height: 1.35em;
		padding: 0 .3em;
		margin: 0 1px;
		font-size: .72em;
		font-weight: 800;
		line-height: 1;
		vertical-align: super;
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		border: 1px solid var(--cmm-primary-ring);
		border-radius: 6px;
		text-decoration: none;
	}
	.cmm-curador a.cmm-cite:hover { background: var(--cmm-primary); color: #fff; text-decoration: none; }

	/* Tooltips do tema: no telemóvel não há hover — o toque dá foco (tabindex=0). */
	.cmm-curador .t-tip:focus { outline: none; }
	.cmm-curador .t-tip:focus .t-tip-text,
	.cmm-curador .t-tip:focus-within .t-tip-text {
		visibility: visible;
		opacity: 1;
		transform: translateX(-50%) translateY(0) !important;
	}

	/* --------------------------------------------------------------------------
	   5. "DIGITANDO" — SHIMMER
	   ------------------------------------------------------------------------ */
	.cmm-typing { display: grid; gap: 12px; min-width: min(100%, 420px); }

	.cmm-typing__head {
		display: flex;
		align-items: center;
		gap: 10px;
		font-weight: 700;
		font-size: .95rem;
		color: var(--cmm-ink);
	}

	.cmm-typing__orb {
		flex-shrink: 0;
		width: 18px; height: 18px;
		border-radius: 50%;
		background: conic-gradient(from 0deg, var(--cmm-primary), var(--cmm-primary-soft), var(--cmm-primary));
		animation: cmm-spin 1s linear infinite;
		-webkit-mask: radial-gradient(circle, transparent 42%, #000 44%);
		        mask: radial-gradient(circle, transparent 42%, #000 44%);
	}

	.cmm-typing__text::after {
		content: "";
		display: inline-block;
		width: 1.2em;
		text-align: left;
		animation: cmm-dots 1.4s steps(4, end) infinite;
	}

	.cmm-skel {
		display: block;
		border-radius: 8px;
		background: linear-gradient(90deg, #eef1f5 0%, #f7f9fb 40%, #eef1f5 80%);
		background-size: 300% 100%;
		animation: cmm-shimmer 1.4s ease-in-out infinite;
	}
	.cmm-skel--line  { width: 100%; height: 13px; }
	.cmm-skel--short { width: 62%; }
	.cmm-skel--block { width: 100%; height: 96px; margin-top: 4px; border-radius: 12px; }

	@keyframes cmm-in      { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
	@keyframes cmm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
	@keyframes cmm-spin    { to { transform: rotate(360deg); } }
	@keyframes cmm-dots    { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }

	/* --------------------------------------------------------------------------
	   6. ERROS (balão do Curador)
	   ------------------------------------------------------------------------ */
	.cmm-msg--bot .cmm-msg__bubble--error {
		display: flex;
		gap: 14px;
		align-items: flex-start;
		background: #fff8e1;
		border-color: #ffe08a;
		border-left: 4px solid #ffb300;
	}
	.cmm-error__icon { font-size: 1.4rem; line-height: 1; }
	.cmm-curador .cmm-error__msg { margin: 0; font-weight: 700; font-size: 1rem; color: var(--cmm-ink) !important; }

	.cmm-curador .cmm-retry {
		cursor: pointer;
		margin-top: 10px;
		font-weight: 800;
		font-size: .9rem;
		border-radius: 50px;
		padding: 9px 18px;
		color: var(--cmm-primary-dark);
		background: #fff;
		border: 2px solid var(--cmm-primary);
		transition: background .2s, color .2s;
	}
	.cmm-curador .cmm-retry:hover { background: var(--cmm-primary); color: #fff; }

	/* --------------------------------------------------------------------------
	   7. SUGESTÕES (chips) — iniciais e de continuação
	   ------------------------------------------------------------------------ */
	.cmm-chips {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}
	.cmm-chips--start { justify-content: center; margin: 14px auto 0; max-width: 760px; }
	.cmm-curador[data-state="chat"] .cmm-chips--start { display: none; }

	.cmm-curador .cmm-chip {
		cursor: pointer;
		font-size: .88rem;
		font-weight: 600;
		text-align: left;
		color: var(--cmm-ink);
		background: #fff;
		border: 1px solid var(--cmm-line);
		border-radius: 50px;
		padding: 8px 14px;
		line-height: 1.25;
		transition: border-color .2s, color .2s, background .2s;
	}
	.cmm-curador .cmm-chip:hover,
	.cmm-curador .cmm-chip:focus-visible {
		border-color: var(--cmm-primary);
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		outline: none;
	}
	.cmm-curador.is-busy .cmm-chip { opacity: .55; pointer-events: none; }

	.cmm-followups { margin: 12px 0 0 4px; }

	/* 2.1.0: "Guardar no site" (só equipe, depois de uma resposta com foto). */
	.cmm-keep { margin: 12px 0 0 4px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--cmm-primary) 45%, #cbd5e1); border-radius: 14px; background: color-mix(in srgb, var(--cmm-primary) 4%, #fff); display: grid; gap: 10px; }
	.cmm-keep__head { display: grid; gap: 2px; }
	.cmm-keep__head strong { font-size: .95rem; color: #1a1a1a; }
	.cmm-keep__head small { font-size: .8rem; color: #64748b; line-height: 1.4; }
	.cmm-keep__items { display: grid; gap: 8px; }
	.cmm-keep__item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
	.cmm-keep__thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; }
	.cmm-keep__field { display: grid; gap: 2px; min-width: 0; }
	.cmm-keep__name { width: 100%; box-sizing: border-box; font: inherit; font-size: .92rem; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #1a1a1a; }
	.cmm-keep__name:focus-visible { outline: 2px solid var(--cmm-primary); outline-offset: 1px; }
	.cmm-keep__hint { font-size: .75rem; color: #64748b; min-height: 1em; }
	.cmm-keep__item.is-done .cmm-keep__thumb { opacity: .6; }
	.cmm-keep__item.is-done .cmm-keep__hint { color: #15803d; font-weight: 700; }
	.cmm-keep__undo { justify-self: start; padding: 2px 4px; border: 0; background: none; color: #64748b; font: inherit; font-size: .78rem; text-decoration: underline; cursor: pointer; }
	.cmm-keep__undo[hidden] { display: none; }
	.cmm-keep__consent { display: grid; gap: 6px; }
	.cmm-keep__consent:empty { display: none; }
	.cmm-keep__consent label { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: #334155; line-height: 1.4; }
	.cmm-keep__consent input { margin-top: 3px; flex-shrink: 0; }
	.cmm-keep__consent small { font-size: .75rem; color: #64748b; }
	.cmm-keep__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
	.cmm-keep__btn { padding: 9px 16px; border: 0; border-radius: 999px; background: var(--cmm-primary); color: #fff; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
	.cmm-keep__btn:hover, .cmm-keep__btn:focus-visible { filter: brightness(1.08); }
	.cmm-keep__btn:disabled { opacity: .55; cursor: default; }
	.cmm-keep__btn[hidden], .cmm-keep__revoke[hidden] { display: none; }
	.cmm-keep__revoke { padding: 4px 6px; border: 0; background: none; color: #64748b; font: inherit; font-size: .78rem; text-decoration: underline; cursor: pointer; }
	.cmm-keep__msg { margin: 0; font-size: .85rem; color: #15803d; line-height: 1.4; }
	.cmm-keep__msg:empty { display: none; }
	.cmm-keep__msg.is-bad { color: #b91c1c; }
	.cmm-save { margin: 10px 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: .82rem; color: #64748b; }
	.cmm-save__btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
	.cmm-save__btn { padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #1a1a1a; font: inherit; font-weight: 600; font-size: .8rem; cursor: pointer; }
	.cmm-save__btn:hover, .cmm-save__btn:focus-visible { border-color: var(--cmm-primary); color: var(--cmm-primary-dark, var(--cmm-primary)); }
	.cmm-save__msg { color: #15803d; font-weight: 600; }
	.cmm-save__msg:empty { display: none; }
	.cmm-keep__link { color: var(--cmm-primary-dark, var(--cmm-primary)); font-weight: 700; }
	/* 0.9.6: cartão de parceiro (abaixo da resposta). */
	.cmm-partner { margin: 12px 0 0; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--cmm-primary) 45%, #cbd5e1); border-radius: 14px; background: color-mix(in srgb, var(--cmm-primary) 5%, #fff); display: grid; gap: 6px; }
	.cmm-partner__badge { justify-self: start; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; background: #eef2f7; border-radius: 999px; padding: 2px 8px; }
	.cmm-partner__title { font-size: 1rem; color: #1a1a1a; }
	.cmm-partner__text { margin: 0; font-size: 0.9rem; color: #475569; line-height: 1.5; }
	.cmm-partner__btn { justify-self: start; margin-top: 4px; padding: 8px 14px; border-radius: 999px; background: var(--cmm-primary); color: #fff !important; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
	.cmm-partner__btn:hover, .cmm-partner__btn:focus-visible { filter: brightness(1.08); }

	/* 0.9.5: "Ver mais opções" de uma lista longa. */
	.cmm-more { margin: 12px 0 0 4px; }
	.cmm-chip--more { background: var(--cmm-primary, #667eea); border-color: transparent; color: #fff; font-weight: 700; }
	.cmm-chip--more:hover, .cmm-chip--more:focus-visible { filter: brightness(1.08); color: #fff; }
	.cmm-followups__label {
		display: block;
		margin-bottom: 8px;
		font-size: .75rem;
		font-weight: 800;
		letter-spacing: .8px;
		text-transform: uppercase;
		color: var(--cmm-muted);
	}

	/* --------------------------------------------------------------------------
	   8. FONTES (análises usadas) — CSS GRID
	   ------------------------------------------------------------------------ */
	.cmm-sources { margin: 14px 0 0 4px; }
	.cmm-curador .cmm-sources__title {
		margin: 0 0 10px;
		font-size: .78rem !important;
		font-weight: 800;
		letter-spacing: .8px;
		text-transform: uppercase;
		color: var(--cmm-muted) !important;
	}

	.cmm-sources__grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
		gap: 14px;
	}

	.cmm-curador a.cmm-source {
		display: flex;
		flex-direction: column;
		height: 100%;
		background: #fff;
		border: 1px solid var(--cmm-line);
		border-radius: 12px;
		overflow: hidden;
		color: var(--cmm-ink);
		text-decoration: none;
		font-weight: 400;
		box-shadow: 0 4px 15px rgba(0, 0, 0, .04);
		transition: border-color .25s ease, box-shadow .25s ease;
		scroll-margin-top: 20px;
	}
	.cmm-curador a.cmm-source:hover,
	.cmm-curador a.cmm-source:focus-visible {
		border-color: var(--cmm-primary);
		box-shadow: 0 10px 24px rgba(44, 62, 80, .12);
		text-decoration: none;
		outline: none;
	}
	.cmm-curador a.cmm-source:target { border-color: var(--cmm-primary); box-shadow: 0 0 0 4px var(--cmm-primary-ring); }

	.cmm-source__media {
		position: relative;
		display: block;
		aspect-ratio: 16 / 9;
		background: linear-gradient(135deg, var(--cmm-primary-soft), #f4f6f9);
		overflow: hidden;
	}
	.cmm-curador .cmm-source__media img {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
		border-radius: 0;
		box-shadow: none;
	}

	.cmm-source__placeholder {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 2rem;
		opacity: .6;
	}

	.cmm-source__num {
		position: absolute;
		top: 8px;
		left: 8px;
		min-width: 24px;
		height: 24px;
		padding: 0 6px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border-radius: 7px;
		background: var(--cmm-primary);
		color: #fff;
		font-size: .78rem;
		font-weight: 800;
		box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
	}

	.cmm-source__body { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 14px; flex: 1; }
	.cmm-source__label { font-size: .68rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--cmm-primary-dark); }
	.cmm-source__title { font-size: .95rem; font-weight: 800; line-height: 1.35; color: var(--cmm-ink); }
	.cmm-source__excerpt {
		font-size: .84rem;
		line-height: 1.5;
		color: var(--cmm-muted);
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.cmm-source__cta { margin-top: auto; padding-top: 6px; font-size: .84rem; font-weight: 800; color: var(--cmm-primary-dark); }

	/* --------------------------------------------------------------------------
	   9. CAIXA DE MENSAGEM (dock)
	   ------------------------------------------------------------------------ */
	.cmm-dock { padding: 18px 28px 22px; flex-shrink: 0; }

	.cmm-curador[data-state="chat"] .cmm-dock {
		padding: 12px 18px 12px;
		background: #fff;
		border-top: 1px solid var(--cmm-line);
	}

	.cmm-composer {
		display: flex;
		align-items: flex-end;
		gap: 8px;
		max-width: 760px;
		margin: 0 auto;
		padding: 8px 8px 8px 20px;
		background: #fff;
		border: 2px solid var(--cmm-line);
		border-radius: 28px;
		box-shadow: 0 12px 32px rgba(44, 62, 80, 0.10);
		transition: border-color .2s ease, box-shadow .2s ease;
	}
	.cmm-curador[data-state="chat"] .cmm-composer {
		max-width: none;
		box-shadow: none;
		border-radius: 22px;
		padding: 6px 6px 6px 16px;
	}
	.cmm-composer:focus-within {
		border-color: var(--cmm-primary);
		box-shadow: 0 0 0 5px var(--cmm-primary-ring), 0 12px 32px rgba(44, 62, 80, 0.10);
	}
	.cmm-curador[data-state="chat"] .cmm-composer:focus-within { box-shadow: 0 0 0 4px var(--cmm-primary-ring); }

	.cmm-curador .cmm-composer__input {
		flex: 1 1 auto;
		min-width: 0;
		min-height: 0;
		max-height: 160px;
		resize: none;
		overflow-y: auto;
		border: 0 !important;
		outline: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
		font: inherit;
		font-size: 1.05rem;
		line-height: 1.5;
		color: var(--cmm-ink);
		padding: 11px 2px;
		margin: 0;
		height: auto;
		-webkit-appearance: none;
		appearance: none;
	}
	.cmm-curador[data-state="chat"] .cmm-composer__input { font-size: 1rem; padding: 9px 2px; }
	.cmm-composer__input::placeholder { color: #9aa7b4; opacity: 1; }

	.cmm-curador .cmm-composer__send {
		flex-shrink: 0;
		width: 48px;
		height: 48px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		border: 0;
		cursor: pointer;
		border-radius: 50%;
		color: #fff;
		background: linear-gradient(135deg, var(--cmm-primary) 0%, var(--cmm-primary-dark) 100%);
		box-shadow: 0 8px 20px var(--cmm-primary-ring);
		transition: box-shadow .2s ease, opacity .2s ease, filter .2s ease;
	}
	.cmm-curador[data-state="chat"] .cmm-composer__send { width: 42px; height: 42px; box-shadow: none; }
	.cmm-curador .cmm-composer__send:hover { filter: brightness(1.08); }
	.cmm-curador .cmm-composer__send:focus-visible { outline: 3px solid var(--cmm-primary); outline-offset: 3px; }
	.cmm-curador .cmm-composer__send:disabled { opacity: .55; cursor: progress; filter: none; }

	.cmm-curador .cmm-composer__hint {
		max-width: 760px;
		margin: 6px auto 0;
		min-height: 0;
		font-size: .85rem;
		text-align: center;
		color: #c0392b !important;
	}
	.cmm-curador .cmm-composer__hint:empty { display: none; }

	.cmm-curador .cmm-chat__foot {
		max-width: 760px;
		margin: 14px auto 0;
		font-size: .74rem !important;
		line-height: 1.45;
		text-align: center;
		color: #5a6877 !important;
	}
	.cmm-curador[data-state="chat"] .cmm-chat__foot { margin-top: 6px; font-size: .7rem !important; }
	/* 0.9.0: aviso de conteúdo (fila editorial), logo abaixo do aviso de afiliado. */
	.cmm-curador .cmm-chat__notice {
		max-width: 760px;
		margin: 4px auto 0;
		font-size: .74rem !important;
		line-height: 1.45;
		text-align: center;
		color: #5a6877 !important;
	}
	.cmm-curador .cmm-chat__notice a { color: inherit !important; text-decoration: underline; }
	.cmm-curador[data-state="chat"] .cmm-chat__notice { margin-top: 2px; font-size: .7rem !important; }
	/* No celular, durante a conversa, o aviso (já visto antes da 1ª pergunta) sai para o campo ficar perto da resposta. */
	@media (max-width: 640px) { .cmm-curador[data-state="chat"] .cmm-chat__notice { display: none; } }

	.cmm-noscript { text-align: center; color: var(--cmm-muted); }

	/* --------------------------------------------------------------------------
	   10. RESPONSIVO E ACESSIBILIDADE
	   ------------------------------------------------------------------------ */
	@media (max-width: 768px) {
		.cmm-curador { margin: 20px auto; --cmm-chat-h: min(88svh, 760px); }
		.cmm-chat { border-radius: 18px; }
		.cmm-chat__scroll { padding: 34px 16px 4px; }
		.cmm-dock { padding: 14px 14px 18px; }
		.cmm-curador[data-state="chat"] .cmm-chat__scroll { padding: 16px 12px 10px; }
		.cmm-curador[data-state="chat"] .cmm-dock { padding: 10px 10px; }
		.cmm-msg--bot .cmm-msg__bubble { padding: 16px 14px; }
		.cmm-msg--user .cmm-msg__bubble { max-width: 88%; }
		.cmm-chips--start { justify-content: flex-start; }
		.cmm-curador .cmm-pick { padding: 22px !important; }
	}

	@media (max-width: 560px) {
		.cmm-msg--bot > .cmm-avatar { display: none; } /* Mais largura para as tabelas. */
		.cmm-curador .cmm-reset span { display: none; }
		.cmm-curador .cmm-reset { padding: 9px 10px; }
		.cmm-chat__status { display: none; }
		.cmm-sources__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
		.cmm-source__excerpt { display: none; }
	}

	@media (prefers-reduced-motion: reduce) {
		.cmm-msg, .cmm-skel, .cmm-typing__orb, .cmm-typing__text::after { animation: none; }
		.cmm-curador a.cmm-source, .cmm-curador .cmm-composer__send, .cmm-composer { transition: none; }
	}

	/* --------------------------------------------------------------------------
	   11. TEXTO DE EXEMPLO INTEIRO NA TELA INICIAL
	   0.3.1: só dentro do widget global. 0.6.0: em todo Curador (página inicial
	   do tema e páginas com o shortcode) — no celular o texto de exemplo longo
	   ficava cortado pela metade. O campo vazio cresce até mostrar a frase
	   inteira; navegadores sem field-sizing reservam três linhas no celular.
	   ------------------------------------------------------------------------ */
	.cmm-curador[data-state="idle"] .cmm-composer__input:placeholder-shown {
		field-sizing: content;
	}
	@supports not (field-sizing: content) {
		@media (max-width: 640px) {
			.cmm-curador[data-state="idle"] .cmm-composer__input:placeholder-shown {
				min-height: 3lh;
			}
		}
	}

	/* --------------------------------------------------------------------------
	   12. FERRAMENTAS DA BARRA (0.7.0): Aa, tela cheia, minimizar
	   ------------------------------------------------------------------------ */
	.cmm-chat__tools {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		margin-left: auto;
		flex-shrink: 0;
	}
	.cmm-curador .cmm-tool {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		padding: 0;
		margin: 0;
		cursor: pointer;
		font: 800 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
		color: var(--cmm-ink);
		background: transparent;
		border: 1px solid transparent;
		border-radius: 10px;
		transition: background .2s, color .2s, border-color .2s;
	}
	.cmm-curador .cmm-tool:hover,
	.cmm-curador .cmm-tool:focus-visible {
		background: var(--cmm-primary-soft);
		border-color: var(--cmm-primary-ring);
		color: var(--cmm-primary-dark);
		outline: none;
	}
	.cmm-curador .cmm-tool--text small { font-size: .72em; font-weight: 800; }
	/* Um traço por passo: mostra em que tamanho o texto está. */
	.cmm-curador .cmm-tool--text { position: relative; }
	.cmm-curador .cmm-tool--text::after {
		content: "";
		position: absolute;
		left: 50%;
		bottom: 4px;
		width: 14px;
		height: 3px;
		border-radius: 3px;
		transform: translateX(-50%);
		background: linear-gradient(90deg, var(--cmm-primary) 33%, transparent 0) 0 0 / 100% 100% no-repeat, var(--cmm-line);
	}
	.cmm-curador .cmm-tool--text[data-step="1"]::after { background: linear-gradient(90deg, var(--cmm-primary) 66%, var(--cmm-line) 0); }
	.cmm-curador .cmm-tool--text[data-step="2"]::after { background: var(--cmm-primary); }

	.cmm-tool--size .cmm-ico-shrink,
	.cmm-curador.is-full .cmm-tool--size .cmm-ico-full { display: none; }
	.cmm-curador.is-full .cmm-tool--size .cmm-ico-shrink { display: block; }

	/* Tamanho do texto: zoom só na conversa e nas boas-vindas (o campo fica igual). */
	.cmm-welcome,
	.cmm-thread { zoom: var(--cmm-zoom, 1); }

	/* --------------------------------------------------------------------------
	   13. JANELA COM ALTURA PRÓPRIA: tela cheia do shortcode e botão flutuante
	   A barra fica sempre visível (tem os botões), a rolagem acontece por dentro
	   e a caixa de mensagem fica embaixo, também na tela inicial.
	   ------------------------------------------------------------------------ */
	html.cmm-lock,
	html.cmm-lock body { overflow: hidden !important; }

	.cmm-curador.is-full {
		position: fixed;
		inset: 0;
		z-index: 99995;
		max-width: none;
		margin: 0;
	}

	.cmm-curador.is-full .cmm-chat,
	.cmm-curador--launcher .cmm-chat { height: 100%; background: var(--cmm-canvas); }
	.cmm-curador.is-full .cmm-chat { border: 0; border-radius: 0; }

	.cmm-curador.is-full .cmm-chat__bar,
	.cmm-curador--launcher .cmm-chat__bar { display: flex; }

	.cmm-curador.is-full .cmm-chat__scroll,
	.cmm-curador--launcher .cmm-chat__scroll {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		padding: 22px 22px 12px;
	}
	.cmm-curador.is-full[data-state="idle"] .cmm-chat__scroll,
	.cmm-curador--launcher[data-state="idle"] .cmm-chat__scroll {
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.cmm-curador.is-full .cmm-dock,
	.cmm-curador--launcher .cmm-dock {
		padding: 12px 16px 12px;
		background: #fff;
		border-top: 1px solid var(--cmm-line);
	}
	.cmm-curador--launcher .cmm-welcome__title { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }

	/* Tela cheia larga: a conversa e o campo ficam numa coluna de leitura. */
	.cmm-curador.is-full .cmm-thread,
	.cmm-curador.is-full .cmm-welcome { max-width: 980px; margin-inline: auto; width: 100%; }
	.cmm-curador.is-full .cmm-composer,
	.cmm-curador.is-full .cmm-composer__hint,
	.cmm-curador.is-full .cmm-chat__foot,
	.cmm-curador.is-full .cmm-chips--start { max-width: 980px; margin-inline: auto; }
	.cmm-curador--launcher .cmm-chips--start { margin-top: 10px; }
	.cmm-curador--launcher .cmm-chip { font-size: .85rem; }

	/* --------------------------------------------------------------------------
	   14. BOTÃO FLUTUANTE: janela "Chat" (canto) e "Buscador" (centro)
	   O botão em si tem CSS mínimo em linha no rodapé (carrega sem este ficheiro).
	   ------------------------------------------------------------------------ */
	.cmm-float__layer { position: fixed; inset: 0; z-index: 99991; pointer-events: none; }
	.cmm-float__layer[hidden] { display: none; }

	.cmm-float__window {
		position: fixed;
		display: flex;
		flex-direction: column;
		pointer-events: auto;
		border-radius: 20px;
		box-shadow: 0 24px 70px rgba(15, 23, 42, .28), 0 4px 14px rgba(15, 23, 42, .10);
	}
	/* Janela estreita (Chat no computador, celular): barra compacta. */
	.cmm-float__window { container: cmm-window / inline-size; }
	@container cmm-window (max-width: 560px) {
		.cmm-curador--launcher .cmm-chat__status { display: none; }
		.cmm-curador--launcher .cmm-chat__bar { padding: 10px 10px 10px 14px; gap: 10px; }
		.cmm-curador--launcher .cmm-avatar:not(.cmm-avatar--sm) { width: 34px; height: 34px; font-size: 1rem; }
		.cmm-curador--launcher .cmm-chat__name { font-size: .95rem; line-height: 1.2; }
		.cmm-curador--launcher .cmm-chat__tools { gap: 2px; }
		.cmm-curador--launcher .cmm-reset span { display: none; }
		.cmm-curador--launcher .cmm-reset { padding: 9px 10px; }
		.cmm-curador--launcher .cmm-msg--bot > .cmm-avatar { display: none; }
		.cmm-curador--launcher .cmm-chat__scroll { padding: 16px 14px 10px; }
		.cmm-curador--launcher .cmm-msg--bot .cmm-msg__bubble { padding: 16px 14px; }
	}

	.cmm-float__window > .cmm-curador {
		width: 100%;
		height: 100%;
		max-width: none;
		margin: 0;
	}
	.cmm-float__window > .cmm-curador,
	.cmm-float__window .cmm-chat { border-radius: inherit; }

	/* Buscador, antes da pergunta: título, campo e sugestões juntos no meio da caixa. */
	.cmm-curador--search[data-state="idle"] .cmm-chat__scroll { flex: 0 0 auto; margin-top: auto; padding-bottom: 6px; }
	.cmm-curador--search[data-state="idle"] .cmm-dock { margin-bottom: auto; border-top: 0; background: transparent; padding-bottom: 28px; }
	.cmm-float__layer.is-open .cmm-float__window { animation: cmm-float-in .2s ease-out; }

	/* Chat: janela no canto (ao lado da posição do botão). */
	.cmm-float--chat .cmm-float__window {
		width: min(460px, calc(100vw - 32px));
		height: min(720px, calc(100dvh - 40px));
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
	}
	.cmm-pos-bottom-left.cmm-float--chat .cmm-float__window,
	.cmm-pos-middle-left.cmm-float--chat .cmm-float__window { right: auto; left: max(16px, env(safe-area-inset-left)); }
	.cmm-pos-bottom-center.cmm-float--chat .cmm-float__window { right: auto; left: 50%; transform: translateX(-50%); }
	.cmm-pos-middle-right.cmm-float--chat .cmm-float__window,
	.cmm-pos-middle-left.cmm-float--chat .cmm-float__window { bottom: auto; top: 50%; transform: translateY(-50%); }

	/* Buscador: caixa grande no centro, com fundo escurecido. */
	.cmm-float--search .cmm-float__layer { pointer-events: auto; }
	.cmm-float__backdrop {
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, .45);
		-webkit-backdrop-filter: blur(3px);
		backdrop-filter: blur(3px);
	}
	.cmm-float--search .cmm-float__window {
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		width: min(900px, calc(100vw - 32px));
		height: min(840px, calc(100dvh - 48px));
		border-radius: 24px;
	}

	/* Tela cheia (escolha do visitante, guardada no navegador). */
	.cmm-float__layer.is-full .cmm-float__window {
		inset: 0;
		width: 100%;
		height: 100%;
		transform: none;
		border-radius: 0;
	}
	.cmm-float__layer.is-full .cmm-curador.is-full { position: static; }

	/* Celular: a janela ocupa a tela toda; o botão de tamanho não faz sentido. */
	@media (max-width: 640px) {
		.cmm-float .cmm-float__window {
			inset: 0;
			width: 100%;
			height: 100%;
			height: 100dvh;
			transform: none;
			border-radius: 0;
		}
		.cmm-curador--launcher .cmm-tool--size { display: none; }
		.cmm-curador--launcher .cmm-chat__scroll { padding: 16px 12px 10px; }
		.cmm-curador--launcher .cmm-dock { padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
	}

	@keyframes cmm-float-in {
		from { opacity: 0; translate: 0 12px; }
		to { opacity: 1; translate: 0 0; }
	}

	/* --------------------------------------------------------------------------
	   15. PÁGINA INICIAL ABERTA (0.7.0) — estilo buscador, sem moldura
	   Antes da pergunta: campo grande e sugestões direto na página (o título vem
	   do tema). Depois: a conversa corre no fluxo da página e o campo fica preso
	   embaixo da tela enquanto a conversa estiver à vista (estilo Perplexity).
	   ------------------------------------------------------------------------ */
	.cmm-curador--open { max-width: 820px; margin: 0 auto; scroll-margin-top: 96px; }
	.cmm-curador--open .cmm-chat,
	.cmm-curador--open[data-state="chat"] .cmm-chat {
		height: auto;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible; /* o campo preso embaixo (sticky) precisa disto */
	}
	.cmm-curador--open .cmm-welcome { display: none; }
	.cmm-curador--open .cmm-chat__scroll,
	.cmm-curador--open[data-state="chat"] .cmm-chat__scroll {
		flex: none;
		overflow: visible;
		padding: 0;
	}
	.cmm-curador--open[data-state="chat"] .cmm-chat__scroll { padding: 4px 0 12px; }
	.cmm-curador--open .cmm-msg { scroll-margin-top: var(--cmm-scroll-offset, 96px); }

	.cmm-curador--open .cmm-chat__bar,
	.cmm-curador--open[data-state="chat"] .cmm-chat__bar {
		padding: 0 0 10px;
		background: transparent;
		border: 0;
	}
	.cmm-curador--open[data-state="idle"] .cmm-chat__bar { display: none; }
	.cmm-curador--open .cmm-chat__bar > .cmm-avatar,
	.cmm-curador--open .cmm-chat__id { display: none; }

	.cmm-curador--open .cmm-dock { padding: 0; }
	.cmm-curador--open[data-state="chat"] .cmm-dock {
		position: sticky;
		bottom: 0;
		z-index: 5;
		padding: 18px 0 max(12px, env(safe-area-inset-bottom));
		border: 0;
		background: linear-gradient(to bottom, transparent, var(--iaf-bg, #fff) 28%);
	}
	.cmm-curador--open[data-state="chat"] .cmm-composer {
		max-width: none;
		box-shadow: 0 10px 30px rgba(44, 62, 80, .14);
	}
	.cmm-curador--open[data-state="chat"] .cmm-chat__foot { margin-top: 8px; }

	/* O topo do tema encolhe durante a conversa (o título continua lá). */
	.iaf-front-hero:has(.cmm-curador--open[data-state="chat"]) { padding-block: 16px 0; border-bottom: 0; }
	.iaf-front-hero:has(.cmm-curador--open[data-state="chat"]) .iaf-front-hero__title { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-bottom: 12px; }
	.iaf-front-hero:has(.cmm-curador--open[data-state="chat"]) .iaf-front-hero__subtitle { display: none; }

	/* Motor ainda a carregar depois de um toque: sinal discreto no botão de enviar. */
	.cmm-curador[aria-busy="true"] .cmm-composer__send { opacity: .7; cursor: progress; }

	@media (max-width: 768px) {
		.cmm-curador--open { margin: 0 auto; }
		.cmm-curador--open[data-state="chat"] .cmm-dock { padding-top: 14px; }
	}

	/* --------------------------------------------------------------------------
	   16. BOTÃO "INSTALAR O APP" (só aparece quando o aparelho permite)
	   ------------------------------------------------------------------------ */
	.cmm-install {
		align-items: center;
		gap: 8px;
		margin: 14px auto 0;
		padding: 8px 16px;
		cursor: pointer;
		font: 700 .85rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
		color: var(--cmm-primary-dark, #3b4cb8);
		background: var(--cmm-primary-soft, #eef0fd);
		border: 1px solid var(--cmm-primary-ring, #c9cff8);
		border-radius: 999px;
	}
	.cmm-install:hover { filter: brightness(.97); }
	.cmm-install-row { margin: 0; text-align: center; }
	.cmm-install-row:has(> .cmm-install) { min-height: 0; }
	.cmm-curador[data-state="chat"] .cmm-install-row { display: none; }

	@media (prefers-reduced-motion: reduce) {
		.cmm-float__layer.is-open .cmm-float__window { animation: none; }
		.cmm-curador .cmm-tool { transition: none; }
	}

	/* --------------------------------------------------------------------------
	   17. E-MAIL DA ANÁLISE (0.8.0)
	   ------------------------------------------------------------------------ */
	.cmm-mail { margin: 14px 0 0; }
	.cmm-curador .cmm-mail__open {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 10px 16px;
		cursor: pointer;
		font: inherit;
		font-size: .92rem;
		font-weight: 700;
		color: var(--cmm-primary-dark);
		background: #fff;
		border: 1px solid var(--cmm-primary-ring);
		border-radius: 999px;
		transition: background .2s, color .2s;
	}
	.cmm-curador .cmm-mail__open:hover,
	.cmm-curador .cmm-mail__open:focus-visible { background: var(--cmm-primary-soft); outline: none; }

	.cmm-mail__form {
		padding: 16px 18px;
		background: #fff;
		border: 1px solid var(--cmm-line);
		border-radius: 16px;
		box-shadow: 0 6px 20px rgba(44, 62, 80, .06);
	}
	.cmm-mail__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
	.cmm-mail__title { font-size: 1rem; color: var(--cmm-ink); }
	.cmm-curador .cmm-mail__close {
		width: 32px; height: 32px; padding: 0; cursor: pointer;
		font-size: 1.4rem; line-height: 1; color: var(--cmm-muted);
		background: transparent; border: 0; border-radius: 8px;
	}
	.cmm-curador .cmm-mail__close:hover { background: var(--cmm-canvas); color: var(--cmm-ink); }
	.cmm-curador .cmm-mail__desc { margin: 0 0 12px; font-size: .88rem; line-height: 1.5; color: var(--cmm-muted) !important; }
	.cmm-mail__row { display: flex; gap: 8px; margin-bottom: 10px; }
	.cmm-curador .cmm-mail__input {
		flex: 1 1 auto;
		min-width: 0;
		height: 46px;
		margin: 0;
		padding: 0 14px;
		font: inherit;
		font-size: 1rem;
		color: var(--cmm-ink);
		background: #fff;
		border: 2px solid var(--cmm-line);
		border-radius: 12px;
		box-shadow: none;
	}
	.cmm-curador .cmm-mail__input:focus { border-color: var(--cmm-primary); outline: none; box-shadow: 0 0 0 4px var(--cmm-primary-ring); }
	.cmm-curador .cmm-mail__send {
		flex-shrink: 0;
		height: 46px;
		padding: 0 20px;
		cursor: pointer;
		font: inherit;
		font-weight: 800;
		color: #fff;
		background: linear-gradient(135deg, var(--cmm-primary) 0%, var(--cmm-primary-dark) 100%);
		border: 0;
		border-radius: 12px;
	}
	.cmm-curador .cmm-mail__send:disabled { opacity: .6; cursor: progress; }
	.cmm-mail__check {
		display: flex;
		align-items: flex-start;
		gap: 10px;
		margin: 0 0 8px;
		font-size: .9rem;
		line-height: 1.45;
		color: var(--cmm-ink);
		cursor: pointer;
	}
	.cmm-mail__check input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cmm-primary); }
	.cmm-curador .cmm-mail__note { margin: 6px 0 0; font-size: .78rem; line-height: 1.45; color: var(--cmm-muted) !important; }
	.cmm-curador .cmm-mail__status { margin: 8px 0 0; font-size: .88rem; font-weight: 700; color: var(--cmm-primary-dark) !important; }
	.cmm-curador .cmm-mail__status:empty { display: none; }
	.cmm-curador .cmm-mail__status.is-error { color: #c0392b !important; }
	.cmm-curador .cmm-mail__done {
		margin: 0;
		padding: 12px 16px;
		font-weight: 700;
		color: #1b5e20 !important;
		background: #e8f5e9;
		border: 1px solid #c8e6c9;
		border-radius: 12px;
	}
	/* Campo-isca para robôs: fora da tela, nunca visível. */
	.cmm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

	/* Aviso informativo (não é erro) embaixo do campo. */
	.cmm-curador .cmm-composer__hint.is-info { color: var(--cmm-primary-dark) !important; }

	@media (max-width: 480px) {
		.cmm-mail__row { flex-direction: column; }
		.cmm-curador .cmm-mail__send { width: 100%; }
	}


	/* ==========================================================================
	   12. VOZ E FOTO (0.9.2)
	   ========================================================================== */
	.cmm-composer.has-photo { padding-left: 8px; }
	.cmm-curador[data-state="chat"] .cmm-composer.has-photo { padding-left: 6px; }

	/* Campo grande (antes da 1ª pergunta): texto em cima, botões embaixo (como no
	   Perplexity/ChatGPT). Assim o texto de exemplo não fica espremido no celular. */
	.cmm-curador:not([data-state="chat"]) .cmm-composer.has-tools {
		flex-wrap: wrap;
		align-items: center;
		row-gap: 2px;
		padding: 10px 10px 10px 12px;
		border-radius: 24px;
	}
	.cmm-curador:not([data-state="chat"]) .cmm-composer.has-tools .cmm-composer__input {
		order: -1;
		flex: 1 1 100%;
		padding: 8px 10px 4px;
	}
	/* Foto à esquerda; microfone e enviar à direita. */
	.cmm-curador:not([data-state="chat"]) .cmm-composer.has-tools .cmm-composer__mic,
	.cmm-curador:not([data-state="chat"]) .cmm-composer.has-tools .cmm-composer__mic[hidden] + .cmm-composer__send,
	.cmm-curador:not([data-state="chat"]) .cmm-composer.has-tools:not(.has-mic) .cmm-composer__send { margin-left: auto; }
	.cmm-composer__file {
		position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
		overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0;
	}
	.cmm-curador .cmm-composer__tool {
		flex-shrink: 0;
		width: 44px;
		height: 44px;
		margin: 2px 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: #5b6b7b;
		cursor: pointer;
		transition: background-color .2s ease, color .2s ease;
	}
	.cmm-curador[data-state="chat"] .cmm-composer__tool { width: 40px; height: 40px; margin: 1px 0; }
	.cmm-curador .cmm-composer__tool[hidden] { display: none; }
	/* 1.20.1: botão "tirar foto agora". Só em tela de toque (celular e tablet): no computador o `capture` não abre câmera, então o botão não faria nada de novo. */
	.cmm-curador .cmm-composer__cam { display: none; }
	@media (pointer: coarse) {
		.cmm-curador .cmm-composer__cam { display: inline-flex; }
		.cmm-curador .cmm-composer__cam[hidden] { display: none; }
	}
	.cmm-curador .cmm-composer__tool:hover { background: var(--cmm-primary-ring); color: var(--cmm-primary-dark); }
	.cmm-curador .cmm-composer__tool:focus-visible { outline: 3px solid var(--cmm-primary); outline-offset: 2px; }
	.cmm-curador .cmm-composer__mic.is-listening { color: #fff; background: #d93025; animation: cmm-listen 1.4s ease-out infinite; }
	@keyframes cmm-listen {
		0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, .45); }
		100% { box-shadow: 0 0 0 14px rgba(217, 48, 37, 0); }
	}

	.cmm-attach { max-width: 760px; margin: 0 auto 8px; }
	.cmm-attach[hidden] { display: none; }
	.cmm-attach__item {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 8px 10px;
		background: #fff;
		border: 1px solid var(--cmm-line);
		border-radius: 16px;
	}
	.cmm-attach__img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
	.cmm-attach__text { flex: 1 1 auto; min-width: 0; font-size: .9rem; line-height: 1.4; color: var(--cmm-ink); }
	.cmm-attach__notice { display: block; margin-top: 2px; font-size: .78rem; color: #5a6877; }
	.cmm-curador .cmm-attach__remove {
		flex-shrink: 0; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
		background: #f1f3f5; color: #333; font-size: 20px; line-height: 1; cursor: pointer;
	}
	.cmm-curador .cmm-attach__remove:focus-visible { outline: 3px solid var(--cmm-primary); outline-offset: 2px; }

	.cmm-msg__photo { display: block; max-width: min(200px, 100%); max-height: 200px; border-radius: 12px; object-fit: cover; }

	/* Conversa no celular: botões um pouco menores para o texto caber. */
	@media (max-width: 480px) {
		.cmm-curador[data-state="chat"] .cmm-composer.has-tools { gap: 4px; }
		.cmm-curador[data-state="chat"] .cmm-composer__tool { width: 36px; height: 36px; margin: 3px 0; }
	}
	.cmm-msg__photo + .cmm-msg__text { display: block; margin-top: 8px; }
	.cmm-msg__photo-note { display: block; font-size: .85rem; opacity: .9; }
	.cmm-msg__photo-note + .cmm-msg__text { display: block; margin-top: 4px; }

	@media (prefers-reduced-motion: reduce) {
		.cmm-curador .cmm-composer__mic.is-listening { animation: none; }
	}
}


/* 0.9.18: campo-isca do filtro anti-robô (fora da tela; pessoas não o veem nem o alcançam pelo teclado). */
@layer curador {
	.cmm-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
}

/* ==========================================================================
   0.9.21 — Resposta rápida: botão "Ver a análise completa" logo abaixo dos produtos
   (onde o olho já está). Secundário aos botões da Amazon: contorno na cor do Curador.
   ========================================================================== */
@layer curador {
	.cmm-curador .cmm-expand {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 12px;
		margin: 6px 0 2px;
	}
	.cmm-curador .cmm-expand__btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 44px;
		padding: 10px 18px;
		cursor: pointer;
		font: inherit;
		font-size: .95rem;
		font-weight: 700;
		color: var(--cmm-primary-dark);
		background: var(--cmm-primary-soft);
		border: 1px solid var(--cmm-primary-ring);
		border-radius: 999px;
		transition: background .2s, box-shadow .2s;
	}
	.cmm-curador .cmm-expand__btn:hover { background: #fff; box-shadow: 0 4px 14px rgba(44, 62, 80, .10); }
	.cmm-curador .cmm-expand__btn:focus-visible { outline: 3px solid var(--cmm-primary-ring); outline-offset: 2px; }
	.cmm-curador .cmm-expand__note { font-size: .8rem; color: var(--cmm-muted); }
	@media (max-width: 640px) {
		.cmm-curador .cmm-expand__btn { width: 100%; }
	}
}

/* ==========================================================================
   0.9.29 — Pódio como 1ª resposta: veredito em uma frase, pódio com foto (ou ícone provisório),
   ficha recolhida num <details> (abre na hora) e link para a análise do site.
   No celular: cartões empilhados, 1º maior. No computador: pódio de verdade (2º · 1º · 3º).
   ========================================================================== */
@layer curador {
	.cmm-curador .cmm-verdict {
		background: color-mix(in srgb, var(--cmm-primary) 9%, #fff);
		border-left: 4px solid var(--cmm-primary);
		border-radius: 8px;
		padding: 11px 14px;
		margin: 0 0 4px;
		line-height: 1.5;
	}
	.cmm-curador .cmm-verdict > :first-child { margin-top: 0; }
	.cmm-curador .cmm-verdict > :last-child { margin-bottom: 0; }
	.cmm-curador .cmm-pod__notice {
		margin: 8px 0 0;
		padding: 8px 12px;
		font-size: .85rem;
		line-height: 1.45;
		background: #fff8e1;
		border-left: 4px solid #f9a825;
		border-radius: 6px;
		color: #5d4300;
	}
	.cmm-curador .cmm-pod__title { margin: 14px 0 8px; font-size: 1rem; font-weight: 800; color: #1a1a1a; }
	.cmm-curador .cmm-pod__box { container: cmm-pod / inline-size; }
	.cmm-curador .cmm-pod__grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: start; }
	.cmm-curador .cmm-pod__card {
		min-width: 0;
		padding: 12px;
		border-radius: 14px;
		border: 1px solid #d9dfe9;
		background: #f8f9fa;
	}
	.cmm-curador .cmm-pod__card--1 { background: #e8f5e9; border: 2px solid #2e7d32; box-shadow: 0 6px 20px rgba(46, 125, 50, .12); }
	.cmm-curador .cmm-pod__card--2 { background: #e3f2fd; border-color: #0056b3; }
	.cmm-curador .cmm-pod__head { display: flex; gap: 11px; align-items: flex-start; }
	.cmm-curador .cmm-pod__badge { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
	.cmm-curador .cmm-pod__num {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; border-radius: 50%;
		background: #eef2ff; color: #0056b3; font-weight: 800;
	}
	.cmm-curador .cmm-pod__id { min-width: 0; flex: 1 1 auto; }
	.cmm-curador .cmm-pod__tag { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #555; }
	.cmm-curador .cmm-pod__card--1 .cmm-pod__tag { color: #2e7d32; }
	.cmm-curador .cmm-pod__card--2 .cmm-pod__tag { color: #0056b3; }
	.cmm-curador .cmm-pod__name { display: block; margin: 2px 0 5px; font-size: 1rem; line-height: 1.3; color: #1a1a1a; overflow-wrap: anywhere; }
	.cmm-curador .cmm-pod__chips { display: flex; flex-wrap: wrap; gap: 5px; }
	.cmm-curador .cmm-pod__chip { padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #e3f0fc; color: #0056b3; white-space: nowrap; }
	.cmm-curador .cmm-pod__chip--g { background: #e5f4e8; color: #2e7d32; }
	.cmm-curador .cmm-pod__line { margin: 7px 0 0; font-size: .88rem; line-height: 1.45; color: #333; }
	.cmm-curador .cmm-pod__ok { color: #2e7d32; }
	.cmm-curador .cmm-pod__warn { color: #b00020; }
	.cmm-curador .cmm-pod__card .btn-amazon,
	.cmm-curador .cmm-pod__card .btn-amazon-sm { display: block; margin-top: 10px; text-align: center; }
	.cmm-curador .cmm-pod__more { margin-top: 8px; }
	.cmm-curador .cmm-pod__more > summary {
		cursor: pointer; list-style: none; padding: 6px 2px; min-height: 32px;
		font-size: .82rem; font-weight: 700; color: var(--cmm-primary-dark);
	}
	.cmm-curador .cmm-pod__more > summary::-webkit-details-marker { display: none; }
	.cmm-curador .cmm-pod__more > summary::before { content: "▾ "; }
	.cmm-curador .cmm-pod__more[open] > summary::before { content: "▴ "; }
	.cmm-curador .cmm-pod__more > summary:focus-visible { outline: 3px solid var(--cmm-primary-ring); outline-offset: 2px; border-radius: 6px; }
	.cmm-curador .cmm-pod__c { display: none; }
	.cmm-curador .cmm-pod__more[open] .cmm-pod__o { display: none; }
	.cmm-curador .cmm-pod__more[open] .cmm-pod__c { display: inline; }
	.cmm-curador .cmm-pod__detail { margin-top: 4px; padding: 10px; background: #fff; border: 1px dashed #b9c4d6; border-radius: 8px; font-size: .84rem; }
	.cmm-curador .cmm-pod__facts { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
	.cmm-curador .cmm-pod__facts th,
	.cmm-curador .cmm-pod__facts td { padding: 4px 0; border-bottom: 1px solid #eef1f6; text-align: left; font-weight: 400; vertical-align: top; }
	.cmm-curador .cmm-pod__facts th { width: 42%; color: var(--cmm-muted); padding-right: 8px; }
	.cmm-curador .cmm-pod__pc { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
	.cmm-curador .cmm-pod__pc h5 { margin: 0 0 3px; font-size: .8rem; }
	.cmm-curador .cmm-pod__pc ul { margin: 0; padding-left: 16px; }
	.cmm-curador .cmm-pod__site {
		display: flex; gap: 10px; align-items: center; margin: 12px 0 0; padding: 9px 10px;
		background: #f1f4fa; border-radius: 10px; text-decoration: none; color: inherit;
	}
	.cmm-curador .cmm-pod__th { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #dfe6f5; display: flex; align-items: center; justify-content: center; }
	.cmm-curador .cmm-pod__th img { width: 100%; height: 100%; object-fit: cover; display: block; }
	.cmm-curador .cmm-pod__sitetxt { min-width: 0; display: flex; flex-direction: column; font-size: .82rem; line-height: 1.35; }
	.cmm-curador .cmm-pod__sitetxt strong { color: #1a1a1a; }
	.cmm-curador .cmm-pod__sitetxt span { color: var(--cmm-primary-dark); font-weight: 700; overflow-wrap: anywhere; }
	@media (max-width: 400px) {
		.cmm-curador .cmm-pod__pc { grid-template-columns: 1fr; }
	}
	/* Pódio de verdade (2º · 1º · 3º) só quando a ÁREA do chat é larga (janela flutuante estreita fica empilhada,
	   mesmo em tela grande). A ordem no HTML continua 1º, 2º, 3º (leitor de tela). */
	@container cmm-pod (min-width: 640px) {
		.cmm-curador .cmm-tpl--podio1[data-n="3"] .cmm-pod__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr); align-items: end; }
		.cmm-curador .cmm-tpl--podio1[data-n="3"] .cmm-pod__card--2 { order: 1; }
		.cmm-curador .cmm-tpl--podio1[data-n="3"] .cmm-pod__card--1 { order: 2; }
		.cmm-curador .cmm-tpl--podio1[data-n="3"] .cmm-pod__card--3 { order: 3; }
		.cmm-curador .cmm-tpl--podio1[data-n="2"] .cmm-pod__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
		.cmm-curador .cmm-pod__head { flex-direction: column; align-items: center; text-align: center; }
		.cmm-curador .cmm-pod__chips { justify-content: center; }
	}
	@media (prefers-reduced-motion: no-preference) {
		.cmm-curador .cmm-pod__more[open] .cmm-pod__detail { animation: cmm-pod-in .18s ease-out; }
	}
	@keyframes cmm-pod-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
}

/* 1.1.0 — várias fotos por pergunta. */
@layer curador {
	.cmm-curador .cmm-attach__thumbs { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; }
	.cmm-curador .cmm-attach__thumb { position: relative; display: inline-block; }
	.cmm-curador .cmm-attach__thumb .cmm-attach__remove { position: absolute; top: -6px; right: -6px; }
	.cmm-curador .cmm-msg__photos { display: flex; flex-wrap: wrap; gap: 6px; }
	.cmm-curador .cmm-msg__photos .cmm-msg__photo { max-width: 120px; max-height: 120px; object-fit: cover; border-radius: 10px; }
}
