:root {
  --creme: #fdf6ec; --papel: #ffffff; --texto: #1c1210; --suave: #5f4b45; --borda: #ecdcc8;
  --verm: #c8102e; --verm-esc: #8e0b20; --ouro: #f2b705; --ouro-cl: #ffd95a; --noite: #160b0a; --verde: #1f8a3b;
  --serif: 'Playfair Display', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--creme); }
body { color: var(--texto); font: 17.5px/1.55 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--verm); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
.m { color: var(--suave); font-size: 15.5px; }
.erro { color: #b3261e; font-weight: 700; font-size: 15px; min-height: 20px; margin: 6px 0; }

.tela { display: none; min-height: 100vh; min-height: 100dvh; }
.tela.on { display: block; }
.centro { min-height: 100vh; display: grid; place-items: center; }
.giro { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--borda); border-top-color: var(--verm); animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.btn { display: block; width: 100%; border: 0; border-radius: 14px; background: var(--verm); color: #fff; font-weight: 800; font-size: 18px; padding: 16px; cursor: pointer; text-align: center; text-decoration: none; box-shadow: 0 5px 0 var(--verm-esc); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--verm-esc); }
.btn:disabled { opacity: .6; }
.btn2 { background: #fff; color: var(--verm); border: 2px solid var(--verm); box-shadow: none; }
.btn.ouro { background: var(--ouro); color: var(--noite); box-shadow: 0 5px 0 #946519; }
.link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--verm); font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 16px; }
.link:disabled { color: var(--suave); text-decoration: none; }
.campo { display: block; width: 100%; padding: 15px 14px; border: 2px solid var(--borda); border-radius: 12px; background: #fff; font-size: 18px; }
.campo:focus { outline: none; border-color: var(--verm); }
.campo.codigo { text-align: center; letter-spacing: 10px; font-size: 26px; font-weight: 800; }

/* entrar */
.entrar { max-width: 420px; margin: 0 auto; padding: 50px 20px; text-align: center; }
.entrar .selo { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 50%; box-shadow: 0 0 0 3px var(--ouro); }
.entrar h1 { font-size: 28px; margin-bottom: 6px; }
.entrar form { margin-top: 20px; text-align: left; }
.entrar .pe { margin-top: 26px; }
.aviso { background: #fff3d6; border-radius: 10px; padding: 10px; margin-top: 12px; font-size: 15px; }

/* topo e abas */
.topo { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--noite); color: #fbeedd; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.topo b { font-family: var(--serif); font-size: 18px; display: block; }
.topo small { color: var(--ouro-cl); font-size: 13.5px; }
.pill { border: 1px solid rgba(243,217,164,.4); background: rgba(255,255,255,.06); color: var(--ouro-cl); border-radius: 99px; padding: 7px 12px; font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.aba { display: none; } .aba.on { display: block; }
.abas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--papel); border-top: 1px solid var(--borda); padding-bottom: env(safe-area-inset-bottom); }
.abas button { border: 0; background: none; padding: 8px 4px 9px; font-size: 12.5px; font-weight: 800; color: var(--suave); cursor: pointer; }
.abas button .ic { display: block; margin: 0 auto 2px; width: 24px; height: 24px; }
.abas button.on { color: var(--verm); }

/* blocos */
.tit { font-size: 25px; margin: 6px 0 6px; }
.cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 18px; padding: 18px 16px; margin-bottom: 14px; }
.cartao h3 { font-size: 20px; margin-bottom: 8px; }
.cartao p + p { margin-top: 10px; }
.rotulo { font-size: 12.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--suave); margin-bottom: 4px; }
.abertura { background: var(--noite); color: #fbeedd; border-radius: 18px; padding: 20px 16px; margin-bottom: 14px; }
.abertura h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.abertura p { color: #ecd9c2; }
.carga { display: inline-block; background: var(--verm); color: #fff; border-radius: 8px; padding: 3px 10px; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.lista { list-style: none; display: grid; gap: 8px; }
.lista li { display: flex; gap: 10px; align-items: flex-start; }
.lista li::before { content: '•'; color: var(--verm); font-weight: 900; }
.check { list-style: none; display: grid; gap: 6px; }
.check label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--borda); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--verde); margin-top: 2px; }
.check label:has(input:checked) { color: var(--suave); text-decoration: line-through; }
.passos { list-style: none; display: grid; gap: 10px; counter-reset: p; }
.passos li { position: relative; padding-left: 40px; }
.passos li::before { counter-increment: p; content: counter(p); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--verm); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.dias button { aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--borda); background: #fff; font-weight: 800; cursor: pointer; font-size: 15px; }
.dias button.on { background: var(--verde); border-color: var(--verde); color: #fff; }
.reza { white-space: pre-line; font-family: var(--serif); font-size: 18.5px; line-height: 1.6; background: #fff7e8; border-left: 4px solid var(--ouro); border-radius: 10px; padding: 14px; }
.ouvir { margin-top: 12px; }
.recado { font-style: italic; }
.assina { font-style: normal; font-weight: 800; display: block; margin-top: 8px; color: var(--verm-esc); }
.orixa { display: flex; gap: 14px; align-items: center; }
.orixa .ic { flex: none; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px var(--ouro); }
.orixa b { font-family: var(--serif); font-size: 22px; display: block; }

/* oferta dentro do app */
.oferta { border: 2.5px solid var(--ouro); background: #fff7e8; }
.oferta .preco { font-family: var(--serif); font-size: 26px; color: var(--verm); font-weight: 700; margin: 8px 0 12px; }
.oferta .preco small { font-family: system-ui, sans-serif; font-size: 14px; color: var(--suave); font-weight: 500; }
.tem { color: var(--verde); font-weight: 800; font-size: 15px; }
.nomes { display: grid; gap: 8px; margin: 10px 0; }
.dupla { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.res { border-radius: 12px; padding: 12px; background: #fff; border: 1px solid var(--borda); }
.res + .res { margin-top: 8px; }
.res b { display: block; }
.res .tag { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 6px; padding: 2px 8px; margin: 4px 0; background: #eee; }
.res.fez { border: 2px solid var(--verm); } .res.fez .tag { background: var(--verm); color: #fff; }
.res.inveja .tag { background: #fde2b3; } .res.inocente .tag { background: #d9f0da; }

/* escrevendo (geração) */
.escrevendo { text-align: center; padding: 40px 10px; }
.escrevendo .foto { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; box-shadow: 0 0 0 3px var(--ouro); }
.escrevendo .foto img { animation: gira 9s linear infinite; }
@keyframes balanca { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.escrevendo h3 { font-size: 22px; margin: 12px 0 6px; }

/* chat */
#chat { display: grid; gap: 10px; margin: 14px 0; }
.msg { border-radius: 16px; padding: 12px 14px; max-width: 92%; }
.msg.eu { background: #fff; border: 1px solid var(--borda); justify-self: end; }
.msg.pai { background: var(--papel); border: 1px solid var(--ouro-cl); }
.msg.pai b { color: var(--verm-esc); font-size: 14px; display: block; margin-bottom: 2px; }

@media (prefers-reduced-motion: reduce) { .giro, .escrevendo .foto img { animation: none; } }

/* ícones e fotos (enquanto a foto não existe, mostra o espaço com o nome do arquivo) */
svg.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foto { position: relative; overflow: hidden; background: #2a1715; }
.foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto.falta { background: repeating-linear-gradient(45deg, #f3e6d6 0 10px, #fbf3e8 10px 20px); }
.foto.falta img { display: none; }
.ouvir { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; }
.pill svg { width: 16px; height: 16px; }
.abertura { background: radial-gradient(ellipse 100% 80% at 50% 0%, #4a0d12 0%, var(--noite) 75%); }
.carga { background: var(--verm); }
.oferta { border-color: var(--ouro); background: #fffbea; }
.reza { background: #fff8e1; }

/* ===== passada visual 03/12: mais leve, cantos macios, transições ===== */
html { scroll-behavior: smooth; }
.topo { background: linear-gradient(180deg, #2a0d0f, var(--noite)); box-shadow: 0 6px 20px -10px rgba(0,0,0,.6); }
.pill { border-color: rgba(255,201,21,.35); transition: background .2s; }
.abas { background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top-color: rgba(236,220,200,.7); box-shadow: 0 -8px 24px -14px rgba(60,20,10,.25); }
.abas button { transition: color .2s; position: relative; }
.abas button.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--verm); }
.abas button .ic { transition: transform .2s; } .abas button.on .ic { transform: translateY(-1px) scale(1.06); }

.tit { font-size: 24px; }
.cartao { border-radius: 22px; border-color: rgba(236,220,200,.7); box-shadow: 0 12px 30px -16px rgba(60,20,10,.2); padding: 18px 16px; }
.cartao h3 { font-size: 19px; }
.abertura { border-radius: 22px; box-shadow: 0 16px 34px -16px rgba(60,10,10,.55); }
.carga { border-radius: 99px; padding: 4px 12px; font-size: 13.5px; }

.btn { border-radius: 999px; background: linear-gradient(180deg, #e0243f, #b10c27); box-shadow: 0 10px 22px -10px rgba(200,16,46,.7); padding: 13px 18px; font-size: 17px; transition: transform .15s ease, box-shadow .2s, filter .2s; }
.btn:active { transform: scale(.98); box-shadow: 0 4px 12px -6px rgba(200,16,46,.6); }
.btn.btn2 { background: #fff; color: var(--verm); border: 1.5px solid rgba(200,16,46,.5); box-shadow: none; }
.btn.ouro { background: linear-gradient(180deg, #ffe066, #ffc915); color: var(--noite); box-shadow: 0 10px 22px -10px rgba(255,201,21,.8); }
.campo { border-radius: 14px; border-width: 1.5px; transition: border-color .2s, box-shadow .2s; }
.campo:focus { box-shadow: 0 0 0 4px rgba(200,16,46,.1); }

.check { gap: 6px; }
.check label { padding: 8px 11px; border-radius: 12px; font-size: 16px; line-height: 1.4; border-color: rgba(236,220,200,.8); transition: background .2s, color .2s; }
.check input { width: 20px; height: 20px; }
.passos li { font-size: 16.5px; }
.passos li::before { width: 26px; height: 26px; font-size: 14px; }
.dias { gap: 7px; }
.dias button { border-radius: 50%; border-width: 1.5px; font-size: 14.5px; transition: background .2s, border-color .2s, transform .15s; }
.dias button:active { transform: scale(.92); }
.reza { font-family: inherit; font-style: italic; font-weight: 600; font-size: 17px; line-height: 1.6; background: linear-gradient(180deg, #fffaf0, #fff4dc); border-left: 3px solid var(--ouro); border-radius: 14px; padding: 14px 16px; }
.cartao .recado { font-size: 17px; line-height: 1.55; }
.orixa .ic { width: 58px; height: 58px; box-shadow: 0 0 0 2px var(--ouro); }

/* ofertas dentro do app */
.oferta { background: linear-gradient(180deg, #fffdf6, #fff7e3); border: 1px solid rgba(255,201,21,.55); box-shadow: 0 14px 30px -16px rgba(185,130,0,.35); }
.oferta h3 { font-size: 19px; }
.oferta p { font-size: 16px; color: var(--suave); }
.oferta .preco { font-size: 24px; margin: 10px 0 12px; }

/* chat com a foto do Pai */
#chat { gap: 12px; }
.msg { border-radius: 18px; animation: entra .35s ease; }
.msg.eu { background: #fff; border-color: rgba(236,220,200,.8); border-bottom-right-radius: 6px; }
.msg.pai { position: relative; margin-left: 42px; max-width: calc(92% - 42px); border-color: rgba(255,201,21,.45); border-top-left-radius: 6px; box-shadow: 0 8px 20px -14px rgba(60,20,10,.3); }
.msg.pai::before { content: ''; position: absolute; left: -42px; top: 0; width: 32px; height: 32px; border-radius: 50%; background: #2a1715 url('/img/pai-juvenal.jpg') center / cover; box-shadow: 0 0 0 2px var(--ouro); }

/* "o Pai está escrevendo" */
.escrevendo { text-align: left; padding: 18px 16px 16px; background: radial-gradient(ellipse 120% 70% at 50% 0%, #3a0c10 0%, var(--noite) 75%); color: #fff; border: 0; }
.esc-pai { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.esc-pai .foto { width: 46px; height: 46px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--ouro); }
.esc-pai b { display: block; font-family: var(--serif); font-size: 17px; }
.esc-pai small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #e9d6c8; }
.esc-pai small i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc6a; animation: aovivo 1.6s infinite; }
@keyframes aovivo { 0% { box-shadow: 0 0 0 0 rgba(61,220,106,.6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(61,220,106,0); } }
.escrevendo h3 { color: #fff; font-size: 20px; margin: 0 0 12px; text-align: left; }
.esc-barra { height: 5px; border-radius: 9px; background: rgba(255,255,255,.1); overflow: hidden; }
.esc-barra i { display: block; height: 100%; width: 4%; border-radius: 9px; background: linear-gradient(90deg, #ffc915, #ffe066); animation: enche 40s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes enche { to { width: 94%; } }
.esc-etapas { list-style: none; display: grid; gap: 9px; margin: 14px 0 12px; }
.esc-etapas li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: rgba(255,255,255,.35); transition: color .4s; }
.esc-etapas li::before { content: ''; flex: none; width: 19px; height: 19px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); box-sizing: border-box; }
.esc-etapas li.agora { color: #fff; font-weight: 700; }
.esc-etapas li.agora::before { border-color: rgba(255,201,21,.3); border-top-color: #ffc915; animation: gira .8s linear infinite; }
.esc-etapas li.feito { color: #e9d6c8; }
.esc-etapas li.feito::before { border: 0; background: #ffc915 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1210' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.escrevendo .m { color: #cdb8aa; font-size: 14px; }

/* transições */
.aba.on { animation: entra .4s cubic-bezier(.2,.8,.2,1); }
.aba.on > .cartao, .aba.on > .abertura, .aba.on > div > .cartao { animation: entra .5s cubic-bezier(.2,.8,.2,1) both; }
.aba.on > :nth-child(2) { animation-delay: .06s } .aba.on > :nth-child(3) { animation-delay: .12s } .aba.on > :nth-child(4) { animation-delay: .18s }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aba.on, .aba.on > *, .msg, .esc-barra i, .esc-etapas li.agora::before, .esc-pai small i { animation: none !important; }
}
.esc-pai .foto { margin: 0; }
.esc-pai .foto img { animation: none; }

/* instalar como app (topo da consulta) */
.inst { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, #2a1210, #160b0a); color: #fff; box-shadow: 0 8px 22px rgba(22,11,10,.18); position: relative; animation: sobe .4s ease both; }
.inst[hidden], .inst-passo[hidden] { display: none; }
.inst img { width: 46px; height: 46px; border-radius: 12px; flex: none; box-shadow: 0 0 0 2px var(--ouro); }
.inst div { flex: 1; min-width: 0; line-height: 1.25; }
.inst b { display: block; font-size: 16px; }
.inst small { display: block; font-size: 13px; color: #e9d9c4; margin-top: 2px; }
.inst-bt { flex: none; border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 800; font-size: 15px; color: #3a2600; background: linear-gradient(180deg, #ffe066, #ffc915); cursor: pointer; margin-right: 14px; }
.inst-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: #b9a58f; font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; }
.inst-passo { margin: -4px 0 14px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--borda); font-size: 15px; line-height: 1.45; }
.inst-passo ol { margin: 8px 0 0; padding-left: 20px; }
.inst-passo li { margin: 4px 0; }
@keyframes sobe { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ofertas espalhadas (formato menor que o cartão da aba Proteções) */
.mini-of { margin: 0 0 16px; padding: 16px 16px 14px; border-radius: 18px; background: linear-gradient(135deg, #fff8e6, #fff1cf); border: 1px solid #f3d98a; box-shadow: 0 6px 18px rgba(150,100,0,.08); }
.mini-of .mo-tag { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; background: rgba(242,183,5,.22); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.mini-of b { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 19px; line-height: 1.2; color: var(--noite); }
.mini-of p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: #5a4636; }
.mini-of .mo-pe { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.mini-of .mo-preco { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 20px; color: var(--verm); white-space: nowrap; }
.mini-of button { border: 0; border-radius: 999px; padding: 11px 16px; font: inherit; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(180deg, #e0243f, #b30d27); box-shadow: 0 6px 14px rgba(200,16,46,.25); cursor: pointer; }
.mini-of button:active { transform: translateY(1px); }
#perg-mais { margin-top: 16px; }

/* áudio da reza carregando (a 1ª vez o servidor grava, leva alguns segundos) */
.ouvir.carregando { opacity: .85; pointer-events: auto; }
.mini-giro { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(200,16,46,.25); border-top-color: var(--verm); animation: gira .8s linear infinite; display: inline-block; flex: none; }
