/* Luna: consultora de ambientes com IA.
   Identidade (18/11/2026): uma lua cheia em verde-água com rosto, e a faísca da IA ao lado, como estrela.
   O rosto muda com o momento (luna-face.js): olá, ouvindo, pensando, encontrei, ops, comemorando.
   Cores da Luna = verde-água da marca: balão em #D2F7F1, texto pequeno em #00796C (4,6:1 sobre o balão). */
:root { --luna: #00B39E; --luna-soft: #D2F7F1; --luna-ink: #00796C; --luna-line: #A6EADF; }

/* ----- atalhos ----- */
.ptabs .luna-mark { vertical-align: -5px; margin-right: 6px; color: var(--ink); }
.luna-ask { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 12px 14px; border-radius: 18px; background: var(--luna-soft); text-align: left; transition: transform .2s, background .2s; }
.luna-ask:active { transform: scale(.98); }
.luna-ask .luna-mark { flex: none; width: 30px; height: 30px; }
.luna-ask span { flex: 1; min-width: 0; }
.luna-ask b { display: block; font-size: .95rem; color: var(--ink); }
.luna-ask small { display: block; margin-top: 1px; font-size: .8rem; color: var(--luna-ink); }
.luna-ask__go { width: 20px; height: 20px; flex: none; color: var(--luna-ink); }
.luna-home { display: flex; align-items: center; gap: 14px; width: calc(100% - 36px); margin: 14px 18px 4px; padding: 14px 16px; border-radius: 22px; background: var(--ink); color: var(--plaster); text-align: left; transition: transform .2s; }
.luna-home:active { transform: scale(.98); }
.luna-home__mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: rgba(255,255,255,.07); flex: none; }
.luna-home__txt { flex: 1; min-width: 0; }
.luna-home__txt b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.08rem; }
.luna-home__txt small { display: block; margin-top: 2px; font-size: .84rem; color: rgba(246,245,241,.72); line-height: 1.35; }
.luna-home__go { width: 22px; height: 22px; color: var(--luna); flex: none; }

/* ----- tela da Luna (s-luna, sem a barra de abas embaixo) ----- */
#s-luna .sec { padding-bottom: 0; }
#s-luna .luna { min-height: calc(100dvh - 76px); padding-bottom: 0; }
#s-luna .lu-composer { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.luna { display: flex; flex-direction: column; min-height: calc(100dvh - 130px); padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.lu-thread { flex: 1; display: flex; flex-direction: column; gap: 18px; padding-bottom: 14px; }

/* tela de boas-vindas */
.lu-hello { display: grid; justify-items: center; text-align: center; padding: 4px 2px 8px; animation: enter .5s var(--ease) both; }
.lu-hello__mark { display: grid; place-items: center; width: 84px; height: 92px; border-radius: 999px 999px 26px 26px; background: var(--luna-soft); margin-bottom: 14px; }
.lu-hello__mark .luna-mark__moon { transform-origin: 13px 11.5px; animation: lu-glow 4s ease-in-out infinite; }
@keyframes lu-glow { 50% { opacity: .78; } }
.lu-hello h2 { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.025em; line-height: 1.12; color: var(--ink); max-width: 320px; text-wrap: balance; }
.lu-hello > p { margin-top: 10px; max-width: 320px; font-size: .95rem; line-height: 1.5; color: var(--muted); }
.lu-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 18px; }
.lu-off { width: 100%; margin-top: 14px; padding: 0 14px; border-radius: 14px; background: var(--luna-soft); text-align: left; }
.lu-off summary { display: flex; align-items: center; gap: 9px; min-height: 44px; list-style: none; cursor: pointer; }
.lu-off summary::-webkit-details-marker { display: none; }
.lu-off__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--luna); flex: none; }
.lu-off b { flex: 1; color: var(--ink); font-size: .88rem; font-weight: 600; }
.lu-off__more { color: var(--luna-ink); font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.lu-off[open] .lu-off__more { visibility: hidden; }
.lu-off > span { display: block; color: var(--luna-ink); font-size: .84rem; line-height: 1.45; }
.lu-off > small { display: block; color: var(--muted); font-size: .76rem; margin: 6px 0 12px; }
.lu-projs { width: 100%; margin-top: 22px; text-align: left; }
.lu-projs > small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.lu-projs__row { display: flex; gap: 8px; overflow-x: auto; margin: 8px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
.lu-proj { flex: 0 0 64px; height: 80px; border-radius: 999px 999px 14px 14px; overflow: hidden; clip-path: inset(0 round 999px 999px 14px 14px); }
.lu-proj img { width: 100%; height: 100%; object-fit: cover; }
.lu-proj:disabled { opacity: .45; }

/* chips */
.lu-chip { padding: 9px 13px; border-radius: 99px; background: var(--luna-soft); color: var(--luna-ink); font-size: .86rem; font-weight: 600; line-height: 1.3; text-align: left; transition: background .2s, transform .2s; }
.lu-chip:active { transform: scale(.97); }
.lu-chip--lg { padding: 13px 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; }
.lu-chip--lg:hover { border-color: var(--luna-line); background: var(--luna-soft); }
.lu-chip:disabled { opacity: .45; cursor: default; }
.lu-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; animation: enter .35s var(--ease) both; }

/* mensagens */
.lu-msg { animation: enter .3s var(--ease) both; }
.lu-msg--me { align-self: flex-end; max-width: 84%; display: grid; gap: 6px; justify-items: end; }
.lu-msg--me p { padding: 11px 15px; border-radius: 20px 20px 6px 20px; background: var(--ink); color: var(--plaster); font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.lu-msg__photo { width: 180px; max-width: 100%; border-radius: 16px; object-fit: cover; aspect-ratio: 4 / 3; }
.lu-msg__ph { font-size: .78rem; color: var(--muted); }
.lu-msg--luna { display: flex; gap: 10px; align-items: flex-start; }
.lu-msg__av { flex: none; margin-top: 2px; }
.lu-msg__body { flex: 1; min-width: 0; }
.lu-text { font-size: .97rem; line-height: 1.58; color: var(--text); overflow-wrap: anywhere; }
.lu-text p { margin: 0 0 10px; }
.lu-text p:last-child { margin-bottom: 0; }
.lu-text b { color: var(--ink); font-weight: 600; }
.lu-text ul, .lu-text ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 5px; }
.lu-text li::marker { color: var(--luna); }
.lu-caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--luna); animation: lu-blink 1s steps(2) infinite; }
@keyframes lu-blink { 50% { opacity: 0; } }
.lu-status { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--luna-ink); }
.lu-dots { display: inline-flex; gap: 4px; }
.lu-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--luna); animation: lu-dot 1.2s ease-in-out infinite; }
.lu-dots i:nth-child(2) { animation-delay: .15s; }
.lu-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lu-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.lu-error { margin-top: 8px; padding: 12px 14px; border-radius: 16px; background: #FBEDEA; }
.lu-error p { font-size: .9rem; color: #8A2E21; line-height: 1.4; }

/* botões pequenos */
.lu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: .8rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.lu-error .lu-btn { margin-top: 10px; }
.lu-btn--dark { background: var(--ink); border-color: var(--ink); color: var(--plaster); }

/* cards de produtos (só ofertas reais) */
.lu-products { display: flex; gap: 10px; overflow-x: auto; margin: 12px -18px 0 -36px; padding: 0 18px 4px 36px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lu-prod { flex: 0 0 236px; scroll-snap-align: start; border-radius: 20px; background: #fff; border: 1.5px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.lu-prod__img { aspect-ratio: 4 / 3; background: var(--soft); }
.lu-prod__img img { width: 100%; height: 100%; object-fit: cover; }
.lu-prod__body { padding: 10px 12px 12px; display: grid; gap: 2px; flex: 1; }
.lu-prod__body small { font-size: .74rem; font-weight: 600; color: var(--muted); }
.lu-prod__body > b { font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lu-prod__body strong { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.lu-prod__why { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--luna); font-size: .8rem; line-height: 1.4; color: var(--luna-ink); }
.lu-prod__acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* orçamento */
.lu-budget { margin-top: 12px; padding: 16px; border-radius: 22px; background: var(--plaster); border: 1.5px solid var(--line); }
.lu-budget header small { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--luna-ink); }
.lu-budget header b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.lu-budget__total { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.lu-budget__total strong { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.lu-budget__total span { font-size: .88rem; color: var(--muted); }
.lu-bar { height: 8px; margin-top: 8px; border-radius: 99px; background: var(--luna-line); overflow: hidden; }
.lu-bar i { display: block; height: 100%; border-radius: inherit; background: var(--luna); transition: width .8s var(--ease); }
.lu-bar.over i { background: #C2362F; }
.lu-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.lu-rows li { border-top: 1px solid var(--line); }
/* cada linha do orçamento é o anúncio: foto, nome, loja e preço; tocar abre a página da loja */
.lu-row { display: grid; grid-template-columns: 46px 1fr auto; grid-template-areas: "img cat val" "img desc val"; gap: 1px 12px; align-items: start; padding: 10px 0; color: inherit; text-decoration: none; border-radius: 12px; }
.lu-row:active { background: rgba(0,0,0,.03); }
.lu-rows__img { grid-area: img; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.lu-rows__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lu-rows__cat { grid-area: cat; font-size: .74rem; font-weight: 700; color: var(--luna-ink); }
.lu-rows__desc { grid-area: desc; font-size: .9rem; color: var(--ink); line-height: 1.35; min-width: 0; }
.lu-rows__desc small { display: block; font-size: .76rem; color: var(--muted); }
.lu-rows__desc a { color: var(--accent-ink); font-weight: 700; }
.lu-rows__val { grid-area: val; text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lu-rows__val em { display: block; margin-top: 3px; font-style: normal; font-size: .68rem; font-weight: 700; color: var(--muted); }
.lu-rows__val em.is-real { color: var(--accent-ink); }
.lu-save { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: #fff; }
.lu-save b { font-size: .85rem; color: var(--ink); }
.lu-save ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .85rem; line-height: 1.4; color: var(--text); }
.lu-fine { margin-top: 10px; font-size: .74rem; color: var(--muted); }

/* campo de mensagem */
.lu-composer { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 4; margin: 0 -18px; padding: 10px 18px 12px; background: linear-gradient(rgba(255,255,255,0), #fff 22%); }
.lu-ctx { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-bottom: 8px; padding: 5px 6px 5px 5px; border-radius: 14px; background: var(--luna-soft); font-size: .8rem; font-weight: 600; color: var(--luna-ink); animation: enter .3s var(--ease) both; }
.lu-ctx img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.lu-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-ctx__x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--luna-ink); flex: none; }
.lu-field { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 26px; background: #fff; border: 1.5px solid var(--line); box-shadow: 0 8px 24px -14px rgba(28,28,26,.35); transition: border-color .2s; }
.lu-field:focus-within { border-color: var(--luna); }
.lu-attach { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); cursor: pointer; flex: none; }
.lu-attach svg { width: 22px; height: 22px; }
.lu-field textarea { flex: 1; min-width: 0; padding: 10px 2px; border: 0; outline: none; resize: none; background: none; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); max-height: 132px; }
.lu-field textarea::placeholder { color: var(--muted); }
.lu-send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--plaster); flex: none; transition: transform .2s, background .2s; }
.lu-send svg { width: 20px; height: 20px; }
.lu-send:active { transform: scale(.92); }
.lu-send:disabled { background: var(--line); color: var(--muted); }
.lu-send.is-stop { background: var(--luna); color: #fff; }
.lu-composer.is-off .lu-field { opacity: .6; }
.lu-attach:focus-within, .lu-send:focus-visible, .lu-chip:focus-visible, .luna-ask:focus-visible, .luna-home:focus-visible { outline: 3px solid var(--luna); outline-offset: 2px; }

@media (max-width: 380px) { .lu-starters { grid-template-columns: 1fr; } .lu-hello h2 { font-size: 1.4rem; } }
@media (prefers-reduced-motion: reduce) {
  .lu-hello, .lu-msg, .lu-sugs, .lu-ctx { animation: none; }
  .lu-caret, .lu-dots i, .lu-hello__mark .luna-mark__moon { animation: none; }
}

/* o botão "nova conversa" guarda o lugar no cabeçalho mesmo escondido (o título fica centralizado) */
#lunaNew[hidden] { display: grid !important; visibility: hidden; }
.lu-msg.is-live, .lu-msg.is-live .lu-sugs { animation: none; }
/* telas baixas (iPhone SE): símbolo e textos menores para as sugestões aparecerem sem rolar */
@media (max-height: 700px) {
  .lu-hello__mark { width: 56px; height: 62px; margin-bottom: 8px; border-radius: 999px 999px 18px 18px; }
  .lu-hello__mark svg { width: 34px; height: 34px; }
  .lu-hello h2 { font-size: 1.25rem; }
  .lu-hello > p { margin-top: 6px; font-size: .86rem; line-height: 1.4; }
  .lu-off { margin-top: 10px; }
}

/* ================= Barra da Luna =================
   Pílula clara com o símbolo da Luna, sugestões que se escrevem e uma luz (latão → verde-água)
   que percorre a borda. Entra com um brilho que atravessa a barra. */
@property --lb-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.lbar-cap { margin: 0 4px 6px; font-size: .72rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); }
.lbar { position: relative; isolation: isolate; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 5px 5px 5px 5px; border-radius: 999px; background: #fff; text-align: left; box-shadow: 0 0 0 1px var(--line), 0 4px 14px -10px rgba(110,81,41,.35); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.lbar:active { transform: scale(.985); }
.lbar:focus-visible { outline: 3px solid var(--luna); outline-offset: 3px; }
/* luz que corre pela borda */
.lbar__ring { position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: conic-gradient(from var(--lb-a), transparent 0deg 215deg, rgba(184,146,90,.0) 220deg, var(--luna) 290deg, var(--accent-2) 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .6s; animation: lb-spin 6s linear infinite; }
.lbar.is-in .lbar__ring, .lbar.is-static .lbar__ring { opacity: .6; }
@keyframes lb-spin { to { --lb-a: 360deg; } }
/* brilho de entrada que atravessa a barra */
.lbar::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(184,146,90,.16) 44%, rgba(46,230,207,.13) 60%, transparent 80%); transform: translateX(-100%); }
.lbar.is-in::after { animation: lb-sweep 1.3s cubic-bezier(.5,0,.2,1) both; }
@keyframes lb-sweep { 0% { opacity: 1; transform: translateX(-100%); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(100%); } }
/* símbolo */
.lbar__ico { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 0; background: none; }
.lbar__ico svg { width: 24px; height: 24px; }
.lbar__ico .luna-mark__moon { transform-origin: 13px 11.5px; animation: lu-glow 4s ease-in-out infinite; }
.lbar:not(.is-static) .lbar__ico { transform: scale(.4); opacity: 0; }
.lbar.is-in .lbar__ico { animation: lb-pop .55s cubic-bezier(.3,1.5,.5,1) .45s both; }
@keyframes lb-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* texto que se escreve */
.lbar__txt { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; align-items: center; font-size: .9rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; }
.lbar__type { overflow: hidden; text-overflow: ellipsis; transition: opacity .3s, filter .3s; }
.lbar__type.is-fading { opacity: 0; filter: blur(2px); }
.lbar__caret { width: 1.5px; height: 1.1em; margin-left: 2px; border-radius: 2px; background: var(--luna); flex: none; opacity: 0; }
.lbar.is-in .lbar__caret { animation: lb-blink 1s steps(1) infinite; }
.lbar.is-typing .lbar__caret { animation: none; opacity: 1; }
@keyframes lb-blink { 50% { opacity: 1; } }
.lbar__go { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: transparent; color: var(--luna-ink); }
.lbar__go svg { width: 17px; height: 17px; }
/* onde a barra aparece */
.lbar-home { margin: 12px 18px 4px; }
.lbar-res { margin: 4px 0 14px; }
.lbar-post { margin: 4px 0 14px; }
.lbar-bud { margin-top: 14px; }
.iluna-bar { margin-top: 20px; }
@media (max-width: 360px) { .lbar__txt { font-size: .86rem; } }
@media (prefers-reduced-motion: reduce) {
  .lbar__ring, .lbar::after, .lbar.is-in .lbar__ico, .lbar__ico .luna-mark__moon, .lbar.is-in .lbar__caret { animation: none; }
  .lbar__ico { transform: none !important; opacity: 1 !important; }
}

/* ================= Tela da Luna (boas-vindas e campo) ================= */
.lu-hello { justify-items: start; text-align: left; padding: 6px 0 8px; }
.lu-hello__top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lu-hello__mark { width: 40px; height: 40px; margin: 0; border-radius: 0; background: none; }
.lu-hello__mark svg { width: 38px; height: 38px; }
.lu-hello__who b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.02rem; color: var(--ink); }
.lu-hello__who small { display: block; font-size: .8rem; color: var(--luna-ink); }
.lu-hello h2 { max-width: none; font-size: 1.6rem; }
.lu-hello > p { max-width: none; }
.lu-starters { grid-template-columns: 1fr; gap: 8px; margin-top: 20px; }
.lu-start { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; animation: enter .45s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 120ms); }
.lu-start__ico { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--luna-soft); color: var(--luna-ink); }
.lu-start__ico svg { width: 20px; height: 20px; }
.lu-start__t { flex: 1; min-width: 0; }
.lu-start__go { width: 18px; height: 18px; flex: none; color: var(--muted); }
/* campo: mesma pílula, com a luz na borda enquanto a Luna responde */
.lu-field { position: relative; isolation: isolate; border-radius: 28px; border-color: var(--luna-line); }
.lu-field > .lbar__ring { opacity: 0; transition: opacity .4s; }
.lu-composer.is-busy .lu-field > .lbar__ring { opacity: 1; }
.lu-field textarea::placeholder { transition: color .2s; }
@media (prefers-reduced-motion: reduce) { .lu-start { animation: none; } }
@media (max-height: 700px) { .lu-hello__top { margin-bottom: 10px; } .lu-hello h2 { font-size: 1.3rem; } }

/* estrela da Luna: respira devagar (sem fundo) */
.luna-mark__star { transform-origin: 12px 12px; transform-box: view-box; }
.lbar__ico .luna-mark__star, .lu-hello__mark .luna-mark__star, .lu-msg__av .luna-mark__star { animation: lu-star 4.5s ease-in-out infinite; }
@keyframes lu-star { 50% { transform: scale(.9) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .luna-mark__star { animation: none !important; } }

/* conversa começando: a Luna cumprimenta e o campo fica pronto para escrever */
.lu-msg--hi { animation: enter .4s var(--ease) both; }
.lu-msg--hi .lu-sugs { margin-top: 10px; }

.lu-off-note { margin-top: 8px; padding: 8px 11px; border-radius: 12px; background: var(--luna-soft); color: var(--luna-ink); font-size: .8rem; line-height: 1.4; }

/* ================= Rosto da Luna (luna-face.js) =================
   Movimento leve: pisca a cada 3,2 s, a faísca brilha, as bolinhas de "pensando" sobem uma de cada vez.
   No "ciclo" (boas-vindas) ela passa por todas as expressões: 1,6 s cada, troca em 0,25 s, flutua 4 px. */
.luna-face { flex: none; display: inline-block; vertical-align: middle; }
.luna-face .lf-bl, .luna-face .lf-tw, .luna-face .lf-dt, .luna-face .lf-pop { transform-box: fill-box; transform-origin: center; }
.luna-face .lf-bl { animation: lf-blink 3.2s ease-in-out infinite; }
.luna-face .lf-tw { animation: lf-tw 2.4s ease-in-out infinite alternate; }
.luna-face .lf-dt { animation: lf-dot 1.2s ease-in-out infinite; }
.luna-face .lf-dt2 { animation-delay: .2s; } .luna-face .lf-dt3 { animation-delay: .4s; }
.luna-face .lf-wv { animation: lf-wave .8s ease-in-out infinite alternate; } .luna-face .lf-wv2 { animation-delay: .4s; }
.luna-face .lf-pop { animation: lf-pop .5s ease-out both; }
.lf-ciclo .lf-fl { animation: lf-float 3.2s ease-in-out infinite; }
.lf-ciclo .lf-s { opacity: 0; animation: lf-slot 9.6s linear infinite both; animation-delay: var(--lf-o, 0s); }
.lf-ciclo .lf-s2 { animation-delay: calc(1.6s + var(--lf-o, 0s)); } .lf-ciclo .lf-s3 { animation-delay: calc(3.2s + var(--lf-o, 0s)); }
.lf-ciclo .lf-s4 { animation-delay: calc(4.8s + var(--lf-o, 0s)); } .lf-ciclo .lf-s5 { animation-delay: calc(6.4s + var(--lf-o, 0s)); }
.lf-ciclo .lf-s6 { animation-delay: calc(8s + var(--lf-o, 0s)); }
.lf-ciclo .lf-spk { animation: lf-spk 9.6s linear infinite both; animation-delay: var(--lf-o, 0s); }
.lf-ciclo .lf-pop { animation: lf-pop-cycle 9.6s ease-out infinite both; }
.lf-ciclo .lf-s4 .lf-pop { animation-delay: calc(4.8s + var(--lf-o, 0s)); } .lf-ciclo .lf-s5 .lf-pop { animation-delay: calc(6.4s + var(--lf-o, 0s)); }
@keyframes lf-blink { 0%, 88%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.12); } }
@keyframes lf-tw { from { transform: rotate(0) scale(1); } to { transform: rotate(18deg) scale(1.15); } }
@keyframes lf-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes lf-wave { from { opacity: .25; } to { opacity: 1; } }
@keyframes lf-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes lf-pop-cycle { 0% { transform: scale(.4); } 4% { transform: scale(1.2); } 7%, 100% { transform: scale(1); } }
@keyframes lf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes lf-slot { 0% { opacity: 0; } 2.6% { opacity: 1; } 16.67% { opacity: 1; } 19.3% { opacity: 0; } 100% { opacity: 0; } }
@keyframes lf-spk { 0%, 33.3% { opacity: 1; } 35.9%, 50% { opacity: 0; } 52.6%, 100% { opacity: 1; } }
/* cada rosto pisca num tempo diferente, para não piscarem todos juntos */
.lu-msg:nth-child(2n) .luna-face .lf-bl { animation-delay: -1.1s; } .lu-msg:nth-child(3n) .luna-face .lf-bl { animation-delay: -2.3s; }
/* lugares da Luna no app */
.ptabs .luna-face { vertical-align: -6px; margin-right: 6px; }
.lu-hello__mark { width: 56px; height: 56px; }
.lu-hello__mark .luna-face { width: 56px; height: 56px; }
.lu-msg__av.luna-face { margin-top: 0; }
.lbar__ico .luna-face { width: 32px; height: 32px; }
@media (prefers-reduced-motion: reduce) {
  .luna-face *, .lf-ciclo .lf-fl { animation: none !important; }
  .lf-ciclo .lf-s { opacity: 0; } .lf-ciclo .lf-s1 { opacity: 1; }
}

/* tela Criando quando a Luna gera (pedido direto na conversa): a Luna ocupa a tela, fundo branco e só uma aura verde-água em volta dela */
.gen.gen--luna { background: #FFFFFF; padding: max(16px, env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); }
.gen--luna .gen__media, .gen--luna .gen__txt { display: none; }
.gen__luna { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.gen__lface { position: relative; width: min(86vw, 52vh, 420px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 18px; }
.gen__lface::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(46,230,207,.45) 0%, rgba(210,247,241,.85) 42%, rgba(210,247,241,0) 70%); animation: lf-aura 3.2s ease-in-out infinite; }
.gen__lface .luna-face { position: relative; }
@keyframes lf-aura { 0%, 100% { transform: scale(.94); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gen__lface::before { animation: none; } }
.gen__lface .luna-face { width: 74%; height: 74%; }
.gen__luna h2 { margin: 0; font: 800 clamp(1.7rem, 7vw, 2.3rem)/1.12 Urbanist, system-ui, sans-serif; letter-spacing: -.02em; color: #1C1C1A; }
.gen__luna p { margin: 0; color: #1C1C1A; font-size: 1.05rem; }
.gen__lbar { width: min(70vw, 320px); height: 8px; border-radius: 999px; background: #ECEAE3; margin-top: 14px; overflow: hidden; }
.gen__lbar i { display: block; height: 100%; width: 6%; border-radius: inherit; background: var(--luna); transition: width .4s; }
.gen__luna small { color: #00796C; font-weight: 700; min-height: 1.2em; }
.gen__luna .btn-black { margin-top: 12px; }
.gen__luna .btn-soft { margin-top: auto; width: 100%; }

/* ================= Conversa por áudio (18/11/2026) =================
   Botão de microfone no campo e na tela inicial; a conversa abre em tela cheia, branca, com o rosto da Luna
   grande e a aura verde-água. As ondas mudam com o momento: ouvindo, pensando, falando. */
.lu-mic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: var(--luna-ink); background: var(--luna-soft); transition: transform .2s; }
.lu-mic svg { width: 20px; height: 20px; }
.lu-mic:active { transform: scale(.92); }
.lu-mic:disabled { opacity: .45; }
.lu-mic:focus-visible, .lu-voice:focus-visible, .lv button:focus-visible { outline: 3px solid var(--luna); outline-offset: 2px; }
.lu-voice { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 12px 16px 12px 12px; border-radius: 18px; background: var(--ink); color: #fff; text-align: left; transition: transform .2s; }
.lu-voice:active { transform: scale(.98); }
.lu-voice__ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--luna); color: #fff; animation: lv-breathe 2.8s ease-in-out infinite; }
.lu-voice__ico svg { width: 22px; height: 22px; }
.lu-voice b { display: block; font-size: 1rem; }
.lu-voice small { display: block; margin-top: 1px; font-size: .8rem; color: #BEBBB2; }
.lu-voice + .lu-starters { margin-top: 10px; }
.lu-chip--voice { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; }
@keyframes lv-breathe { 50% { box-shadow: 0 0 0 7px rgba(0,179,158,.22); } }

.lv { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto auto auto; justify-items: center; gap: 10px;
  padding: max(18px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom)); background: #fff; color: var(--ink); text-align: center;
  opacity: 0; transform: translateY(14px); transition: opacity .22s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.lv.is-in { opacity: 1; transform: none; }
.lv__x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #F1F0EC; color: var(--ink); }
.lv__x svg { width: 20px; height: 20px; }
.lv__top { padding-top: 10px; }
.lv__top b { display: block; font: 800 1.15rem/1.2 var(--display, inherit); }
.lv__top small { color: var(--luna-ink); font-size: .82rem; font-weight: 600; }
.lv__stage { position: relative; align-self: center; display: grid; place-items: center; width: 260px; height: 260px; border-radius: 50%; background: none; }
.lv__stage::before { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(46,230,207,.5), rgba(46,230,207,.16) 55%, transparent); animation: lv-aura 3.4s ease-in-out infinite; }
.lv__face { position: relative; z-index: 1; width: 168px; height: 168px; transition: transform .3s; }
.lv__face svg { width: 168px; height: 168px; display: block; }
.lv__wave { position: absolute; inset: 22%; border-radius: 50%; border: 2px solid rgba(0,179,158,.45); opacity: 0; }
.lv[data-state="ouvindo"] .lv__wave { animation: lv-wave 1.8s ease-out infinite; }
.lv[data-state="ouvindo"] .lv__wave--2 { animation-delay: .9s; }
.lv[data-state="falando"] .lv__face { animation: lv-talk .42s ease-in-out infinite alternate; }
.lv[data-state="falando"] .lv__stage::before { animation-duration: 1.2s; }
.lv[data-state="pensando"] .lv__stage::before { animation-duration: 1.6s; }
.lv[data-state="pausa"] .lv__stage::before, .lv[data-state="erro"] .lv__stage::before { opacity: .45; animation: none; }
@keyframes lv-aura { 50% { transform: scale(.92); opacity: .7; } }
@keyframes lv-wave { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@keyframes lv-talk { from { transform: scale(1); } to { transform: scale(1.045) translateY(-2px); } }
.lv__state { margin: 0; font: 700 1.2rem/1.3 var(--display, inherit); min-height: 1.3em; max-width: 30ch; }
.lv[data-state="erro"] .lv__state { font-size: 1rem; color: var(--ink); }
.lv__said { margin: 0; max-width: 34ch; max-height: 7.4em; overflow-y: auto; color: #6E6B64; font-size: .98rem; line-height: 1.48; min-height: 1.5em; }
.lv__bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.lv__mic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: #fff; transition: transform .2s, background .2s; }
.lv__mic svg { width: 30px; height: 30px; }
.lv__mic:active { transform: scale(.93); }
.lv__mic:disabled { background: #D9D7D0; color: #8D8A82; }
.lv[data-state="ouvindo"] .lv__mic { background: var(--luna); box-shadow: 0 0 0 8px rgba(0,179,158,.18); }
.lv__end { min-height: 48px; padding: 0 22px; border-radius: 999px; background: #F1F0EC; color: var(--ink); font-weight: 700; }
@media (max-height: 640px) { .lv__stage { width: 210px; height: 210px; } .lv__face, .lv__face svg { width: 132px; height: 132px; } .lv__mic { width: 62px; height: 62px; } }
@media (prefers-reduced-motion: reduce) { .lv, .lv__stage::before, .lv__wave, .lv__face, .lu-voice__ico { animation: none !important; transition: none !important; } .lv { opacity: 1; transform: none; } }

/* ================= Minhas Conversas (Perfil) ================= */
.cv-intro { margin: 0 0 12px; }
.cv-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-bottom: 14px; border-radius: 16px; background: var(--luna-soft); color: var(--luna-ink); font-weight: 700; }
.cv-new svg { width: 18px; height: 18px; }
.cv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cv { position: relative; display: flex; align-items: stretch; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cv__open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 6px 14px 14px; text-align: left; background: none; }
.cv__open:active { background: var(--plaster, #F6F5F1); }
.cv__av { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--luna-soft); }
.cv__av svg { width: 40px; height: 40px; }
.cv__body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cv__top { display: flex; align-items: baseline; gap: 8px; }
.cv__top b { flex: 1; min-width: 0; font-size: .97rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__top small { flex: none; font-size: .76rem; color: var(--muted, #75736C); }
.cv__last { font-size: .86rem; line-height: 1.4; color: var(--ink-2, #4A4944); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: .74rem; color: var(--muted, #75736C); }
.cv__meta i { font-style: normal; padding: 2px 8px; border-radius: 99px; background: var(--luna-soft); color: var(--luna-ink); font-weight: 600; }
.cv__del { flex: none; display: grid; place-items: center; width: 44px; color: var(--muted, #75736C); background: none; }
.cv__del svg { width: 19px; height: 19px; }
.cv__ask { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 12px; background: rgba(255,255,255,.96); font-weight: 700; font-size: .9rem; }
.cv__ask > span { margin-right: auto; padding-left: 4px; }
.cv__yes, .cv__no { min-height: 40px; padding: 0 16px; border-radius: 99px; font-weight: 700; }
.cv__yes { background: var(--ink); color: #fff; }
.cv__no { background: #F1F0EC; color: var(--ink); }
.cv__open:focus-visible, .cv__del:focus-visible, .cv-new:focus-visible, .cv__yes:focus-visible, .cv__no:focus-visible { outline: 3px solid var(--luna); outline-offset: -3px; }
.cv-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 10px 10px; text-align: center; }
.cv-empty svg { width: 72px; height: 72px; margin-bottom: 6px; }
.cv-empty b { font-family: var(--display); font-size: 1.12rem; }
.cv-empty span { max-width: 32ch; color: var(--muted, #75736C); font-size: .9rem; line-height: 1.45; }
.cv-empty .btn-black { margin-top: 10px; }
