:root {
  --bg-deep: #120a1f;
  --bg-mid: #1c1130;
  --bg-panel: #211537;
  --gold: #d4af6a;
  --gold-bright: #f0cd8f;
  --text-light: #f1e6d8;
  --text-muted: #b6a6c9;

  --tarot-accent: #a1355f;
  --tarot-glow: rgba(161, 53, 95, 0.45);
  --astral-accent: #4d6fa8;
  --astral-glow: rgba(77, 111, 168, 0.45);
  --zen-accent: #3f8f74;
  --zen-glow: rgba(63, 143, 116, 0.4);

  --font-display: 'Rakkas', 'Cinzel', serif;
  --font-accent: 'Aladin', cursive;
  --font-body: 'EB Garamond', 'Georgia', serif;
  --font-ui: 'Cinzel', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(122, 43, 74, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 85% 0%, rgba(77, 111, 168, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at top, var(--bg-mid) 0%, var(--bg-deep) 55%, #08040d 100%);
  color: var(--text-light);
  font-family: var(--font-body);
  min-height: 100%;
  overflow-x: hidden;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 35% 85%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 10% 65%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.4), transparent);
  background-repeat: repeat;
  background-size: 600px 600px;
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.65;
  background:
    radial-gradient(650px 420px at 18% 20%, rgba(161, 53, 95, 0.4), transparent 70%),
    radial-gradient(600px 460px at 80% 12%, rgba(63, 143, 116, 0.32), transparent 70%),
    radial-gradient(560px 400px at 50% 85%, rgba(77, 111, 168, 0.3), transparent 70%),
    radial-gradient(520px 380px at 55% -5%, rgba(212, 175, 106, 0.25), transparent 70%);
  animation: driftNebula 26s ease-in-out infinite alternate;
}

@keyframes driftNebula {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(24px) scale(1.06); }
}

/* Constelações que se acendem e apagam em pontos diferentes do céu */
.constellations {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Cada slot é uma caixa quadrada; a constelação (figura + estrelas) se encaixa nela
   mantendo a proporção. A figura clássica fica bem apagada, as estrelas por cima. */
.constellation {
  position: absolute;
  width: var(--c-size, 210px);
  height: var(--c-size, 210px);
  overflow: visible;
  opacity: 0;
  animation: constellationGlow 16s ease-in-out infinite;
}

.constellation-figure { opacity: 0.5; }

.constellation-lines {
  stroke: rgba(240, 205, 143, 0.8);
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.constellation-lines line { vector-effect: non-scaling-stroke; }

.constellation-stars {
  fill: #fff4d6;
  filter: drop-shadow(0 0 3px rgba(240, 205, 143, 0.95));
}

.c1 { top: 6%;  left: 5%;  animation-delay: 0s; }
.c2 { top: 12%; left: 72%; animation-delay: -3s; --c-size: 190px; }
.c3 { top: 58%; left: 2%;  animation-delay: -7s; --c-size: 180px; }
.c4 { top: 66%; left: 76%; animation-delay: -10s; --c-size: 200px; }
.c5 { top: 38%; left: 40%; animation-delay: -13s; --c-size: 170px; }
.c6 { top: 2%;  left: 40%; animation-delay: -5.5s; --c-size: 170px; }

@media (max-width: 640px) {
  .constellation { width: calc(var(--c-size, 210px) * 0.6); height: calc(var(--c-size, 210px) * 0.6); }
}

@keyframes constellationGlow {
  0%, 100% { opacity: 0; }
  8%  { opacity: 0; }
  22% { opacity: 0.9; }
  40% { opacity: 0.9; }
  55% { opacity: 0; }
}

/* Ciclo dia/noite: sol e lua cruzando o topo da tela */
.celestial-cycle {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 240px;
  overflow: hidden;
  /* O halo do sol nasce perto da borda de baixo; sem o esmaecimento, o overflow cortava o brilho
     numa linha reta no começo do percurso. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 74%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

/* Um dia inteiro em SKY_CYCLE: o eixo X anda em ritmo constante (.sky-track) e o Y
   sobe e desce com aceleração suave (.sky-body), o que desenha o arco. Até o meio
   da tela o sol já virou lua, que desce rumo ao lado azul e mais escuro do céu. */
.celestial-cycle { --sky-cycle: 100s; }

.sky-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: skyX var(--sky-cycle) linear infinite;
  will-change: transform;
}

.sky-body {
  position: absolute;
  left: 0;
  width: 76px;
  height: 76px;
  margin-left: -38px;
  animation: skyY var(--sky-cycle) infinite;
  will-change: transform, opacity;
}

.sky-sun, .sky-moon, .sky-sun > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sky-sun {
  animation: skySun var(--sky-cycle) linear infinite;
}

/* O brilho do sol é um halo fixo atrás dele. Um filter: drop-shadow sobre os raios que
   giram obrigava o navegador a recompor as camadas a cada quadro (travava o Android). */
.sky-sun::before {
  content: "";
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 100, 0.5) 0%, rgba(255, 140, 60, 0.22) 38%, transparent 70%);
}

/* Os raios giram devagar, como se o sol respirasse. O giro é no <svg> inteiro (roda na
   GPU), nunca num elemento dentro dele (redesenha o sol a cada quadro). */
.sun-rays {
  transform-origin: 50% 50%;
  animation: sunSpin 90s linear infinite;
}

.sky-moon {
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(240, 220, 170, 0.6)) drop-shadow(0 0 26px rgba(180, 200, 255, 0.25));
  animation: skyMoon var(--sky-cycle) linear infinite;
}

@keyframes skyX {
  0%   { transform: translateX(-6vw); }
  92%  { transform: translateX(106vw); }
  100% { transform: translateX(106vw); }
}

/* Sobe até o meio-dia (46%) desacelerando, depois desce acelerando */
@keyframes skyY {
  0%   { transform: translateY(190px); opacity: 0; animation-timing-function: ease-out; }
  4%   { opacity: 1; }
  46%  { transform: translateY(14px); animation-timing-function: ease-in; }
  88%  { opacity: 1; }
  92%  { transform: translateY(190px); opacity: 0; }
  100% { transform: translateY(190px); opacity: 0; }
}

/* A troca acontece na subida final (entre 36% e 46%) e termina quando o astro chega
   ao meio da tela (46%, pelo skyX): o sol encolhe e esfria enquanto a lua surge
   girando de leve, como um dia virando noite. */
@keyframes skySun {
  0%, 36%   { opacity: 1; transform: scale(1) rotate(0deg); }
  46%, 100% { opacity: 0; transform: scale(0.72) rotate(40deg); }
}

@keyframes skyMoon {
  0%, 36%   { opacity: 0; transform: scale(0.7) rotate(-35deg); }
  46%, 100% { opacity: 1; transform: scale(0.92) rotate(0deg); }
}

@keyframes sunSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .sky-body { width: 54px; height: 54px; margin-left: -27px; }
}

@media (prefers-reduced-motion: reduce) {
  .sky-track, .sky-body, .sky-sun, .sky-moon, .sun-rays { animation: none; }
  .sky-body { display: none; }
}

.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4.5rem 1.5rem 2.5rem;
}

.site-logo {
  display: block;
  width: auto;
  height: clamp(96px, 14vw, 140px);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 22px rgba(240, 205, 143, 0.28));
}

.eyebrow {
  font-family: var(--font-accent);
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  opacity: 0.85;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin: 0;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(240,205,143,0.35), 0 2px 0 rgba(0,0,0,0.4);
  letter-spacing: 0.03em;
}

.site-subtitle {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.8rem;
}

.cards-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 2rem 5rem;
}

@media (max-width: 980px) {
  .cards-grid { grid-template-columns: 1fr; max-width: 480px; }
}

/* Página de um mestre (gerada por scripts/gerar-paginas.mjs): um card só, centrado. */
.cards-grid--mestre { grid-template-columns: minmax(260px, 480px); justify-content: center; }
.site-title a { color: inherit; text-decoration: none; }
.outros-mestres { position: relative; z-index: 1; max-width: 720px; margin: 0 auto 4rem; padding: 0 1.5rem; text-align: center; }
.outros-mestres .ask-btn { display: inline-block; text-decoration: none; }
.outros-mestres-links { margin: 1.2rem 0 0; font-family: var(--font-ui); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.6rem; }
.outros-mestres-links a { color: var(--gold); }

/* Aviso dos próximos oráculos, logo abaixo dos três mestres. */
.em-breve {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: -2rem auto 4rem;
  padding: 1.6rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 106, 0.35);
  border-bottom: 1px solid rgba(212, 175, 106, 0.35);
}

.em-breve-titulo {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--gold-bright);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.em-breve-lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.2rem;
  font-family: var(--font-ui);
  color: var(--text-light);
}

.em-breve-item {
  flex: 1 1 190px;
  max-width: 215px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 0.8rem;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 10px;
  background: rgba(10, 8, 20, 0.35);
}

.em-breve-nome {
  margin: 0;
  font-size: 1rem;
  color: var(--gold-bright);
}

.em-breve-nome::before {
  content: "✦ ";
  content: "✦ " / "";
  color: var(--gold);
}

.em-breve-desc {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.em-breve-botao {
  margin-top: auto;
  padding: 0.45rem 1.1rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--gold-bright);
  background: transparent;
  border: 1px solid rgba(212, 175, 106, 0.55);
  border-radius: 999px;
  cursor: pointer;
}

.em-breve-botao:hover,
.em-breve-botao:focus-visible {
  background: rgba(212, 175, 106, 0.12);
  border-color: var(--gold-bright);
}

@media (max-width: 980px) {
  .em-breve { margin: -2rem 16px 3rem; padding: 1.4rem 0.5rem; }
}

@media (max-width: 640px) {
  .em-breve-item { flex-basis: 100%; max-width: 340px; }
}

/* Preço da leitura completa, logo abaixo dos mestres: o valor vem do servidor (script.js).
   Faixa pequena de uma linha; com o preço, ganha a moldura dourada. */
.preco-home {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: -0.5rem auto 3.2rem;
  padding: 0.55rem 1.2rem 0.6rem;
  text-align: center;
  border: 1px solid rgba(212, 175, 106, 0.2);
  border-radius: 999px;
  /* Fundo quase opaco: as constelações do céu não passam por trás do texto. */
  background: rgba(14, 10, 26, 0.92);
  transition: border-color 0.3s ease;
}
.preco-home.preco-carregado { border-color: rgba(212, 175, 106, 0.45); }
.preco-home-linha { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.15rem 0.7rem; }
.preco-home-titulo {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.preco-home-valor {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--gold-bright);
}
.preco-home-valor:empty { display: none; }
.preco-home-promo {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--gold-bright);
}
.preco-home-promo[hidden] { display: none; }
.preco-home-nota {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Perguntas-atalho: sugestões prontas para quem travou na caixa em branco. */
.q-atalhos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.5rem 0 1rem;
}
.atalho {
  padding: 0.45rem 0.85rem;
  border: 1px dashed rgba(212, 175, 106, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.atalho:hover, .atalho:focus-visible {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(212, 175, 106, 0.1);
}

@media (max-width: 640px) {
  .preco-home { margin: -0.5rem 16px 3rem; border-radius: 18px; }
  .q-atalhos { flex-direction: column; }
  .atalho { width: 100%; }
}

.oracle-card {
  position: relative;
  border-radius: 18px 18px 90px 90px / 18px 18px 140px 140px;
  border: 1px solid rgba(212, 175, 106, 0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.15)), var(--bg-panel);
  padding: 2px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  /* Os três cartões têm a mesma altura (grade) e o botão desce para o pé de cada um,
     então os botões ficam alinhados mesmo com textos de tamanhos diferentes. */
  display: flex;
}

.oracle-card:hover { transform: translateY(-6px); }

.card--tarot { box-shadow: 0 10px 35px rgba(0,0,0,0.5), 0 0 40px -12px var(--tarot-glow); }
.card--astral { box-shadow: 0 10px 35px rgba(0,0,0,0.5), 0 0 40px -12px var(--astral-glow); }
.card--zen { box-shadow: 0 10px 35px rgba(0,0,0,0.5), 0 0 40px -12px var(--zen-glow); }

.card-face {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.7rem 2.2rem;
  text-align: center;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.25)), var(--bg-panel);
}

.card--tarot .card-face { border-top: 3px solid var(--tarot-accent); }
.card--astral .card-face { border-top: 3px solid var(--astral-accent); }
.card--zen .card-face { border-top: 3px solid var(--zen-accent); }

.card-emblem { display: flex; justify-content: center; margin-bottom: 1rem; }

.portrait {
  width: 148px;
  height: 188px;
  background-size: cover;
  background-position: center 15%;
  background-repeat: no-repeat;
  border-radius: 50% 50% 10% 10% / 62% 62% 8% 8%;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

.card--tarot .portrait { box-shadow: 0 0 28px -4px var(--tarot-glow), 0 4px 16px rgba(0,0,0,0.6); }
.card--astral .portrait { box-shadow: 0 0 28px -4px var(--astral-glow), 0 4px 16px rgba(0,0,0,0.6); }
.card--zen .portrait { box-shadow: 0 0 28px -4px var(--zen-glow), 0 4px 16px rgba(0,0,0,0.6); }

.card-kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0.4rem 0 0.15rem;
  color: var(--gold-bright);
}

.persona-name {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  color: var(--text-light);
  margin: 0 0 0.9rem;
  opacity: 0.9;
}

.card-desc {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.card-tags {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--gold);
  opacity: 0.85;
  font-family: var(--font-ui);
  letter-spacing: 0.03em;
}

.open-btn, .ask-btn {
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.open-btn:hover, .ask-btn:hover {
  background: var(--gold);
  color: #241531;
  box-shadow: 0 0 18px rgba(240,205,143,0.5);
}

.ask-btn:disabled { opacity: 0.6; cursor: default; }

/* Mesma largura nos três cartões, qualquer que seja o texto. */
.card-face .open-btn { margin-top: auto; width: min(100%, 16rem); padding-inline: 1rem; }
/* "Consultar" na home é um link para a página do mestre. */
a.open-btn { display: inline-block; box-sizing: border-box; text-align: center; text-decoration: none; }

/* ===== Modal em tela cheia ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5vh 1.2rem;
  overflow-y: auto;
  background: radial-gradient(ellipse at top, rgba(28, 17, 48, 0.92), rgba(6, 3, 12, 0.96));
  backdrop-filter: blur(6px);
  animation: overlayFade 0.25s ease;
}

.modal-overlay.is-open { display: flex; }

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  width: min(980px, 96vw);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.3)), var(--bg-panel);
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 26px;
  padding: 3rem 3.2rem 3.4rem;
  box-shadow: 0 25px 70px rgba(0,0,0,0.65);
  animation: modalPop 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1);
  font-size: 1.08rem;
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal--tarot { border-top: 3px solid var(--tarot-accent); }
.modal--astral { border-top: 3px solid var(--astral-accent); }
.modal--zen { border-top: 3px solid var(--zen-accent); }

.modal-header {
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
  text-align: left;
}

.modal-portrait {
  width: 140px;
  height: 178px;
  flex-shrink: 0;
}

.modal-header .persona-name { margin-bottom: 0.5rem; font-size: 1.35rem; }
.modal-header .panel-flavor { font-size: 1.05rem; }

.close-btn {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 2;
}

.close-btn:hover { color: var(--gold-bright); }

.panel-flavor {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.q-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  margin: 1.1rem 0 0.4rem;
}

.q-input {
  width: 100%;
  resize: vertical;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 10px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 1.12rem;
  padding: 0.9rem 1.05rem;
  margin-bottom: 1.1rem;
}

.q-input:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(240,205,143,0.15);
}

.reading-output {
  margin-top: 1.2rem;
  text-align: left;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-light);
  min-height: 0;
}

.reading-output:empty { margin-top: 0; }

.reading-output .reading-text {
  background: rgba(0,0,0,0.2);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  animation: fadeIn 0.5s ease;
}

.reading-output .reading-text p { margin: 0; }
.reading-output .reading-text p + p { margin-top: 0.8em; }

/* Leitura guardada no modal: data/pergunta em cima, ações embaixo */
.reading-output .reading-meta {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
}

.reading-output .reading-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.reading-output .share-status { text-align: left; margin-top: 0.5rem; }

.share-btn--primary {
  background: rgba(212, 175, 106, 0.18);
  border-color: var(--gold);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pergunta falada: botão do microfone logo abaixo da caixa (escondido sem suporte) */
.q-voz { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: -0.5rem 0 0.9rem; }
.q-voz:has(.mic-btn[hidden]) { display: none; }
.mic-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(212, 175, 106, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  cursor: pointer;
}
.mic-btn:hover, .mic-btn:focus-visible { border-color: var(--gold); }
.mic-btn[disabled] { opacity: 0.5; cursor: wait; }
.mic-btn.is-gravando { border-color: #e0607a; color: #ffd6de; animation: micPulso 1.2s ease-in-out infinite; }
@keyframes micPulso { 50% { box-shadow: 0 0 0 6px rgba(224, 96, 122, 0.18); } }
.mic-status { font-size: 0.82rem; font-style: italic; color: var(--text-muted); }
.q-voz + .q-hint { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .mic-btn.is-gravando { animation: none; } }

.q-hint {
  margin: -0.6rem 0 1.1rem;
  text-align: left;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Orientação de que mais detalhes deixam a leitura mais precisa: em destaque. */
.q-hint--destaque {
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: rgba(212, 175, 106, 0.08);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-light);
}
.q-hint--destaque strong { color: var(--gold-bright); font-style: normal; font-weight: 600; }
.birth-form .q-hint--destaque { margin: 0 0 1rem; }

/* Aviso de IA + consentimento, logo acima do botão: discreto, mas legível */
.q-consent {
  margin: -0.4rem 0 1.1rem;
  text-align: left;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-muted);
  opacity: 0.8;
}

.q-consent a, .osm-credit a { color: inherit; text-underline-offset: 2px; }
.q-consent a:hover, .osm-credit a:hover { color: var(--gold-bright); }

.osm-credit {
  margin: -0.3rem 0 0.6rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== As 3 cartas tiradas, de perto e em perspectiva ===== */
.tarot-reveal {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(161, 53, 95, 0.35), transparent 65%),
    rgba(9, 5, 16, 0.94);
  backdrop-filter: blur(6px);
  animation: overlayFade 0.5s ease;
}
.tarot-reveal[hidden] { display: none; }
.tarot-reveal:focus { outline: none; }

.tarot-reveal-title {
  margin: 0;
  font-family: var(--font-accent);
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
  color: var(--gold-bright);
  text-align: center;
}

.tarot-reveal-hint {
  margin: 0.4rem 0 0;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

/* Mesa em perspectiva: as cartas das pontas se voltam para o centro */
.tarot-reveal-cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.6rem, 3vw, 2.6rem);
  margin: clamp(1.4rem, 4vh, 2.6rem) 0;
  perspective: 1400px;
  width: 100%;
}

.reveal-card {
  --tilt: 0deg;
  margin: 0;
  /* limitada pela largura e pela altura da tela, para as 3 caberem sem rolar */
  width: clamp(92px, min(26vw, calc((100vh - 330px) * 0.571)), 250px);
  text-align: center;
  transform-style: preserve-3d;
  transform: rotateY(var(--tilt));
  opacity: 0;
  animation: revealCardIn 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
  animation-delay: calc(var(--i) * 0.18s);
  transition: transform 0.4s ease;
}
.reveal-card:nth-child(1) { --tilt: 16deg; }
.reveal-card:nth-child(3) { --tilt: -16deg; }
.reveal-card:nth-child(2) .reveal-card-frame { transform: translateZ(40px); }
.reveal-card:hover { transform: rotateY(0deg); }

@keyframes revealCardIn {
  from { opacity: 0; transform: translateY(60px) rotateX(35deg) rotateY(var(--tilt)); }
  to { opacity: 1; transform: translateY(0) rotateX(0) rotateY(var(--tilt)); }
}

.reveal-card-position {
  font-family: var(--font-ui);
  font-size: clamp(0.7rem, 0.6rem + 0.4vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.reveal-card-frame {
  aspect-ratio: 4 / 7;
  border-radius: 10px;
  border: 2px solid var(--gold);
  overflow: hidden;
  background: #1c0d18;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 34px rgba(240, 205, 143, 0.25);
}
.reveal-card-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reveal-card.is-reversed .reveal-card-frame img { transform: rotate(180deg); }

.reveal-card-name {
  margin: 0.8rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 0.75rem + 0.6vw, 1.3rem);
  line-height: 1.25;
  color: var(--text-light);
}

.reveal-card-tag {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: #e08aa9;
}

.tarot-reveal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

@media (max-width: 640px) {
  .reveal-card:nth-child(1) { --tilt: 10deg; }
  .reveal-card:nth-child(3) { --tilt: -10deg; }
  .reveal-card:nth-child(2) .reveal-card-frame { transform: translateZ(20px); }
  .tarot-reveal-actions { flex-direction: column; align-items: stretch; width: min(320px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-card { animation: none; opacity: 1; }
}

/* ===== Leitura em tela cheia (por cima dos modais) ===== */
.reading-focus {
  --focus-accent: var(--gold);
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--focus-accent) 22%, transparent), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(6, 3, 12, 0.9), transparent 70%),
    #0d0717;
  animation: overlayFade 0.5s ease;
}

.reading-focus[hidden] { display: none; }
.reading-focus[data-persona="tarot"] { --focus-accent: var(--tarot-accent); }
.reading-focus[data-persona="astral"] { --focus-accent: var(--astral-accent); }
.reading-focus[data-persona="zen"] { --focus-accent: var(--zen-accent); }

/* Com a leitura aberta, a página e os modais de trás não rolam junto */
body.is-reading,
body.is-reading .modal-overlay { overflow: hidden; }

/* Fundo próprio: ao rolar a leitura, o botão fica por cima do texto */
.reading-focus-close {
  position: fixed;
  top: 0.8rem;
  right: 1rem;
  border-radius: 50%;
  background: rgba(13, 7, 23, 0.85);
  border: 1px solid rgba(212, 175, 106, 0.3);
}

/* Largura em px (não em ch): em "ch" a coluna ficava estreita demais no computador */
.reading-focus-inner {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1rem, 5vw, 2rem) 4rem;
  animation: fadeIn 0.8s ease;
}

.reading-focus-inner[hidden],
.reading-wait[hidden] { display: none; }

.reading-focus:focus { outline: none; }

/* Na espera não há como fechar: a leitura já está a caminho */
.reading-focus.is-waiting .reading-focus-close { display: none; }

/* ----- Espera: emblema animado, contador e frases ----- */
.reading-wait {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 3rem 1rem;
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.wait-emblem {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 0.8rem;
}

/* Vídeo do mestre em moldura de arco, como os retratos; com ele, o emblema sai */
.wait-video { display: none; }
.reading-focus.tem-video .wait-video { display: block; }
.reading-focus.tem-video .wait-emblem { display: none; }
.wait-video video {
  display: none;
  height: min(52vh, 540px);
  aspect-ratio: 720 / 1296;
  max-width: 78vw;
  object-fit: cover;
  border-radius: 50% 50% 6% 6% / 28% 28% 3% 3%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 40px -6px var(--focus-accent), 0 8px 30px rgba(0, 0, 0, 0.6);
  background: #0d0717;
}
.reading-focus[data-persona="tarot"] [data-wait-video="tarot"],
.reading-focus[data-persona="astral"] [data-wait-video="astral"],
.reading-focus[data-persona="zen"] [data-wait-video="zen"] { display: block; }
.wait-video { position: relative; }
.wait-som {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: rgba(13, 7, 23, 0.82);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}
.wait-som[hidden] { display: none; }

.wait-tarot, .wait-astral, .wait-zen { display: none; }
.reading-focus[data-persona="tarot"] .wait-tarot,
.reading-focus[data-persona="astral"] .wait-astral,
.reading-focus[data-persona="zen"] .wait-zen { display: block; }

/* Tarô: três cartas que se abrem em leque e voltam, como no embaralhar */
.wait-tarot { position: absolute; inset: 0; }
.wait-tarot span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 116px;
  margin: -58px 0 0 -35px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: url("assets/tarot-card-back.jpg") center / cover, var(--tarot-accent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 26px var(--tarot-glow);
  transform-origin: 50% 120%;
  animation: tarotFan 3.2s ease-in-out infinite;
}
.wait-tarot span:nth-child(1) { --fan: -24deg; }
.wait-tarot span:nth-child(2) { --fan: 0deg; animation-delay: 0.12s; z-index: 1; }
.wait-tarot span:nth-child(3) { --fan: 24deg; animation-delay: 0.24s; }

@keyframes tarotFan {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  35%, 65% { transform: rotate(var(--fan)) translateY(-8px); }
}

/* Astral: planetas em órbita em volta de um sol */
.wait-astral { position: absolute; inset: 0; }
.wait-astral b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2cf, var(--gold-bright) 45%, var(--gold));
  box-shadow: 0 0 30px var(--gold-bright), 0 0 60px var(--astral-glow);
}
.wait-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(160, 185, 230, 0.35);
  border-radius: 50%;
  animation: orbitSpin linear infinite;
}
.wait-orbit i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #cfe0ff;
  box-shadow: 0 0 12px #9fbdf5;
}
.wait-orbit:nth-child(1) { width: 80px; height: 80px; margin: -40px 0 0 -40px; animation-duration: 3s; }
.wait-orbit:nth-child(2) { width: 124px; height: 124px; margin: -62px 0 0 -62px; animation-duration: 5.5s; }
.wait-orbit:nth-child(3) { width: 168px; height: 168px; margin: -84px 0 0 -84px; animation-duration: 9s; }
.wait-orbit:nth-child(2) i { background: var(--gold-bright); box-shadow: 0 0 12px var(--gold); }
.wait-orbit:nth-child(3) i { width: 7px; height: 7px; top: -4px; margin-left: -3.5px; }

@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* Zen: o ensō, círculo desenhado a pincel, traçado e apagado em respiração lenta */
/* O brilho fica no próprio SVG, com overflow visível, para não aparecer cortado em quadrado */
.wait-zen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 10px var(--zen-glow));
}
.wait-zen path {
  fill: none;
  stroke: #cfe8dc;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: ensoDraw 5s ease-in-out infinite;
}

@keyframes ensoDraw {
  0% { stroke-dashoffset: 240; opacity: 0.9; }
  55%, 75% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.wait-title {
  margin: 0;
  font-family: var(--font-accent);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  color: var(--gold-bright);
}

.wait-timer {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(2.2rem, 1.8rem + 1.5vw, 3rem);
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.wait-bar {
  width: min(360px, 80vw);
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.wait-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--focus-accent), var(--gold-bright));
  transition: width 1s linear;
}

.wait-phrase {
  min-height: 3.4em;
  max-width: 34rem;
  margin: 0.6rem 0 0;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-light);
  text-wrap: balance;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.wait-phrase.is-visible { opacity: 1; }

.wait-previa {
  width: min(760px, 100%);
  max-height: 45vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 0.6rem;
  background: rgba(13, 7, 23, 0.85);
  text-align: left;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  line-height: 1.8;
  color: var(--text-light);
}
.wait-previa[hidden] { display: none; }
.wait-previa p { margin: 0; }
.wait-previa p + p { margin-top: 1.1em; }
.wait-previa .wait-previa-legenda {
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.wait-note {
  max-width: 30rem;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .wait-tarot span, .wait-orbit, .wait-zen path { animation: none; }
  .wait-zen path { stroke-dashoffset: 0; }
}

/* ----- Salvar e compartilhar (escondidos enquanto a leitura espera a contribuição) ----- */
.reading-actions[hidden] { display: none; }
.reading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 2.8rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(212, 175, 106, 0.2);
}

.share-btn {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 106, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-bright);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.share-btn:hover { background: rgba(212, 175, 106, 0.15); border-color: var(--gold); }
.share-btn:disabled { opacity: 0.55; cursor: default; }
/* Limpar a leitura / calcular outro mapa: mais discreto que salvar e compartilhar. */
/* Lista das leituras guardadas, no modal de cada mestre */
.leituras-titulo { margin: 1.4rem 0 0.6rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--gold-bright); text-align: center; }
.leituras-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.leitura-item { display: flex; align-items: stretch; gap: 0.4rem; }
.leitura-abrir {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  font: inherit;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.leitura-abrir:hover, .leitura-abrir:focus-visible { border-color: var(--gold-bright); background: rgba(212, 175, 106, 0.08); }
.leitura-data { font-size: 0.8rem; color: var(--text-muted); }
.leitura-pergunta { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leitura-situacao { font-size: 0.78rem; color: var(--gold); }
.leitura-item.is-bloqueada .leitura-situacao { color: var(--gold-bright); }
.leitura-apagar {
  flex: none;
  width: 2.6rem;
  font-size: 1rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed rgba(212, 175, 106, 0.3);
  border-radius: 12px;
  cursor: pointer;
}
.leitura-apagar:hover, .leitura-apagar:focus-visible { color: var(--gold-bright); border-color: var(--gold-bright); }
.leituras-aviso { margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--text-muted); text-align: center; }

.share-status {
  min-height: 1.4em;
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.reading-focus-title {
  margin: 0 0 2rem;
  text-align: center;
  font-family: var(--font-accent);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  color: var(--gold-bright);
}

.reading-focus-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 2px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--focus-accent), transparent);
}

.reading-focus-body .reading-text {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  line-height: 1.8;
  color: var(--text-light);
}

.reading-focus-body .reading-text p { margin: 0; }
.reading-focus-body .reading-text p + p { margin-top: 1.1em; }

/* Capitular no primeiro parágrafo, como num livro antigo */
.reading-focus-body .reading-text p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.4em;
  line-height: 0.9;
  padding: 0.08em 0.12em 0 0;
  color: var(--gold-bright);
}

.reading-focus-back {
  display: block;
  margin: 1.6rem auto 0;
}

/* Formulário de nascimento (mapa astral) */
.birth-form {
  text-align: left;
  margin: 1rem 0 0.4rem;
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 10px;
  padding: 0.2rem 0.9rem 0.9rem;
  background: rgba(0, 0, 0, 0.15);
}

.birth-summary { cursor: pointer; padding: 0.7rem 0; margin: 0; list-style: none; }
.birth-summary::-webkit-details-marker { display: none; }

.birth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.birth-city { grid-column: 1 / -1; }

/* O fuso fica sozinho na linha de baixo; ocupando a largura toda, o texto não é cortado */

.birth-input {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(212, 175, 106, 0.35);
  border-radius: 8px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.5rem 0.6rem;
  width: 100%;
}

.birth-input:focus { outline: none; border-color: var(--gold-bright); }

.mini-btn {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  white-space: nowrap;
  margin-top: 0.6rem;
  min-height: 44px; /* alvo de toque confortável no celular */
}

.mini-btn:hover { background: rgba(212, 175, 106, 0.15); }
.mini-btn.primary { background: rgba(212, 175, 106, 0.12); width: 100%; }

.birth-result {
  font-size: 0.92rem;
  color: var(--gold);
  margin: 0.5rem 0 0;
  min-height: 1.1em;
  line-height: 1.5;
}

.birth-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Tiragem de cartas (tarô) */
.spread-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: left;
  margin: 0 0 1rem;
}

.spread-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 0 1rem;
  min-height: 130px;
}

.spread-card {
  width: 104px;
  height: 172px;
  position: relative;
  perspective: 600px;
  cursor: pointer;
}

.spread-card.is-taken { cursor: default; }

.spread-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.spread-card.is-flipped .spread-card-inner { transform: rotateY(180deg); }

.spread-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 7px;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  background-color: #1c0d18;
}

.spread-card-back {
  background-image: url('assets/tarot-card-back.jpg');
  background-size: cover;
  background-position: center;
}

.spread-card-front {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spread-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Carta que saiu invertida na tiragem */
.spread-card.is-reversed .spread-card-front img { transform: rotate(180deg); }

.spread-card:not(.is-taken):hover .spread-card-inner { transform: translateY(-6px); }
.spread-card.is-flipped:hover .spread-card-inner { transform: rotateY(180deg) translateY(0); }

.spread-selected {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin-bottom: 1rem;
  min-height: 1.3em;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

.spread-selected span { flex: 1; max-width: 120px; }

/* Botões abaixo da mesa: centralizados, mesma altura e alinhados entre si */
.spread-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.spread-actions .ask-btn,
.spread-actions .mini-btn {
  margin: 0;
  height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spread-actions .mini-btn { border-radius: 999px; }

.spread-actions [hidden] { display: none; }

/* Animação de constelação (mapa astral) */

@media (max-width: 640px) {
  .modal-content { padding: 1.8rem 1.3rem 2rem; }
  .modal-header { flex-direction: column; align-items: center; text-align: center; }
  .modal-header .persona-name, .modal-header .panel-flavor { text-align: center; }

  /* Mesa de tarô: 4 cartas por fileira em vez de 2, para as 12 caberem sem rolar tanto */
  .spread-cards { gap: 0.45rem; }
  .spread-card {
    width: calc((100% - 3 * 0.45rem) / 4);
    max-width: 104px;
    height: auto;
    aspect-ratio: 104 / 172;
  }
  .spread-selected { gap: 0.6rem; font-size: 0.68rem; }

  /* No celular os botões ficam empilhados, com a mesma largura */
  .spread-actions { flex-direction: column; align-items: stretch; }
  .spread-actions .ask-btn,
  .spread-actions .mini-btn { width: 100%; }

  /* iOS Safari dá zoom automático em campos com fonte menor que 16px */
  .birth-input { font-size: 16px; }
}


/* ===== Aceite único (antes da primeira leitura) ===== */
.aceite {
  position: fixed;
  inset: 0;
  z-index: 90; /* acima dos modais e da tela de leitura */
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 3, 12, 0.82);
  animation: overlayFade 0.3s ease;
}
.aceite[hidden] { display: none; }
/* Caixa compacta: o texto dos termos rola dentro de uma área de altura fixa */
.aceite-caixa {
  width: min(420px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.3)), var(--bg-panel);
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 18px;
  padding: 1.2rem 1.3rem 1.1rem;
  box-shadow: 0 25px 70px rgba(0,0,0,0.65);
  color: var(--text-light);
  animation: modalPop 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
.aceite-titulo {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold-bright);
  text-align: center;
}
.aceite-texto {
  height: 7.5rem;
  overflow-y: auto;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(212, 175, 106, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: justify;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 106, 0.5) transparent;
}
.aceite-texto p { margin: 0 0 0.6rem; }
.aceite-texto p:last-child { margin-bottom: 0; }
.aceite-texto strong { color: var(--text-light); font-weight: 600; }
.aceite-texto:focus-visible { outline: 1px solid var(--gold); }
.aceite-links { margin: 0.6rem 0 0.7rem; font-size: 0.78rem; color: var(--text-muted); text-align: center; }
.aceite-links a { color: var(--gold-bright); }
.aceite-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
}
.aceite-check input { flex: none; width: 1rem; height: 1rem; margin: 0.1rem 0 0; accent-color: var(--gold); }
.aceite-acoes { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; justify-content: center; }
.aceite[data-aceite] .aceite-acoes .ask-btn { flex: 1 1 9rem; max-width: 13rem; padding-inline: 1rem; } /* os dois botões iguais e redondos */
.aceite-acoes .ask-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Janela da contribuição: escolha da forma e Pix com QR */
.janela-caixa { position: relative; text-align: center; }
.janela-fechar {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  padding: 0.2rem 0.5rem;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.janela-fechar:hover, .janela-fechar:focus-visible { color: var(--gold-bright); }
.escolha-nota, .janela-pix .veu-nota { margin: 0 auto 0.9rem; }
.escolha-opcoes { display: flex; flex-direction: column; gap: 0.7rem; align-items: stretch; }
.escolha-opcao { width: 100%; }
.escolha-opcao[disabled] { opacity: 0.5; cursor: wait; }
/* Botões oficiais de Apple Pay e Google Pay (iframes da Stripe), um embaixo do outro. */
.escolha-carteiras[hidden] { display: none; }
.escolha-carteiras-nota { margin: 0.2rem 0 0.4rem; }
.escolha-carteiras-botoes { min-height: 48px; }
.janela-pix { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
/* Stripe: o Embedded Checkout (iframe da Stripe) cresce com o conteúdo; a janela rola. */
.janela-caixa:has(.janela-stripe) { width: min(36rem, 100%); max-height: 92vh; overflow-y: auto; }
.janela-stripe { display: flex; flex-direction: column; gap: 0.7rem; }
.stripe-checkout { width: 100%; min-height: 20rem; border-radius: 10px; overflow: hidden; }
.stripe-checkout:empty { min-height: 0; }
.pix-qr {
  width: min(220px, 70vw);
  height: auto;
  padding: 0.6rem;
  border-radius: 12px;
  background: #fff; /* o QR precisa de fundo claro para os apps lerem */
}
.pix-codigo {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-light);
  font-size: 0.75rem;
  text-overflow: ellipsis;
}
.pix-tempo { margin: 0; font-size: 0.82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Rodapé com o selo da Tinwe e os documentos legais */
.rodape-oraculo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem 2.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.rodape-oraculo nav { display: flex; gap: 1rem; }
/* Os documentos legais ficam numa linha própria, abaixo da caixa de suporte, que assim fica centralizada. */
.rodape-oraculo nav[aria-label="Documentos legais"] { flex-basis: 100%; justify-content: center; }
.rodape-oraculo nav a { color: inherit; opacity: 0.7; text-decoration: none; }
.rodape-oraculo nav a:hover, .rodape-oraculo nav a:focus-visible { opacity: 1; }
/* Aviso de IA: fica só aqui e na caixa de aceite, discreto, fora da leitura */
.rodape-ia { flex-basis: 100%; text-align: center; font-size: 0.72rem; opacity: 0.5; }

/* Página 404 */
.pagina-404 { position: relative; z-index: 1; max-width: 560px; margin: 18vh auto 0; padding: 0 1rem; text-align: center; color: var(--text-light); }
.pagina-404 .ask-btn { display: inline-block; text-decoration: none; margin-top: 1rem; }

/* Contribuição (só com a cobrança ligada): o véu sobre o restante da leitura, com o
   botão de revelar, e a oferta de pacotes depois de uma leitura paga. O texto sob o
   desfoque é fictício (contribuicao.js); o verdadeiro só chega depois do pagamento. */
.veu { position: relative; margin-top: 1.1em; }
.veu-texto {
  filter: blur(6px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
  max-height: 16rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.veu-texto p { margin: 0 0 1em; }
.veu-chamada {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
}
.veu-titulo { margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-bright); }
.veu-botao { max-width: 100%; }
.veu-nota { margin: 0; max-width: 32rem; font-size: 0.85rem; color: var(--text-muted); }
.veu-status { margin: 0; min-height: 1.2em; font-size: 0.9rem; color: var(--gold-bright); }
.reading-output .veu-texto { max-height: 11rem; }

.pacotes {
  margin: 1.6rem auto 0;
  padding: 1.1rem 1rem;
  max-width: 34rem;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 14px;
  text-align: center;
}
.pacotes-saldo, .pacotes-titulo { margin: 0 0 0.7rem; font-family: var(--font-ui); color: var(--gold-bright); }
.pacotes-opcoes { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 0.9rem; }
.pacotes-recuperar { font-size: 0.85rem; color: var(--text-muted); }
.pacotes-recuperar summary { cursor: pointer; }
.pacotes-codigo { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 0.6rem; }
.pacotes-codigo input {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-light);
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.codigo-recuperacao {
  margin: 0.4rem 0 0.7rem;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
  user-select: all;
}
.aviso-texto { margin: 0 0 1rem; text-align: center; line-height: 1.5; }
.aceite[data-aviso-cobranca] .pacotes { margin-top: 0; }

/* Mestre Kadir: "não sei a hora", mandala, tabela e os quatro tipos de leitura */
.birth-sem-hora { display: flex; align-items: center; gap: 0.5rem; margin: -0.2rem 0 0.7rem; font-size: 0.88rem; color: var(--text-muted); cursor: pointer; }
.birth-sem-hora input { width: 1rem; height: 1rem; accent-color: var(--gold); }
/* Data e hora digitadas (data-hora.js): rótulo visível em cima e números grandes. */
.birth-campo { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; color: var(--text-muted); }
.birth-campo .birth-input { font-size: 1.05rem; letter-spacing: 0.06em; }
/* Ícones dourados de calendário e relógio, só de enfeite: a digitação continua com a máscara. */
/* A data é mais longa que a hora: a coluna dela fica mais larga para caber com o ícone. */
.birth-grid--data { grid-template-columns: 3fr 2fr; }
.birth-input--data, .birth-input--hora { padding-left: 2.1rem; background-repeat: no-repeat; background-position: 0.55rem 50%; background-size: 1.1rem; }
/* Celulares bem estreitos: menos espaçamento e ícone mais junto, sem baixar de 16px (o iPhone daria zoom). */
@media (max-width: 359px) {
  .birth-campo .birth-input--data, .birth-campo .birth-input--hora { font-size: 16px; letter-spacing: 0; padding-left: 1.8rem; padding-right: 0.4rem; background-position: 0.45rem 50%; background-size: 1rem; }
}
.birth-input--data { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af6a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Cpath d='M7.5 14h1M11.5 14h1M15.5 14h1M7.5 17.5h1M11.5 17.5h1'/%3E%3C/svg%3E"); }
.birth-input--hora { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af6a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E"); }
.birth-confirma { margin: -0.3rem 0 0.8rem; min-height: 1.1em; font-size: 0.9rem; color: var(--gold-bright); line-height: 1.5; }
.birth-confirma:empty { margin-bottom: 0; }
.birth-avancado { margin: 0 0 0.6rem; font-size: 0.82rem; color: var(--text-muted); }
.birth-avancado summary { cursor: pointer; padding: 0.3rem 0; }
.birth-avancado[open] summary { margin-bottom: 0.5rem; }
.birth-input:disabled { opacity: 0.45; }
.birth-form .ask-btn { width: 100%; margin-top: 0.4rem; }
.mapa-resultado { margin-top: 1.4rem; text-align: center; }
.mapa-resultado[hidden] { display: none; }
.mapa-mandala svg { display: block; width: min(100%, 520px); height: auto; margin: 0 auto; }
.mapa-tabela { width: min(100%, 520px); margin: 1rem auto 0; border-collapse: collapse; font-size: 0.9rem; }
.mapa-tabela th { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(212, 175, 106, 0.35); }
.mapa-tabela td { padding: 0.3rem 0.5rem; border-bottom: 1px solid rgba(212, 175, 106, 0.12); text-align: left; color: var(--text-light); }
.mapa-tabela td:nth-child(3), .mapa-tabela td:nth-child(4), .mapa-tabela th:nth-child(3), .mapa-tabela th:nth-child(4) { text-align: right; }
.mapa-acoes { justify-content: center; margin-top: 1rem; }
.mapa-escolha { margin-top: 1.8rem; text-align: center; }
.tipos-leitura { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-top: 0.6rem; }
.tipo-leitura {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.9rem 0.9rem;
  border: 1px solid rgba(212, 175, 106, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.tipo-leitura strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; color: var(--gold-bright); }
.tipo-leitura:hover, .tipo-leitura:focus-visible { border-color: var(--gold); background: rgba(212, 175, 106, 0.08); }
.tipo-leitura[data-sugestao] { border-color: var(--gold); }
.tipo-leitura.is-escolhido { border-color: var(--gold-bright); box-shadow: 0 0 0 2px rgba(240, 205, 143, 0.35); }
.tipo-sugestao { align-self: flex-start; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgba(212, 175, 106, 0.18); color: var(--gold-bright); font-family: var(--font-ui); font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase; }
.mapa-contribuicao { margin-top: 1rem; }
.mapa-aviso { position: static; padding: 1.2rem 0.8rem; border: 1px solid rgba(212, 175, 106, 0.3); border-radius: 12px; }
@media (max-width: 640px) {
  .tipos-leitura { grid-template-columns: 1fr; }
}
.mapa-nota { margin: 0.2rem auto 0.4rem; max-width: 34rem; font-size: 0.85rem; font-style: italic; color: var(--text-muted); text-align: center; }
.mapa-nota[hidden] { display: none; }

/* ===== Abertura em vídeo =====
   Tela inteira, acima de tudo, na primeira visita (e quando a pessoa pede para rever). O vídeo cobre a tela (object-fit: cover):
   a versão horizontal vai para telas deitadas e a vertical (com o quadro no centro e o
   fundo desfocado) para telas em pé, então o arco e o título nunca são cortados. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #07040d;
  transition: opacity 0.8s ease;
}
.intro[hidden] { display: none; }
.intro.is-saindo { opacity: 0; pointer-events: none; }
.intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.intro-acoes {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  display: flex;
  gap: 0.6rem;
}
.intro-botao {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 205, 143, 0.6);
  /* Fundo sólido, sem backdrop-filter: desfocar o vídeo por trás do botão obrigava o
     Android a recompor o vídeo a cada quadro. */
  background: rgba(10, 6, 18, 0.78);
  color: var(--gold-bright);
  cursor: pointer;
}
.intro-botao:hover { background: rgba(212, 175, 106, 0.2); }
.intro-botao[hidden] { display: none; }
.intro-aberta body { overflow: hidden; }
/* Enquanto a abertura toca, nada atrás dela é desenhado: o vídeo cobre a tela inteira, e
   o céu animado e os cartões escondidos ainda custavam GPU no Android. */
.intro-aberta .stars,
.intro-aberta .nebula,
.intro-aberta .constellations,
.intro-aberta .celestial-cycle { display: none; }
.intro-aberta .site-header,
.intro-aberta .cards-grid,
.intro-aberta .preco-home,
.intro-aberta .em-breve,
.intro-aberta .outros-mestres,
.intro-aberta .rodape-oraculo { visibility: hidden; }

/* os mestres surgem um a um quando a abertura termina */
.mestres-revelando .site-header { animation: mestreSurge 1.2s ease both; }
.mestres-revelando .oracle-card { animation: mestreSurge 1.1s ease both; }
.mestres-revelando .oracle-card:nth-child(1) { animation-delay: 0.3s; }
.mestres-revelando .oracle-card:nth-child(2) { animation-delay: 0.6s; }
.mestres-revelando .oracle-card:nth-child(3) { animation-delay: 0.9s; }
/* Sem filter: blur, que no Android fazia rasterizar os cartões inteiros a cada quadro. */
@keyframes mestreSurge {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mestres-revelando .site-header, .mestres-revelando .oracle-card { animation: none; }
}

/* Voz do mestre: o botão "Ouvir", a barra de posição e a palavra falada em destaque. O
   destaque muda só cor e fundo (nada de filter, sombra animada ou tamanho), para não
   pesar no Android. */
.voz { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1.2rem; }
.voz[hidden] { display: none; }
.voz-botao { min-width: 7.5rem; }
.voz-progresso { flex: 1 1 10rem; accent-color: var(--gold); }
.voz-progresso[hidden] { display: none; }
.voz-status { flex-basis: 100%; margin: 0; font-size: 0.9rem; color: var(--gold-bright); }
.voz-status:empty { display: none; }
/* Voz sendo criada: onda sonora no tom do mestre, frase que se alterna, aviso e contagem */
.voz-status--espera { text-align: center; padding: 0.9rem 0.8rem 0.8rem; border: 1px solid rgba(212, 175, 106, 0.25); border-radius: 14px; background: rgba(0, 0, 0, 0.25); --voz-cor: var(--gold); }
.voz-status--tarot { --voz-cor: var(--tarot-accent); }
.voz-status--astral { --voz-cor: var(--astral-accent); }
.voz-status--zen { --voz-cor: var(--zen-accent); }
.voz-onda { display: flex; justify-content: center; align-items: center; gap: 5px; height: 2.4rem; margin-bottom: 0.5rem; }
.voz-onda i { display: block; width: 5px; height: 100%; border-radius: 3px; background: var(--voz-cor); box-shadow: 0 0 10px var(--voz-cor); transform-origin: center; animation: vozOnda 1.3s ease-in-out infinite; }
.voz-onda i:nth-child(2) { animation-delay: -1.1s; }
.voz-onda i:nth-child(3) { animation-delay: -0.9s; }
.voz-onda i:nth-child(4) { animation-delay: -0.7s; }
.voz-onda i:nth-child(5) { animation-delay: -0.5s; }
.voz-onda i:nth-child(6) { animation-delay: -0.3s; }
.voz-onda i:nth-child(7) { animation-delay: -0.1s; }
@keyframes vozOnda { 0%, 100% { transform: scaleY(0.2); opacity: 0.55; } 50% { transform: scaleY(1); opacity: 1; } }
.voz-frase { display: block; min-height: 2.8em; font-family: var(--font-body, inherit); font-style: italic; font-size: 1.02rem; color: var(--text-light); opacity: 0; transition: opacity 0.4s ease; }
.voz-frase.is-visible { opacity: 1; }
.voz-aviso { display: block; margin-top: 0.4rem; font-size: 0.82rem; color: var(--text-muted); }
.voz-contador { display: block; margin-top: 0.3rem; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--gold-bright); }
@media (prefers-reduced-motion: reduce) { .voz-onda i { animation: none; transform: scaleY(0.6); } }
/* Durante a narração (tocando ou pausada), a barra fica presa no pé da tela, alinhada à
   coluna da leitura; o texto ganha folga embaixo para o fim não ficar escondido. Fundo
   opaco em vez de backdrop-filter, que pesa no Android. */
.voz.is-fixa {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 0.7rem max(1rem, calc((100% - 860px) / 2 + 2rem)) calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--bg-deep);
  border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}
.reading-focus-inner.com-voz-fixa { padding-bottom: 9rem; }
.voz-palavra { cursor: pointer; border-radius: 0.2em; transition: background-color 0.15s ease, color 0.15s ease; }
.voz-palavra.is-falada { background-color: rgba(240, 205, 143, 0.22); color: var(--gold-bright); }

/* Fale conosco: link no rodapé e a janela do relato (src/contato.js) */
.rodape-contato {
  flex-basis: 100%;
  background: none;
  border: 0;
  padding: 0.2rem;
  color: var(--gold);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rodape-contato:hover, .rodape-contato:focus-visible { color: var(--gold-bright); }
.rodape-suporte {
  flex-basis: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 18px;
  background: var(--bg-panel);
  text-align: center;
}
.rodape-suporte h2 { margin: 0; font: 1.15rem var(--font-display); color: var(--gold-bright); }
.rodape-suporte p { margin: 0; font-size: 0.9rem; }
.rodape-suporte a, .suporte-link { color: var(--gold-bright); text-underline-offset: 3px; overflow-wrap: anywhere; }
.suporte-link { border: 0; padding: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.rodape-suporte :focus-visible, .contato-caixa :focus-visible, .suporte-link:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.contato-caixa { position: relative; }
.contato-form { display: flex; flex-direction: column; gap: 0.45rem; }
.contato-dica, .contato-aviso { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.contato-aviso a { color: inherit; }
.contato-rotulo { margin-top: 0.3rem; font-size: 0.85rem; color: var(--text-light); }
.contato-mensagem { min-height: 7rem; margin: 0; resize: vertical; }
.contato-email { width: 100%; font-size: 16px; }
.contato-assunto { width: 100%; min-width: 0; font-size: 16px; background: var(--bg-panel); }
.contato-armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contato-status { margin: 0.2rem 0 0; min-height: 1.2em; font-size: 0.85rem; color: var(--gold-bright); text-align: center; }

/* Redes sociais no rodapé: o logo de cada rede, na cor dela ao passar o mouse */
.redes { flex-basis: 100%; display: flex; justify-content: center; gap: 1.1rem; }
.redes .rede {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 106, 0.35);
  color: var(--gold);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.redes .rede:hover, .redes .rede:focus-visible { transform: translateY(-2px); border-color: currentColor; }
.redes .rede--instagram:hover, .redes .rede--instagram:focus-visible { color: #e4405f; }
.redes .rede--tiktok:hover, .redes .rede--tiktok:focus-visible { color: #f1e6d8; }
.redes .rede--kwai:hover, .redes .rede--kwai:focus-visible { color: #ff4906; }

/* Página aberta pelo link do e-mail da lista de espera (Worker, /api/em-breve/*). */
body:has(.aviso-pagina) { min-height: 100vh; }
.aviso-pagina { max-width: 32rem; margin: 4rem auto; padding: 0 1rem; text-align: center; color: var(--text-light); font-family: var(--font-ui); }
.aviso-pagina h1 { font-family: var(--font-display); font-weight: 400; color: var(--gold-bright); font-size: 1.8rem; }
.aviso-pagina a { color: var(--gold-bright); }
.aviso-pagina form { margin: 1.5rem 0; }

/* Retratos vivos (home): um vídeo curto em laço sobre a foto, mais um ambiente leve em CSS.
   Só transform e opacity (sem blur nem blend), para não pesar em celular fraco. O vídeo só
   carrega e toca com o card na tela (script.js); data-vivos no <html> diz quanto movimento
   o aparelho aguenta: completo (vídeo + ambiente), leve (só ambiente) ou parado (só a foto). */
.portrait { position: relative; overflow: hidden; }
.vivo-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit;
  opacity: 0; transition: opacity 0.6s ease;
  pointer-events: none;
}
.vivo-video.tocando { opacity: 1; }
.vivo-camada { position: absolute; inset: 0; opacity: 0.8; pointer-events: none; overflow: hidden; border-radius: inherit; }
.vivo-camada > i { position: absolute; display: block; will-change: transform, opacity; }
.portrait.fora-da-tela .vivo-camada > i { animation-play-state: paused; }
.v-brilho { border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 96, 0.8), rgba(255, 140, 40, 0) 68%); animation: vChama 3.6s ease-in-out infinite; }
@keyframes vChama {
  0% { opacity: 0.55; transform: scale(1); } 12% { opacity: 0.95; transform: scale(1.14); } 24% { opacity: 0.6; transform: scale(0.96); }
  41% { opacity: 1; transform: scale(1.1); } 58% { opacity: 0.5; transform: scale(0.94); } 73% { opacity: 0.88; transform: scale(1.06); } 100% { opacity: 0.55; transform: scale(1); }
}
.v-fumaca { width: 16%; height: 24%; bottom: 34%; border-radius: 50%; background: radial-gradient(ellipse, rgba(240, 232, 255, 0.4), rgba(240, 232, 255, 0) 70%); opacity: 0; animation: vSubir 8s ease-in infinite; }
@keyframes vSubir { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 20% { opacity: 0.5; } 100% { opacity: 0; transform: translate(14%, -160%) scale(1.5); } }
.v-estrela { width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 5px 1px rgba(190, 215, 255, 0.9); animation: vCintilar 4s ease-in-out infinite; }
@keyframes vCintilar { 0%, 100% { opacity: 0.15; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.3); } }
.v-luz { inset: -20% -40%; background: linear-gradient(105deg, rgba(255, 244, 214, 0) 40%, rgba(255, 244, 214, 0.22) 50%, rgba(255, 244, 214, 0) 60%); animation: vVarrer 15s ease-in-out infinite; }
@keyframes vVarrer { 0%, 100% { transform: translateX(-24%); } 50% { transform: translateX(24%); } }
.v-folha { top: -6%; width: 8px; height: 11px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #f3b13e, #d8622b); opacity: 0; animation: vCair 14s linear infinite; }
@keyframes vCair { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg); } 8% { opacity: 0.85; } 50% { transform: translate(-18px, 100px) rotate(200deg); } 92% { opacity: 0.75; } 100% { opacity: 0; transform: translate(6px, 205px) rotate(420deg); } }
[data-vivos="parado"] .vivo-camada, [data-vivos="parado"] .vivo-video { display: none; }
[data-vivos="leve"] .vivo-video { display: none; }
@media (prefers-reduced-motion: reduce) { .vivo-camada, .vivo-video { display: none; } }

/* Apresentação do mestre na página dele: texto equivalente ao áudio e botão para silenciar. */
.apresentacao { margin: 0 0 1.2rem; text-align: center; }
.apresentacao-texto { font-style: italic; color: var(--text-muted); line-height: 1.55; margin: 0 0 0.6rem; }
.apresentacao .mini-btn[hidden] { display: none; }

/* ===== Fase 2: home compacta, hierarquia de ações e legibilidade (docs/specs/2026-11-12-paginas-por-mestre.md) =====
   Só espaçamento, tamanho, cor de botão e largura de coluna. Cinzel segue só no peso 500 (o carregado);
   as cores de acento dos mestres (rosa, azul, verde) continuam só em borda, brilho e barra, nunca em texto. */

/* Celular: cabeçalho e cartões mais compactos, sem tirar a marca nem reduzir a leitura. */
@media (max-width: 640px) {
  .site-header { padding: 1.5rem 1.25rem 0.9rem; }
  .site-logo { height: 72px; margin-bottom: 0.5rem; }
  .eyebrow { margin-bottom: 0.3rem; }
  .site-subtitle { margin: 0.5rem auto 0; max-width: 22rem; font-size: 1.05rem; line-height: 1.4; }
  .cards-grid { gap: 1.2rem; padding: 0.6rem 1rem 3rem; }
  .card-face { padding: 1.4rem 1.4rem 1.6rem; }
  .card-emblem { margin-bottom: 0.6rem; }
}

/* Preço junto de cada experiência (preenchido por carregarPrecoHome a partir de /api/preco). */
.card-preco { margin: -0.7rem 0 1rem; font-size: 1.1rem; line-height: 1.4; color: var(--text-light); }
.card-preco[hidden] { display: none; }

/* Ação principal: "Consultar" e "Revelar/Contribuir" são preenchidos (dourado com texto escuro, contraste
   de cerca de 8:1); "Avise-me", "Pedir suporte" e os demais ficam em contorno. */
.open-btn, .veu-botao {
  background: var(--gold);
  color: #241531;
  border-color: var(--gold);
}
.open-btn:hover, .veu-botao:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #241531; }
.open-btn:focus-visible, .veu-botao:focus-visible, .ask-btn:focus-visible, .mini-btn:focus-visible, .em-breve-botao:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.veu-botao:disabled { opacity: 0.6; }

/* Tamanho e toque: botões e rótulos funcionais com 16 px, alvos de pelo menos 44 px de altura. */
.open-btn, .ask-btn { font-size: 1rem; letter-spacing: 0.05em; min-height: 44px; }
.card-face .open-btn { width: min(100%, 18rem); }
.mini-btn { font-size: 1rem; letter-spacing: 0.03em; }
.em-breve-botao { font-size: 1rem; min-height: 44px; padding: 0.5rem 1.2rem; }
.rodape-contato { font-size: 1rem; min-height: 44px; padding: 0.5rem 0.8rem; }
.mic-btn, .atalho, .share-btn, .tipo-leitura, .wait-som, .intro-botao { font-size: 1rem; min-height: 44px; }
.close-btn { min-width: 44px; min-height: 44px; }
.card-tags { font-size: 0.9rem; }
.rodape-suporte a, .suporte-link { display: inline-block; padding: 0.6rem 0.2rem; }

/* Termos do aceite: 16 px e entrelinha de 1,5, alinhados à esquerda (justificado em coluna estreita abre buracos). */
.aceite-texto { height: min(15rem, 42vh); font-size: 1rem; line-height: 1.5; text-align: left; }
.aceite-links { font-size: 0.95rem; }
.aceite-check { font-size: 1rem; line-height: 1.4; }
.aceite-check input { width: 1.25rem; height: 1.25rem; }

/* Leitura em tela cheia: coluna de cerca de 70 caracteres no computador, mesmos tamanhos de fonte. */
.reading-focus-inner { width: min(44rem, 100%); }

@media (prefers-reduced-motion: reduce) {
  .open-btn, .ask-btn, .veu-botao { transition: none; }
  .oracle-card, .oracle-card:hover { transition: none; transform: none; }
}
