/* Tarot Egípcio — azul-noite em degradê radial, painéis de vidro em camadas, petróleo luminoso e dourado suave.
   Tipografia: Raleway, números alinhados. Três temas: Noite (padrão), Chumbo e Grafite dourado.
   Espaçamento: uma escala só (--gap); todo bloco usa a mesma superfície (.panel). Contraste AA nos textos. */

:root,
[data-theme="noite"] {
  /* Noite: azul fosco, acinzentado e bem escuro, para uso à noite sem brilho de tela; o dourado fica contido. */
  --orb-l1:rgba(130,155,195,.72); --orb-l2:rgba(70,100,150,.48); --orb-d1:rgba(22,44,86,.72); --orb-d2:rgba(9,22,52,.5);
  --bg:#0A111E; --fg:#DCE3EE; --muted:#8C9BB2;
  --accent:#C9A15C; --on-accent:#0A111E; --brand:#C9A15C; --brand-text:#D8B677;
  --gold:#C9A15C; --gold-text:#D8B677;
  --surface:#0E1828; --panel-b:#0F1A2D;
  --line:rgba(140,165,205,.15); --edge:rgba(140,165,205,.12); --chip:rgba(201,161,92,.13); --glow:rgba(201,161,92,.18);
  --page: radial-gradient(ellipse 110% 85% at 62% 22%, #17253C 0%, #0F1A2C 40%, #060B14 85%);
  --tone1: linear-gradient(150deg, rgba(48,72,112,.26), rgba(14,28,56,.34));
  --tone2: linear-gradient(150deg, rgba(40,62,100,.24), rgba(11,24,48,.38));
  --tone3: linear-gradient(150deg, rgba(60,86,126,.20), rgba(16,32,62,.32));
  --tone-hero: radial-gradient(110% 130% at 100% 0%, rgba(201,161,92,.12), transparent 60%), linear-gradient(150deg, rgba(52,78,120,.26), rgba(12,26,52,.46));
  --shadow: 0 22px 44px -14px rgba(0,0,0,.70), 0 4px 12px rgba(0,0,0,.40);
  --hi: inset 0 1px 0 rgba(255,255,255,.06);
}
/* Chumbo: base em cinza-chumbo neutro; o dourado aparece só em detalhes (títulos de seção, destaques, botão principal). */
[data-theme="chumbo"] {
  --orb-l1:rgba(247,232,196,.85); --orb-l2:rgba(214,178,104,.55); --orb-d1:rgba(120,126,136,.75); --orb-d2:rgba(58,63,72,.55);
  --bg:#1E2126; --fg:#EDEBE6; --muted:#B3B6BB;
  --accent:#C9A55E; --on-accent:#17140E; --brand:#C2A76C; --brand-text:#D9C79B;
  --gold:#C9A55E; --gold-text:#D8B777;
  --surface:#2B2F35; --panel-b:#2B2F35;
  --line:rgba(225,225,230,.18); --edge:rgba(225,225,230,.13); --chip:rgba(201,165,94,.16); --glow:rgba(201,165,94,.18);
  --page: radial-gradient(ellipse 110% 85% at 62% 22%, #40454D 0%, #2A2E34 40%, #15171A 82%);
  --tone1: linear-gradient(150deg, rgba(190,196,206,.15), rgba(90,97,108,.14));
  --tone2: linear-gradient(150deg, rgba(170,176,187,.13), rgba(70,76,86,.18));
  --tone3: linear-gradient(150deg, rgba(205,208,214,.12), rgba(100,106,116,.14));
  --tone-hero: radial-gradient(110% 130% at 100% 0%, rgba(201,165,94,.14), transparent 60%), linear-gradient(150deg, rgba(200,205,214,.20), rgba(70,76,86,.26));
  --shadow: 0 22px 44px -14px rgba(0,0,0,.60), 0 4px 12px rgba(0,0,0,.30);
  --hi: inset 0 1px 0 rgba(255,255,255,.07);
}
/* Grafite dourado: chumbo mais escuro e quente, com o dourado um pouco mais presente. */
[data-theme="grafite"] {
  --orb-l1:rgba(255,236,190,.88); --orb-l2:rgba(220,178,96,.58); --orb-d1:rgba(128,112,84,.75); --orb-d2:rgba(64,54,40,.55);
  --bg:#1C1A17; --fg:#F0ECE3; --muted:#B8B2A6;
  --accent:#D4AE64; --on-accent:#18130A; --brand:#CDB075; --brand-text:#E2CFA1;
  --gold:#D4AE64; --gold-text:#E0BF7C;
  --surface:#2C2924; --panel-b:#2C2924;
  --line:rgba(235,225,205,.19); --edge:rgba(235,225,205,.14); --chip:rgba(212,174,100,.18); --glow:rgba(212,174,100,.22);
  --page: radial-gradient(ellipse 110% 85% at 62% 22%, #4A443A 0%, #2D2A25 40%, #141311 82%);
  --tone1: linear-gradient(150deg, rgba(200,190,170,.15), rgba(96,90,78,.14));
  --tone2: linear-gradient(150deg, rgba(180,170,150,.13), rgba(78,72,62,.18));
  --tone3: linear-gradient(150deg, rgba(212,204,186,.12), rgba(108,101,88,.14));
  --tone-hero: radial-gradient(110% 130% at 100% 0%, rgba(212,174,100,.20), transparent 60%), linear-gradient(150deg, rgba(205,195,175,.20), rgba(78,72,62,.28));
  --shadow: 0 22px 44px -14px rgba(0,0,0,.62), 0 4px 12px rgba(0,0,0,.32);
  --hi: inset 0 1px 0 rgba(255,240,210,.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; --gap: 16px; }
@media (min-width: 1000px) { html { --gap: 20px; } }
body {
  margin: 0; color: var(--fg);
  background: var(--page) fixed; background-color: var(--bg);
  font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: lining-nums;
  font-size: 17px; font-weight: 500; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh; overflow-x: hidden;
}

#app {
  position: relative; min-height: 100dvh; display: flex; flex-direction: column;
  width: 100%; max-width: 72rem; margin: 0 auto;
  padding: env(safe-area-inset-top) 22px calc(env(safe-area-inset-bottom) + 88px);
}
@media (min-width: 600px) { #app { padding-left: 28px; padding-right: 28px; } }
@media (min-width: 900px) { #app { padding-left: 40px; padding-right: 40px; } }
.page { width: 100%; max-width: 46rem; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
/* Espaçamento único entre os elementos de qualquer tela interna */
.page > main { display: flex; flex-direction: column; gap: var(--gap); }
.page > main > * { margin-top: 0; margin-bottom: 0; }
.page > main > h2 { margin-top: 8px; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; letter-spacing: 0; margin: 0; }
h1 { font-size: clamp(1.6rem, 5vw, 1.95rem); }
h2 { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin: 0; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.25rem; }
li { margin-bottom: 6px; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; } /* título focado por código a cada troca de tela (leitor de tela); não é controle, então sem moldura */

/* Superfície única dos blocos: vidro azul com sombra e brilho na borda de cima */
.panel, .tile, .hero-card, .featured, .card, .item {
  background: var(--tone1);
  border: 1px solid var(--edge); border-radius: 24px;
  box-shadow: var(--shadow), var(--hi);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-card { background: var(--tone-hero); border-radius: 30px; }
/* Variação de tom entre blocos vizinhos (azul sobre azul) */
.tiles > :nth-child(3n+2), .page > main > .item:nth-of-type(3n+2) { background: var(--tone2); }
.tiles > :nth-child(3n), .page > main > .item:nth-of-type(3n) { background: var(--tone3); }
a.tile:hover, a.featured:hover, a.item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow), var(--hi), 0 0 0 1px var(--accent), 0 0 28px var(--glow);
}

/* Cabeçalho das telas internas */
.top { display: flex; align-items: center; gap: 10px; padding: 20px 0 var(--gap); }
.top h1 { flex: 1; }
.back { min-width: 44px; min-height: 44px; margin-left: -12px; justify-content: center; }

/* Botões: alvo mínimo 44px */
button, .btn {
  font: inherit; font-weight: 600; color: inherit; background: none; border: 1px solid var(--line); border-radius: 12px;
  min-height: 46px; padding: 10px 18px; cursor: pointer; text-align: left; text-decoration: none; display: inline-flex; align-items: center;
}
button:hover, .btn:hover { border-color: var(--accent); }
.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); justify-content: center; text-align: center; letter-spacing: .02em; border-radius: 999px; padding: 10px 26px; box-shadow: 0 10px 22px -8px var(--glow); }
.primary:hover { filter: brightness(1.08); }
.ghost { border-color: transparent; color: var(--muted); font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
/* Padrão de botão deste app: centralizado, largura do conteúdo (com um mínimo), nunca a linha inteira. */
.block { display: flex; width: fit-content; min-width: min(13rem, 100%); max-width: 100%; margin-left: auto; margin-right: auto; justify-content: center; text-align: center; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { border-radius: 999px; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Emblema e marca */
.emblem { width: 56px; height: 56px; display: block; }
.wordmark { display: block; margin: 14px 0 6px; }
.wordmark .rule { height: 1px; background: var(--gold); }
.wordmark .name { display: block; padding: 8px 0; font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; color: var(--brand-text); line-height: 1.2; }
.wordmark .app { display: block; text-align: right; font-size: 1rem; font-weight: 600; color: var(--gold-text); line-height: 1; margin-top: 6px; }

/* Cabeçalho do site */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-text); }
.brand-mark { width: 40px; height: 40px; display: block; }
.brand-name { font-weight: 600; font-size: 1.2rem; line-height: 1; }
.brand-name small { font-size: .8rem; color: var(--gold-text); margin-left: 4px; font-weight: 600; }
.head-cfg { gap: 8px; padding: 8px 14px; border-radius: 999px; }
.icon { width: 22px; height: 22px; flex: none; }
@media (max-width: 480px) { .head-cfg .lbl { display: none; } .head-cfg { padding: 8px; min-width: 44px; justify-content: center; } }

/* Início: painel */
.home { flex: 1; display: grid; gap: var(--gap); align-content: start; padding: 4px 0 24px; }

.hero-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 18px; padding: 28px 40px;
}
.hero-title { font-size: clamp(1.7rem, 4.4vw, 2.6rem); font-weight: 700; line-height: 1.12; max-width: 15ch; margin: 6px auto 10px; }
.hero-sub { color: var(--muted); max-width: 36ch; margin: 0 auto 16px; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-art { width: 100%; display: block; }
.hero-figure { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 240px; justify-self: center; text-decoration: none; color: var(--fg); }
.avatar { display: block; width: 100%; max-width: 190px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); background: var(--panel-b); box-shadow: 0 0 0 8px var(--chip), 0 20px 40px -12px rgba(2,8,22,.55); }
.avatar-initial { display: flex; align-items: center; justify-content: center; font-size: clamp(3.2rem, 9vw, 5.5rem); font-weight: 700; color: var(--brand-text); background: color-mix(in srgb, var(--accent) 16%, var(--panel-b)); }
.hero-name { font-size: 1.15rem; font-weight: 700; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
a.hero-figure:hover .avatar { border-color: var(--accent); }
@media (max-width: 800px) {
  .hero-card { grid-template-columns: 1fr; padding: 18px 20px 20px; gap: 6px; }
  .hero-figure { order: -1; max-width: 140px; }
}

.skills { margin-top: var(--gap); }
.home-section { margin-top: var(--gap); }
.skills-title { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.gauges { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; background: none; border: 0; border-radius: 16px; color: var(--fg); font: inherit; cursor: pointer; min-height: 0; box-shadow: none; }
.gauge:hover, .gauge:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.gauge-svg { width: 100%; max-width: 132px; height: auto; transform: rotate(-90deg); overflow: visible; }
.gauge-svg circle { fill: none; }
.g-deco, .g-deco-in { stroke: var(--line); stroke-width: .8; stroke-dasharray: 2 3; }
.g-track, .g-track-in { stroke: var(--line); stroke-width: 3; }
/* Faixa larga que transborda o trilho fino, como no modelo: cobre todo o % atual */
.g-now { stroke: color-mix(in srgb, var(--accent) 78%, #fff); stroke-width: 15; stroke-linecap: butt; filter: drop-shadow(0 0 6px var(--glow)); }
.g-ini { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.gauge-pct { transform: rotate(90deg); transform-origin: 60px 60px; fill: var(--fg); font-size: 20px; font-weight: 700; text-anchor: middle; font-family: inherit; }
.gauge-name { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); }
@media (max-width: 480px) { .gauge-name { font-size: .5625rem; letter-spacing: .02em; } .gauge-pct { font-size: 22px; } }
@media (prefers-reduced-motion: no-preference) {
  .g-now, .g-ini { animation: gauge-fill 1s ease-out both; }
  .g-ini { animation-delay: .15s; }
  @keyframes gauge-fill { from { stroke-dasharray: 0 100; } }
}

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 52px; min-height: 180px; text-decoration: none; color: var(--fg);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
@media (prefers-reduced-motion: no-preference) { a.tile:hover { transform: translateY(-2px); } }
.tile-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--chip); color: var(--gold-text); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(217,165,91,.18); }
.tile-icon .icon { width: 26px; height: 26px; }
.tile-title { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.tile-desc { font-size: .875rem; font-weight: 500; color: var(--muted); line-height: 1.45; }
.tile-arrow { position: absolute; right: 16px; bottom: 14px; color: var(--accent); display: flex; }
.tile-arrow .icon { width: 28px; height: 28px; }
.tile-sos { background: transparent; border-color: var(--gold); }
@media (max-width: 420px) { .tile { padding: 16px 16px 48px; min-height: 166px; } .tile-title { font-size: 1rem; } .tile-desc { font-size: .8125rem; } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile { min-height: 196px; padding: 24px 24px 56px; } }
.page .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Seções do Início: Monitore em 3 por linha (compacto), as demais em 2 */
.home .tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home .tiles-1 { grid-template-columns: minmax(0, 1fr); }
.home .tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home .tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-3 .tile, .tiles-4 .tile { min-height: 132px; padding: 16px 14px 44px; }
.tiles-3 .tile-title, .tiles-4 .tile-title { font-size: 1rem; overflow-wrap: anywhere; }
.tiles-3 .tile-arrow, .tiles-4 .tile-arrow { right: 12px; bottom: 10px; }
.tiles-3 .tile-arrow .icon, .tiles-4 .tile-arrow .icon { width: 24px; height: 24px; }
@media (max-width: 420px) { .tiles-3, .tiles-4 { gap: 8px; } .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .tiles-3 .tile, .tiles-4 .tile { min-height: 120px; padding: 12px 10px 38px; } .tiles-3 .tile-icon, .tiles-4 .tile-icon { width: 40px; height: 40px; border-radius: 13px; } .tiles-3 .tile-icon .icon, .tiles-4 .tile-icon .icon { width: 22px; height: 22px; } .tiles-3 .tile-title, .tiles-4 .tile-title { font-size: .875rem; } .tiles-3 .tile-desc, .tiles-4 .tile-desc { font-size: .75rem; } }

.featured { display: flex; align-items: center; gap: 22px; padding: 24px 28px; text-decoration: none; color: var(--fg); transition: border-color .2s ease, box-shadow .2s ease; }
.featured-body { flex: 1; min-width: 0; }
.featured-title { font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin: 6px 0 8px; }
.featured-text { color: var(--muted); margin: 0; font-size: .95rem; }
.featured .icon { width: 30px; height: 30px; color: var(--accent); }
@media (max-width: 560px) { .featured { padding: 18px; gap: 12px; } .featured-title { font-size: 1.15rem; } }

/* SOS permanente em toda tela (PP2): anel discreto */
.sos-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 10;
  width: 58px; height: 58px; border-radius: 50%; padding: 0; justify-content: center;
  border: 1px solid var(--gold); color: var(--gold-text); background: var(--bg); font-size: .75rem; letter-spacing: .12em; font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(2,8,22,.6);
}

/* Cartões e linhas de lista: mesma superfície dos blocos */
.card { padding: 18px 20px; }
.item { display: block; width: 100%; padding: 16px 20px; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.item .meta { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); }
.notice { border-left: 2px solid var(--gold); padding: 2px 0 2px 14px; }
.locked { opacity: .65; }

/* Palco de prática / SOS / respiração: uma tela, sem rolagem (PP5) */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 18px; min-height: 55dvh; }
.big { font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.25; font-weight: 600; max-width: 22ch; }
.bar { width: 100%; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }


/* Formulários */
label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
select, input:not([type="checkbox"]):not([type="radio"]) {
  font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  min-height: 48px; padding: 8px 2px; width: 100%; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
select option { background: var(--bg); color: var(--fg); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus { border-bottom-color: var(--accent); outline: none; box-shadow: 0 1px 0 0 var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); }
form label:has(input[type="checkbox"]) { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 500; color: var(--fg); }
form p { margin: 0; }

/* Pentágono */
.pentagon { width: 100%; max-width: 21rem; height: auto; display: block; margin: 0 auto; }
.pentagon .grid { fill: none; stroke: var(--line); }
.pentagon .shape { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--gold); stroke-width: 1.5; }
.pentagon text { fill: var(--fg); font-size: 11px; text-anchor: middle; font-family: inherit; font-weight: 600; }

audio { width: 100%; }
svg.infographic { max-width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Respiração guiada (breath.js) */
.br-stage { position: relative; display: grid; place-items: center; min-height: 18rem; }
.br-orbs { position: relative; display: grid; place-items: center; width: min(72vw, 16rem); aspect-ratio: 1; }
.br-orb { grid-area: 1 / 1; width: 100%; aspect-ratio: 1; will-change: scale, transform, border-radius; scale: .55; }
.br-orb.light { background: radial-gradient(circle at 38% 32%, var(--orb-l1), var(--orb-l2) 70%); box-shadow: 0 0 60px -8px var(--glow); border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%; }
.br-orb.dark { background: radial-gradient(circle at 60% 65%, var(--orb-d1), var(--orb-d2) 72%); border-radius: 55% 45% 44% 56% / 46% 54% 46% 54%; }
@media (prefers-reduced-motion: no-preference) {
  .br-orb.light { animation: br-morph-a 7s ease-in-out infinite alternate, br-spin 16s linear infinite; }
  .br-orb.dark { animation: br-morph-b 9s ease-in-out infinite alternate, br-spin 22s linear infinite reverse; }
}
@keyframes br-spin { to { transform: rotate(360deg); } }
@keyframes br-morph-a { 0% { border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%; } 50% { border-radius: 62% 38% 41% 59% / 44% 60% 40% 56%; } 100% { border-radius: 40% 60% 58% 42% / 58% 42% 58% 42%; } }
@keyframes br-morph-b { 0% { border-radius: 55% 45% 44% 56% / 46% 54% 46% 54%; } 50% { border-radius: 40% 60% 60% 40% / 58% 38% 62% 42%; } 100% { border-radius: 60% 40% 45% 55% / 40% 58% 42% 60%; } }
.br-svg { width: min(86vw, 22rem); }
.br-svg svg { width: 100%; height: auto; overflow: visible; }
.br-track { stroke: var(--line); stroke-width: 10; stroke-linecap: round; }
.br-ring .br-track { stroke-width: 6; }
.br-ring.thin .br-track { stroke-width: 3; stroke: var(--fg); opacity: .7; }
.br-trail { stroke-width: 10; stroke-linecap: round; }
.br-ring .br-trail { stroke-width: 6; }
.br-ring.thin .br-trail { stroke-width: 3; }
.br-mark { fill: var(--fg); }
.br-dot { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.br-start { box-shadow: var(--shadow), var(--hi), 0 10px 22px -8px var(--glow); }
.br-stage[data-visual="infinito"] { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.br-stage[data-visual="infinito"] .br-svg { width: min(96vw, 28rem); }
.br-stage[data-visual="infinito"] .br-center { position: static; inset: auto; }
.br-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; pointer-events: none; }
.br-word { margin: 0; text-shadow: 0 1px 8px rgba(5,20,50,.35); font-size: clamp(1.4rem, 5.5vw, 1.9rem); font-weight: 600; }
.br-count { font-size: 1.4rem; font-weight: 600; color: var(--fg); text-shadow: 0 1px 8px rgba(5,20,50,.35); font-variant-numeric: tabular-nums; }
.br-status { text-align: center; min-height: 1.4em; margin: 0; }
.br-slider { display: grid; grid-template-columns: 5.5rem 1fr 4rem; align-items: center; gap: 12px; text-transform: none; letter-spacing: 0; }
.br-slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.br-val { text-align: right; font-variant-numeric: tabular-nums; }
.br-ratiobox { display: flex; align-items: flex-end; gap: 16px; }
.br-ratio { display: flex; align-items: flex-end; gap: 6px; height: 44px; width: 96px; }
.br-bar { flex: 1; background: var(--accent); border-radius: 4px; opacity: .8; }

/* Modal da habilidade */
.skill-modal { width: min(92vw, 22rem); padding: 24px; border: 1px solid var(--edge); border-radius: 28px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow); text-align: center; }
.skill-modal::backdrop { background: rgba(2,8,22,.65); backdrop-filter: blur(4px); }
.skill-modal h2 { margin: 0 0 8px; }
.skill-modal .gauge-svg { max-width: 220px; margin: 0 auto; display: block; }
.sm-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.sm-rows { margin: 14px 0 10px; }
.sm-row { display: flex; justify-content: space-between; padding: 8px 4px; border-top: 1px solid var(--line); }
.sm-row .gold { color: var(--gold-text); }

/* Configurações: seções e perfil */
.cfg-section { padding: 20px 22px; gap: 12px; }
.cfg-section select { width: 100%; }
.profile { border-color: var(--gold); padding: 24px 24px 26px; gap: 20px; }
.profile.needs-name { box-shadow: var(--shadow), var(--hi), 0 0 0 1px var(--gold), 0 0 32px var(--glow); }
.name-field label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1rem; color: var(--fg); margin-bottom: 8px; }
.req-badge { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-accent); background: var(--gold); border-radius: 999px; padding: 2px 10px; }
input.name-input:not([type="checkbox"]):not([type="radio"]) { width: 100%; font: inherit; font-size: 1.25rem; font-weight: 600; color: var(--fg); background: rgba(0,0,0,.22); border: 1.5px solid var(--gold); border-radius: 14px; padding: 14px 16px; min-height: 56px; }
.name-input::placeholder { color: var(--muted); font-weight: 500; opacity: .8; }
input.name-input:not([type="checkbox"]):not([type="radio"]):focus { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; border-color: var(--gold); }
.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar-sm { width: 64px; max-width: 64px; flex: none; border-width: 2px; box-shadow: none; }
.avatar-initial.avatar-sm { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: var(--gold-text); }

/* Formulários (aaf-*) e posts por categoria — só variáveis de tema e a superfície .panel */
.aaf-sr, .aaf-sr-input.aaf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.aaf { padding: 22px; gap: 20px; min-width: 0; }
.aaf-stage { gap: 20px; min-width: 0; }
.aaf p { margin: 0; }
.aaf-step-title { font-size: 1.3rem; line-height: 1.25; color: var(--fg); }
.aaf-intro, .aaf-desc, .aaf-card-text, .aaf-info-text { white-space: pre-line; overflow-wrap: anywhere; }
.aaf-desc, .aaf-help { color: var(--muted); font-size: .9375rem; }
.aaf-help { font-size: .875rem; }
.aaf-start, .aaf-next { min-height: 48px; }
.aaf-start { align-self: flex-start; }
.aaf-progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.aaf-progress-text { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.aaf-progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.aaf-progress > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .aaf-progress > i { transition: width .35s ease; } .aaf-bar > i { transition: width .7s ease; } }
.aaf-form { gap: 22px; }
.aaf-q { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.aaf-q[hidden], .aaf-err[hidden], .aaf-alert[hidden], .aaf-nav [hidden] { display: none; }
.aaf-legend { display: block; padding: 0; margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--fg); line-height: 1.35; overflow-wrap: anywhere; float: none; width: 100%; }
.aaf-opt-mark { font-weight: 500; color: var(--muted); font-size: .875rem; }
.aaf-info { padding: 14px 16px; border-left: 2px solid var(--gold); background: var(--chip); border-radius: 0 14px 14px 0; gap: 6px; }
.aaf-info-title { font-weight: 700; }
.aaf-opts { display: flex; flex-direction: column; gap: 8px; }
.aaf-opts-row { flex-direction: row; flex-wrap: wrap; }
.aaf-opts-row .aaf-opt { flex: 1 1 8rem; }
.aaf .aaf-opt {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; margin: 0;
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  font-size: 1rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg); line-height: 1.4;
}
.aaf .aaf-opt:hover { border-color: var(--accent); }
.aaf .aaf-opt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.aaf .aaf-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.aaf .aaf-opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.aaf .aaf-opt span { min-width: 0; overflow-wrap: anywhere; }
.aaf-scale { display: flex; flex-wrap: wrap; gap: 8px; }
.aaf .aaf-scale-opt { position: relative; display: block; margin: 0; padding: 0; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--fg); cursor: pointer; }
.aaf .aaf-scale-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.aaf .aaf-scale-opt span { display: flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aaf .aaf-scale-opt:hover span { border-color: var(--accent); }
.aaf .aaf-scale-opt input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.aaf .aaf-scale-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.aaf-scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; color: var(--muted); }
.aaf-range { display: flex; align-items: center; gap: 14px; }
.aaf .aaf-range input[type="range"] { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; appearance: auto; -webkit-appearance: auto; accent-color: var(--accent); background: none; }
.aaf-range-out { min-width: 3ch; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.aaf input.aaf-input:not([type="checkbox"]):not([type="radio"]), .aaf textarea.aaf-input {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--fg);
  background: rgba(0,0,0,.2); border: 1px solid var(--line); border-radius: 14px; color-scheme: dark; appearance: none; -webkit-appearance: none;
}
.aaf textarea.aaf-input { resize: vertical; min-height: 7.5rem; line-height: 1.5; }
.aaf input.aaf-input:not([type="checkbox"]):not([type="radio"]):focus, .aaf textarea.aaf-input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.aaf-invalid .aaf-opt, .aaf-invalid .aaf-scale-opt span, .aaf-invalid .aaf-input { border-color: var(--gold); }
.aaf-err, .aaf-alert { color: var(--fg); font-weight: 600; font-size: .9375rem; border-left: 3px solid var(--gold); padding: 2px 0 2px 12px; }
.aaf-err::before { content: "! "; color: var(--gold-text); font-weight: 700; }
.aaf-alert { padding: 10px 14px; background: var(--chip); border-radius: 0 14px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.aaf-alert-extra { font-weight: 500; }
.aaf-nav { display: flex; gap: 12px; align-items: center; }
.aaf-nav .aaf-next { margin-left: auto; }
.aaf-back { min-height: 48px; }

/* Resultado */
.aaf-card {
  --aaf-c: var(--gold);
  display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; min-width: 0;
  background: var(--tone2); border: 1px solid var(--edge); border-left: 4px solid var(--aaf-c); border-radius: 18px; box-shadow: var(--hi);
}
.aaf-card-cat { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.aaf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--aaf-c); flex: none; }
.aaf-card-title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.aaf-card-link { align-self: flex-start; margin-top: 4px; }
.aaf-scores { display: flex; flex-direction: column; gap: 12px; }
.aaf-scores-title { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin: 0; }
.aaf-last { gap: 12px; padding-top: 4px; }
.aaf-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.aaf-bars li { margin: 0; }
.aaf-bar-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: .9375rem; }
.aaf-bar-head span { min-width: 0; overflow-wrap: anywhere; }
.aaf-bar-head strong { font-variant-numeric: tabular-nums; }
.aaf-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.aaf-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); }
.aaf-redo { align-self: flex-start; min-height: 48px; }

/* Posts */
.aaf-posts { gap: var(--gap); }
.aaf-posts > .item:nth-child(3n+2) { background: var(--tone2); }
.aaf-posts > .item:nth-child(3n) { background: var(--tone3); }
.aaf-post-item { display: flex; align-items: flex-start; gap: 14px; color: var(--fg); }
.aaf-post-thumb { width: 72px; height: 72px; flex: none; border-radius: 14px; object-fit: cover; }
.aaf-post-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aaf-post-body strong { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.aaf-post-sum { color: var(--muted); font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.aaf-post-meta { margin: 0; }
.aaf-post-meta a { color: var(--brand-text); }
.aaf-post-html { overflow-wrap: anywhere; min-width: 0; }
.aaf-post-html > :first-child { margin-top: 0; }
.aaf-post-html h2 { font-size: 1.3rem; letter-spacing: 0; text-transform: none; color: var(--fg); margin: 1.6em 0 .5em; }
.aaf-post-html h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.aaf-post-html a { color: var(--brand-text); }
.aaf-post-html img, .aaf-post-html video, .aaf-post-html iframe, .aaf-post-html table { max-width: 100%; height: auto; }
.aaf-post-html blockquote { margin: 0 0 14px; padding-left: 14px; border-left: 2px solid var(--gold); color: var(--muted); }
.aaf-post-html .aaf-mount { margin: 1.6em 0; }
@media (max-width: 420px) { .aaf { padding: 18px 16px; } .aaf-card { padding: 14px 14px; } }

/* Placa de pedra com o olho de Hórus (telas de entrada). */
.plaque { display: block; width: 100%; max-width: 15rem; height: auto; aspect-ratio: 800 / 802; border-radius: 18px; box-shadow: var(--shadow); margin: 0 auto; }

/* Padrão deste app: ícone, título e texto dos blocos centralizados; o bloco todo é o toque (sem seta). */
.tile { align-items: center; justify-content: center; text-align: center; padding: 20px; }
.tile-arrow { display: none; }
.tiles-3 .tile, .tiles-4 .tile { padding: 16px 14px; }
/* Seções centrais (Estudos e Consultas): maiores e com borda dourada. */
.home-section-centrais .tile { min-height: 210px; gap: 10px; border-color: var(--gold); }
.home-section-centrais .tile-icon { width: 68px; height: 68px; border-radius: 22px; }
.home-section-centrais .tile-icon .icon { width: 36px; height: 36px; }
.home-section-centrais .tile-title { font-size: 1.4rem; }
.home-section-centrais .tile-desc { font-size: .95rem; max-width: 24ch; }
/* Axioma cadastrado no painel. */
.axiom { margin: var(--gap) 0 0; padding: 28px 24px; text-align: center; }
.axiom blockquote { margin: 12px auto 0; max-width: 36ch; font-size: 1.3rem; font-style: italic; line-height: 1.5; color: var(--gold-text); }
.axiom blockquote::before { content: '“'; } .axiom blockquote::after { content: '”'; }

/* ---------- Consulta (tiragens) ---------- */
.consulta { gap: var(--gap); }
.centro { text-align: center; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); width: fit-content; margin: 0 auto; }
.seg-btn { border: 0; background: transparent; color: var(--fg); padding: 10px 22px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-wrap { display: inline-flex; align-items: center; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--fg); padding: 8px 16px; border-radius: 999px; font: inherit; cursor: pointer; min-height: 40px; }
.chip.on { border-color: var(--gold); background: var(--chip); color: var(--gold-text); }
.chip.novo { border-style: dashed; color: var(--muted); }
.chip-x { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chip-x .icon { width: 16px; height: 16px; }

.board { --cw: clamp(56px, 20vw, 110px); }
.board-linha { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--cw) * .2); padding: 10px 0; }
.carta { position: relative; display: block; width: var(--cw); aspect-ratio: 516 / 1024; border: 0; padding: 0; border-radius: 5% / 2.5%; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; flex: 0 0 auto; color: var(--fg); }
.carta img { width: 100%; height: 100%; display: block; border-radius: 5% / 2.5%; object-fit: cover; }
.carta:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.carta-verso { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: 10px; border: 1.5px solid var(--gold); background: var(--tone-hero), var(--surface); }
.verso-mark { width: 62%; height: auto; opacity: .9; }
.carta.fechada:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: no-preference) { .carta.fechada { transition: transform .2s ease; } }
.carta.vazia { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; cursor: default; display: flex; align-items: center; justify-content: center; }
.carta-dica { color: var(--muted); font-weight: 700; }
.carta-num { position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--on-accent); font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; z-index: 2; }
.carta-num-s { left: auto; right: -8px; }
.carta.sintese { outline: 2px solid var(--gold); outline-offset: 3px; }
.revela { animation: virar .45s ease both; }
@keyframes virar { from { transform: rotateY(90deg) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .revela { animation: none; } }

/* Cruz: 3 no alto, 4 embaixo, 5 à esquerda, síntese à direita; 2 atravessa a 1. */
.board-cruz { --cw: clamp(48px, 19vw, 100px); display: grid; grid-template-columns: var(--cw) var(--cw) var(--cw); grid-template-areas: ". topo ." "esq centro dir" ". base ."; column-gap: calc(var(--cw) * .8); row-gap: calc(var(--cw) * .25); justify-content: center; align-items: center; padding: 14px 0; }
.cruz-topo { grid-area: topo; } .cruz-esq { grid-area: esq; } .cruz-dir { grid-area: dir; } .cruz-base { grid-area: base; }
.cruz-centro { grid-area: centro; position: relative; width: var(--cw); aspect-ratio: 516 / 1024; }
.cruz-centro > .pos-2 { position: absolute; left: 0; top: 50%; transform: translateY(-50%) translateY(calc(var(--cw) * .26)) rotate(45deg); z-index: 1; }
.cruz-centro > .pos-2.revela { animation: aparece .5s ease both; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.legend-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: center; }
.lg-pos { width: 24px; height: 24px; border-radius: 50%; background: var(--chip); color: var(--gold-text); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex: 0 0 auto; }
.lg-card { font-weight: 700; text-align: right; }
.conta { margin: 0; }

.campos .campo { display: grid; gap: 4px; }
.campo label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.campo-msg { color: #ffb4a8; min-height: 1em; }
.modo-form h2 { margin: 0; }
.campo-linha { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center; }
.qtd-linha { display: flex; align-items: center; gap: 12px; }
.qtd { min-width: 2ch; text-align: center; font-weight: 700; }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.modal { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 18, .84); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { position: relative; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal-img { max-height: min(78vh, 760px); width: auto; max-width: 100%; border-radius: 5% / 2.5%; box-shadow: var(--shadow); }
.modal-cap { margin: 0; text-align: center; }
.modal-close { position: absolute; top: -6px; right: -6px; z-index: 2; background: var(--surface); min-width: 44px; min-height: 44px; }
html.modal-open { overflow: hidden; }

/* ---------- Consulta: ordem, síntese, resultado, histórico ---------- */
.anteriores { align-self: center; display: inline-flex; align-items: center; gap: 8px; }
.anteriores .icon { width: 18px; height: 18px; }
.pergunta { gap: 10px; }
.data-consulta { display: flex; align-items: center; gap: 14px; margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.data-consulta .icon { width: 30px; height: 30px; flex: 0 0 auto; color: var(--gold-text); }
.data-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.data-txt time { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.campo-pergunta { display: flex; flex-direction: column; gap: 6px; }
.campo-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.campo-topo label { margin: 0; }
.contador { font-variant-numeric: tabular-nums; }
.pergunta-tit { font-size: 1rem; margin: 6px 0 0; }
.pergunta-texto { margin: 0; font-size: 1.05rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.dica-sorteio { text-align: center; margin: 0; color: var(--gold-text); font-weight: 600; }
.notice.ok { border-color: var(--gold); }
.btn.danger { color: #ffb4a8; border-color: rgba(255, 180, 168, .45); }

/* a próxima carta a virar brilha; as outras esperam */
.carta.fechada:not(.proxima):not(.sintese) { opacity: .72; }
.carta.proxima { box-shadow: var(--shadow), 0 0 0 2px var(--gold), 0 0 22px 2px color-mix(in srgb, var(--gold) 55%, transparent); }
@media (prefers-reduced-motion: no-preference) { .carta.proxima { animation: respira 1.6s ease-in-out infinite; } }
@keyframes respira { 50% { transform: translateY(-4px); } }
.cruz-centro > .pos-2.proxima { animation: none; }

/* a síntese é mais especial: aguarda brilhando e se revela com um giro dourado */
.carta.sintese-aguarda { cursor: default; opacity: 1; outline: 2px solid var(--gold); outline-offset: 3px; box-shadow: var(--shadow), 0 0 28px 4px color-mix(in srgb, var(--gold) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) { .carta.sintese-aguarda { animation: aguarda 1s ease-in-out infinite; } }
@keyframes aguarda { 50% { box-shadow: var(--shadow), 0 0 46px 12px color-mix(in srgb, var(--gold) 70%, transparent); } }
.carta.revela-sintese { animation: sinteseRevela 1.9s cubic-bezier(.2, .7, .2, 1) both; z-index: 3; }
.carta.revela-sintese::after { content: ''; position: absolute; inset: -14px; border-radius: 22px; border: 2px solid var(--gold); opacity: 0; animation: anel 1.9s ease-out both; pointer-events: none; }
@keyframes sinteseRevela {
  0% { transform: scale(.55) rotateY(180deg); opacity: 0; box-shadow: 0 0 0 0 transparent; }
  45% { transform: scale(1.22) rotateY(0); opacity: 1; box-shadow: 0 0 70px 24px color-mix(in srgb, var(--gold) 65%, transparent); }
  100% { transform: scale(1); opacity: 1; box-shadow: var(--shadow), 0 0 26px 4px color-mix(in srgb, var(--gold) 40%, transparent); }
}
@keyframes anel { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) { .carta.revela-sintese, .carta.revela-sintese::after { animation: none; } }

/* resultado: posição e nome clicável do arcano */
.legend-tit { margin: 0; font-size: 1.1rem; }
.lg-meio { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-rot { color: var(--muted); font-size: .8rem; letter-spacing: .02em; }
.lg-nome { all: unset; cursor: pointer; font-weight: 700; font-size: 1.05rem; color: var(--gold-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent); text-underline-offset: 4px; overflow-wrap: anywhere; }
.lg-nome:hover { text-decoration-color: var(--gold); }
.lg-nome:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.lg-n { color: var(--muted); font-weight: 600; margin-right: 4px; }
.lg-seta { color: var(--accent); display: flex; }
.lg-seta .icon { width: 22px; height: 22px; }

/* modal do significado */
.modal-sig { width: min(30rem, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border: 1px solid var(--edge); border-radius: 24px; padding: 24px 22px 22px; box-shadow: var(--shadow); align-items: stretch; }
.sig { display: flex; flex-direction: column; gap: 14px; }
.sig-topo { display: flex; gap: 16px; align-items: center; padding-right: 36px; }
.sig-img { width: 78px; height: auto; aspect-ratio: 516 / 1024; border-radius: 8px; box-shadow: var(--shadow); flex: 0 0 auto; }
.sig-tit h2 { margin: 4px 0 0; font-size: 1.35rem; line-height: 1.2; }
.sig-resumo { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.selo-teste { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-accent); background: var(--gold); padding: 3px 10px; border-radius: 999px; }
.modal-sig .modal-close { top: 10px; right: 10px; }

/* consultas anteriores: só data | hora e a pergunta; o cartão inteiro é o toque */
.hist { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--fg); transition: border-color .2s ease, transform .2s ease; }
.hist:hover { border-color: var(--gold); }
@media (prefers-reduced-motion: no-preference) { a.hist:hover { transform: translateY(-2px); } }
.hist:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hist-data { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.hist-perg { font-size: 1.1rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hist-perg.vazio { color: var(--muted); font-weight: 500; font-style: italic; }

/* página do arcano: leitura bonita */
.arcano { display: flex; flex-direction: column; gap: 22px; max-width: 40rem; margin: 0 auto; }
.arc-hero { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: 26px; background: var(--tone-hero), var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.arc-carta { all: unset; display: block; cursor: zoom-in; flex: 0 0 auto; width: min(34vw, 150px); border-radius: 5% / 2.5%; box-shadow: var(--shadow); line-height: 0; }
.arc-carta:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.arc-carta img { width: 100%; height: auto; border-radius: 5% / 2.5%; display: block; }
.arc-tit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.arc-tit h1 { margin: 0; font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.1; }
.arc-resumo { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.55; }
.arc-orn { display: flex; align-items: center; gap: 14px; }
.arc-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.arc-orn-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.arc-corpo { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 520px) { .arc-hero { flex-direction: column; text-align: center; } .arc-tit { align-items: center; } .arc-carta { width: min(46vw, 170px); } }

/* Campo de texto de várias linhas: o mesmo padrão do campo de destaque do app (fundo escuro embutido, borda que acende no foco). */
textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 1.05rem; line-height: 1.55; color: var(--fg); background: rgba(0, 0, 0, .22); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; min-height: 112px; resize: vertical; appearance: none; -webkit-appearance: none; }
textarea::placeholder { color: var(--muted); font-weight: 500; opacity: .85; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--gold); }
textarea[readonly] { opacity: .8; border-style: dashed; resize: none; cursor: default; }
textarea[readonly]:focus { outline: none; border-color: var(--line); }

/* Respiro interno dos blocos da consulta (o .panel não traz padding próprio) */
.pergunta, .legend, .campos, .modo-form, .hist { padding: 22px; }
@media (max-width: 420px) { .pergunta, .legend, .campos, .modo-form, .hist { padding: 18px; } }
.legend { gap: 8px; }
.legend-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.legend-list li:last-child { border-bottom: 0; }
.legend-list li.lg-sintese { margin-top: 10px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 16px; background: var(--chip); grid-template-columns: 30px minmax(0, 1fr); }
.lg-sintese .lg-pos { background: var(--gold); color: var(--on-accent); }
.lg-sintese .lg-nome { font-size: 1.15rem; }

.carta-dica { text-align: center; font-size: .66rem; line-height: 1.25; letter-spacing: .04em; text-transform: uppercase; padding: 0 4px; max-width: 100%; }
.campo-faixa { margin-left: 4px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: none; }
.campo-faixa::before { content: '· '; }

.carta.fechada.travada { opacity: .4; cursor: not-allowed; }
.carta.fechada.travada:hover { transform: none; }

/* ---------- Artigo "Detalhado" (arcanos e posts da categoria Detalhado): títulos H2 e destaque no padrão aprovado ---------- */
.arc-corpo { font-size: 1.08rem; }
.arc-corpo > * { margin-top: 0; margin-bottom: 0; }
.arc-corpo h2 { margin: 14px 0 0; font-size: 1.25rem; line-height: 1.3; color: var(--gold-text); letter-spacing: .01em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.arc-corpo h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .5; }
.arc-corpo h3 { margin: 10px 0 0; font-size: 1.1rem; color: var(--gold-text); }
.arc-corpo p, .arc-corpo li { line-height: 1.75; max-width: 62ch; overflow-wrap: anywhere; }
.arc-corpo > h2:first-child + p { font-size: 1.2rem; line-height: 1.7; }
.arc-corpo ul, .arc-corpo ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.arc-corpo li::marker { color: var(--gold); }
.arc-corpo a { color: var(--gold-text); text-decoration-color: color-mix(in srgb, var(--gold) 50%, transparent); text-underline-offset: 3px; }
.arc-corpo strong { color: var(--fg); }
.arc-corpo img, .arc-corpo figure { max-width: 100%; height: auto; border-radius: 16px; }
.arc-corpo figure { margin: 6px 0; }
.arc-corpo figcaption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 6px; }
.arc-corpo blockquote { margin: 6px 0; padding: 16px 20px; border-left: 3px solid var(--gold); background: var(--chip); border-radius: 0 16px 16px 0; font-size: 1.2rem; line-height: 1.55; font-style: italic; color: var(--gold-text); }
.arc-corpo blockquote p { margin: 0; max-width: none; }
.arc-corpo blockquote cite { display: block; margin-top: 8px; font-size: .85rem; font-style: normal; color: var(--muted); }
.arc-corpo hr { border: 0; height: 1px; width: 100%; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; margin: 10px 0; }
.arc-foto { cursor: default; }
.arc-hero.sem-midia { flex-direction: column; text-align: center; }
.arc-hero.sem-midia .arc-tit { align-items: center; }

/* ---------- Interpretação da pessoa ---------- */
.legend-list li { grid-template-columns: 30px minmax(0, 1fr) auto; }
.legend-list li.lg-sintese { grid-template-columns: 30px minmax(0, 1fr) auto; }
.lg-edit { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.lg-edit .icon { width: 20px; height: 20px; }
.lg-edit:hover { border-color: var(--gold); color: var(--gold-text); }
.lg-edit.on { background: var(--gold); border-color: var(--gold); color: var(--on-accent); }
.lg-interp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: .92rem; line-height: 1.45; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }

.leitura { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); gap: 8px; }
.leitura textarea { min-height: 140px; }
.leitura-acoes { align-items: center; }
.leitura-status { color: var(--gold-text); font-weight: 600; }
.leitura-status.erro { color: #ffb4a8; }

.modal-interp { width: min(34rem, 100%); }
.interp-form { gap: 16px; }
.interp-pergunta { margin: 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--chip); border-radius: 0 14px 14px 0; display: flex; flex-direction: column; gap: 4px; font-style: italic; line-height: 1.5; overflow-wrap: anywhere; }
.interp-pergunta .eyebrow { font-style: normal; }
.interp-form textarea { min-height: 180px; }

/* Botão principal inativo (nada a salvar): apagado, sem brilho e sem hover */
.btn.primary:disabled, button.primary:disabled { background: var(--chip); color: var(--muted); border-color: var(--line); box-shadow: none; opacity: 1; cursor: default; filter: none; }
.acoes { flex-wrap: wrap; }
.acoes .btn { flex: 0 1 auto; min-width: 0; padding-left: 16px; padding-right: 16px; white-space: nowrap; justify-content: center; text-align: center; }
@media (max-width: 420px) { .acoes .btn { font-size: .92rem; padding-left: 12px; padding-right: 12px; } }
.acoes .btn .icon { width: 18px; height: 18px; }

/* Perfil: nome completo, nascimento, e-mail, telefone e troca de senha */
.perfil-form { gap: 16px; }
.perfil-form .campo, .senha-form .campo { display: flex; flex-direction: column; gap: 4px; }
.perfil-form .campo p { margin: 2px 0 0; }
input[type="date"] { color-scheme: dark; }
.perfil-senha { display: flex; flex-direction: column; gap: 14px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.perfil-senha > .btn { margin-top: 14px; }
.senha-form { width: 100%; margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.18); gap: 14px; }
.senha-form h3 { margin: 0; font-size: 1.05rem; color: var(--gold-text); }
.notice.erro, .muted.erro { color: #ffb4a8; }

/* ---------- Avisos que chamam atenção: faixa ao lado do botão e aviso flutuante ---------- */
.status-forte { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 12px 16px; border: 1.5px solid var(--gold); border-radius: 16px; background: var(--chip); color: var(--fg); font-weight: 700; font-size: 1.02rem; text-align: center; }
.status-forte[hidden] { display: none; }
.status-ico { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gold); color: var(--on-accent); font-weight: 800; }
.status-forte.erro { border-color: #ffb4a8; background: rgba(255, 140, 120, .12); }
.status-forte.erro .status-ico { background: #ffb4a8; }

.toasts { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(26rem, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--gold); color: var(--fg); font-weight: 700; font-size: 1.02rem; line-height: 1.3; box-shadow: var(--shadow), 0 0 28px 2px color-mix(in srgb, var(--gold) 40%, transparent); animation: toastEntra .35s cubic-bezier(.2, .8, .2, 1) both; }
.toast-ico { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gold); color: var(--on-accent); font-weight: 800; }
.toast-erro { border-color: #ffb4a8; box-shadow: var(--shadow), 0 0 28px 2px rgba(255, 140, 120, .35); }
.toast-erro .toast-ico { background: #ffb4a8; }
.toast.saindo { animation: toastSai .35s ease both; }
@keyframes toastEntra { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastSai { to { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.saindo { animation: none; } }

/* ---------- Telefone com seletor de país (intl-tel-input) no tema do app ----------
   O CSS da biblioteca é carregado depois deste arquivo: o prefixo "html" garante que as cores do tema vençam. */
html .iti, html .iti--container, html .iti--fullscreen-popup {
  --iti-dropdown-bg: var(--surface);
  --iti-border-color: var(--edge);
  --iti-hover-color: var(--chip);
  --iti-dialcode-color: var(--muted);
  --iti-arrow-color: var(--muted);
  --iti-text-gray: var(--muted);
  --iti-icon-color: var(--muted);
}
html .iti { width: 100%; display: block; }
html .iti input.iti__tel-input, html .iti input[type="tel"] { width: 100%; }
html .iti__selected-dial-code { color: var(--fg); font-weight: 600; }
html .iti__dropdown-content { background: var(--surface); color: var(--fg); border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
html .iti__search-input { background: rgba(0, 0, 0, .28); color: var(--fg); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 14px; width: 100%; min-height: 46px; }
html .iti__search-input::placeholder { color: var(--muted); }
html .iti__country-list { background: transparent; }
html .iti__country { color: var(--fg); }
html .iti__country.iti__highlight, html .iti__country:hover { background: var(--chip); }
html .iti__dial-code { color: var(--muted); }
html .iti__divider { border-bottom-color: var(--line); }
html .iti__a11y-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Campo com busca ao digitar (País) */
.combo { position: relative; }
.combo-input { padding-right: 34px !important; }
.combo-seta { position: absolute; right: 8px; top: 50%; width: 0; height: 0; margin-top: -2px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); pointer-events: none; }
.combo-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; max-height: 16rem; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--fg); border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.combo-lista[hidden] { display: none; }
.combo-op { padding: 11px 12px; border-radius: 10px; cursor: pointer; line-height: 1.3; }
.combo-op.ativo, .combo-op:hover { background: var(--chip); }
.combo-op.sel { color: var(--gold-text); font-weight: 700; }
.combo-vazio { padding: 11px 12px; color: var(--muted); }

/* ---------- Botão "Fazer consulta": ouro com brilho que passa, halo que pulsa e estrela ---------- */
.btn.cta {
  position: relative; overflow: hidden; isolation: isolate; gap: 10px; min-height: 58px; padding: 14px 38px;
  font-size: 1.12rem; font-weight: 700; letter-spacing: .05em; color: var(--on-accent); justify-content: center; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 52%, #fff) 0%, var(--gold) 46%, color-mix(in srgb, var(--gold) 68%, #3a1f00) 100%);
  background-size: 180% 180%; background-position: 0% 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, #fff);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--gold) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -3px 8px rgba(70, 36, 0, .30);
  transition: transform .22s ease, box-shadow .22s ease, background-position .6s ease;
}
.btn.cta::before { /* faixa de luz que atravessa o botão */
  content: ''; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .62) 48%, transparent 64%); transform: translateX(-130%);
}
.btn.cta .cta-ico { display: inline-block; font-size: 1.15em; line-height: 1; text-shadow: 0 0 10px rgba(255, 255, 255, .7); }
.btn.cta:hover { transform: translateY(-3px) scale(1.035); background-position: 100% 50%; filter: none;
  box-shadow: 0 18px 34px -10px color-mix(in srgb, var(--gold) 90%, transparent), 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 8px rgba(70, 36, 0, .30); }
.btn.cta:active { transform: translateY(0) scale(.98); }
.btn.cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .btn.cta { animation: ctaHalo 2.8s ease-in-out infinite; }
  .btn.cta::before { animation: ctaBrilho 3.8s ease-in-out infinite; }
  .btn.cta .cta-ico { animation: ctaEstrela 3.8s ease-in-out infinite; }
  .btn.cta:hover { animation-play-state: paused; }
}
@keyframes ctaHalo { 0%, 100% { box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--gold) 80%, transparent), 0 0 0 0 color-mix(in srgb, var(--gold) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 8px rgba(70,36,0,.30); }
  50% { box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--gold) 80%, transparent), 0 0 0 11px color-mix(in srgb, var(--gold) 0%, transparent), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 8px rgba(70,36,0,.30); } }
@keyframes ctaBrilho { 0%, 55% { transform: translateX(-130%); } 80%, 100% { transform: translateX(130%); } }
@keyframes ctaEstrela { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.18); } }

/* Cartões do início: levantam e acendem a borda ao passar o dedo/mouse */
.tile { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
a.tile:hover, a.tile:focus-visible { border-color: var(--gold); box-shadow: var(--shadow), 0 0 26px -4px color-mix(in srgb, var(--gold) 55%, transparent); }
.tile-icon { transition: transform .35s ease, background .25s ease; }
a.tile:hover .tile-icon { transform: translateY(-2px) rotate(-6deg) scale(1.06); background: color-mix(in srgb, var(--gold) 26%, transparent); }
/* Brilho suave que respira atrás do banner */
.hero-card { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .hero-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(60% 80% at 22% 25%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%); animation: ctaAura 7s ease-in-out infinite; }
}
@keyframes ctaAura { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Aviso de nova versão: fica até a pessoa tocar em Atualizar */
.toasts-fixo { pointer-events: auto; }
.toast .toast-btn { min-height: 38px; padding: 6px 18px; margin-left: 6px; white-space: nowrap; pointer-events: auto; }

/* Janela de confirmação */
.modal-confirma { width: min(26rem, 100%); text-align: center; }
.confirma { display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 6px 4px 0; }
.confirma h2 { margin: 0; font-size: 1.25rem; padding-right: 0; }
.confirma p { margin: 0; color: var(--muted); line-height: 1.55; }
.confirma .acoes { margin-top: 6px; }
.btn.perigo { background: #ffb4a8; color: #2a0d08; border-color: #ffb4a8; font-weight: 700; justify-content: center; text-align: center; border-radius: 999px; padding: 10px 26px; }
.btn.perigo:hover { filter: brightness(1.06); }
