:root{
  --bg:#0b0d12; --panel:#15171d; --bubble:#25272d; --line:#2a2d35; --text:#ececf1; --muted:#9a9cab;
  --brand:#8b3fd9; --brand2:#a855f7; --gold:#fbbf24; --ok:#22c55e;
}
*{box-sizing:border-box;margin:0;padding:0}
html{height:100%;height:-webkit-fill-available}
body{height:100%;height:-webkit-fill-available;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
html{height:-webkit-fill-available}
body{background:var(--bg);color:var(--text);font:15px/1.45 Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
.hidden{display:none!important}

.topbar{position:fixed;inset:0 0 auto 0;height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:rgba(11,13,18,.92);backdrop-filter:blur(8px);z-index:20}
.who{display:flex;gap:10px;align-items:center}
.avatar{width:40px;height:40px;border-radius:50%}
.who strong{display:block;font-size:14px;letter-spacing:.3px}
.online{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:5px}
.online i{width:8px;height:8px;border-radius:50%;background:var(--ok);display:inline-block}

.chat{max-width:800px;margin:0 auto;padding:72px 16px 160px;min-height:100%}
.profile{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px 0 40px}
.profile-pic{width:132px;height:132px;border-radius:24px;box-shadow:0 10px 40px rgba(139,63,217,.35)}
.profile strong{font-size:14px;margin-top:6px}
.profile small{color:var(--muted);font-size:12px}

.row{display:flex;gap:8px;align-items:flex-end;margin:6px 0}
.progress-row{display:flex;justify-content:center;align-items:center;margin:6px 0;width:100%}
.row.bot .ava{width:24px;height:24px;border-radius:50%;flex:none;visibility:hidden}
.row.bot.last .ava{visibility:visible}
.bubble{background:var(--bubble);padding:9px 14px;border-radius:18px;max-width:min(560px,82%);white-space:pre-wrap;animation:pop .25s ease}
.row.user{justify-content:flex-end;max-width:100%;overflow:hidden}
.row.user .bubble{background:var(--brand);color:#fff}
.bubble p+p{margin-top:12px}
.typing{display:inline-flex;gap:4px;padding:14px 16px}
.typing span{width:6px;height:6px;border-radius:50%;background:#9a9cab;animation:blink 1s infinite}
.typing span:nth-child(2){animation-delay:.15s}.typing span:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@keyframes pop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin:10px 0 0 32px}
.actions.wide{display:grid;grid-template-columns:1fr 1fr;justify-content:stretch;margin-left:0;width:100%;box-sizing:border-box}
.chip{background:var(--panel);border:1px solid var(--line);color:var(--text);border-radius:999px;padding:8px 14px;font:500 13px Inter;cursor:pointer;transition:.15s}
.chip:hover{border-color:var(--brand2)}
.chip.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.chip.block{border-radius:14px;padding:10px}

.composer{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);width:min(800px,calc(100% - 32px));display:flex;align-items:center;gap:8px;background:#22242a;border:1px solid var(--line);border-radius:22px;padding:4px 4px 4px 14px;z-index:20}
.composer .search{color:#cfd0d8;flex:none}
.composer input{flex:1;background:none;border:0;outline:0;color:var(--text);font:16px Inter;padding:10px 4px;min-width:0;width:0}
.composer input::placeholder{color:#7d7f8c}
.composer button{width:68px;height:40px;border-radius:18px;border:0;background:#5b3cc4;color:#fff;cursor:pointer;display:grid;place-items:center}
.composer button:disabled{opacity:.7;cursor:default}

/* Leque */
.fan{position:fixed;inset:0;z-index:30;backdrop-filter:blur(6px);background:rgba(8,9,13,.55);display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:40px;overflow:hidden}
.fan-counter{display:flex;flex-direction:column;align-items:center;color:var(--muted);font-size:12px;gap:4px;margin-bottom:6px}
.fan-cards{position:relative;height:270px;width:100%}
.card{position:absolute;bottom:0;left:50%;width:140px;height:230px;border-radius:14px;cursor:pointer;
  background:linear-gradient(160deg,#3b1f6e,#5b2ca0 55%,#7a3fc2);border:1px solid rgba(253,230,138,.25);
  box-shadow:0 10px 30px rgba(0,0,0,.5);transform-origin:50% 160%;transition:transform .35s cubic-bezier(.2,.8,.2,1),opacity .3s;display:grid;place-items:center}
.card::after{content:"";width:66px;height:66px;background:url(logo.svg) center/contain no-repeat;opacity:.55;filter:grayscale(.2)}
.card.picked{opacity:.0;pointer-events:none}
.card:hover{filter:brightness(1.15)}

/* Oferta */
.offer{margin:18px 0 8px 32px}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:14px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
.box{border:1px solid var(--line);border-radius:12px;background:#0f1116;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.tag{border:1px solid var(--line);border-radius:999px;padding:3px 9px;font-size:11px;font-weight:600}
.mono{font:500 11px 'JetBrains Mono',monospace;color:#c9cad3}
.qty{display:flex;align-items:center;gap:20px;justify-content:center;flex:1}
.qbtn{width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:none;color:var(--text);font-size:18px;cursor:pointer}
.qnum{text-align:center}.qnum b{font-size:18px;display:block}.qnum small{color:var(--muted);font-size:11px}
.price small{display:block;color:var(--muted);font-size:11px}.price s{opacity:.8}.price b{font-size:20px}
.buy{width:100%;border:0;border-radius:14px;background:#7c3aad;color:#fff;font:600 14px Inter;padding:12px;cursor:pointer;margin-top:4px}
.buy:hover{background:#8b45c0}

/* Leitura revelada */
.reveal{display:flex;gap:10px;margin:10px 0 6px 32px;flex-wrap:wrap}
.face{width:104px;height:164px;border-radius:12px;background:linear-gradient(170deg,#f6efe1,#e7d9bd);color:#2b1a4a;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:10px 8px;text-align:center;font-weight:600;font-size:12px;border:2px solid #c8a24a;animation:flip .6s ease both}
.face .sym{font-size:34px;color:#7c3aed}
.face.rev .sym{transform:rotate(180deg)}
.face small{font-weight:500;color:#6b5a8a;font-size:10px}
@keyframes flip{from{transform:rotateY(90deg);opacity:0}to{transform:none;opacity:1}}

/* Modal */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{position:relative;width:min(440px,100%);background:var(--panel);border:1px solid var(--line);border-radius:20px 20px 0 0;padding:24px 20px 28px;animation:pop .25s}
@media(min-width:640px){.modal{align-items:center}.sheet{border-radius:20px}}
.sheet h3{font-size:18px;margin-bottom:4px}
.muted{color:var(--muted);font-size:13px;margin-bottom:14px}
.sheet label{display:block;font-size:12px;color:var(--muted);margin-bottom:10px}
.sheet input,.sheet textarea{width:100%;margin-top:4px;background:#0f1116;border:1px solid var(--line);border-radius:10px;color:var(--text);padding:11px 12px;font:16px Inter;outline:0}
.sheet textarea{font:12px 'JetBrains Mono',monospace;resize:none}
.sheet input:focus{border-color:var(--brand2)}
.primary{width:100%;border:0;border-radius:12px;background:var(--brand);color:#fff;font:600 14px Inter;padding:12px;cursor:pointer;margin-top:8px}
.primary:disabled{opacity:.6}
.ghost{width:100%;border:1px dashed var(--line);border-radius:12px;background:none;color:var(--muted);padding:10px;margin-top:10px;cursor:pointer}
.close{position:absolute;right:14px;top:10px;background:none;border:0;color:var(--muted);font-size:26px;cursor:pointer}
.err{color:#f87171;font-size:12px;min-height:16px}
.tiny{color:var(--muted);font-size:11px;margin-top:10px;text-align:center}
.qr{background:#fff;border-radius:12px;padding:10px;width:220px;height:220px;margin:0 auto 12px;display:grid;place-items:center}
.qr img,.qr svg{width:100%;height:100%}
.waiting{display:flex;align-items:center;gap:8px;justify-content:center;color:var(--muted);font-size:13px;margin-top:12px}
.dot{width:8px;height:8px;border-radius:50%;background:var(--gold);animation:blink 1s infinite}

@media(max-width:600px){
  .topbar{padding:0 14px}
  .profile-pic{width:104px;height:104px}
  .card{width:110px;height:180px}
  .fan-cards{height:220px}
  .actions.wide{grid-template-columns:1fr}
  .offer,.reveal{margin-left:0}
}

.sugestao{font-size:13px;color:#fbbf24;margin:6px 0 0}
.sugestao button{background:none;border:0;color:#c084fc;text-decoration:underline;font:inherit;padding:0;cursor:pointer}
#pixEmailLine button{background:none;border:0;color:#c084fc;text-decoration:underline;font:inherit;padding:0;cursor:pointer}

/* Caixa de preço entra suave, depois da última mensagem */
.offer.surgir { animation: surgir .9s ease-out both; }
@keyframes surgir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Linha estilo Instagram abaixo do nome */
.profile .ig-stats{color:var(--muted);font-size:13px;margin-top:-2px}
.profile .ig-user{color:var(--muted);font-size:13px;margin-top:-4px}

/* Opções depois de fechar o PIX */
.opcoes-pag{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.buy.alt{background:transparent;border:1px solid var(--brand2);color:var(--text)}
#cardBrick{margin:10px 0 4px;min-height:120px}
#stepCard .err{color:#f87171;font-size:13px;min-height:16px}

/* Foto da Solara estilo Instagram: círculo com anel de stories */
.profile-pic{border-radius:50%;object-fit:cover;padding:4px;background:#0b0d12;
  box-shadow:0 0 0 3px transparent;outline:none;
  border:3px solid transparent;
  background-image:linear-gradient(#0b0d12,#0b0d12),linear-gradient(45deg,#f9ce34,#ee2a7b 50%,#6228d7);
  background-origin:border-box;background-clip:content-box,border-box;
  width:112px;height:112px}
@media(max-width:640px){.profile-pic{width:96px;height:96px}}
.topbar .avatar,.row.bot .ava{border-radius:50%;object-fit:cover}

/* Janela de pagamento: rola por dentro (o formulário do cartão é alto) e trava o fundo */
.sheet{max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(28px + env(safe-area-inset-bottom))}
body.modal-aberto{overflow:hidden;touch-action:none}
body.modal-aberto .sheet{touch-action:pan-y}
#stepCard h3{padding-right:28px}
#cardBrick{scroll-margin-top:12px}

/* Ajustes do teste de ponta a ponta */
.opcoes-pag{margin:10px 0 8px 32px}
#offer{scroll-margin-bottom:110px}
@media(max-width:640px){.sheet.alto{height:calc(100vh - 12px);height:calc(100dvh - 12px)}}

/* Botão "↓ Nova mensagem" (quando a pessoa subiu para ler) */
.nova-msg{position:fixed;left:50%;transform:translateX(-50%);bottom:84px;z-index:25;background:var(--brand);color:#fff;border:0;border-radius:999px;padding:8px 16px;font:600 13px Inter,system-ui,sans-serif;box-shadow:0 6px 20px rgba(0,0,0,.45);cursor:pointer;animation:pop .25s ease}

/* Aviso no topo do PIX: voltar para a conversa depois de pagar */
.aviso-volta{background:rgba(168,85,247,.12);border:1px solid rgba(168,85,247,.45);border-radius:12px;padding:10px 12px;font-size:13px;line-height:1.45;margin:-6px 0 14px;color:var(--text)}
.aviso-volta b{color:#d8b4fe}

/* Mensagem da Solara entre o botão do PIX e o do cartão */
.opcoes-pag .oferta-cartao{margin:2px 0 0 -32px}
