/* ─── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:            #0a0618;
  --bg-deep:       #06040f;
  --bg-elevated:   #150f2b;
  --bg-card:       #1c1436;
  --border:        #322757;
  --border-bright: #4a3a7d;
  --text:          #f2ecff;
  --text-muted:    #b3a7d6;
  --text-dim:      #7d719f;
  --gold:          #e8bf6a;
  --gold-bright:   #ffe0a3;
  --gold-deep:     #b8893a;
  --violet:        #9d7ff0;
  --violet-bright: #c0a8ff;
  --danger:        #ff8f8f;
  --success:       #7fe0b0;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 20px 60px -14px rgba(0, 0, 0, 0.8);
  --glow-gold:     0 0 28px rgba(232, 191, 106, 0.38);
  --glow-violet:   0 0 34px rgba(157, 127, 240, 0.32);
  --font-display:  "Cinzel", "Cormorant Garamond", Georgia, serif;
  --font-serif:    "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Fundo celeste ───────────────────────────────────────────────────────── */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 60% at 50% -12%, rgba(157, 127, 240, 0.30), transparent 68%),
    radial-gradient(ellipse 70% 50% at 88% 10%, rgba(232, 191, 106, 0.13), transparent 62%),
    radial-gradient(ellipse 80% 55% at 12% 42%, rgba(157, 127, 240, 0.10), transparent 66%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

/* Estrelas: dois radial-gradients repetidos, sem imagem e sem JS. */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 14%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 28% 42%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.6px 1.6px at 46% 9%,  rgba(255,235,190,0.8),  transparent),
    radial-gradient(1.1px 1.1px at 63% 33%, rgba(255,255,255,0.5),  transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1.2px 1.2px at 89% 52%, rgba(232,191,106,0.7),  transparent),
    radial-gradient(1.3px 1.3px at 8%  68%, rgba(255,255,255,0.6),  transparent),
    radial-gradient(1.1px 1.1px at 35% 78%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.4px 1.4px at 58% 88%, rgba(255,235,190,0.65), transparent),
    radial-gradient(1.2px 1.2px at 82% 74%, rgba(255,255,255,0.55), transparent);
  background-size: 100% 100%;
  animation: twinkle 5.5s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ─── Layout ──────────────────────────────────────────────────────────────── */
main { max-width: 820px; margin: 0 auto; padding: 0 24px 40px; }

.site-header {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 38px; height: 38px;
  display: block;
  border-radius: 50%;
  filter: drop-shadow(0 0 14px rgba(232, 191, 106, 0.35));
  transition: filter 0.22s ease, transform 0.22s ease;
}
.brand:hover .brand-mark { filter: drop-shadow(0 0 20px rgba(232, 191, 106, 0.6)); transform: scale(1.04); }
.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.user-area { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  font-size: 14px;
}
.user-chip img { width: 26px; height: 26px; border-radius: 50%; }
.user-chip .avatar-fallback {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--gold));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #14121f;
}
.plan-tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold);
  border-left: 1px solid var(--border-bright);
  padding-left: 9px;
}

/* ─── Botões ──────────────────────────────────────────────────────────────── */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s,
              box-shadow 0.18s, opacity 0.18s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  color: #1a1206;
  box-shadow: var(--glow-gold);
  letter-spacing: 0.02em;
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 40px rgba(232, 191, 106, 0.6);
  transform: translateY(-1px);
}

.btn-secondary { background: var(--violet); color: #120c22; box-shadow: var(--glow-violet); }
.btn-secondary:hover:not(:disabled) { background: var(--violet-bright); }

.btn-ghost { background: transparent; border-color: var(--border-bright); color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(255, 143, 143, 0.12);
  border-color: var(--danger);
}

.btn-large { width: 100%; padding: 17px; font-size: 17px; }
.btn-small { padding: 7px 14px; font-size: 14px; font-weight: 500; }
.btn-hero {
  padding: 18px 44px;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}
.btn-star { color: rgba(26, 18, 6, 0.5); font-size: 13px; }

.btn-google {
  width: 100%; background: #fff; color: #1f1f1f;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-google:hover { background: #f1f1f1; }

.lang-select {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 56px; text-align: center; position: relative; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 22px;
}

h1 {
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.02;
}
.h1-small {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
}
.h1-year {
  font-family: var(--font-display);
  font-size: clamp(72px, 17vw, 138px);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(175deg, var(--gold-bright) 8%, var(--gold) 42%, var(--gold-deep) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* drop-shadow em vez de text-shadow: text-shadow desaparece com
     background-clip:text, que torna o texto transparente. */
  filter: drop-shadow(0 0 30px rgba(232, 191, 106, 0.5));
  padding: 0 8px;
}

.lede {
  color: var(--text-muted);
  font-size: 17.5px;
  margin: 0 auto 34px;
  max-width: 55ch;
}

.hero-cta { margin-bottom: 34px; }
.hero-note { font-size: 13.5px; color: var(--text-dim); margin: 14px 0 0; letter-spacing: 0.02em; }

.hero-badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.hero-badges li { display: flex; align-items: center; gap: 7px; }
.badge-icon { color: var(--gold); font-size: 14px; }

/* ─── Painel do formulário ────────────────────────────────────────────────── */
.draw-panel {
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-bright);
  border-radius: 22px;
  padding: 38px 34px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  scroll-margin-top: 24px;
}

.panel-ornament {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.5em;
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 10px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 30px;
  letter-spacing: 0.04em;
}

.reading-form { display: flex; flex-direction: column; gap: 28px; }
.field { display: block; border: 0; padding: 0; margin: 0; position: relative; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  padding: 0;
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-dim); }

textarea {
  width: 100%;
  background: rgba(6, 4, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 15px 17px;
  resize: vertical;
  transition: border-color 0.18s, box-shadow 0.18s;
}
textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,191,106,0.13); }
textarea::placeholder { color: var(--text-dim); }

.counter { position: absolute; right: 4px; bottom: -20px; font-size: 12px; color: var(--text-dim); }

/* Sugestões de pergunta */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  background: rgba(157, 127, 240, 0.10);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 15px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.chip:hover { border-color: var(--violet); color: var(--text); background: rgba(157,127,240,0.2); }

/* Spreads */
.spread-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 11px; }

.spread-option {
  background: rgba(6, 4, 15, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 104px;
  position: relative;
  /* <button> nao herda color: sem isto o nome sai na cor padrao do sistema. */
  color: var(--text);
  font-family: inherit;
}
.spread-option:hover { border-color: var(--border-bright); }
.spread-option.selected {
  border-color: var(--gold);
  background: rgba(232, 175, 106, 0.10);
  box-shadow: 0 0 22px rgba(232, 191, 106, 0.20);
}

/* O spread em destaque ocupa a linha inteira. */
.spread-option.featured { grid-column: 1 / -1; padding-right: 96px; }
.spread-option .name { font-family: var(--font-display); font-weight: 600; font-size: 16.5px; letter-spacing: 0.02em; }
.spread-option .blurb { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.spread-option .count { font-size: 12.5px; color: var(--text-dim); margin-top: auto; padding-top: 6px; }

.featured-flag {
  position: absolute;
  top: 14px; right: 14px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1206;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.form-note {
  margin: 0;
  padding: 14px 17px;
  border-radius: var(--radius-sm);
  background: rgba(255, 143, 143, 0.1);
  border: 1px solid rgba(255, 143, 143, 0.32);
  color: var(--danger);
  font-size: 14px;
}
.form-note.info {
  background: rgba(157, 127, 240, 0.12);
  border-color: rgba(157, 127, 240, 0.35);
  color: var(--violet-bright);
}

.loading-inline { color: var(--text-dim); font-size: 14px; margin: 0; }

/* ─── Títulos de seção ────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 31px);
  font-weight: 600;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: 0.03em;
}
.section-title::after {
  content: "✦";
  display: block;
  color: var(--gold);
  font-size: 13px;
  margin-top: 10px;
  opacity: 0.8;
}

/* ─── Resultado ───────────────────────────────────────────────────────────── */
.result { padding-top: 46px; animation: rise 0.45s ease; scroll-margin-top: 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.result-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.result-head h2 {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 600; margin: 0; letter-spacing: 0.03em;
}

.cards-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  margin-bottom: 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) transparent;
}

.tarot-card {
  flex: 0 0 152px;
  margin: 0;
  background: linear-gradient(158deg, #241a44 0%, #1a1233 55%, #120c26 100%);
  border: 1px solid var(--border-bright);
  border-radius: 13px;
  padding: 13px 11px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: flip 0.55s ease backwards;
  position: relative;
}
@keyframes flip {
  from { opacity: 0; transform: rotateY(-26deg) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.tarot-card .position {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  line-height: 1.4;
  opacity: 0.92;
  min-height: 2.8em;
  order: -1;
}

/* Moldura dourada em volta da arte original. */
.card-art {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #f4ecd8;
  border: 1px solid rgba(232, 191, 106, 0.55);
  box-shadow: 0 0 16px rgba(232, 191, 106, 0.22);
  aspect-ratio: 242 / 420;
  display: grid;
  place-items: center;
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Carta invertida: a arte gira 180°, como na mesa. */
.tarot-card.is-reversed .card-art img { transform: rotate(180deg); }

.glyph-fallback {
  font-size: 40px;
  color: var(--gold-deep);
  line-height: 1;
}

.card-meta { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }

.tarot-card .card-name {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
}
.tarot-card .orientation {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tarot-card.is-reversed { border-color: rgba(157, 127, 240, 0.6); }
.tarot-card.is-reversed .orientation { color: var(--violet-bright); }

/* ─── Interpretação ───────────────────────────────────────────────────────── */
.interpretation {
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 34px 36px;
  box-shadow: var(--shadow);
}

.interpretation-body { font-size: 16.5px; }

/* O "## " do modelo vira <h3>: o <h2> da secao ja e "Your reading". */
.interpretation-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin: 32px 0 11px;
  letter-spacing: 0.02em;
}
.interpretation-body h2 {
  font-family: var(--font-display);
  font-size: 23px; font-weight: 600; color: var(--gold);
  margin: 32px 0 11px; letter-spacing: 0.02em;
}
.interpretation-body > :first-child { margin-top: 0; }
.interpretation-body h4 { font-size: 17px; margin: 22px 0 8px; color: var(--text); }
.interpretation-body p { margin: 0 0 15px; }
.interpretation-body em { color: var(--gold-bright); font-style: italic; }
.interpretation-body strong { color: var(--text); font-weight: 600; }
.interpretation-body ul { padding-left: 22px; margin: 0 0 15px; }
.interpretation-body li { margin-bottom: 6px; }
.interpretation-body code {
  background: rgba(6,4,15,0.7); padding: 1px 5px; border-radius: 4px; font-size: 13.5px;
}

/* ─── A espera: a mesa do tarólogo ────────────────────────────────────────
   Enquanto o modelo escreve, o visitante vê a leitura acontecendo: o
   halo de vela, a roda de graus girando e as cartas sendo viradas uma a
   uma. Tudo em CSS — nenhuma imagem, nenhum frame de JS. */

.thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 0 14px;
}
.thinking[hidden] { display: none; }

.oracle {
  position: relative;
  width: 172px;
  height: 172px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

/* Luz de vela: respira devagar, fora de fase com o resto. */
.oracle-glow {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%,
    rgba(232, 191, 106, 0.30) 0%,
    rgba(157, 127, 240, 0.17) 44%,
    transparent 70%);
  animation: oracle-breathe 3.7s ease-in-out infinite;
}
@keyframes oracle-breathe {
  0%, 100% { opacity: 0.5; transform: scale(0.93); }
  50%      { opacity: 1;   transform: scale(1.07); }
}

.oracle-ring { position: absolute; border-radius: 50%; }

/* Roda de graus: marcas em conic-gradient, recortadas num aro fino.
   As quatro marcas cardeais vêm de um segundo gradiente mais espaçado. */
.oracle-ring-outer {
  inset: 0;
  background:
    repeating-conic-gradient(from 0deg,
      rgba(232, 191, 106, 0.9) 0deg 0.8deg, transparent 0.8deg 15deg),
    repeating-conic-gradient(from 0deg,
      rgba(192, 168, 255, 0.85) 0deg 2deg, transparent 2deg 90deg);
  -webkit-mask: radial-gradient(circle, transparent 0 79px, #000 79px 84px, transparent 84px);
          mask: radial-gradient(circle, transparent 0 79px, #000 79px 84px, transparent 84px);
  animation: oracle-spin 15s linear infinite;
}

/* Aro interno tracejado, girando ao contrário: dá profundidade sem peso. */
.oracle-ring-mid {
  inset: 27px;
  border: 1px dashed rgba(157, 127, 240, 0.5);
  animation: oracle-spin-rev 11s linear infinite;
}

@keyframes oracle-spin     { to { transform: rotate(360deg); } }
@keyframes oracle-spin-rev { to { transform: rotate(-360deg); } }

/* Fagulhas em órbita, cada uma no seu raio e no seu tempo. */
.oracle-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 9px rgba(255, 224, 163, 0.95);
  animation: oracle-orbit var(--dur) linear infinite;
  animation-delay: var(--delay);
}
.oracle-spark:nth-child(4) { --r: 71px; --dur: 6.5s; --delay: 0s;    }
.oracle-spark:nth-child(5) { --r: 60px; --dur: 9s;   --delay: -3.1s; }
.oracle-spark:nth-child(6) { --r: 80px; --dur: 12s;  --delay: -6.4s;
  background: var(--violet-bright); box-shadow: 0 0 9px rgba(192,168,255,0.9); }
.oracle-spark:nth-child(7) { --r: 52px; --dur: 7.8s; --delay: -1.7s; }

@keyframes oracle-orbit {
  0%   { transform: rotate(0deg)   translateX(var(--r)) rotate(0deg);    opacity: 0.15; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: rotate(360deg) translateX(var(--r)) rotate(-360deg); opacity: 0.15; }
}

/* As três cartas: sobem, viram e assentam, uma depois da outra. */
.oracle-deck {
  position: relative;
  width: 44px;
  height: 70px;
  perspective: 520px;
  transform-style: preserve-3d;
}

.oracle-card {
  --rest: 0deg;
  position: absolute;
  inset: 0;
  border-radius: 5px;
  border: 1px solid rgba(232, 191, 106, 0.5);
  /* Mesmo verso do leque, para o olho reconhecer o baralho. */
  background:
    repeating-linear-gradient(45deg,
      rgba(232,191,106,0.14) 0 3px, transparent 3px 7px),
    repeating-linear-gradient(-45deg,
      rgba(232,191,106,0.14) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #2b2050 0%, #1a1233 60%, #120c26 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  color: rgba(232, 191, 106, 0.6);
  font-size: 15px;
  transform-origin: 50% 95%;
  transform-style: preserve-3d;
  animation: oracle-turn 3.6s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
}
.oracle-card::after { content: "✦"; }

.oracle-card:nth-child(1) { --rest: -21deg; animation-delay: 0s;   }
.oracle-card:nth-child(2) { --rest:   0deg; animation-delay: 0.4s; }
.oracle-card:nth-child(3) { --rest:  21deg; animation-delay: 0.8s; }

/* Um giro inteiro por ciclo: termina em 360°, então não há salto no loop.
   O brilho vai ao pico no perfil da carta, no instante em que ela vira. */
@keyframes oracle-turn {
  0%,  6%   { transform: rotate(var(--rest)) translateY(0)     translateZ(0)    rotateY(0deg);
              filter: brightness(1); }
  22%       { transform: rotate(var(--rest)) translateY(-20px) translateZ(34px) rotateY(0deg);
              filter: brightness(1.25); }
  40%       { transform: rotate(var(--rest)) translateY(-20px) translateZ(34px) rotateY(90deg);
              filter: brightness(2.6) saturate(1.5); }
  58%       { transform: rotate(var(--rest)) translateY(-20px) translateZ(34px) rotateY(180deg);
              filter: brightness(1.25); }
  76%       { transform: rotate(var(--rest)) translateY(-20px) translateZ(34px) rotateY(270deg);
              filter: brightness(2.6) saturate(1.5); }
  94%, 100% { transform: rotate(var(--rest)) translateY(0)     translateZ(0)    rotateY(360deg);
              filter: brightness(1); }
}

/* A frase troca sozinha; o fade evita o corte seco entre uma e outra. */
.thinking-label {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.01em;
  min-height: 1.6em;
  transition: opacity 0.42s ease;
}
.thinking-label.is-fading { opacity: 0; }

/* Movimento reduzido: a cena continua legível, só para de se mexer. */
@media (prefers-reduced-motion: reduce) {
  .oracle-ring-outer,
  .oracle-ring-mid,
  .oracle-spark,
  .oracle-card { animation: none; }
  .oracle-card:nth-child(1) { transform: rotate(-21deg); }
  .oracle-card:nth-child(3) { transform: rotate(21deg); }
  .oracle-spark { opacity: 0.7; }
  .oracle-glow { animation: oracle-breathe 6s ease-in-out infinite; }
}

.interpretation-body.streaming::after {
  content: "▌"; color: var(--gold); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ─── Como funciona ───────────────────────────────────────────────────────── */
.how { padding-top: 82px; }
.how-steps {
  list-style: none; padding: 0; margin: 30px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 20px;
}
.how-steps li {
  background: rgba(28, 20, 54, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.step-num {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600;
  box-shadow: var(--glow-gold);
}
.how-steps h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600; margin: 0 0 8px; letter-spacing: 0.03em;
}
.how-steps p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* ─── Planos ──────────────────────────────────────────────────────────────── */
.plans { padding-top: 82px; scroll-margin-top: 20px; }
.plans-sub { color: var(--text-muted); margin: 0 0 30px; text-align: center; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(206px, 1fr)); gap: 16px; }

.plan-card {
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative;
}
.plan-card.current { border-color: var(--gold); box-shadow: 0 0 26px rgba(232,191,106,0.18); }
.plan-card .plan-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: 0.04em;
}
.plan-card .plan-price { font-size: 21px; font-weight: 600; color: var(--gold); }
.plan-card .plan-limit { color: var(--text-muted); font-size: 14px; flex: 1; }
.plan-card .btn { margin-top: 16px; }
.plan-card .plan-current-label {
  margin-top: 16px; font-size: 13px; color: var(--success);
  text-align: center; letter-spacing: 0.05em; text-transform: uppercase;
}
.plan-card .plan-unavailable {
  margin-top: 16px; font-size: 12.5px; color: var(--text-dim);
  text-align: center; line-height: 1.45;
}

/* ─── Prova social ────────────────────────────────────────────────────────── */
.social-proof { padding-top: 82px; }
.testimonials {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px; margin-top: 30px;
}
.testimonial {
  background: rgba(28, 20, 54, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.testimonial .stars-row { color: var(--gold); letter-spacing: 0.14em; font-size: 14px; margin-bottom: 11px; }
.testimonial blockquote {
  margin: 0 0 14px; font-family: var(--font-serif); font-size: 17px;
  font-style: italic; line-height: 1.55; color: var(--text);
}
.testimonial .who { font-size: 13px; color: var(--text-dim); letter-spacing: 0.03em; }

.testimonial.placeholder { border-style: dashed; border-color: var(--border-bright); }
.testimonial.placeholder blockquote { color: var(--text-dim); }

.testimonial-disclaimer {
  margin: 18px 0 0; text-align: center;
  font-size: 13px; color: var(--text-dim); font-style: italic;
}

/* ─── Histórico ───────────────────────────────────────────────────────────── */
.history { padding-top: 82px; }
.history-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: rgba(28, 20, 54, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 19px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.history-item:hover { border-color: var(--gold); background: rgba(232,191,106,0.05); }
.history-item .h-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.history-item .h-spread { font-weight: 600; font-family: var(--font-display); letter-spacing: 0.02em; }
.history-item .h-date { color: var(--text-dim); white-space: nowrap; }
.history-item .h-question { color: var(--text-muted); font-size: 14px; margin-top: 5px; font-style: italic; }

/* ─── Dados da conta ──────────────────────────────────────────────────────── */
.account-data { padding-top: 82px; }
.account-card {
  margin-top: 28px;
  background: rgba(28, 20, 54, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.account-lede { color: var(--text-muted); margin: 0 0 14px; font-size: 15px; }
.account-note { color: var(--text-dim); font-size: 13px; margin: 14px 0 0; }
.account-note a { color: var(--text-muted); }

.delete-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-top: 22px;
}

/* ─── CTA final ───────────────────────────────────────────────────────────── */
.final-cta {
  margin-top: 90px;
  padding: 56px 30px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(157,127,240,0.20), transparent 70%),
    linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-bright);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.final-ornament { color: var(--gold); letter-spacing: 0.55em; font-size: 13px; opacity: 0.7; margin-bottom: 18px; }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.6vw, 34px);
  font-weight: 600; margin: 0 0 10px; letter-spacing: 0.02em;
}
.final-cta p { color: var(--text-muted); margin: 0 0 30px; font-size: 17px; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: 820px; margin: 0 auto;
  padding: 40px 24px 52px;
  border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.site-footer p { margin: 0; }
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer-brand {
  font-family: var(--font-display); color: var(--gold);
  font-size: 14px; letter-spacing: 0.09em; margin-bottom: 3px !important;
  display: flex; align-items: center; gap: 8px;
}
.footer-brand img { width: 22px; height: 22px; border-radius: 50%; }

.footer-legal { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; transition: color 0.18s; }
.footer-legal a:hover { color: var(--gold); text-decoration: underline; }

.socials { display: flex; gap: 18px; align-items: center; }
.socials a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-dim); text-decoration: none; transition: color 0.18s;
}
.socials a:hover { color: var(--gold); }
.socials svg { flex: 0 0 auto; }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(4, 3, 10, 0.86);
  display: grid; place-items: center;
  padding: 24px; z-index: 50;
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }

.modal-card {
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 34px 30px;
  max-width: 410px; width: 100%;
  position: relative;
  box-shadow: var(--shadow);
  text-align: center;
}
.modal-ornament { color: var(--gold); font-size: 22px; text-shadow: var(--glow-gold); margin-bottom: 10px; }
.modal-card h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin: 0 0 8px; letter-spacing: 0.03em;
}
.modal-sub { color: var(--text-muted); font-size: 14.5px; margin: 0 0 24px; }

.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-dim);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }

.divider { text-align: center; margin: 22px 0 16px; position: relative; }
.divider::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.divider span {
  position: relative; background: var(--bg-card); padding: 0 12px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim);
}

.dev-login { text-align: left; }
.dev-note { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; line-height: 1.5; }
.dev-note code { background: var(--bg-deep); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--gold); }
.dev-login input {
  width: 100%; background: var(--bg-deep);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 11px 14px; margin-bottom: 10px;
}
.dev-login input:focus { outline: none; border-color: var(--violet); }
.dev-login .btn { width: 100%; }

.login-error { color: var(--danger); font-size: 14px; margin: 14px 0 0; }

/* ─── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 13px 22px; font-size: 14.5px;
  box-shadow: var(--shadow); z-index: 60;
  max-width: min(460px, calc(100vw - 40px));
}
.toast[hidden] { display: none; }
.toast.error { border-color: rgba(255, 143, 143, 0.6); color: var(--danger); }

/* ─── Responsivo ──────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .site-header { flex-wrap: wrap; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 17px; }
  .draw-panel { padding: 28px 20px; }
  .interpretation { padding: 24px 20px; }
  .tarot-card { flex-basis: 132px; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .spread-option.featured { padding-right: 16px; padding-top: 42px; }
  .featured-flag { top: 14px; left: 16px; right: auto; }
  .final-cta { padding: 42px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Leque de cartas ─────────────────────────────────────────────────────── */
.fan-section {
  padding-top: 56px;
  scroll-margin-top: 20px;
  animation: rise 0.45s ease;
}

.fan-prompt {
  text-align: center;
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 52ch;
  margin: 18px auto 34px;
}

/* O leque em si: as cartas se sobrepõem como na mão de um leitor. */
.fan {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 30px 12px 42px;
  perspective: 1200px;
}

.fan-card {
  /* Sobreposição negativa: 78 cartas cabem sem rolagem horizontal. */
  width: 58px;
  height: 100px;
  margin: 0 -11px 20px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  transform: rotate(var(--angle));
  transform-origin: center center;
  transition: transform 0.22s ease, filter 0.22s ease;
}
.fan-card:hover:not(.inert):not(:disabled) {
  transform: rotate(0deg) translateY(-14px) scale(1.12);
  z-index: 5;
}
.fan-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; z-index: 6; }

/* Verso da carta: padrão geométrico em CSS, sem imagem. */
.fan-back {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(232, 191, 106, 0.45);
  background:
    repeating-linear-gradient(45deg,
      rgba(232,191,106,0.13) 0 3px, transparent 3px 7px),
    repeating-linear-gradient(-45deg,
      rgba(232,191,106,0.13) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #2b2050 0%, #1a1233 60%, #120c26 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}
/* Ponto central, como o miolo de um verso clássico. */
.fan-back::after {
  content: "✦";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(232, 191, 106, 0.5);
  font-size: 15px;
}

.fan-card.chosen {
  transform: rotate(0deg) translateY(-22px) scale(1.16);
  z-index: 8;
}
.fan-card.chosen .fan-back {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(232, 191, 106, 0.75), 0 4px 14px rgba(0, 0, 0, 0.6);
}
.fan-card.inert { filter: grayscale(0.55) brightness(0.62); cursor: default; }

/* Número da ordem de escolha. */
.fan-order {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1206;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 21px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9;
}
.fan-card.chosen .fan-order { opacity: 1; }

.fan-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: rgba(28, 20, 54, 0.55);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
}
.fan-counter {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--gold);
}
.fan-buttons { display: flex; gap: 10px; align-items: center; }

/* ─── Compartilhar ────────────────────────────────────────────────────────── */
.share-block {
  margin-top: 30px;
  padding: 30px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(157,127,240,0.18), transparent 70%),
    linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
}
.share-lede {
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.share-preview { margin-top: 24px; }
.share-preview img {
  max-width: min(320px, 100%);
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow);
}

/* ─── Paywall ─────────────────────────────────────────────────────────────── */
.paywall-card { max-width: 620px; }

.paywall-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}
.paywall-plan {
  background: rgba(6, 4, 15, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.paywall-plan .plan-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.paywall-plan .plan-price { font-size: 20px; font-weight: 600; color: var(--gold); }
.paywall-plan .plan-limit { color: var(--text-muted); font-size: 14px; flex: 1; }
.paywall-plan .btn { margin-top: 14px; width: 100%; }
.paywall-plan .plan-unavailable {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .fan-card { width: 46px; height: 80px; margin: 0 -10px 12px; }
  .fan-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .fan-buttons { justify-content: center; }
}

/* ─── Aviso de cookies ────────────────────────────────────────────────────── */
.cookie-bar {
  position: fixed;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(720px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cookie-bar[hidden] { display: none; }
.cookie-text { margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--text-muted); }
.cookie-text a { color: var(--gold); }
.cookie-bar .btn { flex: 0 0 auto; }

/* ─── Páginas legais ──────────────────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  color: var(--gold);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
.legal .legal-updated { color: var(--text-dim); font-size: 13px; margin: 0 0 36px; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin: 38px 0 12px;
  letter-spacing: 0.02em;
}
.legal p, .legal li { color: var(--text-muted); font-size: 15px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--gold); }
.legal .legal-back {
  display: inline-block; margin-bottom: 28px;
  color: var(--text-muted); text-decoration: none; font-size: 14px;
}
.legal .legal-back:hover { color: var(--gold); }
.legal-note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(28, 20, 54, 0.5);
  padding: 16px 20px;
  margin: 0 0 14px;
}

@media (max-width: 620px) {
  .cookie-bar { bottom: 10px; padding: 14px 16px; gap: 12px; }
  .cookie-text { font-size: 13px; }
  .account-card { padding: 22px 18px; }
  .delete-actions .btn { width: 100%; }
}
