/* ================= ASTRAL — estilo (mobile-first) ================= */
:root {
  --bg: #120826;
  --bg2: #1d0f3d;
  --card: rgba(255, 255, 255, 0.06);
  --card-brd: rgba(255, 255, 255, 0.12);
  --ink: #f3edff;
  --ink-soft: #c6b8e6;
  --gold: #e9c46a;
  --gold-2: #f4d789;
  --violet: #8a63d2;
  --wa: #25d366;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #2a1758 0%, transparent 60%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, #fff8 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 70% 20%, #fff6 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 40% 70%, #fff7 0, transparent 100%),
    radial-gradient(1px 1px at 85% 60%, #fff5 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 60% 85%, #fff6 0, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, #fff4 0, transparent 100%);
  opacity: .7;
}

.view { display: none; position: relative; z-index: 1; }
.view.active { display: block; }

.wrap {
  max-width: 480px; margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px calc(40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}

/* ---- marca / cabeçalho ---- */
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px; letter-spacing: .5px; color: var(--gold);
  margin-bottom: 8px;
}
.brand.small { font-size: 18px; margin: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; }

.display {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600; font-size: clamp(28px, 8vw, 38px);
  line-height: 1.12; letter-spacing: .2px; margin-bottom: 6px;
}
.sub { color: var(--ink-soft); font-size: 15.5px; line-height: 1.5; margin-bottom: 6px; }

/* ---- cartões ---- */
.card {
  background: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.card h2 {
  font-family: Georgia, serif; font-size: 18px; font-weight: 600;
  margin-bottom: 12px; color: var(--gold-2);
}

/* ---- formulário ---- */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-soft); }
.form label.opt span { color: #9a8cc0; font-size: 12.5px; }
.form input {
  -webkit-appearance: none; appearance: none;
  box-sizing: border-box; width: 100%;
  min-height: 52px; height: 52px;
  font-size: 16px; font-family: inherit; line-height: 1.2;
  color: var(--ink); text-align: left;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--card-brd);
  border-radius: 12px; padding: 0 14px;
  outline: none;
}
.form input:focus { border-color: var(--gold); }
/* iOS: normaliza date/time para o mesmo tamanho dos inputs de texto */
.form input[type="date"], .form input[type="time"] { display: block; }
.form input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.form input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }

/* ---- botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: 14px 18px; border: 1px solid transparent;
  transition: transform .06s ease, filter .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #2a1a05; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--card-brd); color: var(--ink); padding: 11px 16px; font-size: 14px; }
.btn.wa { background: var(--wa); color: #04220f; margin-top: 10px; }
.btn.full { width: 100%; }

.fineprint { font-size: 12.5px; color: #9a8cc0; text-align: center; line-height: 1.45; margin-top: 4px; }
.chip {
  background: rgba(233, 196, 106, .14); color: var(--gold-2);
  border: 1px solid rgba(233, 196, 106, .35);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ---- signo / herói ---- */
.sign-hero { display: flex; align-items: center; gap: 16px; }
.sign-emoji { font-size: 46px; line-height: 1; filter: drop-shadow(0 0 12px rgba(233,196,106,.5)); }
.hello { color: var(--ink-soft); font-size: 14px; }
.sign-name { font-family: Georgia, serif; font-size: 24px; font-weight: 600; color: var(--gold-2); }
.today { color: #9a8cc0; font-size: 13px; text-transform: capitalize; }

/* ---- leitura ---- */
.reading .lead { font-size: 16.5px; line-height: 1.5; margin-bottom: 10px; }
.moon-strip { display: flex; align-items: center; gap: 10px; background: rgba(138,99,210,.16); border: 1px solid rgba(138,99,210,.32); border-radius: 12px; padding: 9px 12px; margin: 4px 0 8px; }
.moon-strip .moon-emoji { font-size: 20px; line-height: 1; }
.moon-strip #r-lua-text { font-size: 13.5px; color: var(--ink); }
.reading .clima { font-size: 13.5px; font-style: italic; color: var(--ink-soft); line-height: 1.45; margin-bottom: 12px; }
.reading .row { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 14.5px; line-height: 1.45; }
.reading .row .k, .lucky .k { color: var(--gold); font-weight: 600; min-width: 78px; font-size: 13px; }
.lucky { display: flex; gap: 24px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.lucky b { display: block; font-size: 18px; color: var(--ink); font-family: Georgia, serif; }

/* ---- tarô ---- */
.card-face {
  border: 1px solid rgba(233,196,106,.35);
  background: radial-gradient(120% 120% at 50% 0%, rgba(138,99,210,.25), transparent 70%);
  border-radius: 14px; padding: 22px 18px; text-align: center;
}
.tarot-name { font-family: Georgia, serif; font-size: 22px; color: var(--gold-2); margin-bottom: 6px; }
.tarot-mean { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }

/* ---- oferta / paywall ---- */
.offer { border-color: rgba(233,196,106,.35); background: linear-gradient(160deg, rgba(233,196,106,.10), rgba(138,99,210,.10)); }
.offer-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--gold-2); border: 1px solid rgba(233,196,106,.4); border-radius: 999px; padding: 4px 11px; margin-bottom: 10px; }
.offer p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin-bottom: 14px; }
.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.price span { font-family: Georgia, serif; font-size: 30px; color: var(--gold-2); }
.price small { color: #9a8cc0; font-size: 13px; }
.offer .btn { width: 100%; }

/* ---- planos ---- */
.plans { display: flex; gap: 10px; margin: 4px 0 10px; }
.plan { flex: 1; display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: rgba(0,0,0,.22); border: 1px solid var(--card-brd); border-radius: 14px;
  padding: 14px 13px; cursor: pointer; position: relative; transition: border-color .15s, transform .06s; }
.plan:active { transform: translateY(1px); }
.plan.featured { border-color: rgba(233,196,106,.55); background: rgba(233,196,106,.10); }
.plan:hover { border-color: var(--gold); }
.plan-badge { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 700;
  letter-spacing: .3px; color: #2a1a05; background: var(--gold-2); border-radius: 999px; padding: 2px 8px; }
.plan-nome { font-size: 13px; color: var(--ink-soft); }
.plan-preco { font-family: Georgia, serif; font-size: 26px; color: var(--gold-2); line-height: 1.1; }
.plan-desc { font-size: 11.5px; color: #9a8cc0; line-height: 1.35; }

.btn.card { background: transparent; border-color: var(--card-brd); color: var(--ink); margin-top: 10px; }
.btn.card::before { content: "💳"; margin-right: 4px; }

/* ---- lembrete ---- */
.reminder { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.reminder .mini { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.mini { font-size: 13px; }

.linklike { background: none; border: none; color: #9a8cc0; text-decoration: underline; font-size: 13px; cursor: pointer; padding: 6px; }

/* ---- dica iOS ---- */
.ios-hint { display: flex; align-items: center; gap: 10px; background: rgba(233,196,106,.12); border: 1px solid rgba(233,196,106,.35); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.ios-hint b { color: var(--gold-2); }
.ios-hint button { margin-left: auto; background: none; border: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; line-height: 1; }

/* ---- rodapé ---- */
.foot { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 6px; }
.foot nav { font-size: 13px; color: #9a8cc0; }
.foot nav a { color: var(--ink-soft); text-decoration: underline; }
.foot .disclaimer { font-size: 11.5px; color: #7d6fa6; line-height: 1.45; max-width: 340px; margin-top: 2px; }

/* ---- modal Pix ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8, 3, 20, .72); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 480px; background: linear-gradient(160deg, #1d0f3d, #160a2e);
  border: 1px solid var(--card-brd); border-top-left-radius: 22px; border-top-right-radius: 22px;
  padding: 22px 18px calc(26px + env(safe-area-inset-bottom)); position: relative; box-shadow: var(--shadow);
  animation: slideup .22s ease;
}
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-card h3 { font-family: Georgia, serif; font-size: 21px; color: var(--gold-2); margin-bottom: 6px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--ink-soft); font-size: 26px; cursor: pointer; line-height: 1; }
.pix-amount { font-family: Georgia, serif; font-size: 28px; color: var(--ink); margin: 14px 0 6px; }
.pix-label { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.pix-code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--ink-soft);
  background: rgba(0,0,0,.35); border: 1px solid var(--card-brd); border-radius: 12px;
  padding: 12px; margin: 6px 0 12px; word-break: break-all; max-height: 96px; overflow-y: auto; }

.pix-qr { display: block; width: 200px; height: 200px; margin: 10px auto 4px; border-radius: 14px; background: #fff; padding: 8px; }
.pix-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; color: var(--gold-2); font-size: 14px; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(233,196,106,.3); border-top-color: var(--gold-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- leitura profunda (desbloqueada) ---- */
.deep { border-color: rgba(233,196,106,.4); background: linear-gradient(160deg, rgba(233,196,106,.10), rgba(138,99,210,.12)); }
.deep h2 { font-family: Georgia, serif; font-size: 20px; color: var(--gold-2); margin-bottom: 4px; }
.deep .unlocked-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #04220f; background: var(--wa); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.deep .blk { padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08); }
.deep .blk:first-of-type { border-top: none; }
.deep .blk .k { display: block; color: var(--gold); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.deep .blk p { font-size: 15px; line-height: 1.55; color: var(--ink); }
.deep .deep-close { font-family: Georgia, serif; font-style: italic; color: var(--ink-soft); margin-top: 12px; font-size: 14.5px; }

/* ---- aviso destacado (notice) ---- */
.notice { display: flex; align-items: flex-start; gap: 10px; border-radius: 16px; padding: 16px 16px; font-size: 15px; line-height: 1.5;
  border: 1px solid var(--card-brd); background: rgba(138,99,210,.16); color: var(--ink); box-shadow: var(--shadow); }
.notice.success { border-color: rgba(37,211,102,.5); background: rgba(37,211,102,.14); }
.notice.error { border-color: rgba(255,120,120,.5); background: rgba(255,120,120,.12); }
.notice.info { border-color: rgba(233,196,106,.4); background: rgba(233,196,106,.12); }
.notice-body { flex: 1; }
.notice-body b { color: var(--gold-2); }
.notice.success .notice-body b { color: #b6f0c8; }
.notice-body small { color: var(--ink-soft); font-size: 12.5px; }
.notice button { background: none; border: none; color: var(--ink-soft); font-size: 22px; line-height: 1; cursor: pointer; }

/* ---- conta / login ---- */
.login-toggle { text-align: center; margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.login-toggle .linklike { color: var(--gold-2); }
.acct { display: flex; align-items: center; gap: 8px; }
.acct-email { font-size: 12px; color: var(--ink-soft); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-panel { margin-top: 4px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.login-row { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.login-row input { width: 100%; box-sizing: border-box; font-size: 16px; color: var(--ink); background: rgba(0,0,0,.28); border: 1px solid var(--card-brd); border-radius: 12px; padding: 13px 14px; outline: none; }
.login-row input:focus { border-color: var(--gold); }
.login-row .btn { width: 100%; }
#login-status { color: var(--gold-2); margin-top: 8px; line-height: 1.4; }

/* ---- páginas legais ---- */
.legal .back { color: var(--gold-2); text-decoration: none; font-size: 14px; display: inline-block; margin: 4px 0; }
.legal .card h2 { font-family: Georgia, serif; font-size: 16.5px; color: var(--gold-2); margin: 18px 0 6px; }
.legal .card h2:first-child { margin-top: 0; }
.legal .card p, .legal .card li { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }
.legal .card ul { margin: 6px 0 6px 18px; display: flex; flex-direction: column; gap: 6px; }
.legal .card a { color: var(--gold-2); }
.legal .card b { color: var(--ink); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #2a1758; color: var(--ink); border: 1px solid var(--card-brd);
  padding: 12px 18px; border-radius: 999px; font-size: 14px; z-index: 80; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }

/* respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } .btn { transition: none; } }
