/* ===== Cantinho da SonIA — identidade meia-luz ===== */
[hidden] { display: none !important; }
:root {
  --noite: #160E1C;
  --noite-2: #21142E;
  --card: #2C1B3E;
  --card-2: #3A2454;
  --roxo: #4B2673;
  --lavanda: #C8A4F4;
  --lavanda-clara: #E4D4FA;
  --texto: #F6EFF9;
  --apoio: #BBA6D3;
  --dourado: #D9B15D;
  --creme: #F6EFE9;
  --raio: 18px;
  font-size: 17px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--noite); color: var(--texto); }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% -10%, #3a1d5c 0%, #22123a 40%, var(--noite) 75%) fixed;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; }
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }

/* ---------- topo ---------- */
.topo { display: flex; align-items: center; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 0 6px; }
.topo img { width: 34px; height: 34px; }
.topo .ola { flex: 1; font-size: .82rem; color: var(--apoio); }
.topo .ola b { display: block; color: var(--texto); font-weight: 500; font-size: 1rem; }
.icone-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--lavanda); background: rgba(255,255,255,.04); }
.icone-btn svg { width: 22px; height: 22px; }

/* ---------- títulos ---------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.55rem; line-height: 1.2; }
h2 { font-size: 1.2rem; line-height: 1.3; }
h3 { font-size: 1rem; }
em { font-style: italic; color: var(--lavanda); }
.fio { width: 56px; height: 3px; border-radius: 3px; background: var(--lavanda); margin: 12px 0 4px; opacity: .8; }
.apoio { color: var(--apoio); font-size: .88rem; }
.mini { font-size: .76rem; color: var(--apoio); letter-spacing: .04em; text-transform: uppercase; }
.secao { margin: 26px 0 10px; }

/* ---------- cartões ---------- */
.card { background: var(--card); border-radius: var(--raio); padding: 18px; margin-top: 14px; }
.card.destaque { background: linear-gradient(160deg, #4B2673 0%, #2f1a48 100%); }
.card.suave { background: rgba(255,255,255,.04); border: 1px solid rgba(200,164,244,.15); }
.card.creme { background: var(--creme); color: var(--roxo); }
.card.creme .apoio { color: #7a6390; }
.card p { margin: 8px 0 0; }
@keyframes sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.barra { height: 6px; background: var(--card-2); border-radius: 9px; overflow: hidden; margin: 12px 0 6px; }
.barra i { display: block; height: 100%; background: var(--dourado); border-radius: 9px; transition: width .8s ease; }

/* ---------- botões ---------- */
.btn { display: block; width: 100%; text-align: center; padding: 14px 16px; border-radius: 999px; background: var(--dourado); color: #2A1640; font-weight: 500; margin-top: 14px; }
.btn.secundario { background: transparent; color: var(--texto); border: 1px solid rgba(200,164,244,.35); }
.btn.texto { background: none; color: var(--apoio); padding: 10px; margin-top: 4px; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.btn:active { transform: scale(.98); }
.linha-btns { display: flex; gap: 10px; }
.linha-btns .btn { flex: 1; }
.opcoes { display: grid; gap: 8px; margin-top: 12px; }
.opcoes.tres { grid-template-columns: repeat(3, 1fr); }
.opcao { padding: 12px 10px; border-radius: 14px; background: var(--card-2); text-align: center; font-size: .9rem; }
.opcao.marcada { background: var(--dourado); color: #2A1640; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { padding: 8px 13px; border-radius: 999px; background: var(--card-2); font-size: .85rem; }
.chip.marcada { background: var(--dourado); color: #2A1640; }

/* ---------- áudio ---------- */
.audio { display: flex; align-items: center; gap: 14px; }
.play { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--creme); color: var(--roxo); display: grid; place-items: center; }
.play svg { width: 22px; height: 22px; }
.audio .info { flex: 1; min-width: 0; }
.audio .info b { display: block; font-weight: 500; }
/* áudio no jeito do WhatsApp: risquinhos com bolinha (dá para tocar e pular), tempo pequeno,
   foto da SonIA à direita, que vira o botão de velocidade depois do play */
.onda { position: relative; height: 26px; margin-top: 6px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.onda s { flex: 1; min-width: 2px; max-width: 3px; border-radius: 2px; background: rgba(200,164,244,.32); }
.onda s.on { background: var(--lavanda); }
.onda b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--lavanda); }
.onda { justify-content: space-between; }
.tempo { min-height: 18px; font-size: .72rem; color: var(--apoio); font-variant-numeric: tabular-nums; }
.vel { flex-shrink: 0; width: 52px; height: 34px; font: inherit; font-size: .85rem; font-weight: 600; border: 0; border-radius: 999px; background: var(--card-2); color: var(--texto); cursor: pointer; }
.foto-sonia { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.foto-sonia img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.foto-sonia i { position: absolute; left: -6px; bottom: -2px; width: 22px; height: 22px; color: var(--lavanda); display: grid; place-items: center; }
.foto-sonia i svg { width: 20px; height: 20px; stroke-width: 2.2; }
.lista .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(200,164,244,.12); }
.lista .item:first-child { border-top: 0; }
.lista .item .info { flex: 1; }
.lista .item .info b { font-weight: 500; display: block; font-size: .95rem; }
.lista .play { width: 40px; height: 40px; }
.lista .play svg { width: 18px; height: 18px; }
.bloqueado { opacity: .45; }
.check { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--lavanda); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.check.ok { background: var(--dourado); border-color: var(--dourado); color: #2A1640; }
.check svg { width: 16px; height: 16px; }

/* ---------- navegação ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: rgba(22,14,28,.92); backdrop-filter: blur(10px); border-top: 1px solid rgba(200,164,244,.12); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.nav div { display: flex; max-width: 480px; width: 100%; }
.nav button { flex: 1; padding: 10px 0 12px; color: var(--apoio); font-size: .74rem; display: grid; justify-items: center; gap: 3px; }
.nav button svg { width: 24px; height: 24px; }
.nav button.ativo { color: var(--dourado); }

/* ---------- folhas (telas por cima) ---------- */
.folha-fundo { position: fixed; inset: 0; background: rgba(10,6,14,.7); z-index: 10; display: flex; align-items: flex-end; justify-content: center; animation: aparece .25s ease; }
.folha { background: var(--noite-2); width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); animation: sobeFolha .35s ease; }
.folha.cheia { height: 100dvh; max-height: 100dvh; border-radius: 0; display: flex; flex-direction: column; }
.folha .fechar { float: right; margin: -6px -6px 0 0; }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobeFolha { from { transform: translateY(40px); opacity: .4; } }

/* ---------- conversa (depoimento) ---------- */
.conversa { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.bolha { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: .95rem; animation: sobe .4s ease both; white-space: pre-wrap; }
.bolha.sonia { background: var(--roxo); border-bottom-left-radius: 5px; align-self: flex-start; }
.bolha.mae { background: var(--creme); color: #3b2a52; border-bottom-right-radius: 5px; align-self: flex-end; }
.responder { display: flex; gap: 8px; align-items: flex-end; padding-top: 8px; border-top: 1px solid rgba(200,164,244,.12); }
.responder textarea { flex: 1; min-height: 48px; max-height: 140px; resize: none; border-radius: 16px; border: 1px solid rgba(200,164,244,.25); background: var(--card); color: var(--texto); padding: 12px 14px; }
.circulo { width: 48px; height: 48px; border-radius: 50%; background: var(--dourado); color: #2A1640; display: grid; place-items: center; flex-shrink: 0; }
.circulo.mic { background: var(--card-2); color: var(--lavanda); }
.circulo.gravando { background: #c0506a; color: #fff; animation: pulsa 1.2s infinite; }
.circulo svg { width: 22px; height: 22px; }
@keyframes pulsa { 50% { transform: scale(1.08); } }

/* ---------- formulários ---------- */
.campo { display: block; margin-top: 14px; }
.campo span { display: block; font-size: .85rem; color: var(--apoio); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 14px; border-radius: 14px; border: 1px solid rgba(200,164,244,.25); background: var(--card); color: var(--texto); }
.campo textarea { min-height: 140px; resize: vertical; }
.erro { color: #f2a2b5; font-size: .85rem; margin-top: 8px; }

/* ---------- boas-vindas ---------- */
.capa { margin: 0 -16px; height: 46dvh; background: center 20% / cover no-repeat; position: relative; }
.capa::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,14,28,.1) 30%, var(--noite) 98%); }
.capa img { position: absolute; z-index: 1; left: 16px; top: calc(16px + env(safe-area-inset-top)); width: 44px; }

/* ---------- jornada ---------- */
.ceu { position: relative; margin-top: 10px; }
.ceu svg { width: 100%; height: auto; display: block; }
.estrela-txt { fill: var(--apoio); font-size: 11px; font-family: inherit; }
.estrela-txt.ok { fill: var(--texto); }
.comparar { display: flex; align-items: flex-end; gap: 14px; margin-top: 14px; }
.comparar .col { flex: 1; text-align: center; font-size: .82rem; color: var(--apoio); }
.comparar .col b { display: block; color: var(--texto); font-size: 1.15rem; font-weight: 500; }
.comparar .bar { border-radius: 8px; margin: 0 auto 6px; width: 46px; background: var(--card-2); }
.comparar .bar.agora { background: var(--dourado); }

/* ---------- cards para quem cuida ---------- */
.deck { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pedido-card { padding: 0; border: 0; background: none; border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.28); transition: transform .15s; }
.pedido-card:active { transform: scale(.97); }
.pedido-card img { display: block; width: 100%; aspect-ratio: 4/5; }
.carta { background: var(--roxo); border-radius: var(--raio); padding: 18px; display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; }
.carta > .btn { grid-column: 1 / -1; margin-top: 0; }
.carta-img { width: 104px; aspect-ratio: 4/5; border-radius: 10px; display: block; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.carta p { margin: 6px 0 0; }
.carta p { color: var(--lavanda-clara); font-size: .92rem; }

/* ---------- soltar (esvaziar a cabeça) ---------- */
.soltando { animation: solta 1.6s ease forwards; }
@keyframes solta { to { transform: translateY(-120px) scale(.9); opacity: 0; filter: blur(4px); } }

/* ---------- aviso e modo teste ---------- */
.aviso { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--creme); color: var(--roxo); padding: 12px 18px; border-radius: 999px; font-size: .9rem; z-index: 20; animation: sobe .3s ease; max-width: 90vw; text-align: center; }
.teste { position: fixed; bottom: calc(78px + env(safe-area-inset-bottom)); left: 8px; z-index: 30; background: #000c; border: 1px dashed var(--dourado); color: var(--dourado); border-radius: 12px; padding: 6px 8px; font-size: .72rem; display: flex; gap: 6px; align-items: center; }
.teste button { background: var(--dourado); color: #000; border-radius: 6px; padding: 3px 7px; font-size: .72rem; }
.vazio { text-align: center; padding: 30px 10px; color: var(--apoio); }
.dica-ruido { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(200,164,244,.12); }
.dica-ruido p { margin: 4px 0; font-size: .85rem; color: var(--apoio); }
.dica-ruido b { color: var(--texto); font-weight: 500; }

/* entrada fora do Chrome (Android) */
.dica-chrome { margin: 14px 0 6px; padding: 14px; border-radius: 16px; background: rgba(200,164,244,.08); border: 1px solid rgba(200,164,244,.18); }
.dica-chrome p { margin: 0 0 10px; font-size: .9rem; color: var(--apoio); }
.dica-chrome b { color: var(--texto); font-weight: 500; }

/* leitura do audiobook */
.folha.cheia .fechar { align-self: flex-end; flex: none; }
.leitura { flex: none; padding: 0 4px 8px; }
.leitura .mini { margin-bottom: 14px; }
.leitura div.mini + div.mini { margin-top: 0; }
.leitura h2 { font-weight: 500; font-size: 1.45rem; line-height: 1.25; margin: 4px 0 14px; }
.leitura h3 { font-weight: 500; font-size: 1.12rem; color: var(--lavanda); margin: 26px 0 6px; }
.leitura p { font-size: 1.06rem; line-height: 1.7; margin: 0 0 14px; color: var(--texto); }
.leitura b { font-weight: 600; color: var(--lavanda-clara); }
.folha.cheia > .btn { flex: none; }

/* colocar na tela inicial */
.passo-instalar { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.passo-instalar span { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--roxo); color: var(--lavanda-clara); display: grid; place-items: center; font-size: .85rem; }
.passo-instalar p { margin: 3px 0 0; }
.passo-instalar b { font-weight: 600; color: var(--lavanda-clara); }
.ic-inline { width: 18px; height: 18px; vertical-align: -3px; color: var(--lavanda); }
