/* Raio-X da Embalagem — identidade Black Vitalícia: preto, amarelo e verde. */
:root {
  --fundo: #0b0b0a;
  --fundo-2: #151412;
  --card: #1b1916;
  --borda: #2e2a24;
  --texto: #f4f1ea;
  --texto-2: #b9b3a7;
  --texto-3: #8a857b;
  --amarelo: #f5c518;
  --verde: #3ddc84;
  --verde-escuro: #1f3d2c;
  --vermelho: #ff6b6b;
  --laranja: #ff9f43;
  --verde-ok: #4ade80;
  --ciano: #38bdf8;
  --raio: 18px;
  --fonte: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); color: var(--texto); }
body { font-family: var(--fonte); font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }

/* ---------- Tela 1: entrada ---------- */
.entrada {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: 28px 22px 32px; text-align: center;
  background: radial-gradient(60% 40% at 50% 38%, rgba(245, 197, 24, .13), transparent 70%), var(--fundo);
}
.selo-black { display: flex; align-items: center; gap: 10px; text-align: left; }
.selo-black .infinito { color: var(--amarelo); font-size: 34px; font-weight: 800; line-height: 1; }
.selo-black strong { display: block; color: var(--amarelo); font-size: 18px; letter-spacing: .02em; font-weight: 800; }
.selo-black small { display: block; color: var(--texto-2); font-size: 10.5px; letter-spacing: .14em; font-weight: 700; }
.logo-caixa {
  margin: 30px 0 22px; width: min(62vw, 250px); aspect-ratio: 1; border-radius: 28px;
  border: 3px solid var(--amarelo); background: #050505; overflow: hidden;
  box-shadow: 0 0 46px rgba(245, 197, 24, .35);
}
.logo-caixa img { width: 100%; height: 100%; display: block; }
.entrada h1 { margin: 0; font-size: clamp(34px, 10vw, 48px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; }
.entrada h1 em { font-style: normal; color: var(--amarelo); }
.entrada .sub { margin: 14px auto 26px; max-width: 340px; color: var(--texto-2); font-size: 17px; font-weight: 600; }
.form-entrar { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.form-entrar label { font-size: 13px; color: var(--texto-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.form-entrar input {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--borda);
  background: var(--fundo-2); color: var(--texto); font: inherit; font-size: 17px; outline: none;
}
.form-entrar input:focus { border-color: var(--amarelo); }
.form-entrar button {
  margin-top: 4px; padding: 15px; border: 0; border-radius: 14px; background: var(--amarelo);
  color: #111; font-weight: 800; font-size: 17px; letter-spacing: .01em;
}
.form-entrar button:disabled { opacity: .6; }
.btn-comecar {
  width: 100%; max-width: 360px; padding: 17px; border: 0; border-radius: 16px; background: var(--amarelo);
  color: #111; font-weight: 800; font-size: 19px; letter-spacing: .01em;
  box-shadow: 0 8px 28px rgba(245, 197, 24, .28);
}
.btn-comecar:active { transform: translateY(1px); }
.btn-comecar:disabled { opacity: .5; box-shadow: none; }
.aviso-entrada { margin: 14px auto 0; max-width: 340px; color: var(--amarelo); font-weight: 700; }
.erro { margin: 4px 0 0; color: var(--vermelho); font-size: 15px; font-weight: 600; }
.rodape-entrada { margin-top: auto; padding-top: 26px; color: var(--texto-3); font-size: 13px; }

/* ---------- Tela 2: conversa ---------- */
.chat { height: 100dvh; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.topo {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--fundo-2); border-bottom: 1px solid var(--borda);
}
.avatar { width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid var(--amarelo); background: #000; }
.titulo { flex: 1; min-width: 0; }
.titulo h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.status { margin: 1px 0 0; color: var(--verde); font-size: 14px; font-weight: 700; }
.ponto-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--verde); margin-right: 6px; vertical-align: 1px; }
.selo-ia { background: var(--amarelo); color: #111; font-weight: 800; font-size: 14px; padding: 6px 10px; border-radius: 8px; letter-spacing: .06em; }
.barra-contador {
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 0;
  background: #100f0d; border-bottom: 1px solid var(--borda);
}
.contador {
  flex: 1; min-width: 0; padding: 7px 16px; font-size: 13px; color: var(--texto-2); font-weight: 600;
}
.btn-novo {
  flex: none; padding: 5px 11px; border-radius: 999px; border: 1.5px solid var(--amarelo);
  background: transparent; color: var(--amarelo); font-size: 13px; font-weight: 700;
}
.btn-novo:disabled { opacity: .35; cursor: default; }
.historico { display: contents; }
.separador { align-self: center; display: flex; align-items: center; gap: 10px; width: 100%; color: var(--texto-3); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borda); }
.separador span { max-width: 75%; text-align: center; }
.foto-antiga { display: inline-block; font-size: 12.5px; color: #9fbfab; font-weight: 600; margin-bottom: 4px; }
.contador b { color: var(--amarelo); }
.mensagens { flex: 1; overflow-y: auto; padding: 18px 14px 10px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; border-radius: var(--raio); padding: 12px 14px; font-weight: 600; word-wrap: break-word; }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin-bottom: 0; }
.msg.usuario { align-self: flex-end; background: var(--verde-escuro); color: #f1f7f2; }
.msg.usuario img { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.msg.ia { align-self: flex-start; background: var(--card); border: 1px solid var(--borda); }
.msg .hora { display: block; text-align: right; font-size: 12px; color: var(--texto-3); margin-top: 6px; font-weight: 600; }
.msg.usuario .hora { color: #9fbfab; }
.dica { color: var(--texto-2); font-weight: 500; font-size: 15px; }
.aviso-demo {
  font-size: 12.5px; color: #111; background: var(--amarelo); border-radius: 8px;
  padding: 4px 8px; display: inline-block; margin-bottom: 8px; font-weight: 700;
}
.secao { margin-top: 12px; }
.secao h3 {
  margin: 0 0 6px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.secao h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.secao.faltando h3 { color: var(--vermelho); }
.secao.errado h3 { color: var(--laranja); }
.secao.polui_frente h3 { color: var(--amarelo); }
.secao.bom h3 { color: var(--verde-ok); }
.secao.melhorar h3 { color: var(--ciano); }
.secao ul { list-style: none; margin: 0; padding: 0; }
.secao li { position: relative; padding-left: 18px; margin: 5px 0; }
.secao li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 6px; height: 6px; background: var(--texto-3); border-radius: 1px; }
.secao li .porque { display: block; color: var(--texto-2); font-weight: 500; font-size: 14.5px; margin-top: 1px; }
.digitando { color: var(--texto-2); font-weight: 600; }
.digitando .pontos::after { content: "…"; animation: pisca 1.2s infinite; }
@keyframes pisca { 50% { opacity: .2; } }
.msg.erro-ia { border-color: rgba(255, 107, 107, .4); }

.previa { position: relative; margin: 0 14px 8px; align-self: flex-start; }
.previa img { max-height: 110px; border-radius: 12px; border: 2px solid var(--verde); display: block; }
.previa-tirar {
  position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--texto); color: #111; font-weight: 800; line-height: 1;
}
.compositor {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--fundo); border-top: 1px solid var(--borda);
}
.compositor input[type=text] {
  flex: 1; min-width: 0; padding: 13px 16px; border-radius: 999px; border: 1.5px solid var(--borda);
  background: var(--fundo-2); color: var(--texto); font: inherit; font-size: 16px; outline: none;
}
.compositor input[type=text]:focus { border-color: var(--amarelo); }
.btn-icone, .btn-enviar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--borda);
  background: var(--fundo-2); color: var(--amarelo); display: grid; place-items: center; padding: 0;
}
.btn-icone svg, .btn-enviar svg { width: 22px; height: 22px; }
.btn-enviar { background: var(--amarelo); color: #111; border-color: var(--amarelo); }
.btn-enviar:disabled, .btn-icone:disabled { opacity: .45; }
