:root {
  --fundo: #0f1115;
  --painel: #16181d;
  --linha: #23262d;
  --bolha: #262930;
  --minha: #0a84ff;
  --texto: #f2f3f5;
  --apagado: #8b8f98;
  --verde: #30d158;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #07080a; color: var(--texto);
  font: 15px/1.38 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { display: flex; justify-content: center; }
.tela { width: 100%; max-width: 480px; height: 100dvh; display: flex; flex-direction: column; background: var(--fundo); }
@media (min-width: 520px) { .tela { height: calc(100dvh - 32px); margin-top: 16px; border-radius: 22px; overflow: hidden; border: 1px solid var(--linha); } }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.topo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--painel); border-bottom: 1px solid var(--linha); }
.voltar { color: var(--minha); display: flex; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #333; }
.quem { flex: 1; min-width: 0; }
.nome { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.selo { width: 15px; height: 15px; fill: var(--minha); stroke: none; }
.selo .v { fill: none; stroke: #fff; stroke-width: 2.4; }
.estado { font-size: 12px; color: var(--apagado); }
.estado.digitando { color: var(--verde); }
.icones { display: flex; gap: 16px; color: var(--minha); }

.conversa { flex: 1; overflow-y: auto; padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.dia { align-self: center; font-size: 11.5px; color: var(--apagado); background: #1c1f25; padding: 3px 10px; border-radius: 10px; margin: 4px 0 10px; }

.msg { max-width: 82%; align-self: flex-start; background: var(--bolha); border-radius: 18px; padding: 8px 12px 6px; white-space: pre-wrap; word-wrap: break-word;
  animation: entra .18s ease-out; }
.msg.minha { align-self: flex-end; background: var(--minha); color: #fff; }
.msg .hora { display: block; text-align: right; font-size: 10.5px; color: rgba(255,255,255,.5); margin-top: 2px; }
.msg.foto { padding: 4px; max-width: 75%; }
.msg.foto img { display: block; width: 100%; border-radius: 14px; }
.msg.foto .legenda { padding: 6px 8px 0; }
.grade { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.grade img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; border-radius: 10px; cursor: zoom-in; background: #1b1d22; }
.grade img:only-child { grid-column: span 2; aspect-ratio: auto; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.digitando-bolha { align-self: flex-start; background: var(--bolha); border-radius: 18px; padding: 12px 14px; display: flex; gap: 4px; }
.digitando-bolha i { width: 7px; height: 7px; border-radius: 50%; background: #9aa0aa; animation: pula 1.2s infinite; }
.digitando-bolha i:nth-child(2) { animation-delay: .15s; } .digitando-bolha i:nth-child(3) { animation-delay: .3s; }
@keyframes pula { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.botoes { display: flex; flex-direction: column; gap: 6px; max-width: 82%; width: 100%; align-self: flex-start; animation: entra .18s ease-out; }
.botoes button { text-align: left; }
.btn { appearance: none; border: 0; border-radius: 14px; background: #1d3b5f; color: #e8f2ff; padding: 11px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.forte { background: var(--minha); color: #fff; text-align: center; width: 100%; font-size: 16px; padding: 13px; }
.btn.leve { background: transparent; color: var(--apagado); font-weight: 500; text-align: center; width: 100%; padding: 8px; }

.cartao-pag { align-self: stretch; background: var(--bolha); border-radius: 18px; padding: 12px; animation: entra .18s ease-out; }
.cartao-pag .cab { display: flex; align-items: center; gap: 10px; }
.cartao-pag .ico { width: 34px; height: 34px; border-radius: 10px; background: #0b2c4d; display: grid; place-items: center; color: #6cb6ff; }
.cartao-pag .ico svg { width: 20px; height: 20px; }
.cartao-pag .prod { font-weight: 600; }
.cartao-pag .sub { font-size: 12px; color: var(--apagado); }
.cartao-pag .total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 2px 10px; color: var(--apagado); }
.cartao-pag .total b { color: var(--texto); font-size: 20px; }
.cartao-pag .area { margin-top: 10px; display: none; }
.cartao-pag.aberto .area { display: block; }
.cartao-pag.pago { opacity: .8; }
.cartao-pag .ok { color: var(--verde); font-weight: 600; text-align: center; padding: 6px; }
.stripe-caixa { background: #fff; border-radius: 12px; overflow: hidden; min-height: 120px; }
.ou { display: flex; align-items: center; gap: 8px; color: var(--apagado); font-size: 12px; margin: 12px 0 10px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--linha); }
.paypal-caixa { min-height: 46px; }
.erro { color: #ff6b6b; font-size: 13px; margin-top: 8px; display: none; }
.erro.ver { display: block; }
.seguro { font-size: 11.5px; color: var(--apagado); text-align: center; margin-top: 8px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.seguro svg { width: 13px; height: 13px; }

.rodape { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: var(--painel); border-top: 1px solid var(--linha); color: var(--minha); }
.campo { flex: 1; background: #1f2228; border: 0; border-radius: 18px; padding: 9px 14px; color: var(--texto); font: inherit; }

.portao { position: fixed; inset: 0; background: rgba(4,5,7,.92); display: grid; place-items: center; padding: 20px; z-index: 10; backdrop-filter: blur(8px); }
.portao[hidden] { display: none; }
.portao-caixa { max-width: 340px; text-align: center; background: var(--painel); border: 1px solid var(--linha); border-radius: 20px; padding: 24px 20px; }
.portao-18 { font-size: 30px; font-weight: 800; color: #ff375f; margin-bottom: 6px; }
.portao-caixa p { color: #c9ccd2; margin: 0 0 18px; }
.portao-caixa .btn { width: 100%; text-align: center; background: var(--minha); color: #fff; }
.sair { display: block; margin-top: 12px; color: var(--apagado); font-size: 14px; text-decoration: none; }

.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.95); display: grid; place-items: center; z-index: 20; }
.zoom img { max-width: 100%; max-height: 100%; }
