/* ==========================================================================
   MIC360 · Portal do Paciente — "Jornada MIC360" (DESIGN_SPEC_V2.md, §7)
   Tema "Pastel Místico Sereno" (TEMA_PASTEL_SERENO.md, v6.1): fundo claro e
   quente creme→areia ("amanhecer"), cartões brancos com sombra suave,
   dourado mel como acento/XP e lavanda discreta em detalhes. Mobile-first
   com bottom tab bar. Adulto, sóbrio, premium — inspiração Headspace/Calm,
   nunca infantil. Os NOMES das variáveis --p-* são mantidos (só os valores
   mudam) para não quebrar as ~1400 linhas de regras abaixo.
   ========================================================================== */

:root {
  --p-ink-1: #faf4e8;
  --p-ink-2: #f6ecdb;
  --p-ink-3: #fbf0da;
  --p-violet: #8474ad;
  --p-violet-light: #8474ad;
  --p-gold: #d9ab52;
  --p-gold-soft: #f0d9a8;
  --p-gold-deep: #b98d3e;
  --p-glass: #ffffff;
  --p-glass-strong: #fdfaf3;
  --p-glass-border: #eadfc9;
  --p-text: #3f3a52;
  /* 23.9.0 — era #75708a, que dava 4,39:1 sobre o creme: falhava o mínimo AA
     de 4,5 POR 0,11. Este valor é o menor escurecimento que o põe em
     conformidade mantendo o matiz — 2% mais escuro, 4,52:1. Invisível a olho,
     e corrige o produto inteiro numa linha.
     O `--p-text-soft` abaixo NÃO é escurecido: para chegar a 4,5:1 teria de
     ficar 24% mais escuro e deixaria de ser soft — viraria um segundo muted.
     A decisão foi outra: **soft é estrutura, não leitura.** Sai do texto e
     fica para linhas, bordos, ícones e estados desativados. */
  --p-text-muted: #736e87;
  --p-text-soft: #a29dbb;
  --p-success: #7fbf9a;
  --p-danger: #e2938d;
  --p-radius: 20px;
  --p-radius-sm: 14px;
  --p-radius-lg: 26px;
  --p-shadow-glass: 0 10px 30px rgba(90, 70, 120, 0.10);
  --p-shadow-gold: 0 0 0 1px rgba(217, 171, 82, 0.35), 0 8px 24px rgba(217, 171, 82, 0.22);
  --p-max-w: 520px;
  --p-tabbar-h: 68px;
  --p-font: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Shell — ativado quando #app-shell tem a classe "patient-mode"
   ========================================================================== */
#app-shell.patient-mode {
  background:
    radial-gradient(720px 480px at 12% -6%, rgba(132, 116, 173, 0.08), transparent 60%),
    radial-gradient(640px 520px at 108% 12%, rgba(217, 171, 82, 0.12), transparent 55%),
    linear-gradient(160deg, var(--p-ink-1) 0%, var(--p-ink-2) 55%, var(--p-ink-3) 100%);
  min-height: 100vh;
  color: var(--p-text);
  font-family: var(--p-font);
}
#app-shell.patient-mode .app-body { min-height: 100vh; }
#app-shell.patient-mode .sidebar,
#app-shell.patient-mode .sidebar-backdrop,
#app-shell.patient-mode .app-header,
#app-shell.patient-mode .app-footer {
  display: none !important;
}
#app-shell.patient-mode .main-col { min-height: 100vh; }
#app-shell.patient-mode main#view {
  max-width: var(--p-max-w);
  margin: 0 auto;
  padding: 18px 16px calc(var(--p-tabbar-h) + 28px);
  width: 100%;
  color: var(--p-text);
}
#app-shell.patient-mode a { color: var(--p-gold-deep); }
#app-shell.patient-mode ::selection { background: var(--p-gold); color: #241249; }

/* Rotas públicas do paciente (registro via convite, convidado Johari)
   herdam o mesmo fundo, sem tabbar — ver .no-chrome combinado abaixo. */
#app-shell.patient-mode.no-chrome main#view { padding: 0; max-width: none; }

/* ==========================================================================
   Bottom tab bar
   ========================================================================== */
.patient-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  height: var(--p-tabbar-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--p-glass-border);
  box-shadow: 0 -8px 30px rgba(90, 70, 120, 0.12);
}
#app-shell.patient-mode:not(.no-chrome) .patient-tabbar { display: block; }
.patient-tabbar-inner {
  max-width: var(--p-max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: stretch;
}
.p-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--p-text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: color .2s ease, transform .2s ease;
  position: relative;
}
/* 22/07 — Pedido da usuária: o indicador de aba ativa deixa de ser a
   barrinha no topo e passa a ser um círculo atrás do ícone, igual para TODAS
   as abas (incluindo a Bússola, que antes tinha um tratamento elevado à
   parte — ver buildPatientTabbar() em app.js). O círculo só aparece no
   estado .active; fora dele, o ícone fica neutro como qualquer outra aba. */
.p-tab .p-tab-ic {
  width: 34px; height: 34px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; border-radius: 50%;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.p-tab:hover { color: var(--p-text); }
.p-tab.active { color: var(--p-gold-deep); }
.p-tab.active .p-tab-ic {
  transform: scale(1.06);
  background: var(--p-gold-soft);
  box-shadow: 0 2px 8px rgba(185, 141, 62, .3);
}

/* ==========================================================================
   Primitivos: glass card, botões, chips
   ========================================================================== */
.p-card {
  background: var(--p-glass);
  border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius);
  padding: 18px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--p-shadow-glass);
  margin-bottom: 14px;
  position: relative;
}
.p-card + .p-card { margin-top: 0; }
.p-card-strong { background: var(--p-glass-strong); }
/* ==========================================================================
   Release 23.9.1 — a escala aplicada aos COMPONENTES TRANSVERSAIS
   SPEC_ESCALA_TIPOGRAFICA_MIC360.md

   Porquê os componentes antes dos territórios, contra o plano inicial: fui
   mapear o que a tela do Perfil usa e **não é migrável sozinha**. Medido:

       .p-btn          217 usos em 48 ficheiros
       .p-card-title   122 usos em 42
       .p-field         70 usos em 15
       .p-h1            40 usos em 39  (praticamente todas as telas)

   O CSS deste produto está organizado por COMPONENTE, não por território.
   Migrar "o Perfil" obrigaria a tocar em coisas que servem 48 ficheiros — e
   fazê-lo dentro de um passo chamado "Perfil" esconderia o alcance real.
   Então este passo assume-o: são os componentes, e a decisão é a mesma em
   toda a parte — um título de cartão é um cabeçalho de secção, um botão é
   texto de ação, um rótulo de campo é uma legenda.

   O que NÃO se toca: ícones e números de exibição (§C da spec).
   ========================================================================== */
/* 23.9.2 — peso 600, não 700. A titular, vendo 18px/700 na tela do Perfil:
   "O 700 deixa Meus dados, Dados de nascimento e Explorar um pouco pesados em
   relação ao restante da interface." O princípio que fica: hierarquia pela
   ESCALA primeiro, peso como reforço — não peso a compensar tamanho pequeno.
   O 700 fica reservado a ênfases realmente maiores (.p-h1, .p-h2). */
.p-card-title { font-size: var(--tf-secao); font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; color: var(--p-text); }
.p-card-sub { font-size: 12.5px; color: var(--p-text-muted); margin: -6px 0 12px; }
.p-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--p-gold-deep); margin-bottom: 4px; }

.p-h1 { font-size: var(--tf-titulo); font-weight: 700; margin: 0 0 4px; color: var(--p-text); }
.p-h2 { font-size: 17px; font-weight: 700; margin: 24px 0 12px; color: var(--p-text); display: flex; align-items: center; gap: 8px; }
.p-muted { color: var(--p-text-muted); }
.p-soft { color: var(--p-text-soft); }

.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-size: var(--tf-acao); font-weight: 700;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  font-family: inherit; line-height: 1.2;
}
.p-btn:active { transform: scale(.97); }
.p-btn:disabled { opacity: .45; cursor: not-allowed; }
.p-btn-gold {
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep));
  color: #2a1808;
  box-shadow: var(--p-shadow-gold);
}
.p-btn-gold:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(217,171,82,.5), 0 10px 28px rgba(217,171,82,.32); }
.p-btn-ghost { background: var(--p-glass); border-color: var(--p-glass-border); color: var(--p-text); }
.p-btn-ghost:hover { background: var(--p-glass-strong); }
.p-btn-outline { background: transparent; border-color: rgba(217,171,82,.55); color: var(--p-gold-deep); }
.p-btn-outline:hover { background: rgba(217,171,82,.10); }
.p-btn-danger { background: rgba(226,147,141,.16); color: #b45f5f; border-color: rgba(226,147,141,.3); }
.p-btn-block { width: 100%; }
.p-btn-sm { padding: 8px 14px; font-size: 12.5px; }

.p-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--p-glass); border: 1px solid var(--p-glass-border);
  color: var(--p-text-muted);
}
.p-chip-gold { background: rgba(217,171,82,.16); border-color: rgba(217,171,82,.4); color: var(--p-gold-deep); }
.p-chip-locked { opacity: .5; }

.p-divider { height: 1px; background: var(--p-glass-border); margin: 16px 0; border: none; }

.p-disclaimer {
  font-size: 11.5px; color: var(--p-text-soft); background: rgba(63,58,82,.04);
  border: 1px dashed var(--p-glass-border); border-radius: 12px; padding: 10px 13px;
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; margin-top: 16px;
}
.p-disclaimer .p-disc-ic { flex-shrink: 0; opacity: .8; }

.p-skel { background: linear-gradient(90deg, rgba(63,58,82,.05) 25%, rgba(63,58,82,.11) 37%, rgba(63,58,82,.05) 63%); background-size: 400% 100%; animation: pskel 1.4s ease infinite; border-radius: 10px; }
@keyframes pskel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.p-skel-line { height: 14px; margin-bottom: 8px; }
.p-skel-card { height: 88px; border-radius: var(--p-radius); }

/* Legenda sob um p-skel-card quando a espera é uma operação real (ex.: a
   Centelha a compor uma leitura), não só o piscar breve de uma navegação —
   sem ela, o ecrã parece ter travado. Ver toolkitFlow.js/compreenderSituacao.js finish(). */
.p-loading-caption { margin: 10px 2px 0; font-size: 12.5px; color: var(--p-text-muted); text-align: center; font-style: italic; }

.p-empty { text-align: center; padding: 34px 14px; color: var(--p-text-muted); }
.p-empty .p-empty-ic { font-size: 34px; margin-bottom: 10px; opacity: .75; }
.p-empty h4 { font-size: 14.5px; color: var(--p-text); margin: 0 0 4px; }
.p-empty p { font-size: 12.5px; margin: 0 0 14px; }

/* Inputs no tema paciente */
/* 23.9.1 — a lista explícita já tinha falhado: o produto usa `time` (4×),
   `url` (3×) e `search` (2×), e nenhum deles estava aqui. Esses campos
   apareciam SEM estilo nenhum — sem padding, sem borda, e no tamanho de
   omissão do browser (13,3px), o que também os deixava abaixo do piso dos
   16px e portanto a dar zoom no iOS. "Hora de nascimento" é um `time`, e
   está na tela do Perfil.
   Acrescentar mais três à lista repetiria o mesmo modo de falha ao quarto
   tipo novo. A regra passa a ser por EXCLUSÃO: são campos de escrita todos
   os `input` menos os que têm forma própria. Um tipo novo entra coberto. */
#app-shell.patient-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="color"]):not([type="hidden"]),
#app-shell.patient-mode select,
#app-shell.patient-mode textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--p-glass-border); background: rgba(63,58,82,.05);
  color: var(--p-text); font-size: var(--tf-campo); font-family: inherit;
  /* 16px NÃO é gosto: abaixo disso o iOS dá zoom ao focar o campo e desloca a
     tela. Já estava assim na caixa das reflexões do Caminho (23.8.2); passa a
     valer em todos os campos do portal. */
}
#app-shell.patient-mode input::placeholder,
#app-shell.patient-mode textarea::placeholder { color: var(--p-text-soft); }
#app-shell.patient-mode input:focus,
#app-shell.patient-mode select:focus,
#app-shell.patient-mode textarea:focus {
  outline: none; border-color: rgba(217,171,82,.55); box-shadow: 0 0 0 3px rgba(217,171,82,.14);
}
#app-shell.patient-mode textarea { resize: vertical; min-height: 78px; }
#app-shell.patient-mode .p-field { margin-bottom: 14px; }
#app-shell.patient-mode .p-field label { display: block; font-size: var(--tf-legenda); font-weight: 700; margin-bottom: 6px; color: var(--p-text-muted); }
/* Dupla correção: era 11,5px E em --p-text-soft (2,41:1) — e é uma FRASE,
   não um rótulo. O soft saiu do texto por decisão da 23.9.0. */
#app-shell.patient-mode .p-field-hint { font-size: var(--tf-legenda); color: var(--p-text-muted); margin-top: 4px; }

/* ==========================================================================
   Header de saudação (home)
   ========================================================================== */
.p-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.p-hero-greeting { font-size: 20px; font-weight: 700; }
.p-hero-sub { font-size: 12.5px; color: var(--p-text-muted); margin-top: 2px; }
.p-streak {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  color: var(--p-gold-deep); background: rgba(217,171,82,.12); border: 1px solid rgba(217,171,82,.28);
  padding: 5px 11px; border-radius: 999px; margin-top: 6px;
}

/* ==========================================================================
   Anel de XP (SVG) — animado
   ========================================================================== */
.p-xp-ring-wrap { display: flex; align-items: center; gap: 16px; }
.p-xp-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.p-xp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.p-xp-ring circle { fill: none; }
.p-xp-ring .ring-bg { stroke: rgba(63,58,82,.10); }
.p-xp-ring .ring-fg {
  stroke: var(--p-gold);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(217,171,82,.55));
  transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1);
}
.p-xp-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.p-xp-ring-level { font-size: 19px; font-weight: 800; color: var(--p-gold-deep); line-height: 1; }
.p-xp-ring-tag { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--p-text-soft); margin-top: 1px; }
.p-xp-info .p-xp-level-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.p-xp-info .p-xp-count { font-size: 12px; color: var(--p-text-muted); }
.p-xp-bar-mini { height: 5px; background: rgba(63,58,82,.10); border-radius: 99px; margin-top: 7px; width: 148px; overflow: hidden; }
.p-xp-bar-mini > span { display: block; height: 100%; background: linear-gradient(90deg, var(--p-gold-deep), var(--p-gold)); border-radius: 99px; transition: width .8s ease; }

/* ==========================================================================
   Toast flutuante de XP ("+20 XP")
   ========================================================================== */
.p-xp-float-layer { position: fixed; inset: 0; pointer-events: none; z-index: 500; }
.p-xp-float {
  position: fixed; left: 50%; top: 38%; transform: translate(-50%, 0);
  font-size: 22px; font-weight: 800; color: var(--p-gold-deep);
  text-shadow: 0 0 16px rgba(217,171,82,.65), 0 2px 6px rgba(0,0,0,.4);
  animation: pxpfloat 1.5s ease forwards;
}
@keyframes pxpfloat {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(.85); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%, -46px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}

/* Toast de medalha */
.p-medal-toast {
  position: fixed; left: 50%; bottom: calc(var(--p-tabbar-h) + 18px); transform: translateX(-50%) translateY(10px);
  z-index: 500; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(217,171,82,.22), rgba(132,116,173,.20));
  border: 1px solid rgba(217,171,82,.4); border-radius: 999px; padding: 10px 18px 10px 10px;
  box-shadow: var(--p-shadow-gold); backdrop-filter: blur(12px);
  animation: pmedalin .35s cubic-bezier(.22,1,.36,1) forwards, pmedalout .35s ease forwards 3.6s;
  opacity: 0;
}
.p-medal-toast .pmt-ic { font-size: 26px; background: rgba(63,58,82,.12); border-radius: 50%; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.p-medal-toast .pmt-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--p-gold-deep); font-weight: 700; }
.p-medal-toast .pmt-name { font-size: 13.5px; font-weight: 700; color: var(--p-text); }
@keyframes pmedalin { from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes pmedalout { from { opacity: 1; } to { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* ==========================================================================
   Modal de level-up — glow dourado
   ========================================================================== */
.p-levelup-overlay {
  position: fixed; inset: 0; background: rgba(63,58,82,.45); z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: pfade .2s ease;
  backdrop-filter: blur(4px);
}
.p-levelup-card {
  width: 100%; max-width: 340px; text-align: center; border-radius: var(--p-radius-lg);
  padding: 36px 28px 30px;
  background: radial-gradient(120% 140% at 50% -10%, rgba(217,171,82,.28), transparent 60%),
              linear-gradient(160deg, #fffdf8 0%, #fbf0da 100%);
  border: 1px solid rgba(217,171,82,.4);
  box-shadow: 0 0 0 1px rgba(217,171,82,.25), 0 30px 70px rgba(90,70,120,.22), 0 0 60px rgba(217,171,82,.18);
  animation: plevelpop .45s cubic-bezier(.2,1.4,.4,1);
  position: relative; overflow: hidden;
}
.p-levelup-card::before {
  content: ""; position: absolute; inset: -40%; background: radial-gradient(circle, rgba(217,171,82,.25), transparent 60%);
  animation: pglowspin 6s linear infinite;
}
.p-levelup-badge {
  width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%; position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep));
  display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 800; color: #2a1808;
  box-shadow: 0 0 0 6px rgba(217,171,82,.16), 0 12px 30px rgba(217,171,82,.4);
  animation: pbadgepulse 1.8s ease-in-out infinite;
}
.p-levelup-eyebrow { position: relative; z-index: 1; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--p-gold-deep); font-weight: 700; margin-bottom: 6px; }
.p-levelup-name { position: relative; z-index: 1; font-size: 22px; font-weight: 800; color: var(--p-text); margin-bottom: 10px; }
.p-levelup-desc { position: relative; z-index: 1; font-size: 13px; color: var(--p-text-muted); margin-bottom: 18px; }
.p-levelup-unlocks { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 22px; }
@keyframes pglowspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pbadgepulse { 0%,100% { box-shadow: 0 0 0 6px rgba(217,171,82,.16), 0 12px 30px rgba(217,171,82,.4); } 50% { box-shadow: 0 0 0 12px rgba(217,171,82,.08), 0 12px 40px rgba(217,171,82,.55); } }
@keyframes plevelpop { from { opacity: 0; transform: scale(.8) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pfade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Bottom sheet (check-in de humor, etc.)
   ========================================================================== */
.p-sheet-overlay {
  position: fixed; inset: 0; background: rgba(63,58,82,.35); z-index: 550;
  display: flex; align-items: flex-end; justify-content: center;
  animation: pfade .18s ease;
}
.p-sheet {
  width: 100%; max-width: var(--p-max-w); background: linear-gradient(180deg, #fffefa 0%, #fdfaf3 100%);
  border: 1px solid var(--p-glass-border); border-bottom: none;
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(26px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -20px 60px rgba(90,70,120,.16);
  animation: psheetup .28s cubic-bezier(.22,1,.36,1);
  max-height: 86vh; overflow-y: auto;
}
/* 23.10.50 — o X de fechar, no canto direito de TODA a folha.
   `sticky` e não `absolute`: a `.p-sheet` tem `overflow-y: auto` e
   `max-height: 86vh`, e um absolute lá dentro rola com o conteúdo — numa
   folha alta (a do humor, com os dois cursores) o X desapareceria por cima
   assim que se rolasse. Assim fica sempre à mão.
   O `margin-bottom` negativo tira-o do fluxo vertical para não empurrar a
   pega nem o título; a pega tem 40px e está centrada, o X está encostado à
   direita — não se tocam. */
.p-sheet-close {
  position: sticky; top: 2px; z-index: 3;
  margin: 0 -8px -30px auto;   /* `auto` à esquerda encosta-o à direita */
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; padding: 0;
  color: var(--p-text-soft, #a29dbb); font-family: inherit;
  transition: background .18s, color .18s;
}
.p-sheet-close:hover { background: rgba(63,58,82,.07); color: var(--p-text, #3f3a52); }
.p-sheet-close:focus-visible { outline: 2px solid var(--p-gold-deep, #b98d3e); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .p-sheet-close { transition: none; } }

.p-sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: rgba(63,58,82,.18); margin: 6px auto 14px; }
.p-sheet-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; padding-right: 34px; }
.p-sheet-sub { font-size: 12.5px; color: var(--p-text-muted); margin-bottom: 18px; }
@keyframes psheetup { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Seletor de humor — 5 emojis grandes */
.p-mood-picker { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 20px; }
.p-mood-opt {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px; border-radius: 16px; border: 1.5px solid transparent; background: transparent;
  cursor: pointer; transition: all .18s ease; font-family: inherit;
}
.p-mood-opt .p-mood-emoji { font-size: 28px; transition: transform .18s ease; filter: grayscale(.35) brightness(.9); }
.p-mood-opt .p-mood-label { font-size: 10px; color: var(--p-text-soft); font-weight: 600; }
.p-mood-opt:hover .p-mood-emoji { transform: scale(1.12); }
.p-mood-opt.selected { border-color: rgba(217,171,82,.5); background: rgba(217,171,82,.12); }
.p-mood-opt.selected .p-mood-emoji { filter: none; transform: scale(1.22); }
.p-mood-opt.selected .p-mood-label { color: var(--p-gold-deep); }

.p-slider-row { margin-bottom: 18px; }
.p-slider-row .psr-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--p-text-muted); margin-bottom: 8px; font-weight: 600; }
.p-slider-row .psr-value { color: var(--p-gold-deep); font-weight: 800; }
#app-shell.patient-mode input[type="range"] {
  width: 100%; -webkit-appearance: none; height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--p-gold-deep), var(--p-gold) var(--p-range-pct, 50%), rgba(63,58,82,.10) var(--p-range-pct, 50%));
  outline: none;
}
#app-shell.patient-mode input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--p-gold-soft); border: 3px solid #fffdf6; box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer;
}
#app-shell.patient-mode input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--p-gold-soft); border: 3px solid #fffdf6; cursor: pointer;
}

/* ==========================================================================
   Missões
   ========================================================================== */
.p-mission-list { display: flex; flex-direction: column; gap: 10px; }
.p-mission {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px;
  background: var(--p-glass); border: 1px solid var(--p-glass-border); transition: all .2s ease;
}
.p-mission.locked { opacity: .48; }
.p-mission.done { background: rgba(127,191,154,.09); border-color: rgba(127,191,154,.28); }
.p-mission-ic { font-size: 22px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(63,58,82,.06); flex-shrink: 0; }
.p-mission-body { flex: 1; min-width: 0; }
.p-mission-title { font-size: 13.5px; font-weight: 700; color: var(--p-text); }
.p-mission-desc { font-size: 11.5px; color: var(--p-text-muted); margin-top: 1px; }
.p-mission-xp { font-size: 11px; font-weight: 800; color: var(--p-gold-deep); flex-shrink: 0; }
.p-mission-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(63,58,82,.28);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px;
  transition: all .25s cubic-bezier(.2,1.4,.4,1); cursor: pointer; color: transparent;
}
.p-mission.done .p-mission-check {
  background: var(--p-success); border-color: var(--p-success); color: #103319;
  animation: pcheckpop .4s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pcheckpop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

.p-mission-section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.p-mission-section-title h3 { font-size: 14px; font-weight: 700; margin: 0; color: var(--p-text); }
.p-week-progress { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--p-text-muted); }

/* Grade de medalhas */
.p-medal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.p-medal-cell {
  aspect-ratio: 1; border-radius: 16px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; background: var(--p-glass); border: 1px solid var(--p-glass-border);
  font-size: 22px; text-align: center; padding: 6px;
}
.p-medal-cell.earned { background: rgba(217,171,82,.13); border-color: rgba(217,171,82,.4); box-shadow: 0 0 18px rgba(217,171,82,.15); }
.p-medal-cell.locked { filter: grayscale(1); opacity: .38; }
.p-medal-cell .pmc-name { font-size: 8.5px; font-weight: 700; line-height: 1.15; color: var(--p-text-muted); }
.p-medal-cell.earned .pmc-name { color: var(--p-gold-deep); }

/* Tabela de níveis */
.p-level-table { display: flex; flex-direction: column; gap: 4px; }
.p-level-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--p-glass-border); font-size: 12.5px; }
.p-level-row:last-child { border-bottom: none; }
.p-level-row .plr-badge { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11.5px; background: rgba(63,58,82,.07); flex-shrink: 0; }
.p-level-row.current .plr-badge { background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); color: #2a1808; }
.p-level-row .plr-name { flex: 1; font-weight: 600; color: var(--p-text); }
.p-level-row .plr-unlock { font-size: 10.5px; color: var(--p-text-soft); }

/* ==========================================================================
   Roda da Vida
   ========================================================================== */
.p-wheel-progress { font-size: 12px; color: var(--p-text-muted); text-align: center; margin-bottom: 14px; font-weight: 600; }
.p-wheel-area-card { text-align: center; }
.p-wheel-area-emoji { font-size: 40px; margin-bottom: 4px; }
.p-wheel-area-name { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.p-wheel-question { margin: 20px 0 6px; }
.p-wheel-question .pwq-text { font-size: 13.5px; color: var(--p-text); margin-bottom: 10px; }
.p-wheel-nav { display: flex; gap: 10px; margin-top: 18px; }
.p-wheel-dots { display: flex; justify-content: center; gap: 5px; margin: 10px 0 4px; }
.p-wheel-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(63,58,82,.18); }
.p-wheel-dots span.on { background: var(--p-gold); }

.p-radar-wrap { display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.p-radar-wrap canvas { width: 100%; max-width: 340px; height: 340px; }
.p-radar-legend { display: flex; justify-content: center; gap: 16px; margin-top: 6px; font-size: 12px; }
.p-radar-legend-item { display: flex; align-items: center; gap: 6px; color: var(--p-text-muted); }
.p-radar-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.p-overall-score { text-align: center; margin: 6px 0 14px; }
.p-overall-score .pos-num { font-size: 44px; font-weight: 800; color: var(--p-gold-deep); line-height: 1; }
.p-overall-score .pos-label { font-size: 12px; color: var(--p-text-muted); }

.p-area-list { display: flex; flex-direction: column; gap: 8px; }
.p-area-row { display: flex; align-items: center; gap: 10px; }
.p-area-row .par-emoji { font-size: 16px; width: 22px; text-align: center; }
.p-area-row .par-name { flex: 1; font-size: 12.5px; color: var(--p-text-muted); }
.p-area-row .par-track { flex: 1.4; height: 8px; border-radius: 99px; background: #f3ecdf; overflow: hidden; }
.p-area-row .par-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--p-gold-soft), var(--p-gold)); }
.p-area-row .par-val { font-size: 12.5px; font-weight: 700; min-width: 30px; text-align: right; color: var(--p-text); }
.p-area-row .par-delta { font-size: 11px; font-weight: 800; min-width: 30px; text-align: right; }
.p-delta-up { color: var(--p-success); }
.p-delta-down { color: var(--p-danger); }
.p-delta-flat { color: var(--p-text-soft); }

.p-wheel-history-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); font-size: 12.5px; }
.p-wheel-history-item:last-child { border-bottom: none; }
.p-wheel-compare-select { display: flex; gap: 10px; margin-bottom: 12px; }
.p-wheel-compare-select select { flex: 1; }

/* ==========================================================================
   Jornada do Herói — trilha vertical
   ========================================================================== */
.p-journey-trail { position: relative; padding-left: 34px; margin: 8px 0 4px; }
.p-journey-node { position: relative; padding-bottom: 26px; }
.p-journey-node:last-child { padding-bottom: 4px; }
.p-journey-node::before {
  content: ""; position: absolute; left: -34px; top: 22px; bottom: -4px; width: 2px;
  background: rgba(63,58,82,.14);
}
.p-journey-node:last-child::before { display: none; }
.p-journey-node.done::before { background: linear-gradient(180deg, var(--p-gold), rgba(217,171,82,.25)); }
.p-journey-marker {
  position: absolute; left: -46px; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  background: rgba(63,58,82,.08); border: 2px solid rgba(63,58,82,.18); color: var(--p-text-soft);
}
.p-journey-node.done .p-journey-marker { background: var(--p-gold-deep); border-color: var(--p-gold-deep); color: #2a1808; }
.p-journey-node.current .p-journey-marker {
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); border-color: var(--p-gold-deep);
  color: #2a1808; box-shadow: 0 0 0 4px rgba(217,171,82,.18);
  animation: pjourneypulse 1.8s ease-in-out infinite;
}
@keyframes pjourneypulse { 0%,100% { box-shadow: 0 0 0 4px rgba(217,171,82,.18); } 50% { box-shadow: 0 0 0 9px rgba(217,171,82,.06); } }
.p-journey-node.future { opacity: .42; }
.p-journey-node-title { font-size: 13.5px; font-weight: 700; color: var(--p-text); display: flex; align-items: center; gap: 6px; }
.p-journey-node.current .p-journey-node-title { color: var(--p-gold-deep); }
.p-journey-node-desc { font-size: 11.5px; color: var(--p-text-muted); margin-top: 2px; }

.p-journey-phase-card .pjp-emoji { font-size: 40px; margin-bottom: 6px; }
.p-journey-phase-card .pjp-name { font-size: 19px; font-weight: 800; }
.p-journey-phase-card .pjp-time { font-size: 11.5px; color: var(--p-gold-deep); font-weight: 700; margin-top: 2px; }
.p-journey-phase-card .pjp-desc { font-size: 13px; color: var(--p-text-muted); margin: 12px 0; line-height: 1.55; }
.p-journey-invitation { border-left: 3px solid var(--p-gold); background: rgba(217,171,82,.08); padding: 10px 14px; border-radius: 0 12px 12px 0; font-style: italic; font-size: 12.5px; color: var(--p-gold-deep); margin-bottom: 4px; }

.p-reflection-item { margin-bottom: 14px; }
.p-reflection-q { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--p-text); }
.p-reflection-answered { font-size: 12px; color: var(--p-text-muted); background: rgba(63,58,82,.04); border-radius: 12px; padding: 10px 12px; margin-top: 6px; }
/* 23.7.0 — aviso inline de falha ao guardar uma reflexao. Nao pisca (P9). */
.p-reflection-error { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--p-danger); }

.p-journey-archetype-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(132,116,173,.18); border: 1px solid rgba(132,116,173,.35); color: #6f5fae; margin: 3px 4px 0 0; }

/* ==========================================================================
   Mapa Arquetípico
   ========================================================================== */
.p-quiz-progress { text-align: center; font-size: 12px; color: var(--p-text-muted); margin-bottom: 14px; font-weight: 600; }
.p-quiz-question { font-size: 16px; font-weight: 700; text-align: center; margin: 10px 0 20px; line-height: 1.4; }
.p-quiz-options { display: flex; flex-direction: column; gap: 10px; }
.p-quiz-opt {
  text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--p-glass);
  border: 1.5px solid var(--p-glass-border); color: var(--p-text); font-size: 13.5px; cursor: pointer;
  transition: all .18s ease; font-family: inherit;
}
.p-quiz-opt:hover { border-color: rgba(217,171,82,.45); background: rgba(217,171,82,.08); transform: translateX(2px); }

.p-arch-bar-row { margin-bottom: 12px; }
.p-arch-bar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.p-arch-bar-top .pab-name { font-weight: 700; color: var(--p-text); display: flex; gap: 6px; align-items: center; }
.p-arch-bar-top .pab-pct { color: var(--p-gold-deep); font-weight: 800; }
.p-arch-bar-track { height: 10px; border-radius: 99px; background: #f3ecdf; overflow: hidden; }
.p-arch-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--p-gold-soft), var(--p-gold)); transition: width .6s ease; }

.p-symbol-card { display: flex; gap: 12px; align-items: flex-start; }
.p-symbol-emoji { font-size: 30px; flex-shrink: 0; }
.p-symbol-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.p-symbol-summary { font-size: 12px; color: var(--p-text-muted); margin-bottom: 8px; line-height: 1.5; }
.p-symbol-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.p-chip-light { background: rgba(127,191,154,.14); border-color: rgba(127,191,154,.35); color: #3f7a5c; }
.p-chip-shadow { background: rgba(226,147,141,.13); border-color: rgba(226,147,141,.32); color: #b45f5f; }

/* ==========================================================================
   Janela de Johari
   ========================================================================== */
.p-johari-grid { display: grid; gap: 6px; border-radius: var(--p-radius); overflow: hidden; margin-bottom: 6px; }
.p-johari-quad {
  padding: 14px; min-height: 108px; display: flex; flex-direction: column; gap: 6px;
  border-radius: 14px; position: relative; overflow: hidden;
}
.p-johari-quad .pjq-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding-right: 6px; overflow-wrap: break-word; hyphens: auto; }
.p-johari-quad .pjq-pct { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 800; opacity: .8; }
.p-johari-quad .pjq-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.p-johari-quad .pjq-chip { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: rgba(63,58,82,.14); }
.p-johari-quad.pjq-aberta { background: linear-gradient(150deg, rgba(127,191,154,.20), rgba(127,191,154,.06)); border: 1px solid rgba(127,191,154,.28); }
.p-johari-quad.pjq-cega { background: linear-gradient(150deg, rgba(226,147,141,.18), rgba(226,147,141,.05)); border: 1px solid rgba(226,147,141,.26); }
.p-johari-quad.pjq-oculta { background: linear-gradient(150deg, rgba(132,116,173,.22), rgba(132,116,173,.06)); border: 1px solid rgba(132,116,173,.32); }
.p-johari-quad.pjq-desconhecida { background: linear-gradient(150deg, rgba(63,58,82,.10), rgba(63,58,82,.03)); border: 1px solid var(--p-glass-border); }
.p-johari-explain { font-size: 11.5px; color: var(--p-text-muted); margin-top: 10px; line-height: 1.5; }

.p-trait-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.p-trait-pill {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--p-glass-border); background: var(--p-glass);
  font-size: 12.5px; cursor: pointer; color: var(--p-text-muted); transition: all .15s ease; font-family: inherit;
}
.p-trait-pill.selected { background: rgba(217,171,82,.16); border-color: rgba(217,171,82,.5); color: var(--p-gold-deep); font-weight: 700; }
.p-trait-count { text-align: center; font-size: 11.5px; color: var(--p-text-soft); margin: 10px 0; }

.p-invite-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); font-size: 12.5px; }
.p-invite-row:last-child { border-bottom: none; }
.p-invite-code { font-family: monospace; font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--p-gold-deep); }
.p-invite-status { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.p-invite-status.used { background: rgba(127,191,154,.15); color: #3f7a5c; }
.p-invite-status.pending { background: rgba(63,58,82,.08); color: var(--p-text-soft); }

/* ==========================================================================
   Fichas (bem-estar / bioimpedância / anamnese)
   ========================================================================== */
.p-forms-hub-grid { display: flex; flex-direction: column; gap: 10px; }
.p-form-hub-card { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.p-form-hub-card:hover { border-color: rgba(217,171,82,.35); }
.p-form-hub-ic { font-size: 26px; width: 46px; height: 46px; border-radius: 14px; background: rgba(63,58,82,.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p-form-hub-title { font-size: 14px; font-weight: 700; }
.p-form-hub-sub { font-size: 11.5px; color: var(--p-text-muted); margin-top: 1px; }
.p-form-hub-arrow { margin-left: auto; color: var(--p-text-soft); }

.p-toggle-list { display: flex; flex-direction: column; }
.p-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-toggle-row:last-child { border-bottom: none; }
.p-toggle-q { font-size: 13px; color: var(--p-text); flex: 1; }
.p-switch { position: relative; width: 46px; height: 26px; border-radius: 99px; background: rgba(63,58,82,.12); border: 1px solid var(--p-glass-border); cursor: pointer; flex-shrink: 0; transition: background .2s ease; }
.p-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.p-switch.on { background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); }
.p-switch.on::after { transform: translateX(20px); }

.p-result-band { text-align: center; padding: 20px 12px; }
.p-result-band .prb-score { font-size: 40px; font-weight: 800; color: var(--p-gold-deep); }
.p-result-band .prb-label { font-size: 15px; font-weight: 700; margin-top: 4px; }
.p-result-band .prb-msg { font-size: 12.5px; color: var(--p-text-muted); margin-top: 8px; line-height: 1.55; }

.p-bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
@media (max-width: 420px) { .p-bio-grid { grid-template-columns: 1fr; } }
.p-imc-badge { text-align: center; padding: 14px; border-radius: 14px; background: rgba(217,171,82,.10); border: 1px solid rgba(217,171,82,.3); margin-bottom: 14px; }
.p-imc-badge .pib-num { font-size: 30px; font-weight: 800; color: var(--p-gold-deep); }
.p-imc-badge .pib-label { font-size: 11px; color: var(--p-text-muted); }

.p-bio-history-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); font-size: 12.5px; }
.p-bio-history-row:last-child { border-bottom: none; }
.p-bio-metrics { display: flex; gap: 12px; }
.p-bio-metric { text-align: right; }
.p-bio-metric .pbm-label { font-size: 9.5px; color: var(--p-text-soft); text-transform: uppercase; }
.p-bio-metric .pbm-val { font-weight: 700; }

.p-anamnese-progress { margin: 4px 0 16px; }
.p-anamnese-autosave { font-size: 11px; color: var(--p-text-soft); text-align: center; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.p-anamnese-autosave .pas-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--p-success); }

#app-shell.patient-mode .accordion-item { background: var(--p-glass); border: 1px solid var(--p-glass-border); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
#app-shell.patient-mode .accordion-header { background: transparent; color: var(--p-text); font-size: 13.5px; padding: 15px 16px; }
#app-shell.patient-mode .accordion-header .acc-arrow { color: var(--p-text-soft); }
#app-shell.patient-mode .accordion-body { padding: 0 16px; }

/* ==========================================================================
   Minha História
   ========================================================================== */
.p-story-letter {
  font-family: Georgia, 'Times New Roman', serif; font-size: 14.5px; line-height: 1.75; color: var(--p-text);
  background: linear-gradient(160deg, rgba(63,58,82,.05), rgba(63,58,82,.02));
  border-left: 3px solid var(--p-gold); padding: 18px 18px 18px 20px; border-radius: 4px 16px 16px 4px;
}
.p-story-letter::first-letter { font-size: 26px; font-weight: 700; color: var(--p-gold-deep); }
.p-insight-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-insight-item:last-child { border-bottom: none; }
.p-insight-ic { font-size: 18px; flex-shrink: 0; }
.p-insight-title { font-size: 13px; font-weight: 700; }
.p-insight-content { font-size: 12px; color: var(--p-text-muted); margin-top: 2px; line-height: 1.5; }

.p-achievement-timeline { position: relative; margin-left: 6px; }
.p-achievement-item { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--p-glass-border); }
.p-achievement-item:last-child { border-color: transparent; }
.p-achievement-dot { position: absolute; left: -8px; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--p-gold); border: 2px solid #fdfaf3; }
.p-achievement-date { font-size: 10.5px; color: var(--p-text-soft); font-weight: 700; }
.p-achievement-label { font-size: 12.5px; margin-top: 2px; }

/* ==========================================================================
   Perfil
   ========================================================================== */
.p-profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.p-profile-avatar {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #2a1808;
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep));
  box-shadow: var(--p-shadow-gold);
}
.p-profile-name { font-size: 17px; font-weight: 700; }
.p-profile-meta { font-size: 12px; color: var(--p-text-muted); }

.p-menu-list { display: flex; flex-direction: column; }
.p-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--p-glass-border);
  cursor: pointer; font-size: var(--tf-acao); color: var(--p-text); transition: opacity .15s ease;
}
.p-menu-item:last-child { border-bottom: none; }
.p-menu-item:hover { opacity: .82; }
.p-menu-item .pmi-ic { font-size: 18px; width: 24px; text-align: center; }
.p-menu-item .pmi-arrow { margin-left: auto; color: var(--p-text-soft); }

.p-goal-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-goal-item:last-child { border-bottom: none; }
.p-goal-item.done .p-goal-title { text-decoration: line-through; color: var(--p-text-soft); }
.p-goal-title { font-size: 13px; font-weight: 600; }
.p-goal-desc { font-size: 11.5px; color: var(--p-text-muted); margin-top: 2px; }
.p-goal-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(63,58,82,.28); flex-shrink: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; margin-top: 1px;
}
.p-goal-item.done .p-goal-check { background: var(--p-success); border-color: var(--p-success); color: #103319; }

/* ==========================================================================
   Linhas chave/valor — card "Meus dados" (#/p/perfil) e "Indicar alguém"
   (#/p/indique) — SPEC_RELEASE_3_1.md §F4/§F5.
   ========================================================================== */
.p-kv-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--p-glass-border);
}
.p-kv-row:last-child { border-bottom: none; }
/* A linha declarava 13px para os dois lados, e nem o rótulo nem o valor
   tinham tamanho próprio — herdavam-no. Mas são coisas diferentes: "Email" é
   um rótulo, e o endereço é o DADO da pessoa. Separados, cada um recebe o seu
   nível. É este o tipo de cadeia que a migração existe para desfazer. */
.p-kv-label { font-size: var(--tf-legenda); color: var(--p-text-muted); flex-shrink: 0; }
.p-kv-value { font-size: var(--tf-corpo); font-weight: 700; color: var(--p-text); text-align: right; }

/* ==========================================================================
   Recursos / atalhos na Home ("Mais recursos")
   ========================================================================== */
.p-shortcut-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.p-shortcut-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; }
.p-shortcut-card:hover { border-color: rgba(217,171,82,.35); }
.p-shortcut-ic { font-size: 22px; }
.p-shortcut-title { font-size: 12.5px; font-weight: 700; }
.p-shortcut-sub { font-size: 10.5px; color: var(--p-text-muted); }

/* Mini radar CTA na home */
.p-mini-wheel-cta { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.p-mini-wheel-cta canvas { width: 84px; height: 84px; flex-shrink: 0; }

/* Card da fase da jornada (resumo, home) */
.p-phase-mini { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.p-phase-mini-ic { font-size: 30px; }
.p-phase-mini-title { font-size: 14px; font-weight: 700; }
.p-phase-mini-sub { font-size: 11.5px; color: var(--p-text-muted); }

/* ==========================================================================
   Auth do paciente / convidado Johari (telas públicas, sem tabbar)
   ========================================================================== */
.p-auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(720px 480px at 12% -6%, rgba(132,116,173,0.32), transparent 60%),
    radial-gradient(640px 520px at 108% 12%, rgba(217,171,82,0.12), transparent 55%),
    linear-gradient(160deg, var(--p-ink-1) 0%, var(--p-ink-2) 42%, var(--p-ink-3) 100%);
  color: var(--p-text); font-family: var(--p-font);
}
/* app.css define `h1..h5 { color: var(--text) }` (tom escuro, pensado para
   fundos claros) — herança do `.p-auth-page { color: var(--p-text) }` acima
   NÃO sobrepõe essa regra (herança só vale quando nenhuma regra define a
   propriedade diretamente no próprio elemento), então sem este override os
   títulos <h1> desta página ficam quase invisíveis sobre o fundo escuro. */
.p-auth-page h1, .p-auth-page h2, .p-auth-page h3, .p-auth-page h4 { color: var(--p-text); }
.p-auth-card { width: 100%; max-width: 420px; }
.p-auth-logo { text-align: center; margin-bottom: 22px; }
.p-auth-logo .pal-mark {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep));
  display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: var(--p-shadow-gold);
}
.p-auth-logo h1 { font-size: 20px; margin-bottom: 4px; }
.p-auth-logo p { font-size: 13px; color: var(--p-text-muted); margin: 0; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (min-width: 560px) {
  #app-shell.patient-mode main#view { padding-top: 26px; }
}
@media (max-width: 380px) {
  .p-medal-grid { grid-template-columns: repeat(3, 1fr); }
  .p-mood-opt .p-mood-emoji { font-size: 24px; }
}

/* Reduz movimento para quem prefere (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  .p-levelup-card, .p-levelup-badge, .p-levelup-card::before, .p-journey-node.current .p-journey-marker,
  .p-xp-float, .p-medal-toast { animation: none !important; }
}

/* ==========================================================================
   Acessos e Consentimentos (#/p/acessos) — SPEC_DATA_SHARING.md
   ========================================================================== */
.p-share-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); flex-wrap: wrap;
}
.p-share-item:last-child { border-bottom: none; }
.p-share-name { font-size: 14px; font-weight: 700; color: var(--p-text); margin-bottom: 4px; }
.p-share-code { font-size: 15px; font-weight: 800; letter-spacing: .06em; color: var(--p-gold-deep); font-family: 'Courier New', monospace; }
.p-share-meta { font-size: 11.5px; color: var(--p-text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.p-share-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.p-share-level-opt { width: 100%; margin-bottom: 8px; }
.p-share-level-opt.selected {
  border-color: var(--p-gold-deep); background: rgba(217,171,82,.12);
  box-shadow: 0 0 0 1px rgba(217,171,82,.35);
}

.p-share-generated {
  text-align: center; padding: 18px; border-radius: 16px;
  background: rgba(217,171,82,.10); border: 1.5px dashed rgba(217,171,82,.5);
}
.p-share-generated-code {
  font-size: 28px; font-weight: 800; letter-spacing: .18em; color: var(--p-gold-deep);
  font-family: 'Courier New', monospace;
}

/* ==========================================================================
   Release 4 (SPEC_RELEASE_4.md) — Home nova, ícones SVG (icons.js), Esfera
   Vibracional (sphere.js), avatar evolutivo (avatars.js), stepper horizontal,
   progresso do hub "Descobrir", Diário/Evolução/Objetivos/Biblioteca/Árvore.
   Coerente com o glassmorphism violeta/dourado já definido acima.
   ========================================================================== */

/* Ícones SVG inline (icons.js) — herdam a cor do texto onde aparecem. */
.mic-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.p-card-title .mic-icon { margin-right: 2px; }

/* -- Esfera Vibracional (estado atual, Home) ------------------------------ */
.p-sphere-card { text-align: center; }
.p-sphere-wrap { display: flex; justify-content: center; cursor: pointer; margin-bottom: 6px; }
.p-sphere-wrap svg { max-width: 100%; height: auto; }
.p-sphere-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
.p-sphere-hz { font-size: 20px; font-weight: 800; color: var(--p-gold-deep); }
.p-sphere-band { font-size: 12.5px; color: var(--p-text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

.p-bars-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; margin-top: 14px; text-align: left; }
.p-bar-item { }
.p-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--p-text-muted); margin-bottom: 5px; font-weight: 600; }
.p-bar-top-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.p-bar-ic { display: inline-flex; opacity: .85; }
.p-bar-track { height: 6px; border-radius: 99px; background: #f3ecdf; overflow: hidden; }
.p-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--p-gold-soft), var(--p-gold)); transition: width .6s ease; }
.p-focus-line { font-size: 12px; color: var(--p-text-muted); margin-top: 12px; line-height: 1.5; text-align: left; }

/* -- Insight do dia + mensagem do terapeuta -------------------------------- */
.p-message-row {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px;
  border-radius: 14px; background: rgba(217,171,82,.08); border: 1px solid rgba(217,171,82,.28); cursor: pointer;
}
.p-message-ic { flex-shrink: 0; margin-top: 2px; color: var(--p-gold-deep); }
.p-message-from { font-size: 11.5px; font-weight: 700; color: var(--p-gold-deep); text-transform: uppercase; letter-spacing: .03em; }
.p-message-body { font-size: 12.5px; color: var(--p-text); margin-top: 3px; line-height: 1.5; }

/* -- Missão de hoje + streak compacto -------------------------------------- */
.p-mission-streak-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.p-mission-streak-top .p-streak { margin-top: 0; }
.p-mission-streak-top .p-streak svg { margin-right: 2px; }

/* -- Avatar evolutivo + XP compacto ---------------------------------------- */
.p-avatar-card { display: flex; align-items: center; gap: 14px; }
.p-avatar-svg svg { display: block; }
.p-avatar-stage-name { font-size: 15px; font-weight: 700; }

/* -- Stepper horizontal da Jornada (Home) ---------------------------------- */
.p-stepper-h { display: flex; align-items: center; gap: 4px; margin: 8px 0 10px; }
.p-stepper-h-node {
  flex: 1; height: 6px; border-radius: 99px; background: rgba(63,58,82,.10); position: relative;
}
.p-stepper-h-node.done { background: linear-gradient(90deg, var(--p-gold-deep), var(--p-gold)); }
.p-stepper-h-node.current {
  background: rgba(217,171,82,.35);
  box-shadow: 0 0 0 2px rgba(217,171,82,.3);
}
.p-stepper-h-dot { display: none; }
.p-stepper-h-current { font-size: 12.5px; color: var(--p-gold-deep); font-weight: 700; }
.p-tree-mini-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--p-text-muted);
  cursor: pointer;
}

/* -- Hub "Descobrir quem eu sou" e barras de progresso reutilizáveis ------- */
.p-progress-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); cursor: pointer; }
.p-progress-row:last-child { border-bottom: none; }
.p-progress-row-compact { padding: 8px 0; }
.p-progress-row-ic { width: 30px; height: 30px; border-radius: 10px; background: rgba(63,58,82,.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--p-gold-deep); }
.p-progress-row-body { flex: 1; min-width: 0; }
.p-progress-row-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.p-progress-row-label { font-weight: 600; color: var(--p-text); }
.p-progress-row-pct { color: var(--p-gold-deep); font-weight: 700; }
.p-progress-row-arrow { color: var(--p-text-soft); flex-shrink: 0; }
.p-progress-track { height: 7px; border-radius: 99px; background: #f3ecdf; overflow: hidden; }
.p-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--p-gold-soft), var(--p-gold)); transition: width .5s ease; }

/* Valores/Talentos — resultado (top 5 / top 3) */
.p-value-result-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-value-result-item:last-child { border-bottom: none; }
.p-value-result-rank {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); color: #2a1808;
}
.p-value-result-name { font-size: 13.5px; font-weight: 700; }
.p-value-result-desc { font-size: 12px; color: var(--p-text-muted); margin-top: 2px; line-height: 1.5; }

/* Talentos — escala Likert 1-5 */
.p-likert-row { padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-likert-row:last-child { border-bottom: none; }
.p-likert-text { font-size: 12.5px; color: var(--p-text); margin-bottom: 8px; }
.p-likert-scale { display: flex; gap: 6px; }
.p-likert-opt {
  flex: 1; padding: 8px 0; border-radius: 10px; border: 1.5px solid var(--p-glass-border); background: var(--p-glass);
  color: var(--p-text-muted); font-weight: 700; cursor: pointer; font-family: inherit;
}
.p-likert-opt.selected { border-color: rgba(217,171,82,.55); background: rgba(217,171,82,.16); color: var(--p-gold-deep); }

/* -- Objetivos (#/p/objetivos) --------------------------------------------- */
.p-goal-card.done { opacity: .72; }
.p-goal-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-goal-card-title { font-size: 14px; font-weight: 700; }
.p-goal-card-pct { font-size: 13px; font-weight: 800; color: var(--p-gold-deep); }
.p-goal-bar-row { margin-bottom: 12px; }
.p-goal-bar-row:last-child { margin-bottom: 0; }
.p-goal-bar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; color: var(--p-text-muted); }

/* -- Biblioteca (#/p/biblioteca) -------------------------------------------- */
.p-library-item { padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-library-item:last-child { border-bottom: none; }
.p-library-item.done { opacity: .68; }
.p-library-item-title { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.p-library-item-body { font-size: 12.5px; color: var(--p-text-muted); line-height: 1.55; }

/* -- Diário (#/p/diario) ----------------------------------------------------- */
.p-diary-entry { padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-diary-entry:last-child { border-bottom: none; }
.p-diary-entry-top { display: flex; align-items: center; justify-content: space-between; }
.p-diary-entry-date { font-size: 11.5px; color: var(--p-text-soft); font-weight: 700; }
.p-diary-entry-mood { font-size: 18px; }
.p-diary-entry-text { font-size: 12.5px; color: var(--p-text); margin-top: 4px; line-height: 1.5; }
.p-diary-entry-gratitude { font-size: 11.5px; color: var(--p-gold-deep); margin-top: 4px; }

/* -- Evolução (#/p/evolucao) --------------------------------------------- */
.p-evolution-stats-row { display: flex; justify-content: space-around; text-align: center; }
.p-evolution-stat .pes-num { font-size: 24px; font-weight: 800; color: var(--p-gold-deep); }
.p-evolution-stat .pes-label { font-size: 10.5px; color: var(--p-text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* -- Árvore da Vida (#/p/arvore) ------------------------------------------ */
.p-tree-card { text-align: center; }
.p-tree-svg-wrap { display: flex; justify-content: center; }
.p-tree-svg-wrap svg { max-width: 100%; height: auto; }
.p-tree-legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 11.5px; color: var(--p-text-muted); }
.p-tree-legend-item { display: flex; align-items: center; gap: 6px; }
.p-tree-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid var(--p-violet-light); background: transparent; }
.p-tree-legend-dot.active { background: rgba(217,171,82,.4); border-color: var(--p-gold-deep); }
.p-tree-legend-dot.worked { background: var(--p-gold); border-color: var(--p-gold-deep); }
.p-tree-note { margin-top: 10px; text-align: left; font-size: 12.5px; color: var(--p-text-muted); background: rgba(63,58,82,.04); border-radius: 12px; padding: 10px 12px; }

/* -- Hub Jornada (sub-tabs Jornada/Árvore/Missões) ------------------------- */
#app-shell.patient-mode .p-journey-hub .tabs {
  display: flex; gap: 6px; margin-bottom: 16px; background: var(--p-glass); border: 1px solid var(--p-glass-border);
  border-radius: 999px; padding: 4px;
}
#app-shell.patient-mode .p-journey-hub .tab-btn {
  flex: 1; border: none; background: transparent; color: var(--p-text-muted); font-family: inherit;
  font-size: 12.5px; font-weight: 700; padding: 9px 8px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
#app-shell.patient-mode .p-journey-hub .tab-btn.active {
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); color: #2a1808;
}
#app-shell.patient-mode .p-journey-hub .tab-panel { display: none; }
#app-shell.patient-mode .p-journey-hub .tab-panel.active { display: block; }

/* -- Slider com ícone (check-in de humor: energia/ansiedade/sono) ---------- */
.psr-label-ic { display: flex; align-items: center; gap: 6px; }
.psr-label-ic svg { opacity: .85; }

/* -- Perfil: idioma, mensagens do terapeuta -------------------------------- */
#pp-locale select { max-width: 260px; }
.p-profile-message { padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); cursor: pointer; }
.p-profile-message:last-child { border-bottom: none; }
.p-profile-message.unread .p-message-from { color: var(--p-gold-deep); }
.p-profile-message .p-message-from { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--p-text-soft); }
.p-profile-message .p-message-body { font-size: 12.5px; color: var(--p-text); margin-top: 3px; line-height: 1.5; }

/* ==========================================================================
   R5 patient booking — SPEC_RELEASE_5.md §A5/§B3/§C: #/p/consultas,
   #/p/arquivos, #/agendar/:slug e #/gerir/:token (agendamento público) e o
   sino de notificações no shell do paciente.
   ========================================================================== */

/* -- Sino de notificações + botão "Sair" no shell do paciente -------------
   22/07 — pedido da usuária: ícone de logout ao lado do sino (o par de
   ações fixo passou a ser DOIS botões, não só o sino — por isso o
   position:fixed/display migrou do .patient-notif-bell-wrap para o novo
   pai .patient-header-actions, que os alinha lado a lado). */
.patient-header-actions {
  display: none; position: fixed; top: 16px; right: 16px; z-index: 130;
  align-items: center; gap: 8px;
}
#app-shell.patient-mode:not(.no-chrome) .patient-header-actions { display: flex; }
/* O dropdown de notificações (.notif-dropdown, montado dentro do próprio
   #patient-notif-bell-wrap por mountBellWrap em app.js) usa
   position:absolute e precisa ancorar no PRÓPRIO botão do sino — não no
   .patient-header-actions inteiro (que agora também contém o botão de
   logout) — senão "right:0" alinharia à ponta da fila toda, não do sino. */
.patient-notif-bell-wrap { position: relative; }
.patient-header-actions .icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--p-glass-border);
  background: var(--p-glass-strong); color: var(--p-text); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
}
.patient-header-actions .icon-btn:hover { background: rgba(63,58,82,.16); color: var(--p-text); }
.patient-logout-btn-wrap .icon-btn:hover { color: var(--p-gold-deep); }
.patient-notif-bell-wrap .notif-dropdown {
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf3 100%);
  border-color: var(--p-glass-border); color: var(--p-text);
  box-shadow: var(--p-shadow-glass);
}
.patient-notif-bell-wrap .notif-dropdown-head { border-bottom-color: var(--p-glass-border); color: var(--p-text); }
.patient-notif-bell-wrap .notif-dropdown-head button { color: var(--p-gold-deep); }
.patient-notif-bell-wrap .notif-item { border-bottom-color: var(--p-glass-border); color: var(--p-text); }
.patient-notif-bell-wrap .notif-item:hover { background: rgba(63,58,82,.06); }
.patient-notif-bell-wrap .notif-item.unread { background: rgba(217,171,82,.08); }
.patient-notif-bell-wrap .notif-item-body { color: var(--p-text-muted); }
.patient-notif-bell-wrap .notif-item-time { color: var(--p-text-soft); }
.patient-notif-bell-wrap .notif-empty { color: var(--p-text-soft); }

/* -- #/p/consultas: próxima consulta, stepper, histórico ------------------ */
.pconsult-hero-date { font-size: 19px; font-weight: 800; color: var(--p-text); margin-top: 2px; }
.pconsult-hero-time { font-size: 13px; color: var(--p-gold-deep); font-weight: 700; margin-bottom: 10px; }
.pconsult-hero-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.pconsult-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--p-text-muted); }
.pconsult-row svg { flex-shrink: 0; opacity: .85; }
.pconsult-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pconsult-mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--p-glass-border); cursor: pointer; font-size: 12.5px;
}
.pconsult-mini-row:last-child { border-bottom: none; }
.pconsult-mini-date { font-weight: 700; color: var(--p-text); min-width: 108px; }
.pconsult-mini-service { flex: 1; color: var(--p-text-muted); }

.pconsult-book-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.pconsult-steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.pconsult-step {
  flex: 1; text-align: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding-bottom: 8px; border-bottom: 3px solid var(--p-glass-border); color: var(--p-text-soft);
}
.pconsult-step.active { color: var(--p-gold-deep); border-bottom-color: var(--p-gold-deep); }

.pconsult-service-grid { display: flex; flex-direction: column; gap: 10px; }
.pconsult-service-card {
  text-align: left; border: 1px solid var(--p-glass-border); background: var(--p-glass);
  border-left: 4px solid var(--pconsult-accent, var(--p-gold)); border-radius: 14px; padding: 12px 14px;
  cursor: pointer; color: var(--p-text); font-family: inherit;
}
.pconsult-service-card:hover { background: var(--p-glass-strong); }
.pconsult-service-name { font-weight: 700; font-size: 13.5px; }
.pconsult-service-desc { font-size: 11.5px; color: var(--p-text-muted); margin-top: 2px; }
.pconsult-service-meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--p-text-soft); margin-top: 6px; font-weight: 600; }

.pconsult-back-link {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--p-gold-deep);
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 0 12px; font-family: inherit;
}
.pconsult-selected-service { font-size: 13px; font-weight: 700; color: var(--p-text); margin-bottom: 12px; }

.pconsult-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pconsult-cal-label { font-size: 13px; font-weight: 700; color: var(--p-text); }
/* .icon-btn (app.css) usa `background: var(--surface)` (claro) + `color:
   var(--text-muted)` (escuro) — pensado para o header claro do app "normal".
   Usado aqui (stepper de agendamento, tema escuro tanto no #/p/consultas
   autenticado quanto nas páginas públicas #/agendar e #/gerir), isso rendia
   um quadrado branco quase sem contraste com a seta. */
.pconsult-cal-nav .icon-btn {
  background: rgba(63,58,82,0.08); border-color: rgba(63,58,82,0.14); color: var(--p-text);
}
.pconsult-cal-nav .icon-btn:hover { background: rgba(63,58,82,0.16); color: var(--p-text); }
.pconsult-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pconsult-cal-weekday { text-align: center; font-size: 10px; font-weight: 700; color: var(--p-text-soft); padding-bottom: 4px; }
.pconsult-cal-day {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: rgba(63,58,82,.04);
  color: var(--p-text-soft); font-size: 12.5px; font-family: inherit; cursor: default;
}
.pconsult-cal-day.empty { background: transparent; }
.pconsult-cal-day.has-slots { background: rgba(217,171,82,.14); border-color: rgba(217,171,82,.34); color: var(--p-gold-deep); font-weight: 700; cursor: pointer; }
.pconsult-cal-day.has-slots:hover { background: rgba(217,171,82,.24); }
.pconsult-cal-day.today { box-shadow: inset 0 0 0 1.5px var(--p-gold-deep); }
.pconsult-cal-day.selected { background: var(--p-gold); color: #241249; }
.pconsult-cal-day.disabled { opacity: .35; }
.pconsult-slot-chips { margin: 4px 0 0; }
.pconsult-confirm-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--p-glass-border); }
.pconsult-confirm-summary { font-size: 13px; color: var(--p-text); margin-bottom: 12px; font-weight: 600; }

.pconsult-history-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--p-glass-border);
}
.pconsult-history-row:last-child { border-bottom: none; }

.pconsult-home-card { cursor: default; }
.pconsult-home-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pconsult-home-ic { opacity: .8; }

.pconsult-push-card { background: rgba(217,171,82,.07); border-color: rgba(217,171,82,.28); }

.pconsult-waitlist-banner {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(63,58,82,.04);
  border: 1px dashed var(--p-glass-border); font-size: 12.5px; color: var(--p-text-muted);
}

/* Slot chips reaproveitados de agn-slot-chips/agn-slot-chip (agenda do
   terapeuta) — aqui recebem uma variante escura para o Portal do Paciente e
   as páginas públicas de agendamento (que não têm a classe patient-mode). */
.pconsult-slot-chip {
  background: rgba(63,58,82,.05); border-color: var(--p-glass-border); color: var(--p-text);
}
.pconsult-slot-chip:hover { border-color: var(--p-gold-deep); color: var(--p-gold-deep); }
.pconsult-slot-chip.active { background: var(--p-gold); border-color: var(--p-gold-deep); color: #241249; }

/* -- #/p/arquivos ---------------------------------------------------------- */
.pfiles-upload-zone { border-color: var(--p-glass-border); background: rgba(63,58,82,.03); }
.pfiles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 460px) { .pfiles-grid { grid-template-columns: repeat(3, 1fr); } }
.pfiles-card { padding: 10px; }
.pfiles-thumb {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(63,58,82,.05);
  display: flex; align-items: center; justify-content: center; color: var(--p-text-soft); margin-bottom: 8px;
}
.pfiles-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pfiles-meta { font-size: 11.5px; }
.pfiles-name { font-weight: 700; color: var(--p-text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -- Reutilização de classes do prontuário (pr-*) no tema escuro do
   paciente/páginas públicas — upload zone, filtros e badge. */
.pr-upload-zone.pfiles-upload-zone,
.p-auth-page .pr-upload-zone {
  border: 1.5px dashed var(--p-glass-border); border-radius: 14px; padding: 18px; text-align: center; color: var(--p-text-muted);
}
.pr-upload-zone.pfiles-upload-zone.pr-drag-over,
.p-auth-page .pr-upload-zone.pr-drag-over { border-color: var(--p-gold-deep); background: rgba(217,171,82,.06); }
.pr-upload-zone.pfiles-upload-zone .pr-upload-actions,
.p-auth-page .pr-upload-zone .pr-upload-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.pr-filter-chip {
  display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--p-glass); border: 1px solid var(--p-glass-border); color: var(--p-text-muted); cursor: pointer; margin: 0 6px 10px 0;
}
.pr-filter-chip.active { background: rgba(217,171,82,.16); border-color: rgba(217,171,82,.4); color: var(--p-gold-deep); }
.pr-patient-badge { background: rgba(132,116,173,.18); border-color: rgba(132,116,173,.4); color: #6f5fae; }

/* -- Páginas públicas de agendamento (#/agendar/:slug, #/gerir/:token) -----
   Fora de #app-shell.patient-mode (sem usuário autenticado), então os
   estilos de campo do tema paciente (escopados a "patient-mode" acima)
   não chegam aqui — replicados sob .p-auth-page para o formulário de
   contato/lista de espera/reagendamento ficarem no mesmo tema escuro. */
.p-auth-page .p-field { margin-bottom: 14px; }
.p-auth-page .p-field label { display: block; font-size: var(--tf-legenda); font-weight: 700; margin-bottom: 6px; color: var(--p-text-muted); }
/* 23.9.1 — mesma regra por exclusão da tela do portal, ver acima. */
.p-auth-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="color"]):not([type="hidden"]),
.p-auth-page select,
.p-auth-page textarea
{
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--p-glass-border); background: rgba(63,58,82,.05);
  color: var(--p-text); font-size: var(--tf-campo); font-family: inherit;
}
.p-auth-page textarea { resize: vertical; min-height: 70px; }
.p-auth-page input::placeholder,
.p-auth-page textarea::placeholder { color: var(--p-text-soft); }
.p-public-card { max-width: 640px; }


/* ==========================================================================
   Release 6 (SPEC_RELEASE_6.md §A6/§B4) — Central de Evolução, Plano
   Evolutivo (trilha/wizard), hábitos, oráculo Kin e numerologia.
   Mobile-first, usa apenas os tokens existentes.
   ========================================================================== */

/* ---- Central de Evolução (home) ---- */
.p-evo-top { display: flex; align-items: center; gap: 16px; }
.p-evo-ring-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.p-ici-ring { width: 108px; height: 108px; }
.p-ici-ring-num { fill: var(--p-text); font-size: 24px; font-weight: 700; font-family: var(--p-font); }
.p-ici-ring-sub { fill: rgba(63,58,82,0.5); font-size: 8.5px; font-weight: 700; letter-spacing: .12em; font-family: var(--p-font); }
.p-evo-band { font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.p-evo-right { flex: 1; min-width: 0; }
.p-evo-level-line { font-size: 12.5px; color: var(--p-text-muted); margin-bottom: 6px; }
.p-evo-streak { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--p-gold-deep); }
.p-evo-mission {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  background: rgba(63,58,82,.05); border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius-sm); padding: 10px 12px; flex-wrap: wrap;
}
.p-evo-mission-ic { color: var(--p-gold-deep); flex-shrink: 0; }
.p-evo-mission-body { flex: 1; min-width: 130px; }
.p-evo-mission-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--p-text-soft); font-weight: 700; }
.p-evo-mission-title { font-size: 13.5px; font-weight: 700; }
.p-evo-habits-line {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12px; color: var(--p-text-muted); cursor: pointer;
}

/* ---- Trilha do plano (mapa dos meses) ---- */
.p-plan-trail-wrap { margin: 6px -4px 0; }
.p-plan-trail { width: 100%; height: auto; display: block; }
.plan-trail-path { fill: none; stroke: rgba(63,58,82,0.16); stroke-width: 2.5; stroke-dasharray: 5 6; stroke-linecap: round; }
.plan-node .plan-node-halo { fill: none; stroke: transparent; stroke-width: 1.5; }
.plan-node .plan-node-dot { stroke-width: 2; }
.plan-node-label { fill: rgba(63,58,82,0.55); font-size: 8.5px; font-weight: 700; font-family: var(--p-font); }
.plan-node--done .plan-node-dot { fill: var(--p-gold); stroke: var(--p-gold-deep); }
.plan-node--done .plan-node-label { fill: var(--p-gold-deep); }
.plan-node--current .plan-node-dot { fill: var(--p-violet-light); stroke: #fff; }
.plan-node--current .plan-node-halo { stroke: var(--p-gold); animation: planPulse 1.8s ease infinite; }
.plan-node--current .plan-node-label { fill: var(--p-text); }
.plan-node--locked .plan-node-dot { fill: rgba(63,58,82,0.08); stroke: rgba(63,58,82,0.25); }
@keyframes planPulse {
  0%, 100% { opacity: .25; r: 12; }
  50% { opacity: .9; }
}
.p-plan-trail-current { font-size: 12.5px; color: var(--p-text-muted); margin-top: 6px; }

/* ---- Painel "Este capítulo" ---- */
.p-chapter-objective { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.p-chapter-sub-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--p-text-soft); margin: 14px 0 6px; }
.p-chapter-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--p-text-muted); margin-bottom: 6px; }
.p-chapter-line-ic { color: var(--p-gold-deep); flex-shrink: 0; margin-top: 2px; }

/* ---- Hábitos: linha com checkbox + cartão com grelha semanal ---- */
.p-habit-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.p-habit-row.done .p-habit-row-name { color: var(--p-text-soft); text-decoration: line-through; }
.p-habit-check {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0; cursor: pointer;
  border: 1.5px solid var(--p-glass-border); background: rgba(63,58,82,.05);
  color: #2a1808; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.p-habit-row.done .p-habit-check { background: var(--p-gold); border-color: var(--p-gold-deep); }
.p-habit-row-name { font-size: 13.5px; font-weight: 600; }
.p-habit-row-streak { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--p-gold-deep); font-weight: 700; }
.p-habit-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.p-habit-card-name { font-size: 14.5px; font-weight: 700; }
.p-habit-card-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.p-habit-card.archived { opacity: .65; }
.p-habit-week { display: flex; gap: 6px; margin-top: 12px; }
.p-habit-day {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0; font-family: inherit;
}
.p-habit-day-label { font-size: 10px; font-weight: 700; color: var(--p-text-soft); text-transform: uppercase; }
.p-habit-day-dot {
  width: 30px; height: 30px; border-radius: 10px;
  border: 1.5px solid var(--p-glass-border); background: rgba(63,58,82,.05);
  display: inline-flex; align-items: center; justify-content: center; color: #2a1808;
  transition: background .15s ease, border-color .15s ease;
}
.p-habit-day.done .p-habit-day-dot { background: var(--p-gold); border-color: var(--p-gold-deep); }
.p-habit-day.today .p-habit-day-label { color: var(--p-gold-deep); }
.p-habit-day.today .p-habit-day-dot { box-shadow: 0 0 0 2px rgba(217,171,82,.35); }
.p-habit-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

/* ---- Cartões das 7 áreas ---- */
.p-area-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(63,58,82,0.07);
}
.p-area-card:last-child { border-bottom: none; padding-bottom: 4px; }
.p-area-ic { color: var(--p-gold-deep); flex-shrink: 0; margin-top: 2px; }
.p-area-body { flex: 1; min-width: 0; }
.p-area-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--p-text-soft); }
.p-area-goal { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.p-area-first-step { font-size: 12px; color: var(--p-text-muted); margin-top: 3px; }
.p-area-edit {
  background: var(--p-glass); border: 1px solid var(--p-glass-border); color: var(--p-text-muted);
  border-radius: 10px; width: 32px; height: 32px; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.p-area-edit:hover { color: var(--p-gold-deep); border-color: rgba(217,171,82,.4); }

/* ---- Reflexão mensal ---- */
.p-badge-pending {
  margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(226,147,141,.18); color: #b45f5f; border: 1px solid rgba(226,147,141,.35);
  padding: 3px 9px; border-radius: 99px;
}
.p-reflection-entry { margin-bottom: 10px; }
.p-reflection-q { font-size: 11.5px; font-weight: 700; color: var(--p-text-soft); }
.p-reflection-a { font-size: 13.5px; margin-top: 2px; white-space: pre-wrap; }
.p-ai-report {
  margin-top: 12px; background: rgba(132,116,173,.14); border: 1px solid rgba(132,116,173,.35);
  border-radius: var(--p-radius-sm); padding: 12px 14px;
}
.p-ai-report-title { font-size: 12px; font-weight: 700; color: var(--p-gold-deep); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.p-ai-report-body { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }

/* ---- Cartas ao futuro ---- */
.p-letter-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(63,58,82,0.07); flex-wrap: wrap;
}
.p-letter-ic { color: var(--p-gold-deep); flex-shrink: 0; margin-top: 2px; }
.p-letter-body { flex: 1; min-width: 150px; }
.p-letter-date { font-size: 12.5px; font-weight: 700; color: var(--p-text-muted); }
.p-letter-text { font-size: 13.5px; margin-top: 6px; white-space: pre-wrap; line-height: 1.5; }
.p-letter-row.open .p-letter-date { color: var(--p-gold-deep); }
.p-letter-form { margin-top: 14px; }

/* ---- Parceiro de responsabilidade ---- */
.p-partner-row { display: flex; align-items: center; gap: 10px; }

/* ---- Wizard do plano ---- */
.p-wizard-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.p-wizard-dot { width: 8px; height: 8px; border-radius: 99px; background: rgba(63,58,82,0.16); transition: background .2s ease, width .2s ease; }
.p-wizard-dot.done { background: rgba(217,171,82,.55); }
.p-wizard-dot.current { background: var(--p-gold); width: 22px; }
.p-wizard-welcome { text-align: center; padding: 30px 20px; }
.p-wizard-welcome-ic { color: var(--p-gold-deep); margin-bottom: 12px; }
.p-wizard-welcome-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.p-wizard-welcome-sub { font-size: 13.5px; color: var(--p-text-muted); line-height: 1.55; margin: 0 0 8px; }
.p-wizard-question { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.p-wizard-q-ic { color: var(--p-gold-deep); flex-shrink: 0; margin-top: 1px; }
.p-wizard-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 14px; }
.p-wizard-chip { cursor: pointer; transition: border-color .15s ease, color .15s ease; font-weight: 600; text-align: left; }
.p-wizard-chip:hover { border-color: rgba(217,171,82,.5); color: var(--p-gold-deep); }
.p-wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.p-wizard-nav .p-btn { flex: 1; }
.p-people-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.p-person-card {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: rgba(63,58,82,.04); border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius-sm); padding: 12px; padding-right: 34px;
}
.p-person-remove {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
  border-radius: 8px; border: none; background: rgba(226,147,141,.16); color: #b45f5f;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.p-suggest-card { border-color: rgba(132,116,173,.4); background: rgba(132,116,173,.10); }
.p-suggest-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--p-text-soft); margin: 10px 0 6px; }
.p-suggest-rationale { margin-top: 12px; }
.p-suggest-rationale-line { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--p-text-muted); margin-bottom: 5px; }
.p-suggest-rationale-line .mic-icon { flex-shrink: 0; margin-top: 2px; opacity: .8; }
.p-timeline-row {
  border-bottom: 1px solid rgba(63,58,82,0.07); padding: 12px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.p-timeline-row:last-of-type { border-bottom: none; }
.p-timeline-month { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--p-gold-deep); text-transform: capitalize; }
.p-timeline-month-num {
  width: 22px; height: 22px; border-radius: 99px; background: rgba(217,171,82,.16);
  border: 1px solid rgba(217,171,82,.4); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.p-review-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(63,58,82,0.06); }
.p-review-row:last-of-type { border-bottom: none; }
.p-review-ic { color: var(--p-gold-deep); flex-shrink: 0; margin-top: 2px; }
.p-review-area { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--p-text-soft); }
.p-review-goal { font-size: 13.5px; font-weight: 600; }
.p-review-vision { margin-top: 10px; }
.p-plan-success-overlay {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 8, 40, 0.85); backdrop-filter: blur(8px); animation: planFadeIn .35s ease;
}
.p-plan-success-card { text-align: center; padding: 30px; animation: planPop .5s cubic-bezier(.2, 1.4, .5, 1); }
.p-plan-success-ic { color: var(--p-gold-deep); margin-bottom: 14px; animation: planGlow 1.6s ease infinite; }
.p-plan-success-title { font-size: 21px; font-weight: 700; color: var(--p-text); }
.p-plan-success-sub { font-size: 13.5px; color: var(--p-text-muted); margin-top: 6px; }
@keyframes planFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes planPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes planGlow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(217,171,82,.4)); } 50% { filter: drop-shadow(0 0 16px rgba(217,171,82,.9)); } }

/* ---- Kin Maia ---- */
.p-kin-natal { text-align: center; }
.p-kin-glyph-wrap { display: flex; justify-content: center; margin: 8px 0 10px; }
.p-kin-number { font-size: 24px; font-weight: 700; }
.p-kin-name { font-size: 14.5px; font-weight: 700; color: var(--p-gold-deep); margin-top: 2px; }
.p-kin-color { font-size: 12px; color: var(--p-text-muted); margin-top: 2px; }
.p-kin-meta-grid { margin-top: 14px; text-align: left; }
.p-kin-meta-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 7px 0;
  border-bottom: 1px solid rgba(63,58,82,0.06);
}
.p-kin-meta-row:last-child { border-bottom: none; }
.p-kin-meta-ic { color: var(--p-gold-deep); flex-shrink: 0; }
.p-kin-meta-label { color: var(--p-text-soft); font-weight: 700; }
.p-kin-meta-value { margin-left: auto; color: var(--p-text); font-weight: 600; text-align: right; }
.p-oracle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: center; justify-items: center; }
.p-oracle-cell {
  text-align: center; padding: 8px 4px; border-radius: var(--p-radius-sm);
  background: rgba(63,58,82,.04); border: 1px solid var(--p-glass-border); width: 100%;
}
.p-oracle-cell.center { background: rgba(217,171,82,.10); border-color: rgba(217,171,82,.4); }
.p-oracle-role { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--p-text-soft); margin-bottom: 4px; }
.p-oracle-kin { font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.p-oracle-seal { font-size: 10px; color: var(--p-text-muted); }
.p-kin-today-row { display: flex; align-items: center; gap: 12px; }
.p-kin-today-glyph { flex-shrink: 0; }

/* ---- Numerologia ---- */
.p-num-card { display: flex; gap: 14px; align-items: flex-start; }
.p-num-badge {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: linear-gradient(135deg, rgba(217,171,82,.22), rgba(132,116,173,.22));
  border: 1px solid rgba(217,171,82,.4); color: var(--p-gold-deep);
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700;
}
.p-num-body { flex: 1; min-width: 0; }
.p-num-kind { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.p-num-kind .mic-icon { color: var(--p-gold-deep); }
.p-num-kind-sub { font-size: 11.5px; color: var(--p-text-soft); margin-top: 1px; }
.p-num-meaning { font-size: 12.5px; color: var(--p-text-muted); margin-top: 6px; line-height: 1.5; }

/* ---- Hub Jornada: destaque do plano ---- */
.p-journey-plan-card { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-top: 12px; }
.p-journey-plan-card:hover { border-color: rgba(217,171,82,.45); }

/* ==========================================================================
   Tema "Pastel Místico Sereno" (TEMA_PASTEL_SERENO.md, v6.1) — quadro do
   estado vibracional, "Opção A refinada": selo da banda (chip claro com
   pontinho + nome em maiúsculas na cor da banda) e linha de tendência
   abaixo da esfera (sphere.js já desenha a esfera dourada + arco + Hz
   dentro). Cores inline por banda vêm de BAND_COLORS (sphere.js) via JS.
   ========================================================================== */
.p-band-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; border: 1px solid transparent;
  margin: 2px 0 4px;
}
.p-band-badge-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; border: 1px solid transparent; }
.p-sphere-trend { font-size: 11.5px; color: var(--p-text-soft); margin-bottom: 12px; }

/* Barras do quadro Hz: valor (1 casa decimal) à direita do rótulo; stress
   fica verde quando baixo (<40), as demais permanecem no dourado padrão
   (--p-bar-fill já usa o gradiente #f0d9a8→#d9ab52 definido acima). */
.p-bar-value { font-size: 11.5px; font-weight: 700; color: var(--p-gold-deep); }
.p-bar-value-success { color: #4e8f6b; }
.p-bar-fill-success { background: linear-gradient(90deg, #cfe6d9, #7fbf9a); }

/* ==========================================================================
   Release 6.2 — Cartas do dia (#/p/jogos) · SPEC_RELEASE_6.2.md §C2
   Flip-card do terapeuta (app.css) adaptado ao tema Pastel Sereno: verso
   creme com borda dourada; frente vibracional na cor freqColor(hz); frente
   do tarot branca com numeração romana e lavanda só nos detalhes.
   ========================================================================== */
.pg-flip { perspective: 1200px; height: 250px; margin: 4px 0 12px; }
.pg-flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1); transform-style: preserve-3d;
}
.pg-flip.flipped .pg-flip-inner { transform: rotateY(180deg); }
.pg-flip.pg-no-anim .pg-flip-inner { transition: none; }
/* R6.2 fix: com a carta revelada o contentor cresce com o texto (as faces
   absolutas + altura fixa cortavam a última linha da mensagem do arcano).
   A face de trás passa a relativa e a frente sai do fluxo. */
.pg-flip.flipped { height: auto; min-height: 250px; }
.pg-flip.flipped .pg-flip-inner { height: auto; min-height: 250px; }
.pg-flip.flipped .pg-flip-back { position: relative; inset: auto; min-height: 250px; overflow: visible; }
.pg-flip.flipped .pg-flip-front { display: none; }
.pg-flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--p-radius); display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 18px; text-align: center;
}
.pg-flip-front {
  background:
    radial-gradient(130px 90px at 50% 26%, rgba(217, 171, 82, 0.16), transparent 70%),
    linear-gradient(150deg, var(--p-glass-strong), #f4e7cd);
  border: 2px solid rgba(217, 171, 82, 0.55);
  box-shadow: var(--p-shadow-gold);
  color: var(--p-gold-deep);
}
.pg-flip-front .pg-glyph { margin-bottom: 10px; opacity: .9; }
.pg-flip-front .pg-back-label {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--p-gold-deep);
}
.pg-flip-front .pg-back-deck { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--p-text-muted); }
.pg-flip-back {
  transform: rotateY(180deg); overflow-y: auto; justify-content: flex-start;
  border: 2px solid rgba(217, 171, 82, 0.55); box-shadow: var(--p-shadow-glass);
  background: var(--p-glass);
}
.pg-face-vib { color: #fff; }
.pg-face-vib .pg-hz { font-size: 28px; font-weight: 800; margin-top: 4px; text-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.pg-face-vib .pg-card-name { font-size: 14px; font-weight: 700; margin: 2px 0 8px; }
.pg-card-message { font-size: 13px; line-height: 1.55; font-style: italic; opacity: .96; }
.pg-card-message-dark { color: var(--p-text-muted); margin-top: 10px; }
.pg-face-tarot .pg-roman { font-size: 26px; font-weight: 800; color: var(--p-gold-deep); letter-spacing: .08em; }
.pg-face-tarot .pg-card-name { font-size: 16px; font-weight: 700; color: var(--p-violet); margin: 2px 0 8px; }
.pg-face-tarot .pg-keyword { margin-bottom: 4px; }
.pg-deck-off {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5;
  color: var(--p-text-soft); padding: 10px 2px 4px;
}
.pg-drawn-badge { font-size: 10.5px; flex-shrink: 0; }
.pg-details { display: flex; flex-direction: column; gap: 10px; }
.pg-details:empty { display: none; }
.pg-chip-block .pg-chip-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--p-text-muted); margin-bottom: 6px;
}
.pg-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-questions {
  background: rgba(132, 116, 173, 0.06); border: 1px solid rgba(132, 116, 173, 0.16);
  border-radius: var(--p-radius-sm); padding: 12px 14px;
}
.pg-questions-title {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--p-violet); margin-bottom: 6px;
}
.pg-questions ul { margin: 0; padding-left: 18px; }
.pg-questions li { font-size: 12.5px; line-height: 1.55; color: var(--p-text); margin-bottom: 4px; }
.pg-questions li:last-child { margin-bottom: 0; }

/* "Dica do dia" — corpo num cartão destacado + nota do motor de regras */
.pg-reading-body {
  background: rgba(217, 171, 82, 0.08); border: 1px solid rgba(217, 171, 82, 0.32);
  border-left: 3px solid var(--p-gold); border-radius: var(--p-radius-sm); padding: 14px 16px;
}
.pg-reading-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--p-text); }
.pg-reading-body p:last-child { margin-bottom: 0; }
.pg-reading-note {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px;
  font-size: 11px; line-height: 1.5; color: var(--p-text-soft);
}
.pg-reading-note span:first-child { flex-shrink: 0; margin-top: 1px; }
/* Hotfix v21.1.1 — nota fixa do baralho Carta Vibracional (mesmo padrão de .pg-reading-note). */
.pg-vib-note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0 0 12px;
  font-size: 11px; line-height: 1.5; color: var(--p-text-soft);
}
.pg-vib-note span:first-child { flex-shrink: 0; margin-top: 1px; }

/* Compartilhamento social da dica do dia (Instagram/Threads) — _socialShare.js */
.pg-share {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(217, 171, 82, 0.35);
}
.pg-share-title {
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--p-text-muted); margin-bottom: 3px;
}
.pg-share-sub { font-size: 12px; color: var(--p-text-soft); margin: 0 0 10px; }
.pg-share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pg-share-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; line-height: 1.2; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  flex: 1 1 auto; justify-content: center;
}
.pg-share-btn:active { transform: scale(.97); }
.pg-share-btn:disabled { opacity: .55; cursor: not-allowed; }
.pg-share-instagram {
  background: linear-gradient(135deg, #f3c26a 0%, #d9576b 45%, #8a5bb0 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(154, 82, 122, 0.28);
}
.pg-share-instagram:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(154, 82, 122, 0.36); }
.pg-share-threads {
  background: #1c1c1e; color: #fff; box-shadow: 0 6px 16px rgba(28, 28, 30, 0.22);
}
.pg-share-threads:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(28, 28, 30, 0.3); }

/* Cartão "Cartas do dia" na home (§C4) */
.pgh-decks { display: flex; flex-direction: column; gap: 8px; }
.pgh-deck { display: flex; align-items: center; gap: 9px; }
.pgh-deck-ic { color: var(--p-gold-deep); display: inline-flex; flex-shrink: 0; }
.pgh-deck-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--p-text); }
.pgh-deck-chip { font-size: 10.5px; }
.pgh-teaser {
  margin-top: 12px; font-size: 12.5px; font-style: italic; line-height: 1.55;
  color: var(--p-text-muted);
}

/* Chip "ver escala" no cartão de estado da esfera (§C4) */
.p-escala-chip { margin-top: 10px; cursor: pointer; font-family: inherit; }
.p-escala-chip:hover { background: rgba(217, 171, 82, 0.24); }

/* ==========================================================================
   Release 6.2 — Escala Vibracional do paciente (#/p/escala) · §C3
   ========================================================================== */
.pesc-current { text-align: center; }
.pesc-current .p-band-badge { margin-top: 8px; }
.pesc-sphere { display: flex; justify-content: center; margin: 6px 0 2px; }
.pesc-trail { display: flex; gap: 3px; align-items: center; margin: 4px 0 16px; }
.pesc-seg { flex: 1; height: 10px; border-radius: 99px; opacity: .82; position: relative; }
.pesc-seg.current { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--p-gold-deep); }
.pesc-marker {
  position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--p-gold-deep);
}
.pesc-list { display: flex; flex-direction: column; gap: 6px; }
.pesc-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px;
  border-radius: var(--p-radius-sm); border: 1px solid transparent;
}
.pesc-row.current {
  background: rgba(217, 171, 82, 0.09); border-color: rgba(217, 171, 82, 0.45);
  box-shadow: 0 0 0 1px rgba(217, 171, 82, 0.18);
}
.pesc-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.pesc-row-body { flex: 1; min-width: 0; }
.pesc-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pesc-row-name { font-size: 13px; font-weight: 700; color: var(--p-text); }
.pesc-row-hz { font-size: 11.5px; font-weight: 800; color: var(--p-gold-deep); }
.pesc-row-chip { font-size: 10px; padding: 2px 8px; }
.pesc-row-short { font-size: 12px; line-height: 1.5; color: var(--p-text-muted); margin-top: 2px; }

/* ==========================================================================
   Release 7.1 — Detalhe da frequência para o paciente (#/p/escala/:hz)
   (views/patient/escalaDetail.js). pfd-* = patient frequency detail.
   ========================================================================== */
.pfd-hero { text-align: center; border-top: 4px solid var(--pfd-color, var(--p-gold-deep)); }
.pfd-hero-hz { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.pfd-hero-name { font-size: 19px; font-weight: 700; color: var(--p-text); margin-top: 2px; }
.pfd-hero-chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pfd-intro { font-size: 13.5px; line-height: 1.65; color: var(--p-text); text-align: left; margin: 12px 0 0; }
.pfd-invite { font-size: 13px; line-height: 1.6; color: var(--p-text); margin: 0 0 12px; }
.pfd-mini { margin-bottom: 10px; }
.pfd-mini-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--p-gold-deep); }
.pfd-mini-text { font-size: 13px; line-height: 1.55; color: var(--p-text); margin-top: 2px; }
.pfd-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pfd-practice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--p-border, rgba(0,0,0,.08)); }
.pfd-practice:first-of-type { border-top: none; }
.pfd-practice-ic { color: var(--p-gold-deep); flex: 0 0 auto; margin-top: 2px; }
.pfd-aff-text { font-size: 15px; font-style: italic; line-height: 1.55; color: var(--p-text); margin: 4px 0 6px; }
.pfd-cta-row { display: flex; flex-direction: column; gap: 8px; }
/* Linhas da lista #/p/escala agora navegam para o detalhe. */
.pesc-row { cursor: pointer; }
.pesc-row:active { background: rgba(217, 171, 82, 0.07); }
.pesc-row-arrow { margin-left: auto; color: var(--p-text-soft); font-size: 14px; align-self: center; }

/* ==========================================================================
   Release 8 (SPEC_RELEASE_8.md §A3/§B3/§D) — Agente C. APENAS classes NOVAS
   com prefixo pa- (avaliações/numerologia) e pj- (Jornada de Descoberta),
   acrescentadas no fim do ficheiro (regra de território da spec §G).
   ========================================================================== */

/* -- Tabs em pílula (Numerologia Pitagórica|Cabalística) — mesmo desenho das
   sub-tabs do hub Jornada, replicado sob a classe nova .pa-tabs para não
   tocar nos seletores existentes (renderTabs de utils.js gera .tabs/.tab-btn/
   .tab-panel). ------------------------------------------------------------ */
#app-shell.patient-mode .pa-tabs .tabs {
  display: flex; gap: 6px; margin-bottom: 16px; background: var(--p-glass); border: 1px solid var(--p-glass-border);
  border-radius: 999px; padding: 4px;
}
#app-shell.patient-mode .pa-tabs .tab-btn {
  flex: 1; border: none; background: transparent; color: var(--p-text-muted); font-family: inherit;
  font-size: 12.5px; font-weight: 700; padding: 9px 8px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
#app-shell.patient-mode .pa-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); color: #2a1808;
}
#app-shell.patient-mode .pa-tabs .tab-panel { display: none; }
#app-shell.patient-mode .pa-tabs .tab-panel.active { display: block; }

/* -- Cartão TIKUN em destaque (§A3): borda dourada + blocos de lições/
   dívidas/gap. ------------------------------------------------------------ */
.pa-tikun {
  border: 1.5px solid rgba(217, 171, 82, 0.55);
  box-shadow: 0 0 0 1px rgba(217, 171, 82, 0.18), 0 8px 22px rgba(217, 171, 82, 0.10);
}
.pa-tikun-intro { font-size: 13px; line-height: 1.6; color: var(--p-text); margin: 0 0 12px; }
.pa-tikun-sub {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--p-gold-deep); margin: 12px 0 6px;
}
.pa-tikun-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.pa-tikun-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--p-gold-deep);
  background: rgba(217, 171, 82, 0.12); border: 1px solid rgba(217, 171, 82, 0.45);
}
.pa-tikun-item-body { flex: 1; min-width: 0; }
.pa-tikun-item-text { font-size: 13px; line-height: 1.55; color: var(--p-text); }
.pa-tikun-item-work { font-size: 12.5px; line-height: 1.55; color: var(--p-text-muted); margin-top: 3px; }
.pa-tikun-work-label { font-weight: 700; color: var(--p-gold-deep); }
.pa-tikun-gap { font-size: 13px; line-height: 1.6; color: var(--p-text); margin: 0; }
.pa-tikun-clean {
  font-size: 13px; line-height: 1.6; color: var(--p-text); padding: 10px 12px;
  background: rgba(78, 143, 107, 0.10); border: 1px solid rgba(78, 143, 107, 0.35); border-radius: 12px;
}
.pa-method-note { font-size: 11px; line-height: 1.5; color: var(--p-text-soft); margin-top: 12px; }

/* -- Selo de evidência (cientifica|simbolica) nos cartões de avaliação e no
   intro/resultado do runner (§B3/§D). ------------------------------------- */
.pa-badge-evid { font-size: 10px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.pa-badge-evid.cientifica {
  background: rgba(93, 134, 176, 0.14); border: 1px solid rgba(93, 134, 176, 0.45); color: #3d6591;
}
.pa-badge-evid.simbolica {
  background: rgba(143, 136, 168, 0.14); border: 1px solid rgba(143, 136, 168, 0.5); color: #6a6288;
}

/* -- Resultado do runner de avaliações (§B3). ----------------------------- */
.pa-result-hero { text-align: center; }
.pa-result-type { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; color: var(--p-text); margin-top: 4px; }
.pa-result-name { font-size: 15px; font-weight: 700; color: var(--p-text); margin-top: 2px; }
.pa-dim-row { margin-bottom: 10px; }
.pa-dim-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.pa-dim-label { font-size: 12.5px; font-weight: 700; color: var(--p-text); }
.pa-dim-val { font-size: 12px; font-weight: 800; color: var(--p-gold-deep); }
.pa-sec { margin-bottom: 12px; }
.pa-sec:last-child { margin-bottom: 0; }
.pa-sec-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--p-gold-deep); margin-bottom: 3px;
}
.pa-sec-text { font-size: 13px; line-height: 1.6; color: var(--p-text); }
.pa-sec-li { margin-top: 2px; }
.pa-sec-group {
  font-size: 12.5px; font-weight: 800; color: var(--p-text); margin: 14px 0 6px;
  padding-top: 10px; border-top: 1px dashed var(--p-glass-border);
}

/* -- Jornada de Descoberta (§D): cartão no topo do hub + slot da home. ---- */
.pj-discovery-row { display: flex; gap: 14px; align-items: center; }
.pj-discovery-ring { flex-shrink: 0; }
.pj-discovery-body { flex: 1; min-width: 0; }
.pj-discovery-progress { font-size: 14px; font-weight: 700; color: var(--p-text); }
.pj-discovery-next { font-size: 12.5px; line-height: 1.5; color: var(--p-text-muted); margin-top: 4px; }
.pj-ring-num { font-size: 15px; font-weight: 800; fill: var(--p-text, #3f3a52); }
.pj-ring-sub { font-size: 9px; font-weight: 700; fill: var(--p-gold-deep, #b98d3e); letter-spacing: .04em; }
.pj-home-slot-ring { display: flex; justify-content: center; margin-bottom: 4px; }

/* 20/07 — aviso "estes guias usam a sua data de nascimento" no topo da
   secção "Quem sou eu" do hub de Ferramentas (renderQuemSouIntro em
   toolsHub.js); some sozinho assim que os 4 guias estiverem completos. */
.pj-quemsou-intro {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px;
  border-radius: 14px; background: rgba(217,171,82,.10); border: 1px solid rgba(217,171,82,.28);
}
.pj-quemsou-intro-ic { flex-shrink: 0; color: var(--p-gold-deep); margin-top: 2px; }
.pj-quemsou-intro-title { font-size: 13px; font-weight: 700; color: var(--p-text); margin-bottom: 3px; }
.pj-quemsou-intro-sub { font-size: 12px; line-height: 1.55; color: var(--p-text-muted); }
.pj-quemsou-intro-cta {
  display: inline-block; margin-top: 9px; font-size: 12px; font-weight: 700;
  color: var(--p-gold-deep); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
}
.pj-quemsou-intro-cta:hover { text-decoration: underline; }

/* == v8.1 — Hub de ferramentas: chips de cadência + "O Meu Retrato 360" == */
/* Chips de estado dos cartões (respondida há X dias / preenchida). */
.pj-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pj-status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(217,171,82,.12); color: var(--p-gold-deep);
  border: 1px solid rgba(217,171,82,.3); white-space: nowrap;
}
.pj-status-chip svg { flex-shrink: 0; }
.pj-status-chip.fresh { background: rgba(140,180,140,.16); color: #5f7d5f; border-color: rgba(140,180,140,.35); }
.pj-status-chip.done { background: var(--p-glass); color: var(--p-text-muted); border-color: var(--p-glass-border); }

/* 23.10.95 — A COLUNA QUE REBENTAVA AOS 390px.
   Um `.pj-status-chip` é `white-space: nowrap`: o seu min-content é a frase
   inteira («Em maturação · 14 dias» ≈ 151px). Num grid `repeat(2, 1fr)` o
   `min-width: auto` que os itens têm por omissão deixa esse min-content
   GANHAR ao `1fr` — a segunda coluna ia a 188px, a primeira encolhia a
   125px, e a grelha transbordava o cartão que a hospeda.

   Não é defeito da 95: media-se 323px de conteúdo em 320px de grelha na
   23.10.94, na secção «Minha jornada». A 95 só o tornou VISÍVEL, porque
   «Como estou hoje» passou de um cartão para cinco e o transbordo saltou
   de 3px para 6px — o suficiente para os cartões saírem do ecrã.

   Duas linhas, e o âmbito é a grelha (não o produto inteiro): os itens
   podem encolher, e um chip nunca é mais largo do que o cartão que o
   hospeda — quando não cabe numa linha, passa a duas. Onde há espaço,
   nada muda. Apanhado pela prova visual da 95; nenhum gate de node o
   veria (CLAUDE.md §5). */
.p-shortcut-grid > * { min-width: 0; }
.p-shortcut-grid .pj-card-chips { min-width: 0; max-width: 100%; }
.p-shortcut-grid .pj-status-chip { max-width: 100%; white-space: normal; }

/* Cartão "O Meu Retrato 360". */
.pr-card { position: relative; }
.pr-rows { display: flex; flex-direction: column; }
.pr-row { border-top: 1px dashed var(--p-glass-border); }
.pr-row:first-child { border-top: none; }
.pr-row-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; padding: 10px 2px; cursor: pointer;
  text-align: left; color: inherit; font: inherit;
}
.pr-row-ic { flex-shrink: 0; color: var(--p-gold-deep); display: inline-flex; }
.pr-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pr-row-tool {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--p-text-muted);
}
.pr-row-headline { font-size: 13.5px; font-weight: 700; color: var(--p-text); line-height: 1.35; }
.pr-row-chevron { flex-shrink: 0; color: var(--p-text-muted); transition: transform .18s ease; display: inline-flex; }
.pr-row.open .pr-row-chevron { transform: rotate(90deg); }
.pr-row-detail { padding: 0 2px 12px 28px; }
.pr-sec { margin-top: 10px; }
.pr-trait { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.pr-trait-name { font-weight: 700; color: var(--p-text); }

/* Agregado de dons / pontos de atenção. */
.pr-agg { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--p-glass-border); }
.pr-agg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.pr-chip {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--p-glass-border); background: var(--p-glass); color: var(--p-text);
}
.pr-chip.gold { background: rgba(217,171,82,.12); border-color: rgba(217,171,82,.3); color: var(--p-gold-deep); }
.pr-chip.soft { background: rgba(143,136,168,.10); border-color: rgba(143,136,168,.28); color: var(--p-text-muted); }
.pr-agg-line { margin-top: 6px; font-size: 13px; line-height: 1.55; }
.pr-agg-source {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--p-gold-deep); margin-right: 6px;
}
.pr-more {
  background: none; border: none; padding: 4px 0 0; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--p-gold-deep);
}

/* == v8.2 — rodapé "Voltar às Ferramentas" nas páginas da secção. ======== */
.p-tools-back { margin: 18px 0 8px; }
.p-tools-back .p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* ==========================================================================
   R9 · O Lugar (SPEC_RELEASE_9.md §B7) — "menos app, mais lugar": a Home
   ganha uma dobra 1 em tela cheia (céu por temporada + árvore viva discreta
   + Centelha + missão única, SEM números), seguida de um "abaixo da dobra"
   sem caixas (tipografia + hairlines, respiro generoso, ao gosto de
   Headspace/Apple Journal). Todas as vars --p-* acima são reaproveitadas —
   nenhuma foi removida ou renomeada.
   ========================================================================== */

.p-serif { font-family: Georgia, 'Times New Roman', serif; }

/* -- Dobra 1 — céu, árvore de fundo, Centelha, missão única -------------- */
.p-fold {
  position: relative;
  min-height: calc(100vh - var(--p-tabbar-h) - 56px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 44px 26px 64px;
  overflow: hidden;
  background: linear-gradient(180deg, #fceecf 0%, #fdf5e2 34%, var(--p-ink-1) 78%);
  border-radius: 0 0 var(--p-radius-lg) var(--p-radius-lg);
  /* Sangra até às bordas de main#view (que tem padding 18px 16px) para o
     céu tocar as laterais/topo, como no mockup aprovado. */
  margin: -18px -16px 8px;
}
.p-fold-tree {
  position: absolute; bottom: -8%; left: 50%; transform: translateX(-50%);
  width: 78%; max-width: 320px; opacity: .45; pointer-events: none; z-index: 0;
}
.p-fold-tree .lt-svg { width: 100%; height: auto; display: block; }
.p-fold-stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; display: none; }
.p-star {
  position: absolute; color: #e9dfb9; opacity: 0; font-size: 12px;
  animation: p-twinkle 2.6s ease-in-out infinite;
}
.p-star:nth-of-type(1) { top: 8%; left: 20%; }
.p-star:nth-of-type(2) { top: 16%; left: 74%; animation-delay: 1.1s; }
.p-star:nth-of-type(3) { top: 26%; left: 42%; animation-delay: .5s; }
@keyframes p-twinkle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: .9; transform: scale(1.1); } }

.p-fold-greet { position: relative; z-index: 2; font-size: 30px; font-weight: 600; letter-spacing: .01em; color: var(--p-text); margin: 0; }
.p-fold-phrase {
  position: relative; z-index: 2; font-size: 15px; color: #7d7050; line-height: 1.6;
  margin: 10px 0 30px; max-width: 260px;
}
.p-fold-centelha { position: relative; z-index: 2; margin-bottom: 10px; display: flex; justify-content: center; }
.p-fold-band { position: relative; z-index: 2; font-size: 14px; color: var(--p-text-muted); margin-bottom: 28px; }
.p-fold-band b { color: var(--p-text); font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 600; }

.p-fold-mission { position: relative; z-index: 2; width: 100%; max-width: 300px; }
.p-fold-mission-card {
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px);
  border: 1px solid var(--p-gold-soft); border-radius: var(--p-radius);
  padding: 16px 18px; box-shadow: 0 10px 26px rgba(185, 141, 62, .14);
}
.p-fold-mission-label {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--p-gold-deep); margin-bottom: 6px;
}
.p-fold-mission-title { font-size: 15.5px; line-height: 1.4; margin-bottom: 12px; color: var(--p-text); }
.p-fold-mission-done {
  font-size: 13.5px; font-weight: 700; color: #4e9370; background: rgba(127, 191, 154, .16);
  padding: 10px; border-radius: 12px;
}
.p-fold-mission-cta .p-fold-mission-title { margin-bottom: 14px; }

.p-scroll-cue {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 2;
  color: var(--p-text-soft); font-size: 11px; letter-spacing: .1em;
  animation: p-scroll-cue-bounce 2.2s ease-in-out infinite;
}
.p-scroll-cue span { display: block; font-size: 15px; margin-top: 1px; }
@keyframes p-scroll-cue-bounce { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(5px); opacity: 1; } }

/* -- Temporadas (§B7) — a luz do universo muda; aplicadas em #app-shell -- */
#app-shell.patient-mode.p-season-outono .p-fold { background: linear-gradient(180deg, #f9e0ba 0%, #faecd4 40%, var(--p-ink-1) 78%); }
#app-shell.patient-mode.p-season-outono .p-fold-tree { filter: hue-rotate(-16deg) saturate(1.2); opacity: .55; }
#app-shell.patient-mode.p-season-inverno .p-fold { background: linear-gradient(180deg, #e7ecf2 0%, #f1f0e6 46%, var(--p-ink-1) 78%); }
#app-shell.patient-mode.p-season-verao .p-fold { background: linear-gradient(180deg, #fdf0c9 0%, #fdf6e0 38%, var(--p-ink-1) 76%); }
#app-shell.patient-mode.p-season-primavera .p-fold { background: linear-gradient(180deg, #fceecf 0%, #fdf5e2 34%, var(--p-ink-1) 78%); }
#app-shell.patient-mode.p-special-natal .p-fold { background: linear-gradient(180deg, #e6e1f2 0%, #f1ece2 46%, var(--p-ink-1) 78%); }
#app-shell.patient-mode.p-special-natal .p-fold-stars { display: block; }
#app-shell.patient-mode.p-special-aniversario .p-fold { background: linear-gradient(180deg, #fdecb6 0%, #fcf2d4 42%, var(--p-ink-1) 78%); }

/* -- Abaixo da dobra (§B2) — sem caixas, tipografia + hairlines --------- */
.p-below { padding-top: 6px; }
.p-below > * { margin-bottom: 10px; }
.p-quiet {
  background: transparent; box-shadow: none; border-radius: 0; padding: 18px 4px;
  border-top: 1px solid #ece1c8; margin-bottom: 0;
}
.p-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.p-reveal.in { opacity: 1; transform: none; }

.p-speak-row { display: flex; gap: 12px; align-items: flex-start; }
.p-speak-row .p-speak-orb { width: 32px; height: 32px; flex-shrink: 0; }
.p-speak-row .p-speak-bub { font-size: 14.5px; line-height: 1.55; font-style: italic; color: #5d5478; padding-top: 2px; }

.p-oracle-teaser {
  background: linear-gradient(135deg, #4b4266, #645887); border-radius: 22px;
  padding: 18px; display: flex; align-items: center; gap: 15px; cursor: pointer;
  box-shadow: 0 12px 30px rgba(75, 66, 102, .32); position: relative; overflow: hidden;
}
.p-oracle-teaser .p-mini-card {
  width: 40px; height: 56px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(150deg, #8474ad, #5d5183); border: 1.5px solid #b7a8dd;
  position: relative; display: flex; align-items: center; justify-content: center;
  color: #e9dfb9; font-size: 15px;
}
.p-oracle-teaser h4 { color: #fdf9ee; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.p-oracle-teaser p { color: #c8bfe0; font-size: 12.5px; margin: 0; }
.p-oracle-teaser .p-oracle-teaser-go { margin-left: auto; color: #e9d9a8; font-size: 13px; font-weight: 700; white-space: nowrap; }

.p-tree-quiet .p-tree-quiet-title { font-family: Georgia, 'Times New Roman', serif; font-size: 16.5px; font-weight: 600; margin-bottom: 8px; color: var(--p-text); }
.p-tree-quiet p { font-size: 13.5px; line-height: 1.65; color: #55506b; margin: 0 0 6px; }
.p-tree-quiet .p-tree-quiet-link { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--p-gold-deep); cursor: pointer; }

.p-guia-quiet .p-guia-quiet-bub { font-size: 14.5px; line-height: 1.6; color: #55506b; font-style: italic; margin-bottom: 8px; }
.p-guia-quiet .p-guia-quiet-why { font-size: 11.5px; color: var(--p-text-soft); margin-top: 8px; }

.p-quiet-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--p-text-muted); cursor: pointer; }
.p-quiet-line + .p-quiet-line { margin-top: 8px; }
.p-quiet-line b { color: var(--p-text); font-weight: 700; }

/* -- Toast narrativo (missão concluída) + números em 2º plano (§B6) ------ */
.p-narrative-toast {
  position: fixed; left: 50%; bottom: calc(var(--p-tabbar-h) + 18px); transform: translateX(-50%) translateY(20px);
  background: var(--p-text); color: #f7f2e4; font-size: 13.5px; font-weight: 600; padding: 12px 20px;
  border-radius: 30px; opacity: 0; transition: all .4s ease; z-index: 260; max-width: 88vw; text-align: center;
  box-shadow: 0 10px 26px rgba(63, 58, 82, .35);
}
.p-narrative-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.p-xp-sub { font-size: 11px; font-weight: 800; color: var(--p-gold-soft); margin-top: 3px; letter-spacing: .02em; }

/* -- Centelha: orb (fold + presença) ------------------------------------- */
.p-fold-centelha svg { display: block; }
.p-presence {
  /* Release 12 — a Centelha ambiente saiu do canto SUPERIOR direito (onde
     cobria o trio sino/ajuda/sair — pedido da usuária: "o Sair some") para o
     canto INFERIOR direito, logo acima da tabbar, como companheira discreta
     que abre a ajuda ao toque. */
  position: fixed; bottom: calc(var(--p-tabbar-h) + 14px); right: 14px; top: auto;
  width: 34px; height: 34px; z-index: 200;
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  filter: drop-shadow(0 4px 12px rgba(185, 141, 62, .35));
}
.p-presence.is-visible { opacity: 1; pointer-events: auto; }
.p-presence-glow { animation: p-presence-glow-pulse .9s ease; }
@keyframes p-presence-glow-pulse {
  0% { filter: drop-shadow(0 4px 12px rgba(185, 141, 62, .35)); }
  50% { filter: drop-shadow(0 4px 22px rgba(185, 141, 62, .85)); }
  100% { filter: drop-shadow(0 4px 12px rgba(185, 141, 62, .35)); }
}

/* -- Oráculo (games.js restyle mínimo, §B5): overlay dourado ao revelar -- */
.p-oracle-lit { position: relative; transition: background 2s ease; }
.p-oracle-lit::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(circle at 50% 20%, rgba(244, 196, 104, .35) 0%, rgba(250, 222, 160, .16) 45%, rgba(250, 222, 160, 0) 78%);
  transition: opacity 2s ease;
}
.p-oracle-lit.p-oracle-lit-on::before { opacity: 1; }

/* -- livingTree.js — folhas/galhos/raízes (mesmas cores do mockup) ------- */
.lt-svg { display: block; }
.lt-leaf, .lt-leaf-halo { transform-box: fill-box; transform-origin: center; }
.lt-leaf.new, .lt-leaf-halo.new { animation: lt-sprout 1.1s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes lt-sprout { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }
.lt-preview .lt-leaf.lt-new, .lt-preview .lt-leaf-halo.lt-new { animation: lt-sprout 1s cubic-bezier(.2, 1.4, .4, 1); }

/* ═══════════ R9 · O Lugar — Livro/Guia/Prólogo/Caminho (Território C) ═══════════ */
/* ==========================================================================
   integration/C/css-additions.css — Território C (SPEC_RELEASE_9.md §C1-C6)
   Bloco a colar em public/css/patient.css pelo orquestrador (bloco "R9 · O
   Lugar"). Classes exclusivas do Território C: prefixos .p-livro-, .p-guia-,
   .p-prologo-, .p-cam-. Tema Pastel Sereno: usa SEMPRE as vars --p-*
   existentes (nunca cores hardcoded fora das específicas do mockup
   aprovado), tipografia serif Georgia para títulos, hairlines #ece1c8,
   muito respiro, sem caixas (sem .p-card / box-shadow nestas telas).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Livro (C1) — índice tipográfico
   -------------------------------------------------------------------------- */
.p-livro-hero { text-align: center; padding: 18px 8px 6px; }
.p-livro-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 600;
  color: #fff; background: radial-gradient(circle at 34% 28%, var(--p-gold-soft), var(--p-gold-deep));
}
.p-livro-name { font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 600; color: var(--p-text); }
.p-livro-subtitle { font-size: 12.5px; font-style: italic; color: var(--p-text-soft); margin-top: 2px; }
.p-livro-section-label {
  text-align: center; font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--p-gold-deep); margin: 18px 0 6px;
}

.p-livro-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 4px;
  border-bottom: 1px solid #ece1c8; cursor: pointer; background: transparent;
}
.p-livro-item:first-of-type { border-top: 1px solid #ece1c8; }
.p-livro-item:hover .p-livro-item-title { color: var(--p-gold-deep); }
.p-livro-rn {
  font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 700;
  color: var(--p-gold-deep); width: 26px; text-align: center; flex-shrink: 0;
}
.p-livro-item-body { flex: 1; min-width: 0; }
.p-livro-item-title { font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; font-weight: 600; color: var(--p-text); }
.p-livro-item.prologue .p-livro-item-title { font-style: italic; font-weight: 500; }
.p-livro-item-sub { display: block; font-size: 12px; font-style: italic; color: var(--p-text-soft); margin-top: 2px; }
.p-livro-item-go { margin-left: auto; color: var(--p-text-soft); flex-shrink: 0; display: flex; }

.p-livro-quiet-links { text-align: center; font-size: 12px; color: var(--p-text-soft); margin-top: 22px; }
.p-livro-quiet-links a { color: var(--p-text-soft); text-decoration: none; cursor: pointer; }
.p-livro-quiet-links a:hover { color: var(--p-gold-deep); }

/* Voltar (capítulos do Livro) */
.p-livro-back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--p-gold-deep); cursor: pointer; margin-bottom: 12px; background: none; border: none;
  padding: 0; font-family: inherit;
}

/* --------------------------------------------------------------------------
   Prólogo (C2) — parágrafos em cascata, assinatura da Centelha
   -------------------------------------------------------------------------- */
.p-prologo-kicker {
  text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--p-gold-deep); margin-bottom: 6px;
}
.p-prologo-orb {
  width: 44px; height: 44px; border-radius: 50%; margin: 8px auto 26px;
  background: radial-gradient(circle at 36% 30%, #fffaf0, #e7c67f);
  box-shadow: 0 0 0 7px rgba(217, 171, 82, .12), 0 8px 20px rgba(185, 141, 62, .3);
  animation: p-c-floaty 5s ease-in-out infinite;
}
.p-prologo-body { max-width: 320px; margin: 0 auto; text-align: center; }
.p-prologo-line {
  font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; line-height: 1.75;
  color: #54506a; margin-bottom: 22px; opacity: 0; animation: p-prologo-fade-up 1s ease forwards;
}
.p-prologo-line:nth-child(1) { animation-delay: .15s; }
.p-prologo-line:nth-child(2) { animation-delay: 1s; }
.p-prologo-line:nth-child(3) { animation-delay: 1.85s; }
.p-prologo-line:nth-child(4) { animation-delay: 2.7s; }
.p-prologo-line:nth-child(5) { animation-delay: 3.55s; }
.p-prologo-line:nth-child(6) { animation-delay: 4.4s; }
.p-prologo-sig { font-size: 13px; font-style: italic; color: var(--p-gold-deep); animation-delay: 5.2s; }

@keyframes p-prologo-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes p-c-floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Árvore — capítulo do Livro (C3): leitura + simulador "E se…"
   -------------------------------------------------------------------------- */
.p-livro-arv-head { text-align: center; margin-bottom: 6px; }
.p-livro-arv-head h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 600; color: var(--p-text); margin: 0; }
.p-livro-arv-sub { font-size: 12.5px; font-style: italic; color: var(--p-text-soft); margin: 3px 0 8px; }
.p-livro-tree-wrap { text-align: center; margin: 6px 0 10px; }
.p-livro-tree-wrap svg { width: 260px; max-width: 80%; opacity: .92; }
.p-livro-tree-placeholder { font-size: 12.5px; font-style: italic; color: var(--p-text-soft); padding: 30px 10px; }

.p-livro-sim { text-align: center; margin-top: 14px; }
.p-livro-sim > small {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--p-text-soft); margin-bottom: 9px;
}
.p-livro-sim-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.p-livro-sim-btn {
  /* 20/07 — usava var(--p-font) (sans padrão do app): destoava do resto do
     capítulo "A Minha Árvore" (título, legendas e leitura, todos em Georgia
     serif) — pedido da usuária ("estilo da página do livro, letras
     diferentes"). Alinhado à mesma família serif do resto do Livro. */
  border: 1.5px solid #e3d5b4; background: #fffdf6; color: #6d6350;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 20px; cursor: pointer;
  transition: all .2s ease;
}
.p-livro-sim-btn.on {
  background: linear-gradient(135deg, var(--p-gold), var(--p-gold-deep)); color: #fff;
  border-color: transparent; box-shadow: 0 5px 14px rgba(185, 141, 62, .3);
}
.p-livro-sim-cap { font-size: 12.5px; color: var(--p-text-soft); font-style: italic; margin-top: 11px; min-height: 18px; }

.p-livro-read { margin-top: 18px; padding-top: 16px; border-top: 1px solid #ece1c8; }
.p-livro-read-kicker { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--p-violet); margin-bottom: 9px; }
.p-livro-read-text { font-size: 13.5px; line-height: 1.65; color: #55506b; }
.p-livro-tree-foot { text-align: center; font-size: 12px; color: var(--p-text-soft); margin-top: 16px; font-style: italic; }

/* --------------------------------------------------------------------------
   Conquistas — capítulo do Livro (C3): medalhas
   -------------------------------------------------------------------------- */
.p-livro-medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px; margin-top: 12px; }
.p-livro-medal-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px 4px; }
.p-livro-medal-cell .p-livro-medal-ic { font-size: 26px; line-height: 1; }
.p-livro-medal-cell.locked { opacity: .42; filter: grayscale(.4); }
.p-livro-medal-name { font-size: 11px; color: var(--p-text); }
.p-livro-medal-name.muted { color: var(--p-text-soft); font-style: italic; }

/* --------------------------------------------------------------------------
   Guia (C4)
   -------------------------------------------------------------------------- */
.p-guia-hero { text-align: center; padding: 20px 8px 8px; }
.p-guia-orb {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px;
  background: radial-gradient(circle at 34% 28%, #fffaf0, #b6a6e0);
  box-shadow: 0 0 0 7px rgba(132, 116, 173, .14), 0 8px 20px rgba(132, 116, 173, .28);
  animation: p-c-floaty 5s ease-in-out infinite;
}
.p-guia-title { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 600; color: var(--p-text); margin: 0; }
.p-guia-intent {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid #ece1c8; border-radius: 0;
  padding: 16px 4px; cursor: pointer; font-family: Georgia, "Times New Roman", serif;
  font-size: 15.5px; font-weight: 500; color: var(--p-text);
}
.p-guia-intent:first-of-type { border-top: 1px solid #ece1c8; }
.p-guia-intent small {
  font-family: var(--p-font); font-size: 11.5px; font-style: italic; color: var(--p-text-soft);
  margin-top: 3px; text-transform: none; letter-spacing: 0;
}
.p-guia-intent.picked { color: var(--p-gold-deep); }
.p-guia-intent.picked small { color: var(--p-gold-deep); }

.p-guia-bubble {
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 14.5px;
  line-height: 1.6; color: #54506a; padding: 14px 2px 4px;
}
.p-guia-why { font-size: 11.5px; color: var(--p-text-soft); margin-top: 10px; font-style: italic; }
.p-guia-alltools { margin-top: 26px; }
.p-guia-alltools-card {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  text-decoration: none; cursor: pointer; text-align: left;
  padding: 14px 16px; border-radius: 999px 22px 22px 999px;
  background: linear-gradient(120deg, var(--p-glass-strong), var(--p-gold-soft) 140%);
  border: 1.5px solid var(--p-gold-soft);
  box-shadow: var(--p-shadow-gold);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.p-guia-alltools-card:hover,
.p-guia-alltools-card:focus-visible {
  transform: translateY(-1px);
  border-color: var(--p-gold);
  box-shadow: 0 0 0 1px rgba(217, 171, 82, .5), 0 12px 28px rgba(217, 171, 82, .3);
}
.p-guia-leaf {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 32% 26%, #fffaf0, #ecd9b0 70%);
  box-shadow: 0 4px 12px rgba(185, 141, 62, .28);
}
.p-guia-alltools-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p-guia-alltools-text strong {
  font-family: Georgia, "Times New Roman", serif; font-size: 14.5px; font-weight: 600; color: var(--p-text);
  line-height: 1.3;
}
.p-guia-alltools-text small { font-size: 11.5px; color: var(--p-text-muted); font-style: italic; line-height: 1.35; }
.p-guia-alltools-arrow {
  flex: 0 0 auto; font-size: 16px; color: var(--p-gold-deep); font-weight: 700;
  transition: transform .18s ease;
}
.p-guia-alltools-card:hover .p-guia-alltools-arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Caminho (C5) — toque poético; NÃO altera a lógica de fases/answers.
   -------------------------------------------------------------------------- */
.p-cam-poetic {
  text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 14px;
  font-style: italic; color: var(--p-text-soft); margin: -2px 0 14px; min-height: 1px;
}
.p-cam-here-note { font-size: 11.5px; font-style: italic; color: var(--p-text-soft); margin: 4px 0 2px; }

/* --------------------------------------------------------------------------
   B6 — números em 2º plano (classe partilhada com o Território B; definida
   aqui também porque o Território C precisa dela antes da integração final
   — mesma regra em ambos os ficheiros de origem, sem conflito no merge).
   -------------------------------------------------------------------------- */
.p-xp-sub { font-size: 10.5px; color: var(--p-text-soft); letter-spacing: .03em; }

/* ==========================================================================
   Release 10 (SPEC_RELEASE_10.md §4) — "Descobrir" (marketplace vivo do
   paciente): tab bar com 6 abas, cartões de terapeuta/oferta, filtros,
   perfil público, trilhas, compras/coins, avaliações e o CTA discreto de
   fim de página reutilizado nas 12+ ferramentas do portal.
   ========================================================================== */

/* Ajuste fino da tab bar para 7 abas em mobile estreito (≤360px): reduz
   levemente o ícone/fonte, o círculo do estado ativo e o padding lateral
   para os rótulos não colidirem nem quebrarem em duas linhas com layout
   torto. */
@media (max-width: 360px) {
  .p-tab { font-size: 9.5px; gap: 1px; }
  .p-tab .p-tab-ic { font-size: 18px; width: 30px; height: 30px; }
}
@media (max-width: 320px) {
  .p-tab { font-size: 8.5px; }
  .p-tab .p-tab-ic { font-size: 16px; width: 27px; height: 27px; }
}

/* --------------------------------------------------------------------------
   Hub (#/p/descobrir) — frase de cuidado do dia, busca, chips de categoria
   -------------------------------------------------------------------------- */
.p-mkt-reco { display: flex; gap: 12px; align-items: flex-start; }
.p-mkt-reco-ic { flex-shrink: 0; color: var(--p-gold-deep); margin-top: 2px; }
/* 20/07 — .p-mkt-reco-body agrupa texto + link "Ver mais →" numa coluna,
   irmã do ícone: antes o link era um 3º item da linha flex do .p-mkt-reco
   e quebrava sem largura própria (ver discoverHub.js recoCard()). */
.p-mkt-reco-body { min-width: 0; }
.p-mkt-reco-text { font-size: 13.5px; line-height: 1.6; color: var(--p-text); }
.p-mkt-reco a { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--p-gold-deep); text-decoration: none; white-space: nowrap; }
.p-mkt-reco a:hover { text-decoration: underline; }

.p-mkt-search { display: flex; gap: 8px; margin-bottom: 14px; }
.p-mkt-search input { flex: 1; }
.p-mkt-search .p-btn { flex-shrink: 0; padding: 10px 16px; }

/* 20/07 — pedido da usuária: os chips de categoria/terapia ficavam cortados
   na borda direita do ecrã (a fileira rolava, mas sem nenhuma folga depois
   do último chip visível, parecendo quebrado em vez de "há mais para
   deslizar"). padding-right dá essa folga.
   20/07 (2ª volta) — no Portal Web (rato/trackpad, sem gesto de swipe) a
   barra de rolagem ESCONDIDA (scrollbar-width:none + -webkit-scrollbar
   display:none) deixava estas fileiras parecendo cortadas e sem NENHUMA
   forma de chegar ao resto do conteúdo — só funcionava por toque. Passa a
   mostrar uma barra fina discreta (tema dourado) sempre; o wheel-scroll
   horizontal (rato) é ligado globalmente em utils.js `enableHScrollWheel`. */
.p-mkt-chip-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 10px 2px; margin-bottom: 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--p-gold-soft) transparent;
}
.p-mkt-chip-row::-webkit-scrollbar { height: 6px; }
.p-mkt-chip-row::-webkit-scrollbar-track { background: transparent; }
.p-mkt-chip-row::-webkit-scrollbar-thumb { background: var(--p-gold-soft); border-radius: 99px; }
.p-mkt-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--p-glass); border: 1px solid var(--p-glass-border);
  color: var(--p-text-muted); cursor: pointer; font-family: inherit; white-space: nowrap;
}
.p-mkt-chip:hover, .p-mkt-chip.active { background: rgba(217,171,82,.14); border-color: rgba(217,171,82,.4); color: var(--p-gold-deep); }
.p-mkt-chip-count { font-size: 10px; opacity: .7; }

.p-mkt-hscroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 20px 16px 2px; margin-bottom: 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--p-gold-soft) transparent;
}
.p-mkt-hscroll::-webkit-scrollbar { height: 6px; }
.p-mkt-hscroll::-webkit-scrollbar-track { background: transparent; }
.p-mkt-hscroll::-webkit-scrollbar-thumb { background: var(--p-gold-soft); border-radius: 99px; }
.p-mkt-hscroll > * { flex-shrink: 0; width: 200px; margin-bottom: 0; }

.p-mkt-back-link { display: inline-block; font-size: 12.5px; color: var(--p-text-muted); text-decoration: none; margin-bottom: 12px; }
.p-mkt-back-link:hover { color: var(--p-gold-deep); }

/* --------------------------------------------------------------------------
   Cartão de terapeuta (hub + listagem + perfil hero)
   -------------------------------------------------------------------------- */
.p-mkt-t-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.p-mkt-t-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(90,70,120,.14); }
.p-mkt-t-top { display: flex; gap: 10px; align-items: flex-start; }
.p-mkt-t-avatar {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--p-gold-soft), var(--p-gold-deep)); color: #2a1808; font-weight: 800; font-size: 15px;
}
.p-mkt-t-info { min-width: 0; }
.p-mkt-t-name { font-size: 13.5px; font-weight: 700; color: var(--p-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-mkt-t-headline { font-size: 11.5px; color: var(--p-text-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-mkt-t-city { font-size: 11px; color: var(--p-text-soft); margin-top: 2px; display: flex; align-items: center; gap: 3px; }
.p-mkt-t-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.p-mkt-t-index-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.p-mkt-t-price { font-size: 12px; font-weight: 700; color: var(--p-gold-deep); margin-top: 8px; }

.p-mkt-hero { text-align: center; }

/* --------------------------------------------------------------------------
   Índice MIC360 (barra dourada compacta)
   -------------------------------------------------------------------------- */
.p-mkt-index { display: flex; align-items: center; gap: 6px; flex: 1; }
.p-mkt-index-track { flex: 1; height: 5px; border-radius: 99px; background: #f3ecdf; overflow: hidden; }
.p-mkt-index-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--p-gold-soft), var(--p-gold-deep)); transition: width .5s ease; }
.p-mkt-index-value { font-size: 10.5px; font-weight: 700; color: var(--p-gold-deep); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Cartão de oferta (curso/evento/produto/sessão avulsa)
   -------------------------------------------------------------------------- */
.p-mkt-o-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.p-mkt-o-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(90,70,120,.14); }
.p-mkt-o-title { font-size: 13.5px; font-weight: 700; color: var(--p-text); margin-top: 4px; line-height: 1.35; }
.p-mkt-o-price { font-size: 12.5px; font-weight: 700; color: var(--p-gold-deep); margin-top: 8px; }

/* --------------------------------------------------------------------------
   Filtros (listagem de terapeutas)
   -------------------------------------------------------------------------- */
.p-mkt-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.p-mkt-filters select { width: 100%; }

/* --------------------------------------------------------------------------
   Vídeo (perfil do terapeuta) — embed sanitizado 16:9
   -------------------------------------------------------------------------- */
.p-mkt-video-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.p-mkt-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* --------------------------------------------------------------------------
   Avaliações (perfil do terapeuta)
   -------------------------------------------------------------------------- */
.p-mkt-review-row { padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-mkt-review-row:last-child { border-bottom: none; }
.p-mkt-review-comment { font-size: 13px; line-height: 1.55; color: var(--p-text); margin-top: 6px; }
.p-mkt-review-reply { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(63,58,82,.04); font-size: 12.5px; line-height: 1.5; color: var(--p-text-muted); }

/* --------------------------------------------------------------------------
   Estrelas (avaliação — leitura e input) — SVG icon('star'), nunca emoji
   -------------------------------------------------------------------------- */
.p-stars { display: inline-flex; gap: 2px; }
.p-star { color: var(--p-glass-border); display: inline-flex; }
.p-star.filled { color: var(--p-gold-deep); }
.p-star-input { display: flex; gap: 6px; justify-content: center; margin: 6px 0 16px; }
.p-star-input-btn { background: none; border: none; padding: 2px; cursor: pointer; color: var(--p-glass-border); transition: transform .15s ease, color .15s ease; }
.p-star-input-btn:hover { transform: scale(1.08); }
.p-star-input-btn.filled { color: var(--p-gold-deep); }

/* --------------------------------------------------------------------------
   Trilha de cuidado (hub + #/p/trilha/:key)
   -------------------------------------------------------------------------- */
.p-mkt-track-card { cursor: pointer; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.p-mkt-track-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(90,70,120,.14); }
.p-mkt-track-ic { color: var(--p-gold-deep); }
.p-mkt-track-title { font-size: 12.5px; font-weight: 700; color: var(--p-text); margin-top: 6px; line-height: 1.35; }

.p-mkt-step-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--p-glass-border); }
.p-mkt-step-row:last-child { border-bottom: none; }
.p-mkt-step-row.done { opacity: .62; }
.p-mkt-step-check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  border: 1.5px solid var(--p-glass-border); display: flex; align-items: center; justify-content: center; color: #fff;
}
.p-mkt-step-row.done .p-mkt-step-check { background: var(--p-gold-deep); border-color: var(--p-gold-deep); }
.p-mkt-step-body { flex: 1; min-width: 0; }
.p-mkt-step-title { font-size: 13px; font-weight: 700; color: var(--p-text); }
.p-mkt-step-desc { font-size: 11.5px; color: var(--p-text-muted); margin-top: 2px; line-height: 1.45; }

/* --------------------------------------------------------------------------
   Compras (#/p/compras) — pedidos, pendentes de avaliação
   -------------------------------------------------------------------------- */
.p-mkt-pending-row, .p-mkt-order-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--p-glass-border);
}
.p-mkt-pending-row:last-child, .p-mkt-order-row:last-child { border-bottom: none; }

/* --------------------------------------------------------------------------
   Bloco de recomendação contextual — Termômetro/Roda da Vida/Home (frase de
   cuidado do recoEngine, "a venda nasce do cuidado" — nunca um pitch).
   -------------------------------------------------------------------------- */
.p-mkt-context-reco { margin-top: 4px; }
.p-mkt-home-reco { margin-top: 4px; }

/* --------------------------------------------------------------------------
   discoverCTA() — cartão discreto de fim de página nas 12+ ferramentas do
   portal (jogos, numerologia, kin, mapa astral, human design, escala,
   desafios, plano, diário, johari, ayurveda, hábitos).
   -------------------------------------------------------------------------- */
.p-discover-cta { display: flex; gap: 12px; align-items: center; background: rgba(217,171,82,.06); }
.p-discover-cta-ic { flex-shrink: 0; color: var(--p-gold-deep); }
.p-discover-cta-body { flex: 1; min-width: 0; }
.p-discover-cta-text { font-size: 12.5px; line-height: 1.5; color: var(--p-text-muted); margin-bottom: 8px; }

/* ==========================================================================
   Release 12.4 — Maturação dos retratos. Em vez de um cadeado, um cartão
   que explica o tempo natural do instrumento, oferece o que fazer
   entretanto e mantém um caminho discreto para refazer na mesma.
   ========================================================================== */
.p-matur-card { text-align: center; }
.p-matur-ic {
  width: 56px; height: 56px; border-radius: 50%; margin: 2px auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fffaf0, var(--p-gold-soft, #f0d9a8));
  color: var(--p-gold-deep);
}
.p-matur-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--p-text); }
.p-matur-body { font-size: 13.5px; line-height: 1.55; color: var(--p-text-muted); margin: 0 0 8px; }
.p-matur-when { font-size: 12.5px; color: var(--p-text-soft, var(--p-text-muted)); margin: 0 0 14px; }
.p-matur-alt-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--p-text-soft, var(--p-text-muted)); margin: 0 0 8px; font-weight: 700;
}
.p-matur-alts { display: flex; flex-direction: column; gap: 8px; }
.p-matur-alt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border-radius: 14px; cursor: pointer; font-family: inherit;
  font-size: 13.5px; color: var(--p-text); text-align: left;
  background: var(--p-ink-2); border: 1px solid var(--p-glass-border);
}
.p-matur-alt:hover { background: #fff; border-color: var(--p-gold); }
.p-matur-alt-ic { display: flex; color: var(--p-gold-deep); flex: none; }
.p-matur-anyway {
  margin-top: 14px; background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 12.5px; color: var(--p-text-muted); text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.p-matur-anyway:hover { color: var(--p-violet, var(--p-text)); }

/* convite quando o tempo natural passou */
.p-matur-invite {
  background: var(--p-ink-2); border: 1px dashed var(--p-gold);
  border-radius: 14px; padding: 12px 14px; margin: 12px 0 4px; text-align: left;
}
.p-matur-invite-title { font-size: 13.5px; font-weight: 600; color: var(--p-text); }
.p-matur-invite-body { font-size: 12.5px; color: var(--p-text-muted); margin-top: 2px; }

/* comparação narrativa e "e agora" */
.p-matur-compare, .p-matur-next { margin-top: 12px; }

/* chips do hub */
.pj-status-chip.maturing { color: var(--p-text-muted); }
.pj-status-chip.ready { color: var(--p-gold-deep); font-weight: 600; }

/* ==========================================================================
   R12.6 — "Anjo do dia" na home do paciente
   Cartão aberto (sem clique para revelar): identidade do anjo, o que ele
   convida, o tom do Sincronário, o encontro dos dois, uma opção e uma frase.
   ========================================================================== */
.p-angel-card {
  background: linear-gradient(160deg, #fffdf7 0%, #fbf5e6 58%, #f5eeff 100%);
  border: 1px solid #ecdfc0; border-radius: var(--p-radius-lg, 20px);
  padding: 18px 18px 16px; margin: 0 0 4px;
  box-shadow: 0 8px 22px rgba(120, 100, 60, .10);
  position: relative; overflow: hidden;
}
.p-angel-card::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 132px; height: 132px;
  border-radius: 50%; background: radial-gradient(circle, rgba(212,175,95,.20), transparent 68%);
  pointer-events: none;
}
.p-angel-kicker {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--p-gold-deep); font-weight: 700; margin-bottom: 12px;
}
.p-angel-head { display: flex; gap: 14px; align-items: center; }
.p-angel-seal {
  flex: none; width: 62px; height: 62px; border-radius: 16px;
  background: #fff; border: 1px solid #e6d6ae;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 3px rgba(212,175,95,.12);
}
.p-angel-heb {
  font-size: 22px; line-height: 1; color: var(--p-gold-deep); font-weight: 600;
  direction: rtl; unicode-bidi: isolate;
}
.p-angel-num { font-size: 10.5px; color: var(--p-text-soft); margin-top: 4px; letter-spacing: .06em; }
.p-angel-idty { min-width: 0; flex: 1; }
.p-angel-name { font-size: 21px; line-height: 1.15; color: var(--p-text); }
.p-angel-letters { font-size: 12px; color: var(--p-text-soft); margin-top: 3px; letter-spacing: .03em; }
.p-angel-meaning { font-size: 13px; color: var(--p-text-muted); margin-top: 5px; font-style: italic; }

.p-angel-rows { margin-top: 15px; display: flex; flex-direction: column; gap: 11px; }
.p-angel-row { display: flex; gap: 10px; align-items: flex-start; }
.p-angel-ic { flex: none; display: flex; color: var(--p-gold-deep); padding-top: 1px; }
.p-angel-label {
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--p-text-soft); font-weight: 700;
}
.p-angel-text { font-size: 14px; line-height: 1.5; color: var(--p-text); margin-top: 2px; }

.p-angel-together {
  margin-top: 15px; padding: 13px 15px; border-radius: 14px;
  background: rgba(255, 255, 255, .72); border: 1px solid #eadfc6;
  font-size: 15px; line-height: 1.5; color: var(--p-text);
}
.p-angel-option {
  margin-top: 11px; font-size: 13.5px; line-height: 1.5; color: var(--p-text);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
}
.p-angel-option .p-angel-label { text-transform: none; letter-spacing: .02em; font-size: 12.5px; color: var(--p-gold-deep); }
.p-angel-phrase {
  margin-top: 13px; padding-top: 12px; border-top: 1px dashed #e3d5b4;
  font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-size: 15px; line-height: 1.5; color: #5d5478;
}
.p-angel-yours { margin-top: 9px; font-size: 12px; color: var(--p-text-soft); }

@media (max-width: 400px) {
  .p-angel-card { padding: 16px 14px 14px; }
  .p-angel-seal { width: 54px; height: 54px; border-radius: 14px; }
  .p-angel-heb { font-size: 19px; }
  .p-angel-name { font-size: 19px; }
}
.p-angel-more {
  margin-top: 12px; background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12.5px; color: var(--p-gold-deep);
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.p-angel-more-body { margin-top: 10px; }
.p-angel-meta { font-size: 12.5px; color: var(--p-text-muted); }
.p-angel-evoc { font-size: 13px; line-height: 1.55; color: var(--p-text-muted); margin: 8px 0 0; }
.p-angel-src { font-size: 11.5px; color: var(--p-text-soft); margin-top: 8px; }

/* ==========================================================================
   Release 13 — "A Árvore, o Fruto e a Semente" (#/p/arvore, tree.js,
   views/patient/treeView.js + orchard.js). Prefixo p-orch- / p-tree-.
   Ícones sempre via icons.js (traço) — zero emojis, regra do produto desde
   a v12.1.
   ========================================================================== */

/* Mapa: wrapper precisa de position:relative para o <svg> aninhado do fruto
   pendurado (tree.js) alinhar corretamente com o resto do desenho. */
.p-tree-svg-wrap { position: relative; }

/* Legenda — 4ª pastilha "viva" (halo dourado a respirar), Release 13. */
.p-tree-legend-dot.viva {
  background: rgba(217,171,82,.55);
  border-color: var(--p-gold-deep);
  animation: pOrchLegendBreathe 4.6s ease-in-out infinite;
}
@keyframes pOrchLegendBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,171,82,.35); }
  50% { box-shadow: 0 0 0 3px rgba(217,171,82,.18); }
}

/* "A sua árvore" — cartão da voz, usado em todos os quatro estados. */
.p-orch-voice-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15.5px; font-weight: 600; margin: 0 0 6px; color: var(--p-text);
}
.p-orch-voice-body { font-size: 13px; line-height: 1.6; color: var(--p-text-muted); margin: 0; }

/* Estado 'maduro' — cartão-convite para colher. */
.p-orch-prompt-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.p-orch-prompt-ic {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(217,171,82,.16); color: var(--p-gold-deep);
}

/* Estado 'colhido' / 'quieta' — ações e cartão "ainda por aqui". */
.p-orch-practice-row { display: flex; gap: 8px; margin-top: 10px; }
.p-orch-practice-row .p-btn { flex: 1; }
.p-orch-still-here { cursor: pointer; }
.p-orch-still-here:hover { box-shadow: var(--p-shadow-gold); }

/* Estado 'quieta' — nunca vazio: "Entretanto". */
.p-orch-quiet-card p { font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); margin: 0 0 8px; }
.p-orch-quiet-card p:last-child { margin-bottom: 0; }

/* Pergunta da semente — cartão compacto no topo de #/p/arvore. */
.p-orch-seed-card { }
.p-orch-seed-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15.5px; font-weight: 600; margin: 0 0 6px; color: var(--p-text);
}
.p-orch-seed-body { font-size: 13px; line-height: 1.55; color: var(--p-text); margin: 0 0 6px; }
.p-orch-seed-help { font-size: 12px; line-height: 1.55; color: var(--p-text-muted); margin: 0; }
.p-orch-seed-once { margin-top: 10px; font-size: 11px; color: var(--p-text-soft); text-align: center; }

/* Palco do fruto — três camadas (núcleo de luz + duas metades recortadas
   via clip-path) sobre a MESMA ilustração de tree.js::fruitShape(), usadas
   para a animação genérica de abertura em orchard.js::renderPick(). Estas
   camadas são <div>s HTML normais posicionados com clip-path — não usam
   `transform` de posição em <g> SVG, então não têm nenhuma relação com a
   armadilha de transform/animation descrita em tree.js. */
.p-orch-fruit-shape { position: relative; margin: 4px auto 18px; }
.p-orch-fruit-stage { display: flex; justify-content: center; cursor: pointer; }
.p-orch-fruit-core {
  position: absolute; inset: 0; margin: auto; width: 22%; height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,247,222,.95), rgba(217,171,82,0) 72%);
  opacity: 0; transform: scale(.4);
  transition: opacity .5s ease, transform .5s ease;
}
.p-orch-fruit-half {
  position: absolute; inset: 0;
  transition: transform .6s ease, opacity .6s ease;
}
.p-orch-fruit-half svg { width: 100%; height: 100%; display: block; }
.p-orch-fruit-half-l { clip-path: inset(0 50% 0 0); }
.p-orch-fruit-half-r { clip-path: inset(0 0 0 50%); }
.p-orch-fruit-shape.p-orch-opening .p-orch-fruit-half-l { transform: translateX(-13px) rotate(-6deg); }
.p-orch-fruit-shape.p-orch-opening .p-orch-fruit-half-r { transform: translateX(13px) rotate(6deg); }
.p-orch-fruit-shape.p-orch-opening .p-orch-fruit-core,
.p-orch-fruit-shape.p-orch-opened .p-orch-fruit-core { opacity: 1; transform: scale(1); }
.p-orch-fruit-shape.p-orch-opened .p-orch-fruit-half-l { transform: translateX(-20px) rotate(-9deg); opacity: .8; }
.p-orch-fruit-shape.p-orch-opened .p-orch-fruit-half-r { transform: translateX(20px) rotate(9deg); opacity: .8; }

.p-orch-pick-hint { font-size: 12.5px; color: var(--p-text-muted); text-align: center; margin: 0 0 6px; }
.p-orch-pick-result { text-align: center; margin-top: 10px; }
.p-orch-fruit-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px; font-weight: 700; margin: 4px 0 6px; color: var(--p-text);
}
.p-orch-fruit-header { text-align: center; margin-bottom: 4px; }
.p-orch-fruit-header .p-orch-fruit-name { margin-bottom: 8px; }
.p-orch-born { font-size: 12.5px; color: var(--p-text-muted); text-align: center; margin: 0 0 14px; }
.p-orch-theme { font-size: 13px; line-height: 1.55; color: var(--p-text-muted); text-align: center; margin: -6px 0 14px; font-style: italic; }

/* A Centelha — parágrafo do meio (leitura hesitante) em tom mais suave. */
.p-orch-reading-p { font-size: 13.5px; line-height: 1.65; color: var(--p-text); margin: 0 0 10px; }
.p-orch-reading-p:last-child { margin-bottom: 0; }
.p-orch-reading-p-soft { color: var(--p-text-muted); font-style: italic; }

.p-orch-practice-text { font-size: 13px; line-height: 1.6; color: var(--p-text-muted); margin: 0 0 10px; }

/* A dobra — <details> discreto, fecha por omissão. */
.p-orch-fold { margin-top: 4px; font-size: 12.5px; color: var(--p-text-muted); }
.p-orch-fold summary {
  cursor: pointer; font-weight: 700; color: var(--p-gold-deep);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.p-orch-fold summary::-webkit-details-marker { display: none; }
.p-orch-fold summary::before { content: '+'; font-weight: 700; }
.p-orch-fold[open] summary::before { content: '−'; }
.p-orch-fold p { margin: 8px 0 0; line-height: 1.55; }

.p-orch-stays-note {
  font-size: 11.5px; color: var(--p-text-soft); text-align: center;
  margin: 14px 0 0; font-style: italic;
}

/* Frase de fecho da folha da esfera ("devolve tempo") — sempre presente. */
.p-orch-breathe { margin-top: 14px; font-size: 12px; color: var(--p-text-soft); font-style: italic; }


/* ===== Release 13 — O Pomar e as Raízes (capítulo III do Livro) ===== */
/* ==========================================================================
   integration/C-css.css — Território C, Release 13 ("A Árvore, o Fruto e a
   Semente"). Estilos das telas NOVAS deste capítulo:
     - #/p/livro/pomar  (public/js/views/patient/pomar.js  -> renderPomar)
     - #/p/livro/raizes (public/js/views/patient/pomar.js  -> renderRoots)
   Segue o mesmo vocabulário visual de patient.css (tema "Pastel Sereno"):
   mesmas custom properties (--p-*), mesma tipografia serif nos títulos,
   hairlines finas, sem caixas pesadas. Este ficheiro é só o ENTREGÁVEL do
   agente — o merge para public/css/patient.css é feito por fora.
   ========================================================================== */

/* -------------------------------------------------------------------------
   #/p/livro/pomar — cabeçalho
   ------------------------------------------------------------------------- */
.p-pomar-head { text-align: center; padding: 10px 6px 4px; }
.p-pomar-chapter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--p-violet);
}
.p-pomar-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--p-text);
  margin: 4px 0 0;
}
.p-pomar-sub {
  font-size: 12.5px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 4px 0 0;
  min-height: 16px;
}

/* -------------------------------------------------------------------------
   Seletor de duas entradas — pílulas (pelo tempo / pelas esferas)
   ------------------------------------------------------------------------- */
.p-pomar-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 6px;
}
.p-pomar-switch.p-pomar-switch-hidden { display: none; }
.p-pomar-pill {
  border: 1px solid var(--p-glass-border);
  background: var(--p-glass);
  color: var(--p-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.p-pomar-pill:hover { border-color: var(--p-gold); }
.p-pomar-pill.on {
  background: var(--p-gold-soft);
  border-color: var(--p-gold-deep);
  color: var(--p-gold-deep);
}

/* -------------------------------------------------------------------------
   Grupos (mês, na vista pelo tempo; esfera, na vista pelas esferas)
   ------------------------------------------------------------------------- */
.p-pomar-content { margin-top: 8px; }
.p-pomar-group { margin-top: 22px; }
.p-pomar-group:first-child { margin-top: 12px; }
.p-pomar-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--p-text-soft);
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #ece1c8;
}
.p-pomar-group-empty {
  font-size: 12.5px;
  font-style: italic;
  color: var(--p-text-soft);
  padding: 6px 2px 4px;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Um fruto colhido
   ------------------------------------------------------------------------- */
.p-pomar-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 2px;
  border-bottom: 1px solid #f2e9d4;
}
.p-pomar-item:last-child { border-bottom: none; }
.p-pomar-item-ic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-pomar-item-ic svg { width: 100%; height: 100%; }
.p-pomar-item-body { flex: 1; min-width: 0; }
.p-pomar-item-name-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p-pomar-item-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--p-text);
}
.p-pomar-seed-mark {
  font-size: 10.5px;
  font-style: italic;
  color: var(--p-text-soft);
}
.p-pomar-item-meta {
  font-size: 11.5px;
  color: var(--p-text-soft);
  margin-top: 2px;
}
.p-pomar-item-note {
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
  color: #55506b;
  margin: 6px 0 0;
}
.p-pomar-item-unopened {
  font-size: 12px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 6px 0 0;
}

/* -------------------------------------------------------------------------
   Vazio total
   ------------------------------------------------------------------------- */
.p-pomar-empty { text-align: center; padding: 40px 14px; }
.p-pomar-empty-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--p-text);
}
.p-pomar-empty-body {
  font-size: 13px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 6px 0 0;
  line-height: 1.55;
}

/* -------------------------------------------------------------------------
   Rodapé — nota de ordem fixa, link discreto para as raízes, frase de fecho
   ------------------------------------------------------------------------- */
.p-pomar-footer { text-align: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid #ece1c8; }
.p-pomar-order-note {
  font-size: 11.5px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 0 0 12px;
}
.p-pomar-roots-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--p-text-soft);
  text-decoration: none;
  cursor: pointer;
}
.p-pomar-roots-link:hover { color: var(--p-gold-deep); }
.p-pomar-closing {
  font-size: 12px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 10px 0 0;
}

/* -------------------------------------------------------------------------
   #/p/livro/raizes — "As raízes"
   ------------------------------------------------------------------------- */
.p-seed-head { text-align: center; padding: 10px 6px 4px; }
.p-seed-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--p-text);
  margin: 0;
}
.p-seed-sub {
  font-size: 12.5px;
  font-style: italic;
  color: var(--p-text-soft);
  margin: 4px 0 0;
}
.p-seed-list { margin-top: 18px; }
.p-seed-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 2px;
  border-bottom: 1px solid #f2e9d4;
}
.p-seed-item:last-child { border-bottom: none; }
.p-seed-item-ic {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-seed-item-ic svg { width: 100%; height: 100%; }
.p-seed-item-body { flex: 1; min-width: 0; }
.p-seed-item-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--p-text);
}
.p-seed-item-meta {
  font-size: 11.5px;
  color: var(--p-text-soft);
  margin-top: 2px;
}
.p-seed-item-note {
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
  color: #55506b;
  margin: 6px 0 0;
}
.p-seed-empty {
  font-size: 13px;
  font-style: italic;
  color: var(--p-text-soft);
  text-align: center;
  padding: 30px 10px;
}
.p-seed-note {
  font-size: 12px;
  font-style: italic;
  color: var(--p-text-soft);
  text-align: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #ece1c8;
}


/* --- R13.0.1: a fala da árvore explica o estado, não só o nomeia --- */
.p-orch-voice-explain {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
}
.p-orch-voice-since {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}
.p-orch-why { margin-top: 12px; }
.p-orch-why-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.p-orch-why-list li { margin-bottom: 6px; }

/* ==========================================================================
   Release 14 — Motor de Jornadas ("Percurso"), PRD_MOTOR_DE_JORNADAS.md.
   Tema Pastel Sereno, mobile-first, sem nenhuma barra de percentagem de
   conclusão: a única barra é a do sinal de integração, e vem sempre
   acompanhada da palavra do estado, nunca de um número.
   ========================================================================== */

/* --- a trilha ------------------------------------------------------------ */
#app-shell.patient-mode .p-trail { position: relative; padding-left: 44px; margin-top: 4px; }
#app-shell.patient-mode .p-trail::before {
  content: ""; position: absolute; left: 17px; top: 12px; bottom: 24px; width: 2px;
  background: linear-gradient(180deg, var(--p-gold) 0%, var(--p-gold-soft) 34%, var(--p-glass-border) 46%);
}
#app-shell.patient-mode .p-trail-step { position: relative; margin-bottom: 14px; }
#app-shell.patient-mode .p-trail-dot {
  position: absolute; left: -44px; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #fff;
  border: 2px solid var(--p-glass-border); color: var(--p-gold-deep); z-index: 2;
}
#app-shell.patient-mode .p-trail-step.done .p-trail-dot { background: var(--p-gold-soft); border-color: var(--p-gold); }
#app-shell.patient-mode .p-trail-step.open .p-trail-dot {
  border-color: var(--p-gold); box-shadow: 0 0 0 5px rgba(217, 171, 82, .16);
  animation: p-trail-halo 3s ease-in-out infinite;
}
@keyframes p-trail-halo {
  0%, 100% { box-shadow: 0 0 0 5px rgba(217, 171, 82, .16); }
  50% { box-shadow: 0 0 0 9px rgba(217, 171, 82, .09); }
}
#app-shell.patient-mode .p-trail-box {
  background: var(--p-glass); border-radius: var(--p-radius-sm); padding: 13px 15px;
  box-shadow: 0 4px 14px rgba(90, 70, 120, .06); cursor: pointer; transition: .18s;
}
#app-shell.patient-mode .p-trail-step.open .p-trail-box { box-shadow: var(--p-shadow-gold); padding: 16px 15px; }
#app-shell.patient-mode .p-trail-step.future .p-trail-box {
  background: rgba(255, 255, 255, .5); box-shadow: none; border: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-trail-step.future .p-trail-name,
#app-shell.patient-mode .p-trail-step.future .p-trail-desc { opacity: .62; }
#app-shell.patient-mode .p-trail-name { font-size: 15px; font-weight: 600; margin: 0; }
#app-shell.patient-mode .p-trail-step.open .p-trail-name { font-size: 17.5px; }
#app-shell.patient-mode .p-trail-desc { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--p-text-muted); }
#app-shell.patient-mode .p-trail-meta { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* --- o sinal de integração ----------------------------------------------- */
#app-shell.patient-mode .p-integ { margin-top: 13px; }
#app-shell.patient-mode .p-integ-label {
  display: flex; justify-content: space-between; font-size: 11.5px;
  color: var(--p-text-muted); margin-bottom: 6px;
}
#app-shell.patient-mode .p-integ-bar {
  height: 7px; border-radius: 9px; background: var(--p-ink-2); overflow: hidden;
}
#app-shell.patient-mode .p-integ-bar i {
  display: block; height: 100%; border-radius: 9px;
  background: linear-gradient(90deg, var(--p-gold-soft) 0%, var(--p-gold) 62%, rgba(217, 171, 82, .3) 100%);
  transition: width .4s ease;
}
#app-shell.patient-mode .p-integ-signals { display: flex; gap: 6px; margin-top: 9px; }
#app-shell.patient-mode .p-integ-sig {
  flex: 1; text-align: center; background: var(--p-ink-2); border-radius: 10px; padding: 7px 3px;
}
#app-shell.patient-mode .p-integ-sig b { display: block; font-size: 13px; color: var(--p-gold-deep); }
#app-shell.patient-mode .p-integ-sig span { font-size: 9.5px; color: var(--p-text-muted); }
#app-shell.patient-mode .p-integ-note {
  font-size: 11.5px; color: var(--p-text-soft); line-height: 1.55; margin: 10px 0 0;
}

/* --- a voz da Centelha ---------------------------------------------------- */
#app-shell.patient-mode .p-centelha {
  display: flex; gap: 12px; padding: 15px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(132, 116, 173, .10), rgba(217, 171, 82, .08));
  border: 1px solid rgba(132, 116, 173, .20); border-radius: var(--p-radius);
}
#app-shell.patient-mode .p-centelha p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text); }
#app-shell.patient-mode .p-centelha-orb {
  flex: none; width: 34px; height: 34px; border-radius: 50%; margin-top: 2px;
  background: radial-gradient(circle at 32% 30%, #fff, var(--p-gold-soft) 45%, var(--p-violet) 130%);
  box-shadow: 0 0 16px rgba(217, 171, 82, .5); animation: p-orb-pulse 3.4s ease-in-out infinite;
}
@keyframes p-orb-pulse {
  0%, 100% { transform: scale(1); opacity: .94; }
  50% { transform: scale(1.07); opacity: 1; }
}
#app-shell.patient-mode .p-centelha-closing {
  display: block; margin-top: 8px; padding-left: 10px; font-style: italic;
  color: var(--p-text-muted); border-left: 2px solid var(--p-violet);
}

/* --- o foco do dia e as ações --------------------------------------------- */
#app-shell.patient-mode .p-focus-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
#app-shell.patient-mode .p-focus-desc {
  font-size: 13px; line-height: 1.6; color: var(--p-text-muted); margin: 0 0 14px;
}
#app-shell.patient-mode .p-textarea {
  width: 100%; border: 1px solid var(--p-glass-border); border-radius: var(--p-radius-sm);
  padding: 11px 12px; font-family: var(--p-font); font-size: 13.5px; line-height: 1.55;
  color: var(--p-text); background: var(--p-glass-strong); resize: vertical; margin-bottom: 12px;
}
#app-shell.patient-mode .p-textarea:focus { outline: none; border-color: var(--p-gold); }
#app-shell.patient-mode .p-act {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 0;
  border-bottom: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-act:last-child { border-bottom: none; }
#app-shell.patient-mode .p-act-tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%; margin-top: 1px;
  border: 1.8px solid var(--p-glass-border); display: flex; align-items: center;
  justify-content: center; color: #fff;
}
#app-shell.patient-mode .p-act-tick.on { background: var(--p-success); border-color: var(--p-success); }
#app-shell.patient-mode .p-act-kind {
  font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--p-gold-deep); font-weight: 600;
}
#app-shell.patient-mode .p-act-title { font-size: 13.8px; font-weight: 600; margin: 0; line-height: 1.4; }
#app-shell.patient-mode .p-act.done .p-act-title { color: var(--p-text-soft); text-decoration: line-through; }
#app-shell.patient-mode .p-act-sub { font-size: 11.5px; color: var(--p-text-muted); margin: 3px 0 0; line-height: 1.5; }

/* --- o momento de integração ---------------------------------------------- */
#app-shell.patient-mode .p-celebrate { text-align: center; padding: 8px 0 0; }
#app-shell.patient-mode .p-celebrate-tree { margin: 0 auto 6px; line-height: 0; }
#app-shell.patient-mode .p-center { text-align: center; }
#app-shell.patient-mode .p-quote-card {
  background: var(--p-glass); border-radius: var(--p-radius); padding: 17px; margin: 14px 0;
  box-shadow: var(--p-shadow-glass); text-align: left;
}
#app-shell.patient-mode .p-quote-intro { font-size: 12.5px; color: var(--p-text-muted); margin: 0 0 12px; }
#app-shell.patient-mode .p-quote {
  margin: 0 0 10px; font-size: 13.5px; line-height: 1.62; font-style: italic; color: var(--p-text);
}
#app-shell.patient-mode .p-quote:last-child { margin-bottom: 0; }
#app-shell.patient-mode .p-quote-when {
  display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: var(--p-text-soft);
}
#app-shell.patient-mode .p-xp-pill {
  display: inline-flex; align-items: center; gap: 7px; margin: 2px 0 4px;
  background: rgba(217, 171, 82, .15); color: var(--p-gold-deep);
  font-size: 12.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
}
#app-shell.patient-mode .p-book-note { font-size: 13px; line-height: 1.6; margin: 0; color: var(--p-text-muted); }
#app-shell.patient-mode .p-card-quiet {
  background: rgba(255, 255, 255, .55); box-shadow: none; border: 1px dashed var(--p-glass-border);
  font-size: 12.5px; line-height: 1.55; color: var(--p-text-muted);
}

/* Classes de moldura usadas pelo Percurso e ainda não existentes no tema.
   Mantidas com o prefixo p- e dentro do patient-mode, como o resto. */
#app-shell.patient-mode .p-title {
  margin: 0 0 6px; font-size: 23px; font-weight: 600; line-height: 1.28; color: var(--p-text);
}
#app-shell.patient-mode .p-lead {
  margin: 0 0 18px; font-size: 13.5px; line-height: 1.62; color: var(--p-text-muted);
}
#app-shell.patient-mode .p-topbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
#app-shell.patient-mode .p-back { font-size: 13px; color: var(--p-text-muted); cursor: pointer; }
#app-shell.patient-mode .p-tag {
  font-size: 10.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--p-ink-2); color: var(--p-text-muted);
}
#app-shell.patient-mode .p-tag-soft { background: rgba(127, 191, 154, .18); color: #3f7f60; }
#app-shell.patient-mode .p-card-gold { box-shadow: var(--p-shadow-gold); }

/* O "hoje não" do Percurso. Classe própria: `.p-quiet` já existe no tema
   como estilo de SECÇÃO (border-top + padding) e herdá-la punha uma linha
   por cima do link. Apanhado no smoke-ui antes do deploy. */
#app-shell.patient-mode .p-trail-skip {
  display: block; text-align: center; margin-top: 14px; cursor: pointer;
  font-size: 12.5px; color: var(--p-text-soft); text-decoration: underline dotted;
}
#app-shell.patient-mode .p-trail-skip:hover { color: var(--p-text-muted); }

/* ==========================================================================
   Release 15 — O Retrato 360 sem placar (PRD_MOTOR_DE_JORNADAS.md §9.2).
   Nenhum número no fluxo principal: só a lente do Momento, oito frases e
   oito barras sem valor. O total vive atrás da dobra.
   ========================================================================== */
#app-shell.patient-mode .p-ici-lens {
  background: linear-gradient(135deg, rgba(132,116,173,.13), rgba(217,171,82,.11));
  border: 1px solid rgba(132,116,173,.24); border-radius: var(--p-radius);
  padding: 18px 16px; margin-bottom: 6px;
}
#app-shell.patient-mode .p-ici-lens-label {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--p-violet); font-weight: 700; margin-bottom: 8px;
}
#app-shell.patient-mode .p-ici-lens-body {
  margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--p-text);
}
#app-shell.patient-mode .p-ici-lens-caption {
  text-align: center; font-size: 10.5px; color: var(--p-text-soft); margin: 8px 0 14px;
}
#app-shell.patient-mode .p-ici-pillars { display: flex; flex-direction: column; gap: 10px; }
#app-shell.patient-mode .p-ici-pillar {
  background: var(--p-glass); border-radius: var(--p-radius-sm); padding: 14px 15px;
  box-shadow: 0 4px 14px rgba(90,70,120,.06);
}
#app-shell.patient-mode .p-ici-pillar.empty {
  background: rgba(255,255,255,.55); box-shadow: none; border: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-ici-pillar-name { font-size: 13.2px; font-weight: 600; margin: 0 0 9px; }
/* Ponta esbatida: comunica intensidade, nunca precisão. */
#app-shell.patient-mode .p-ici-bar {
  height: 7px; border-radius: 8px; background: var(--p-ink-2); overflow: hidden;
}
#app-shell.patient-mode .p-ici-bar i {
  display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--p-violet) 0%, #a294c9 62%, rgba(162,148,201,.25) 100%);
}
#app-shell.patient-mode .p-ici-reading {
  font-size: 12px; color: var(--p-text-muted); margin: 9px 0 0; line-height: 1.55;
}
#app-shell.patient-mode .p-ici-pillar.empty .p-ici-reading { color: var(--p-text-soft); margin-top: 0; }

/* A dobra */
#app-shell.patient-mode .p-ici-tech { margin-top: 18px; }
#app-shell.patient-mode .p-ici-tech-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  background: none; border: none; font-family: inherit; font-size: 12.5px;
  color: var(--p-text-soft); cursor: pointer; padding: 11px;
  border-top: 1px dashed var(--p-glass-border); border-bottom: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-ici-caret { display: inline-flex; transition: transform .2s; }
#app-shell.patient-mode .p-ici-tech.open .p-ici-caret { transform: rotate(90deg); }
#app-shell.patient-mode .p-ici-tech-body { display: none; padding-top: 14px; }
#app-shell.patient-mode .p-ici-tech.open .p-ici-tech-body { display: block; }
#app-shell.patient-mode .p-ici-tech-card { text-align: center; }
#app-shell.patient-mode .p-ici-tech-title {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--p-text-soft); font-weight: 600; margin-bottom: 9px;
}
#app-shell.patient-mode .p-ici-tech-num {
  font-size: 38px; font-weight: 600; letter-spacing: -1px; line-height: 1; color: var(--p-text);
}
#app-shell.patient-mode .p-ici-tech-band { font-size: 12px; color: var(--p-gold-deep); font-weight: 600; margin-top: 6px; }
#app-shell.patient-mode .p-ici-tech-sub { font-size: 11px; color: var(--p-text-soft); margin-top: 6px; }
#app-shell.patient-mode .p-ici-tech-note {
  font-size: 11px; color: var(--p-text-soft); line-height: 1.5; text-align: left;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-ici-comp-row {
  display: flex; justify-content: space-between; align-items: center; font-size: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--p-glass-border);
}
#app-shell.patient-mode .p-ici-comp-row:last-child { border-bottom: none; }
#app-shell.patient-mode .p-ici-comp-row b { font-weight: 600; color: var(--p-text-muted); font-variant-numeric: tabular-nums; }
#app-shell.patient-mode .p-ici-comp-row b.soft { font-weight: 400; color: var(--p-text-soft); }
#app-shell.patient-mode .p-ici-divider {
  display: flex; align-items: center; gap: 9px; margin: 16px 0 10px;
  font-size: 10.5px; color: var(--p-text-soft);
}
#app-shell.patient-mode .p-ici-divider::before,
#app-shell.patient-mode .p-ici-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--p-glass-border);
}
#app-shell.patient-mode .p-ici-divider-note {
  background: rgba(217,171,82,.10); border: 1px solid rgba(217,171,82,.28);
  border-radius: 14px; padding: 12px 13px; font-size: 11.5px; line-height: 1.55; color: var(--p-gold-deep);
}

/* ==========================================================================
   Release 16 — O CAMINHO DE SEGURANÇA (SPEC_SEGURANCA_MIC360.md §3).

   NENHUMA COR DE ALARME. Sem vermelho, sem borda grossa, sem sombra dura,
   sem animação de entrada. Urgência visual assusta, e assustar alguém que
   já está mal é o oposto do que este cartão existe para fazer.

   O cartão usa a paleta calma do tema (violeta suave sobre vidro) e
   distingue-se do resto só pelo peso do texto e por uma borda ligeiramente
   mais presente. Se um dia alguém quiser "destacá-lo mais", a resposta
   está aqui: ele já está destacado o suficiente — ele aparece no lugar do
   que ia aparecer, e isso é o destaque.
   ========================================================================== */
#app-shell.patient-mode .p-safety-card {
  background: var(--p-glass-strong);
  border: 1px solid rgba(132,116,173,.30);
  border-radius: var(--p-radius);
  padding: 20px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(90,70,120,.08);
}
#app-shell.patient-mode .p-safety-title {
  margin: 0 0 10px; font-size: 15.5px; font-weight: 700; color: var(--p-text);
  line-height: 1.4;
}
#app-shell.patient-mode .p-safety-body {
  margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--p-text);
}
#app-shell.patient-mode .p-safety-actions {
  display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0;
}
#app-shell.patient-mode .p-safety-primary {
  display: block; width: 100%; text-align: center; cursor: pointer;
  background: var(--p-violet); color: #fff; border: none;
  border-radius: var(--p-radius-sm); padding: 13px 14px;
  font-family: var(--p-font); font-size: 14px; font-weight: 600;
}
#app-shell.patient-mode .p-safety-secondary {
  display: block; width: 100%; text-align: center; cursor: pointer;
  background: transparent; color: var(--p-violet);
  border: 1px solid rgba(132,116,173,.40);
  border-radius: var(--p-radius-sm); padding: 12px 14px;
  font-family: var(--p-font); font-size: 14px; font-weight: 600;
  text-decoration: none;
}
#app-shell.patient-mode .p-safety-details { margin-top: 14px; }
#app-shell.patient-mode .p-safety-note {
  margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--p-text-muted);
}
#app-shell.patient-mode .p-safety-res {
  background: rgba(132,116,173,.07);
  border-radius: var(--p-radius-sm); padding: 13px 14px; margin-bottom: 9px;
}
#app-shell.patient-mode .p-safety-res-name {
  margin: 0 0 3px; font-size: 13.5px; font-weight: 700; color: var(--p-text);
}
#app-shell.patient-mode .p-safety-res-detail {
  margin: 0 0 9px; font-size: 12.5px; line-height: 1.5; color: var(--p-text-muted);
}
/* O telefone é o elemento mais tocável do cartão, de propósito. */
#app-shell.patient-mode .p-safety-call {
  display: inline-block; background: var(--p-violet); color: #fff;
  border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 700;
  text-decoration: none; margin-right: 8px;
}
#app-shell.patient-mode .p-safety-link {
  display: inline-block; color: var(--p-violet); font-size: 13px;
  font-weight: 600; text-decoration: underline; padding: 9px 0;
}
#app-shell.patient-mode .p-safety-always {
  margin: 14px 0 0; font-size: 12px; color: var(--p-text-soft); font-style: italic;
}
/* Fechar tem de ser fácil de encontrar e fácil de acertar. */
#app-shell.patient-mode .p-safety-dismiss {
  display: block; width: 100%; margin-top: 10px; cursor: pointer;
  background: none; border: none; color: var(--p-text-muted);
  font-family: var(--p-font); font-size: 13px; padding: 10px;
}
/* A entrada permanente. Discreta, nunca escondida. */
#app-shell.patient-mode .p-safety-entry {
  display: block; width: 100%; margin: 18px 0 6px; cursor: pointer;
  background: none; border: 1px solid var(--p-glass-border);
  border-radius: var(--p-radius-sm); padding: 12px;
  font-family: var(--p-font); font-size: 12.5px; color: var(--p-text-muted);
}

/* ==========================================================================
   Release 21 — "A Companheira de Jornada" (SPEC_RELEASE_21.md §1).
   Prefixo .pk-* (toolkit). Só o que as classes p-* existentes não cobrem.
   ========================================================================== */
/* Nome técnico discreto ao lado do título do hub. */
.pk-tech-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--p-text-muted); margin-left: 8px; white-space: nowrap; }
/* "Bom momento para você" — linhas de sugestão com motivo. */
.pk-reco-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: none; border: none; border-top: 1px solid var(--p-glass-border); padding: 12px 2px; font-family: var(--p-font); color: var(--p-text); }
.pk-reco-row:first-of-type { border-top: none; }
.pk-reco-ic { flex-shrink: 0; }
.pk-reco-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pk-reco-name { font-weight: 700; font-size: 14px; }
.pk-reco-reason { font-size: 12.5px; color: var(--p-text-muted); line-height: 1.45; }
.pk-reco-chevron { color: var(--p-text-muted); flex-shrink: 0; }
.pk-own-choice { font-size: 12.5px; color: var(--p-text-muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--p-glass-border); }
/* Jornadas Evolutivas. */
.pk-journey-head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: none; border: none; padding: 0; font-family: var(--p-font); color: var(--p-text); }
.pk-journey-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pk-journey-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pk-journey-chip { padding: 2px 8px; font-size: 10.5px; }
.pk-journey-desc { font-size: 12.5px; color: var(--p-text-muted); line-height: 1.45; }
.pk-journey.open .pk-reco-chevron { transform: rotate(90deg); }
.pk-journey-why { margin-top: 10px; padding: 10px 12px; border-radius: var(--p-radius-sm); background: rgba(217,171,82,.08); border: 1px solid rgba(217,171,82,.25); }
.pk-journey-why-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--p-gold-deep); margin-bottom: 3px; }
.pk-journey-why-text { font-size: 12.5px; line-height: 1.5; }
.pk-journey-detail { margin-top: 12px; }
.pk-chain-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--p-text-muted); margin-bottom: 8px; }
.pk-chain-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--p-glass-border); font-size: 13px; }
.pk-chain-n { width: 20px; height: 20px; border-radius: 50%; background: rgba(217,171,82,.16); color: var(--p-gold-deep); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pk-chain-name { flex: 1; }
.pk-chain-min { font-size: 11.5px; color: var(--p-text-muted); }
/* Grelha — a linha "quando utilizar" do cartão de ferramenta. */
.pk-tool-when { font-size: 11.5px; color: var(--p-text-muted); font-style: italic; line-height: 1.4; margin-top: 4px; }
/* A frase que devolve tempo, no rodapé do hub. */
.pk-no-rush { text-align: center; font-size: 12.5px; color: var(--p-text-muted); margin: 18px 0 8px; }
/* O eco "Centelha lembra". */
.pk-echo { border-left: 3px solid rgba(217,171,82,.5); }
.pk-echo-lead { font-size: 13px; color: var(--p-text-muted); margin: 2px 0 8px; line-height: 1.5; }
.pk-echo-quote { font-size: 14px; font-style: italic; line-height: 1.55; margin: 0 0 6px; }
.pk-echo-when { font-size: 11.5px; color: var(--p-text-muted); margin: 0; }
/* Passos "lista": opção escolhida. */
.pk-list-options { flex-direction: row; flex-wrap: wrap; }
.pk-list-options .pk-opt { flex: 0 1 auto; }
.pk-opt.selected { border-color: rgba(217,171,82,.6); background: rgba(217,171,82,.14); color: var(--p-gold-deep); font-weight: 700; }
/* Passo "escala". */
.pk-scale { width: 100%; accent-color: var(--p-gold-deep, #b98d3e); }
.pk-scale-value { text-align: center; font-size: 22px; font-weight: 700; color: var(--p-gold-deep); margin-bottom: 6px; }
/* Resultado narrativo. */
.pk-result-line { font-size: 14px; line-height: 1.6; margin: 8px 0; }
.pk-result-closing { font-size: 13.5px; line-height: 1.6; font-style: italic; color: var(--p-text-muted); margin: 12px 0 4px; padding-top: 10px; border-top: 1px dashed var(--p-glass-border); }
.pk-bridge-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--p-text-muted); margin: 10px 2px; }
/* "Os meus marcos" (capítulo V do Livro, #/p/evolucao). */
.pk-marco { padding: 9px 0; border-top: 1px solid var(--p-glass-border); }
.pk-marco-when { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--p-gold-deep); }
.pk-marco-title { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.pk-marco-reflection { font-size: 12.5px; color: var(--p-text-muted); line-height: 1.5; margin-top: 3px; }

/* ==========================================================================
   "Compreender uma Situação" (posicoes_perceptivas) — experiência dedicada
   (views/patient/compreenderSituacao.js). Reference implementation do
   PADRAO_EXPERIENCIA_FERRAMENTAS_MIC360.md, congelada em 31/07/2026.
   Prefixo pkx- para não colidir com as classes genéricas pk-/p-quiz- que as
   outras três ferramentas do catálogo continuam a usar.
   ========================================================================== */
.pkx-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pkx-back { font-size: 12.5px; color: var(--p-text-muted); cursor: pointer; }
.pkx-phase { font-size: 13px; font-style: italic; color: var(--p-violet-dark, #6c5c93); margin: 0 0 14px; }

.pkx-presence { margin: 2px 0 16px; }
.pkx-presence p {
  margin: 0 0 9px; font-size: 14.5px; line-height: 1.5; color: var(--p-text); font-style: italic;
  opacity: 0; animation: pkx-fadesoft .6s ease forwards;
}
.pkx-presence p:nth-child(1) { animation-delay: .1s; }
.pkx-presence p:nth-child(2) { animation-delay: 1.1s; }
.pkx-presence p:nth-child(3) { animation-delay: 2.1s; }
@keyframes pkx-fadesoft { from { opacity: 0; } to { opacity: 1; } }

.pkx-lead { margin: 0 0 12px; font-size: 13.5px; line-height: 1.68; color: var(--p-text-muted); }
.pkx-lead b { color: var(--p-text); font-weight: 600; }
.pkx-field-label { font-size: 13px; font-weight: 600; color: var(--p-text); margin: 0 0 8px; }
.pkx-field-hint { font-size: 11.5px; color: var(--p-text-soft, #a29dbb); margin: 6px 0 2px; }
.pkx-reassure { font-size: 12.5px; line-height: 1.6; color: var(--p-text-soft, #a29dbb); font-style: italic; margin: 0 0 14px; }

.pkx-textarea { min-height: 88px; margin-bottom: 8px; }

.pkx-exgrid { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 14px; }
.pkx-exchip {
  border: 1px dashed var(--p-glass-border); background: var(--p-glass); color: var(--p-text-muted);
  font-size: 11.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.pkx-exchip:hover { border-color: var(--p-violet, #8474ad); color: var(--p-violet-dark, #6c5c93); }

.pkx-microack { display: none; margin: 4px 0 14px; }
.pkx-microack.show { display: block; }
.pkx-microack p {
  margin: 0 0 4px; font-size: 12.5px; font-style: italic; color: var(--p-violet-dark, #6c5c93);
  opacity: 0; animation: pkx-fadesoft .5s ease forwards;
}
.pkx-microack p:nth-child(2) { animation-delay: .6s; }

.pkx-hidden { display: none !important; }

.pkx-pgrid { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 4px; }
.pkx-pchip {
  border: 1px solid var(--p-glass-border); background: var(--p-glass); color: var(--p-text-muted);
  font-size: 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.pkx-pchip.sel { background: var(--p-violet, #8474ad); color: #fff; border-color: var(--p-violet, #8474ad); }
.pkx-pchip-nope { border-style: dashed; color: var(--p-text-soft, #a29dbb); }
.pkx-pchip-nope.sel { background: var(--p-text-soft, #a29dbb); border-color: var(--p-text-soft, #a29dbb); color: #fff; }

.pkx-centelha {
  display: flex; gap: 11px;
  background: linear-gradient(135deg, rgba(132,116,173,.10), rgba(217,171,82,.08));
  border: 1px solid rgba(132,116,173,.20); border-radius: var(--p-radius); padding: 14px; margin-bottom: 14px;
}
.pkx-orb {
  flex: none; width: 30px; height: 30px; border-radius: 50%; margin-top: 2px;
  background: radial-gradient(circle at 32% 30%, #fff, var(--p-gold-soft) 45%, var(--p-violet, #8474ad) 130%);
  box-shadow: 0 0 16px rgba(217,171,82,.5); animation: pkx-pulse 3.4s ease-in-out infinite;
}
@keyframes pkx-pulse { 0%, 100% { transform: scale(1); opacity: .94; } 50% { transform: scale(1.07); opacity: 1; } }
.pkx-centelha p { margin: 0; font-size: 13px; line-height: 1.58; color: var(--p-text); }
.pkx-centelha p + p { margin-top: 8px; }
/* O wrapper de texto de duas falas (compreenderSituacao.js) é o 2º item flex
   ao lado de .pkx-orb — sem flex:1/min-width:0 ele não estica nem quebra
   linha corretamente (mesma causa raiz do bug de 2 colunas visto no mockup
   v7-v9, aqui evitado só porque o JS já agrupa os <p> num div; reforçado
   aqui por precaução). */
.pkx-centelha > div:not(.pkx-orb) { flex: 1; min-width: 0; }

.pkx-ackline { font-size: 12px; color: var(--p-text-muted); font-style: italic; margin: 0 2px 14px; line-height: 1.55; }

.pkx-breathscreen {
  min-height: 45vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px 8px;
}
.pkx-borb {
  width: 42px; height: 42px; border-radius: 50%; margin-bottom: 20px;
  background: radial-gradient(circle at 32% 30%, #fff, var(--p-gold-soft) 45%, var(--p-violet, #8474ad) 130%);
  box-shadow: 0 0 22px rgba(217,171,82,.55); animation: pkx-pulse 3.4s ease-in-out infinite;
}
.pkx-breathscreen p { margin: 0 0 10px; font-size: 14px; line-height: 1.72; color: var(--p-text); font-style: italic; max-width: 320px; }

.pkx-result-title { font-size: 15.5px; font-weight: 700; color: var(--p-text); margin-bottom: 10px; }
.pkx-result-thanks { font-size: 12.8px; line-height: 1.65; color: var(--p-text-muted); font-style: italic; margin: 0 0 14px; }

.pkx-closewrap { margin-top: 4px; }
.pkx-cl-lead { font-size: 12.5px; color: var(--p-text-muted); margin: 0 0 10px; }
.pkx-closegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.pkx-closeitem {
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--p-glass-border);
  background: var(--p-glass); border-radius: 14px; padding: 11px 6px; cursor: pointer; transition: .15s;
}
.pkx-closeitem svg { width: 18px; height: 18px; stroke: var(--p-violet-dark, #6c5c93); }
.pkx-closeitem span { font-size: 10.3px; color: var(--p-text-muted); line-height: 1.3; text-align: center; }
.pkx-closeitem.sel { background: rgba(132,116,173,.12); border-color: var(--p-violet, #8474ad); }
.pkx-closeitem.sel span { color: var(--p-violet-dark, #6c5c93); font-weight: 600; }
.pkx-closenote { font-size: 11px; color: var(--p-text-soft, #a29dbb); margin: 8px 0 4px; }
.pkx-feelresponse { display: none; margin-top: 10px; }
.pkx-feelresponse.show { display: block; animation: pkx-fadesoft .4s ease; }
.pkx-feelresponse .pkx-centelha { margin-bottom: 0; }
.pkx-writearea { display: none; margin-top: 10px; }
.pkx-writearea.show { display: block; }

/* ==========================================================================
   Release 22 — A PERGUNTA VIVA (views/patient/perguntaViva.js), capítulo III
   do Livro. PRINCIPIO_DA_PERGUNTA_VIVA_MIC360.md.

   Prefixo pv- próprio, como o pkx- da reference implementation, para não
   colidir com as classes genéricas do portal.

   Nota de desenho: a pergunta é a única coisa no ecrã e por isso é o único
   elemento com peso visual. Tudo o resto — transição, rodapé, micro-links —
   é deliberadamente leve. Se um dia algo aqui competir com a pergunta, é
   sinal de que o princípio se está a perder na interface antes de se perder
   no código.
   ========================================================================== */

/* O cabeçalho da app tem três botões flutuantes no canto superior direito
   (✦ da Centelha, sino, sair). "O Que a Vida Me Pergunta" é longo o bastante
   para lhe passar por baixo no telemóvel — apanhado no smoke antes do
   deploy. O limite de largura faz o título quebrar de linha antes de os
   alcançar, em vez de mexer no .p-h1 global (que serve dezenas de views).
   NOTA: o problema de fundo é do cabeçalho, não desta view — qualquer
   título longo o encontra. Fica anotado no backlog. */
.pv-h1 { max-width: calc(100% - 160px); line-height: 1.24; }

/* ---- convite (ecrã 1) ---- */
.pv-invite {
  background: rgba(132, 116, 173, 0.10);
  border-radius: var(--p-radius-sm);
  padding: 15px 17px;
  margin-bottom: 12px;
  font-size: 13.6px;
  line-height: 1.62;
  font-style: italic;
  color: var(--p-violet);
  animation: pkx-fadesoft .5s ease;
}
.pv-card { padding: 14px 15px; }
.pv-textarea {
  width: 100%;
  border: 1px solid var(--p-glass-border);
  border-radius: 11px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.58;
  color: var(--p-text);
  background: var(--p-ink-1);
  resize: vertical;
  min-height: 96px;
}
.pv-textarea:focus { outline: none; border-color: var(--p-gold); box-shadow: var(--p-shadow-gold); }
.pv-error { margin: 10px 0 0; font-size: 12.4px; color: var(--p-danger); }

/* ---- a pergunta (ecrã 2) ---- */
.pv-transition {
  text-align: center;
  font-size: 12.8px;
  font-style: italic;
  color: var(--p-text-muted);
  line-height: 1.6;
  margin: 4px 0 18px;
  animation: pkx-fadesoft .6s ease;
}
.pv-hero {
  background: linear-gradient(135deg, rgba(217, 171, 82, 0.16), rgba(132, 116, 173, 0.13));
  border: 1px solid var(--p-gold-soft);
  border-radius: 22px;
  padding: 26px 22px;
  text-align: center;
  margin-bottom: 14px;
  animation: pkx-fadesoft .8s ease;
}
.pv-hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--p-gold-deep);
  margin-bottom: 14px;
}
.pv-hero-q {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.44;
  color: var(--p-text);
  margin: 0;
}
.pv-hero-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  font-style: italic;
  color: var(--p-text-soft);
}

/* ---- presença (ecrã 3) ---- */
.pv-presence { text-align: center; padding: 22px 6px 6px; animation: pkx-fadesoft .7s ease; }
.pv-orb {
  width: 54px; height: 54px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p-gold-soft), rgba(132, 116, 173, 0.45));
  opacity: .75;
}
.pv-presence-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--p-text);
  margin: 0;
}
.pv-presence-sub {
  margin: 14px 0 0;
  font-size: 12.2px;
  line-height: 1.62;
  color: var(--p-text-muted);
}

/* ---- partilhado ---- */
.pv-microlink {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 11.8px;
  color: var(--p-text-soft);
  text-decoration: underline;
  cursor: pointer;
}
.pv-microlink:hover { color: var(--p-text-muted); }
.pv-back {
  display: block;
  width: 100%;
  margin-top: 18px;
  background: none;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--p-text-muted);
  cursor: pointer;
}

/* ==========================================================================
   Release 23.2 — "Compartilhar meu perfil" (SPEC_RELEASE_23.2.md)
   ========================================================================== */
.p-share-titular {
  background: rgba(132, 116, 173, .06);
  border-radius: 14px;
  padding: 12px 13px;
  margin-bottom: 4px;
  border-bottom: none;
}
.p-share-titular-tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #6b5b93; background: rgba(132, 116, 173, .16);
  padding: 3px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.p-share-pend-chip {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #8a6d2f; background: rgba(201, 168, 90, .2);
  padding: 3px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.p-share-mode-switch {
  display: flex; gap: 4px; background: rgba(63, 58, 82, .07);
  border-radius: 999px; padding: 4px; margin-bottom: 14px;
}
.p-share-mode-switch button {
  flex: 1; border: none; background: transparent; border-radius: 999px;
  padding: 9px 10px; font-size: 13px; font-weight: 700; color: var(--p-text-muted);
  cursor: pointer; font-family: inherit;
}
.p-share-mode-switch button.on { background: #fff; color: var(--p-text); box-shadow: 0 1px 4px rgba(63, 58, 82, .12); }
.p-share-search-input {
  width: 100%; box-sizing: border-box; border: 1.5px solid rgba(63, 58, 82, .16);
  border-radius: 14px; padding: 12px 14px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--p-text);
}
.p-share-search-input:focus { outline: none; border-color: var(--p-violet); }
.p-share-result {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  border: 1px solid rgba(63, 58, 82, .1); background: #fff; border-radius: 14px;
  padding: 11px 13px; margin-top: 8px; cursor: pointer; font-family: inherit; color: var(--p-text);
}
.p-share-result:hover { border-color: var(--p-violet); }
.p-share-result-flag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--p-text-muted); background: rgba(63, 58, 82, .08);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.p-share-already {
  border: 1.5px dashed rgba(96, 140, 100, .5); background: rgba(96, 140, 100, .07);
  border-radius: 14px; padding: 11px 13px; margin-top: 8px; color: #3f5c43;
}
.p-share-search-empty {
  font-size: 12.5px; line-height: 1.6; color: var(--p-text-muted);
  background: rgba(63, 58, 82, .05); border-radius: 14px; padding: 12px 13px; margin-top: 8px;
}
.p-share-step-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--p-gold-deep); margin-bottom: 8px;
}
.p-share-send { width: 100%; }
.p-share-email-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.p-share-email-row input {
  flex: 1; min-width: 170px; box-sizing: border-box; border: 1.5px solid rgba(63, 58, 82, .16);
  border-radius: 12px; padding: 9px 12px; font-size: 13px; font-family: inherit; background: #fff;
}
.p-share-email-row input:focus { outline: none; border-color: var(--p-violet); }
.p-share-preview {
  margin-top: 11px; border-radius: 14px; border: 1px solid rgba(63, 58, 82, .1);
  background: rgba(63, 58, 82, .03); padding: 12px 13px;
}
.p-share-preview-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--p-text-muted); display: block; margin-bottom: 6px;
}
.p-share-preview pre {
  margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit;
  font-size: 12px; line-height: 1.6; color: var(--p-text-muted);
}
.p-share-codes-note {
  background: rgba(132, 116, 173, .05); border: 1px solid rgba(132, 116, 173, .16);
  border-radius: 14px; padding: 4px 13px; font-size: 12.5px; line-height: 1.62;
  color: var(--p-text-muted); margin-bottom: 12px;
}
.p-share-codes-note p { margin: 9px 0; }
.p-share-codes-note b { color: var(--p-text); }

/* Hotfix 23.2.1 — a pílula "Incluir sessões" ganha um quadrado de marcação
   explícito: o input nativo é display:none (app.css) e o estado só pela cor
   de fundo passava despercebido. */
.p-share-sessions-pill { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.p-share-sessions-mark {
  width: 19px; height: 19px; flex: 0 0 19px; border-radius: 6px;
  border: 2px solid rgba(63, 58, 82, .35); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: transparent; line-height: 1;
}
.p-share-sessions-mark::after { content: "✓"; }
.p-share-sessions-pill.checked .p-share-sessions-mark {
  background: var(--p-violet); border-color: var(--p-violet); color: #fff;
}

/* Release 23.3 — chip do titular com acesso revogado ("só o que ele mesmo registrou") */
.p-share-chip-limited { background: rgba(63, 58, 82, .1); color: #5c5470; font-weight: 700; }


/* ==========================================================================
   Release 23.4.2 — o mesmo sinal de app.css, para o portal do paciente

   Ver a nota longa no fim de public/css/app.css. Em resumo: o modo escuro do
   Samsung Internet só desiste de inverter a página se encontrar regras
   `prefers-color-scheme: dark`. Os valores repetem os do :root acima de
   propósito — a área do paciente tem um só esquema, o creme sobre o qual a
   Cor de Território foi medida.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --p-ink-1: #faf4e8;
    --p-ink-2: #f6ecdb;
    --p-ink-3: #fbf0da;
    --p-glass: #ffffff;
    --p-glass-strong: #fdfaf3;
    --p-text: #3f3a52;
    --p-text-muted: #736e87;  /* 23.9.0 — igual ao :root, ver acima */
    --p-text-soft: #a29dbb;
  }
}

/* --------------------------------------------------------------------------
   23.10.13 — "A Minha Árvore" (#/p/livro/arvore).
   Lugar de presença e memória: a árvore é a protagonista, os alvos de toque
   vivem em HTML por cima do SVG (44×44 pt reais, foco de teclado) e todo o
   movimento morre com `prefers-reduced-motion`.
   -------------------------------------------------------------------------- */
.p-arv-head { text-align: center; margin: 2px 0 4px; }
.p-arv-eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--p-text-soft); margin-bottom: 6px;
}
.p-arv-title {
  font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 600;
  color: var(--p-text); margin: 0;
}
.p-arv-singular { font-size: 13px; font-style: italic; color: var(--p-text-muted); margin: 6px 0 0; }
.p-arv-season {
  display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; color: var(--p-text-muted);
  background: var(--p-glass-strong); border: 1px solid var(--p-glass-border);
}
.p-arv-return {
  text-align: center; font-size: 13.5px; color: var(--p-text-muted);
  margin: 14px auto 0; max-width: 30em;
}

.p-arv-stage { display: flex; justify-content: center; margin: 10px 0 4px; }
.p-arv-tree { width: 100%; display: flex; justify-content: center; }
.p-arv-svg { position: relative; width: 300px; max-width: 86vw; margin-bottom: 16px; }
.p-arv-svg svg { width: 100%; height: auto; display: block; overflow: visible; }
.p-arv-skeleton {
  height: 320px; margin: 18px auto; max-width: 300px; border-radius: 24px;
  background: linear-gradient(180deg, var(--p-ink-3) 0%, var(--p-ink-2) 100%);
  opacity: .55;
}

/* Alvo de toque: o quadrado de 44 pt é invisível e centrado na folha. */
.p-arv-hotspot {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  padding: 0; border: 0; border-radius: 50%; background: transparent;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.p-arv-hotspot:focus-visible {
  outline: 2px solid var(--p-violet); outline-offset: 2px; background: rgba(132, 116, 173, .10);
}
@media (hover: hover) {
  .p-arv-hotspot:hover { background: rgba(217, 171, 82, .12); }
}
.lt-leaf-today { filter: drop-shadow(0 0 3px rgba(231, 198, 127, .95)); }

/* Partículas da estação — decorativas, nunca lidas por leitor de ecrã. */
.lt-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lt-particles span {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; opacity: 0;
  animation-iteration-count: infinite; animation-timing-function: linear;
}
.lt-particles-fall span { top: -6px; animation-name: p-arv-fall; }
.lt-particles-snow span { top: -6px; animation-name: p-arv-fall; width: 4px; height: 4px; }
.lt-particles-up span { bottom: -6px; animation-name: p-arv-rise; }
.lt-particles-light span { bottom: 20%; animation-name: p-arv-glimmer; width: 3px; height: 3px; }
@keyframes p-arv-fall {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .75; }
  100% { transform: translateY(330px) translateX(18px); opacity: 0; }
}
@keyframes p-arv-rise {
  0% { transform: translateY(0); opacity: 0; }
  18% { opacity: .7; }
  100% { transform: translateY(-300px); opacity: 0; }
}
@keyframes p-arv-glimmer {
  0%, 100% { opacity: 0; transform: scale(.7); }
  50% { opacity: .8; transform: scale(1.25); }
}

.p-arv-hint {
  text-align: center; font-size: 13px; color: var(--p-text-muted);
  margin: 6px auto 0; max-width: 28em; line-height: 1.55;
}

.p-arv-pills { text-align: center; margin-top: 22px; }
.p-arv-pills-label {
  display: block; font-size: 11.5px; letter-spacing: .04em;
  color: var(--p-text-muted); margin-bottom: 10px;
}
.p-arv-pills-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.p-arv-pill {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; color: var(--p-text-muted);
  background: var(--p-glass); border: 1px solid var(--p-glass-border);
}
.p-arv-pill.on { color: var(--p-gold-deep); border-color: var(--p-gold-soft); background: var(--p-ink-3); }
.p-arv-pill:focus-visible { outline: 2px solid var(--p-violet); outline-offset: 2px; }
.p-arv-pills-note {
  font-size: 12px; font-style: italic; color: var(--p-text-soft);
  margin: 11px auto 0; max-width: 30em;
}

.p-arv-read { margin-top: 26px; text-align: center; }
.p-arv-read-kicker {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--p-text-soft); margin: 0 0 8px; font-weight: 500;
}
.p-arv-read-text {
  font-size: 14.5px; line-height: 1.7; color: var(--p-text);
  margin: 0 auto; max-width: 32em;
}
.p-arv-read-close {
  font-size: 13px; font-style: italic; color: var(--p-text-muted);
  margin: 10px auto 0; max-width: 32em;
}

.p-arv-foot { margin-top: 30px; text-align: center; }
.p-arv-foot-line { font-size: 13px; font-style: italic; color: var(--p-text-soft); margin: 0 0 10px; }
.p-arv-foot-link {
  min-height: 44px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  font-size: 13.5px; color: var(--p-gold-deep); text-decoration: underline;
  text-underline-offset: 3px;
}
.p-arv-foot-link:focus-visible { outline: 2px solid var(--p-violet); outline-offset: 2px; }
.p-arv-offline { display: block; margin-top: 8px; font-size: 12px; }

/* Sheet de memória (§3.6) — uma ação: Fechar. */
.p-arv-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(63, 58, 82, .34); z-index: 1200;
}
.p-arv-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(520px, 100%); z-index: 1201; box-sizing: border-box;
  padding: 14px 22px 26px; text-align: center;
  background: var(--p-glass-strong); border: 1px solid var(--p-glass-border);
  border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 34px rgba(63, 58, 82, .16);
}
.p-arv-sheet-grip {
  display: block; width: 42px; height: 4px; border-radius: 2px;
  background: var(--p-glass-border); margin: 0 auto 14px;
}
.p-arv-sheet-kind {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--p-text-soft);
}
.p-arv-sheet-title {
  font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 600;
  color: var(--p-text); margin: 6px 0 10px;
}
.p-arv-sheet-quote { font-size: 15px; line-height: 1.65; color: var(--p-text); margin: 0 0 12px; }
.p-arv-sheet-meta { display: block; font-size: 12px; color: var(--p-text-muted); }
.p-arv-sheet-close {
  min-height: 44px; margin-top: 16px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  font-size: 14px; color: var(--p-text); background: var(--p-glass); border: 1px solid var(--p-glass-border);
}
.p-arv-sheet-close:focus-visible { outline: 2px solid var(--p-violet); outline-offset: 2px; }

/* §9 — sem movimento nenhum quando o sistema o pede. A respiração já é
   desligada em JS (livingTree.js); aqui morrem as partículas e o brilho. */
@media (prefers-reduced-motion: reduce) {
  .lt-particles { display: none; }
  .lt-particles span { animation: none; }
  .lt-leaf-today { filter: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   23.10.29 · O LIVRO POR ESTAÇÕES
   Arquitetura congelada pela titular a 18/08/2026 (ARQUITETURA_LIVRO_ESTACOES.md).
   Herda o registo do Território C (serif Georgia, hairlines #ece1c8, sem
   caixas) e acrescenta: eyebrow À ESQUERDA no índice — pedido dela, para o
   Livro se ler como as páginas de estação —, o par das duas margens ligado
   por um fio, a linha de confluência e o realce discreto da estação 3.
   Nenhuma cor nova: dourado do território + lavanda de apoio, ambos já no DS.
   ══════════════════════════════════════════════════════════════════════════ */

/* Eyebrow comum ao índice e às estações — alinhado à esquerda. */
.p-est-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 20px 0 6px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--p-gold-deep);
}
.p-est-eyebrow-ic {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #f5e6c8, #e8d4a0);
  display: inline-flex; align-items: center; justify-content: center; color: var(--p-gold-deep);
}
.p-livro-hero-title {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px;
  line-height: 1.25; color: var(--p-text); margin: 0 0 4px;
}

/* Rótulos de grupo do índice */
.p-livro-group {
  margin: 22px 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--p-text-soft); font-weight: 700;
}
.p-livro-group small {
  display: block; margin-top: 4px; font-size: 12px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--p-text-soft); font-style: italic; max-width: 44ch;
}

/* A pergunta narrativa de cada estação */
.p-livro-item-q {
  display: block; margin-top: 5px; font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-size: 13px; color: #7b62a8;
}
.p-livro-item.prologue .p-livro-item-q { color: var(--p-gold-deep); }

/* As duas margens: um fio à esquerda liga Quem Sou e O Que Me Move */
.p-livro-pair { position: relative; padding-left: 12px; border-left: 2px solid #ded3ee; }
.p-livro-pair .p-livro-item:first-of-type { border-top: none; }

/* A confluência */
.p-livro-confluence {
  display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 10px 0 6px;
  text-align: center;
}
.p-livro-conf-line { width: 2px; height: 16px; background: #ded3ee; border-radius: 2px; }
.p-livro-conf-txt {
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 13px;
  color: #7b62a8; max-width: 34ch;
}

/* A estação 3 — realce discreto, sem selo e sem marca: o ICI-360 é motor
   invisível (regra 8 da arquitetura), nunca aparece escrito nesta tela. */
.p-livro-item.heart { background: linear-gradient(135deg, #fdfbff 0%, #f7f3fb 100%); border-radius: 14px; padding-left: 10px; }
.p-livro-item.heart .p-livro-rn { color: #7b62a8; }
.p-livro-item.quiet .p-livro-item-title { font-size: 14.5px; font-weight: 500; color: var(--p-text-soft); }
.p-livro-closing {
  font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.45;
  color: var(--p-text); text-align: center; max-width: 26ch; margin: 26px auto 0;
}

/* ── Páginas de estação ─────────────────────────────────────────────────── */
.p-est-title {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 30px;
  line-height: 1.16; color: var(--p-text); margin: 0 0 10px;
}
.p-est-opening p {
  font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.62;
  color: var(--p-text); margin-bottom: 14px;
}
.p-est-opening .p-est-open-last { color: var(--p-gold-deep); }
.p-est-rule { height: 1px; background: #ece1c8; margin: 24px 0; }
.p-est-sec {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: var(--p-text-soft); margin: 0 0 10px;
}
.p-est-piece { display: flex; align-items: flex-start; gap: 12px; padding: 14px 2px; border-bottom: 1px solid #ece1c8; }
.p-est-piece:first-of-type { border-top: 1px solid #ece1c8; }
.p-est-piece.is-link { cursor: pointer; }
.p-est-piece.is-link:hover .p-est-piece-title { color: var(--p-gold-deep); }
.p-est-piece-body { flex: 1; min-width: 0; }
.p-est-piece-title { font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; color: var(--p-text); }
.p-est-piece-note { font-size: 13px; color: var(--p-text-soft); margin-top: 3px; line-height: 1.5; }
.p-est-piece-meta { font-size: 11.5px; color: var(--p-text-soft); margin-top: 5px; font-style: italic; }
.p-est-piece-go { color: var(--p-text-soft); display: flex; align-items: center; margin-top: 2px; }

/* O convite — a resposta ao vazio. Nunca "complete esta estação". */
.p-est-invite { padding: 18px 2px 4px; }
.p-est-invite p {
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 15px;
  line-height: 1.6; color: var(--p-text-soft); max-width: 40ch;
}
.p-est-invite-cta {
  margin-top: 12px; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: #2a2218; background: linear-gradient(145deg, #e8c878, #c9a04a); border: none;
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
}
.p-est-invite-cta:hover { filter: brightness(1.04); }

/* «De onde veio esta percepção?» */
.p-est-origin { margin-top: 24px; border-top: 1px solid #ece1c8; border-bottom: 1px solid #ece1c8; }
.p-est-origin summary {
  cursor: pointer; list-style: none; padding: 15px 2px; font-size: 14px; font-weight: 700;
  color: var(--p-gold-deep); display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.p-est-origin summary::-webkit-details-marker { display: none; }
.p-est-caret { display: flex; transition: transform .2s ease; opacity: .7; }
.p-est-origin[open] .p-est-caret { transform: rotate(90deg); }
.p-est-origin-in { padding: 0 2px 14px; }
.p-est-src { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #efe6d6; font-size: 13.5px; }
.p-est-src:last-of-type { border-bottom: none; }
.p-est-src-name { color: var(--p-text); }
.p-est-src-val { color: var(--p-text-soft); font-size: 12.5px; text-align: right; }
.p-est-caveat { margin-top: 12px; font-size: 12.5px; color: var(--p-text-soft); line-height: 1.55; font-style: italic; }
.p-est-caveat-loose { margin-top: 20px; }

/* A regra da estação 3, visível — é o que a impede de virar painel. */
.p-est-law { margin-top: 24px; border-left: 2px solid #ded3ee; padding: 4px 0 4px 14px; }
.p-est-law h4 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7b62a8; margin-bottom: 8px; }
.p-est-law p { font-size: 13.5px; color: var(--p-text-soft); line-height: 1.6; margin-bottom: 8px; }
.p-est-law p:last-child { margin-bottom: 0; }

.p-est-answers { margin-top: 26px; text-align: center; }
.p-est-answers small {
  display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--p-text-soft); margin-bottom: 6px;
}
.p-est-answers span { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 15px; color: #7b62a8; }
.p-est-hint { font-size: 12.5px; font-style: italic; color: var(--p-text-soft); margin: -4px 0 12px; }

/* ══════════ 23.10.29 · O LIVRO — cabeçalho de território, árvore e envio ══════════
   Pedido da titular a olhar para a produção: «O seu livro» sobe para cima, no
   MESMO cabeçalho da Bússola e do Caminho (símbolo + sobrancelha + título +
   lede), o nome logo abaixo e a árvore a seguir. O hero centrado saiu.
   ═══════════════════════════════════════════════════════════════════════════ */
.p-livro-terr { display: flex; align-items: flex-start; gap: 15px; margin: 6px 0 16px; }
.p-livro-terr-sym { width: 56px; height: 56px; flex: 0 0 56px; margin-top: 2px; color: var(--p-gold-deep); display: flex; }
.p-livro-terr-sym svg { width: 56px; height: 56px; }
.p-livro-terr-txt { flex: 1; min-width: 0; }
.p-livro-terr-eyebrow { margin: 5px 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--p-gold-deep); }
.p-livro-terr-title { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: 27px; line-height: 1.1; color: #43213f; letter-spacing: -.01em; }
.p-livro-terr-lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 46ch; }
@media (max-width: 520px) {
  .p-livro-terr-sym, .p-livro-terr-sym svg { width: 44px; height: 44px; }
  .p-livro-terr-sym { flex: 0 0 44px; }
  .p-livro-terr-title { font-size: 23px; }
}

.p-livro-who { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.p-livro-who-mono { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-family: Georgia, "Times New Roman", serif; font-size: 14px; font-weight: 600;
  background: radial-gradient(circle at 34% 28%, var(--p-gold-soft), var(--p-gold-deep)); }
.p-livro-who-name { font-family: Georgia, "Times New Roman", serif; font-size: 17px; color: var(--p-text); }
.p-livro-who-meta { font-size: 12.5px; font-style: italic; color: var(--p-text-soft); margin-top: 1px; }

.p-livro-art { display: block; width: 100%; max-width: 600px; height: 150px; padding: 0; margin: 0 0 6px;
  position: relative; border: 1px solid rgba(234, 223, 201, .8); border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #faf6ee, #f3ead8); box-shadow: 0 10px 30px rgba(90, 70, 100, .08);
  cursor: pointer; }
.p-livro-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.p-livro-art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(251, 246, 236, .68) 100%); }
.p-livro-art-cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; padding: 5px 13px; border-radius: 999px;
  background: rgba(251, 246, 236, .9); font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 700; color: var(--p-gold-deep); box-shadow: 0 2px 8px rgba(90, 70, 100, .08); }
@media (max-width: 520px) { .p-livro-art { height: 132px; } }

.p-livro-send { margin: 26px 0 0; padding: 18px 18px 16px; border: 1px solid var(--p-border, #eadfc9);
  border-radius: 16px; background: linear-gradient(135deg, #fdfaf3, #f9f4e8); }
.p-livro-send b { display: block; font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: 17px; color: var(--p-text); margin-bottom: 5px; }
.p-livro-send p { font-size: 13px; line-height: 1.55; color: var(--p-text-soft); max-width: 46ch; margin-bottom: 13px; }
.p-livro-send-cta { font-family: inherit; font-size: 13.5px; font-weight: 700; color: #2a2218; border: none;
  cursor: pointer; background: linear-gradient(145deg, #e8c878, #c9a04a); border-radius: 999px; padding: 11px 22px;
  box-shadow: 0 4px 14px rgba(185, 141, 62, .22); }
.p-livro-send-cta:disabled { opacity: .6; cursor: default; }
.p-livro-send-note { display: block; margin-top: 10px; font-size: 11.5px; color: var(--p-text-soft); }

/* 23.10.24 — o Livro ganha uma coluna própria (760px). O encosto ao menu
   deixou de ser exclusivo desta tela na 23.10.29 (ver hoje.css): o que fica
   aqui é só a LARGURA, que é maior do que a base por causa da ilustração. */
@media (min-width: 1024px) {
  #app-shell.patient-mode.livro-view:not(.no-chrome) main#view {
    max-width: 760px; margin-left: 0; margin-right: 0; padding-left: 28px; padding-right: 28px;
  }
}

/* 23.10.29 — Prólogo e Árvore no mesmo registo do resto do Livro.
   O kicker central do Prólogo e o «Capítulo II» da Árvore eram os dois
   últimos sítios onde o Livro falava outra língua visual: agora usam o
   eyebrow das estações (à esquerda, com o ícone) e o texto acompanha. */
.p-prologo-orb { margin-left: 0; margin-right: auto; }
.p-prologo-body { max-width: 46ch; margin: 0; text-align: left; }
.p-prologo-line { text-align: left; }
.p-prologo-sig { text-align: left; }
.p-arv-head { text-align: left; }
.p-arv-title { font-weight: 400; }
.p-arv-singular { max-width: 46ch; }
.p-arv-return { text-align: left; margin-left: 0; }
/* 23.10.29 — a narrativa da estação, escrita pelo servidor (livroBook). */
.p-est-narrative { font-size: 14.5px; line-height: 1.65; color: var(--p-text-soft); margin: 0 0 14px; }
/* 23.10.29 — o Prólogo com a mesma cabeça da Árvore: eyebrow, título, frase. */
.p-prologo-orb { margin-top: 14px; }

/* ══════════ 23.10.30 · O PERFIL — cabeçalho de território ══════════
   Pedido da titular: «colocar o perfil no padrão das outras páginas como
   Bússola, Caminho, Livro». Mesma anatomia (símbolo 56px + sobrancelha +
   título + frase), na cor do território do Perfil (§3.2 da MEC).
   ═══════════════════════════════════════════════════════════════════ */
.p-perf-terr { display: flex; align-items: flex-start; gap: 15px; margin: 6px 0 16px; }
.p-perf-terr-sym { width: 56px; height: 56px; flex: 0 0 56px; margin-top: 2px;
  color: var(--t-perfil-accent, #6b6270); display: flex; }
.p-perf-terr-sym svg { width: 56px; height: 56px; }
.p-perf-terr-txt { flex: 1; min-width: 0; }
.p-perf-terr-eyebrow { margin: 5px 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--t-perfil-text, #6b6270); }
.p-perf-terr-title { margin: 0 0 9px; font-family: var(--mec-serif, Georgia, "Times New Roman", serif);
  font-weight: 400; font-size: 27px; line-height: 1.1; color: #43213f; letter-spacing: -.01em; }
.p-perf-terr-lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 46ch; }
@media (max-width: 520px) {
  .p-perf-terr-sym, .p-perf-terr-sym svg { width: 44px; height: 44px; }
  .p-perf-terr-sym { flex: 0 0 44px; }
  .p-perf-terr-title { font-size: 23px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   23.10.29 · O ORÁCULO — cabeçalho de território e as quatro energias do dia
   -------------------------------------------------------------------------
   Bloco NOVO, acrescentado no fim do ficheiro de propósito: outra sessão pode
   estar a editar patient.css ao mesmo tempo, e um bloco no fim não colide com
   regras existentes.

   O cabeçalho é o mesmo padrão da Bússola (.bus-head) e do Caminho
   (.cam-head), e o mesmo que o Livro adotou na 23.10.24 (.p-livro-terr) —
   símbolo de 56px à esquerda, sobrancelha, título em pergunta, lede. Fica
   aqui a duplicação consciente: quando as três famílias convergirem num só
   `.p-terr`, estas regras saem inteiras. Não convergiram já para não mexer em
   telas que estão em produção e a ser editadas noutra frente.

   Os dois rótulos de grupo são o coração da tela: um diz «você tira», o outro
   «o dia traz». A etiqueta lavanda existe para essa distinção — não é enfeite.
   ══════════════════════════════════════════════════════════════════════════ */

.p-ora-wrap { position: relative; }

/* O ORNAMENTO NÃO ENTROU nesta release, e a razão fica escrita porque é a
   mesma que vai voltar: a coluna do portal é de 520px (`--p-max-w`) em todas
   as larguras — só o Hoje (23.10.21) e o Livro (23.10.24) a alargam. Uma peça
   no canto rouba metade da largura à pergunta, e a prova visual mediu-o: com
   ornamento, o título partia-se em quatro linhas a 1280. A `oraculo.webp`
   fica no repositório à espera de o Oráculo herdar a coluna larga. */

.p-ora-terr {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: 15px;
  margin: 6px 0 16px;
}
.p-ora-terr-sym {
  width: 56px; height: 56px; flex: 0 0 56px; margin-top: 2px;
  color: var(--t-oraculo-accent, #5f3a72); display: flex;
}
.p-ora-terr-sym svg { width: 56px; height: 56px; }
.p-ora-terr-txt { flex: 1; min-width: 0; }
.p-ora-terr-eyebrow {
  margin: 5px 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--t-oraculo-accent, #5f3a72);
}
.p-ora-terr-title {
  margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: 27px; line-height: 1.1; color: #43213f; letter-spacing: -.01em;
}
.p-ora-terr-lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 46ch; }
@media (max-width: 520px) {
  .p-ora-terr-sym, .p-ora-terr-sym svg { width: 44px; height: 44px; }
  .p-ora-terr-sym { flex: 0 0 44px; }
  .p-ora-terr-title { font-size: 23px; }
}

/* ── rótulos de grupo ─────────────────────────────────────────────────── */
.p-ora-grp { position: relative; z-index: 2; margin: 24px 0 2px; }
.p-ora-grp:first-child { margin-top: 8px; }
.p-ora-grp-l {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--p-gold-deep);
}
.p-ora-grp-tag {
  font-size: 10.5px; letter-spacing: .02em; text-transform: none; font-weight: 700;
  background: rgba(132,116,173,.10); border: 1px solid rgba(132,116,173,.26);
  color: var(--p-violet); border-radius: 999px; padding: 2px 9px;
}
.p-ora-grp-sub {
  margin: 5px 0 0; font-size: 12.5px; line-height: 1.55;
  color: var(--p-text-soft); max-width: 46ch;
}

/* ── os dois cartões do dia (anjo, kin) ───────────────────────────────── */
.p-ora-day { background: linear-gradient(160deg, #fdfaf3, #fbf5ea); }
.p-ora-day-chip {
  background: rgba(132,116,173,.10); border-color: rgba(132,116,173,.26);
  color: var(--p-violet); flex-shrink: 0;
}
.p-ora-day-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.p-ora-day-txt { flex: 1; min-width: 0; }
.p-ora-day-lbl {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--p-text-soft); margin-bottom: 3px;
}
.p-ora-day-val { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--p-text); }
.p-ora-day-sub { font-size: 12.5px; line-height: 1.55; color: var(--p-text-muted); margin-top: 5px; }

/* As três letras hebraicas do anjo. `lang`/`dir` vêm no HTML — as pessoas
   usam-nas para meditar e a ordem importa. */
.p-ora-heb {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 1px solid rgba(217,171,82,.4); border-radius: 14px;
  padding: 8px 12px; min-width: 76px;
}
.p-ora-heb-l { font-size: 26px; line-height: 1; color: var(--p-gold-deep); font-family: Georgia, serif; }
.p-ora-heb-t {
  font-size: 9.5px; letter-spacing: .05em; color: var(--p-text-soft);
  text-transform: uppercase; font-weight: 700; text-align: center;
}

.p-ora-kin-glyph {
  flex: 0 0 auto; background: #fff; border: 1px solid var(--p-glass-border);
  border-radius: 14px; padding: 6px; display: flex;
}

.p-ora-phrase {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 10px 13px; border-radius: 12px;
  background: rgba(217,171,82,.09); border: 1px solid rgba(217,171,82,.3);
  font-family: Georgia, "Times New Roman", serif; font-size: 15px; color: #43213f;
}
.p-ora-phrase svg { color: var(--p-gold-deep); flex: 0 0 13px; }

.p-ora-tone {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  padding: 6px 12px; border-radius: 999px; background: #fff;
  border: 1px solid var(--p-glass-border); font-size: 12px; color: var(--p-text-muted);
}
.p-ora-tone svg { color: var(--p-violet); flex: 0 0 13px; }
.p-ora-tone b { color: var(--p-text); font-weight: 700; }

.p-ora-src { font-size: 11px; line-height: 1.5; color: var(--p-text-soft); margin-top: 10px; }

/* Nota do link partilhado — diz que o link leva o código dela. */
.pg-share-note {
  margin-top: 10px; font-size: 11px; line-height: 1.5; color: var(--p-text-soft);
}

/* ══════════ 23.10.31 · O PERFIL — duas colunas no desktop ══════════
   Pedido da titular ao ver a 23.10.30 em produção: "tem muito espaço vazio"
   → mock aprovado (`mockup-perfil-duas-colunas-v1.html`, 18/08). A coluna de
   520px sobrava contra uma tela larga; ganha a mesma exceção do Hoje/Livro
   (ver .hoje-view/.livro-view) — só que em vez de alargar UMA coluna, o
   Perfil SPLITA em duas: principal (quem a pessoa é) + lateral (conta e
   ações). 1080 = 664 (principal) + 28 (vão) + 388 (lateral) — mesma família
   de largura que o Hoje (1060) e o Livro (760).
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  #app-shell.patient-mode.perfil-view:not(.no-chrome) main#view {
    max-width: 1080px; margin-left: 0; margin-right: 0; padding-left: 28px; padding-right: 28px;
  }
}
.p-perf-cols { display: grid; grid-template-columns: 1fr; gap: 0; align-items: start; }
.p-perf-main, .p-perf-side { min-width: 0; }
@media (min-width: 1024px) {
  .p-perf-cols { grid-template-columns: 1fr 388px; gap: 28px; }
}

/* Faixa "Torne-se profissional" — esticada por baixo das duas colunas em vez
   de um cartão estreito empilhado (proposta do mock; ficava escondida na
   lateral). EMPILHADA por padrão (mobile-first, como o resto da página) —
   só deita na horizontal quando o container tem mesmo a largura das duas
   colunas (.perfil-view a partir de 1024px). Sem isto ficava em linha desde
   os 700px, mas entre 521 e 1023 o Perfil continua com UMA coluna de 520px
   (a exceção só liga a partir de 1024) e a faixa ficava espremida — medido
   com a titular a olhar para uma largura "estreita mas não é telemóvel". */
.p-perf-cta { display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  gap: 12px; padding: 20px 22px; border-radius: 22px;
  background: linear-gradient(120deg, #fffdf9 0%, #fdf8f0 55%, #f7f0f6 100%);
  box-shadow: var(--p-shadow-glass); margin: 0 0 14px; }
.p-perf-cta .ic { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px; display: flex;
  align-items: center; justify-content: center; background: var(--p-gold-soft); color: var(--p-gold-deep); }
.p-perf-cta-txt { flex: 1; min-width: 0; }
.p-perf-cta-txt h4 { margin: 0 0 3px; font-family: var(--mec-serif); font-weight: 400; font-size: 17px; color: #43213f; }
.p-perf-cta-txt p { margin: 0; font-size: 12.5px; color: var(--p-text-muted); }
.p-perf-cta .p-btn { width: 100%; }
@media (min-width: 1024px) {
  #app-shell.patient-mode.perfil-view:not(.no-chrome) .p-perf-cta {
    flex-direction: row; align-items: center; text-align: left; gap: 18px;
  }
  #app-shell.patient-mode.perfil-view:not(.no-chrome) .p-perf-cta .p-btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
}
/* ══════════ 23.10.36 · O PERFIL — "Acompanhar" de largura inteira ══════════
   Pedido da titular ao ver a 23.10.35 em produção: "Acompanhar pode ficar
   acima da área profissional, pegando as duas colunas". O cartão sai da
   coluna lateral (ver .p-perf-side) e passa a faixa cheia, logo antes da
   faixa "Torne-se profissional".

   Só mudar a largura não bastava: os 5 atalhos são linhas rótulo↔seta, e a
   1080px a seta ficava a ~900px do rótulo — uma linha esticada e vazia, o
   mesmo defeito que motivou as duas colunas. Por isso, e SÓ nesta faixa (a
   `.p-menu-list` é partilhada com outras telas), os atalhos passam a uma
   grelha de 3 colunas: cada um fica com uma largura de leitura normal e a
   faixa fica baixa em vez de alta.

   Sem separadores na grelha — uma linha por baixo de cada célula leria como
   tabela, e a regra `:last-child` que apaga a última não funciona quando as
   células mudam de linha. O respiro entre colunas + o realce no rato bastam,
   e assim não há nada preso ao número de atalhos (hoje 5).
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  #app-shell.patient-mode.perfil-view:not(.no-chrome) .p-perf-follow .p-menu-list {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 26px; row-gap: 2px;
  }
  #app-shell.patient-mode.perfil-view:not(.no-chrome) .p-perf-follow .p-menu-item {
    border-bottom: none; border-radius: 12px; padding: 12px 12px;
    transition: background-color .15s ease, opacity .15s ease;
  }
  #app-shell.patient-mode.perfil-view:not(.no-chrome) .p-perf-follow .p-menu-item:hover {
    background: rgba(255, 255, 255, .55); opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   23.10.37 · O ORÁCULO EM DUAS COLUNAS NO DESKTOP
   ══════════════════════════════════════════════════════════════════════════
   Pedido da titular: "linha 1 as cartas que tira lado a lado, linha 2 anjo e
   energia lado a lado e depois a 3 só com a dica" — e, no acerto seguinte,
   "deixe os quadros do mesmo tamanho".

   A primeira proposta era por COLUNAS (cartas à esquerda, energias à direita).
   Foi descartada: a coluna das cartas mede ~1100px e a das energias ~530px,
   portanto sobravam ~575px de vazio no canto inferior direito. Por LINHAS não
   sobra nada — cada linha fecha em si mesma — e a página fica 176px mais
   curta. O rótulo do grupo atravessa as duas colunas, o que faz dele o título
   de facto do par, em vez de um rótulo espremido no topo de uma coluna.

   Isto obriga o Oráculo a herdar a coluna larga: dois cartões não cabem nos
   520px de `--p-max-w`. É a decisão que ficou aberta na SPEC 23.10.24 §1 e
   que a SPEC 23.10.32 registou como pendente. Reusa-se o 1060 do Hoje.

   Abaixo dos 1024px NADA muda: sem grelha, uma coluna, na ordem do DOM —
   exatamente a tela de hoje.
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) main#view {
    max-width: 1060px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 28px;
    padding-right: 28px;
  }

  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 26px;
    row-gap: 18px;
    /* stretch (e não start) porque a titular pediu os quadros do mesmo
       tamanho: Carta Vibracional alinhada com Tarot, Anjo com Energia. */
    align-items: stretch;
  }

  /* Rótulos de grupo, dica, aviso e CTA atravessam a grelha inteira. */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .p-ora-full {
    grid-column: 1 / -1;
  }

  /* O primeiro rótulo é o topo da tela: já não precisa do ar de separação. */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome)
    .p-ora-grid > .p-ora-full:first-child > .p-ora-grp {
    margin-top: 4px;
  }

  /* O cartão preenche a célula; o respiro entre linhas é do row-gap, não da
     margem de cada cartão (senão as duas somam-se e a linha desalinha). */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .p-card {
    height: 100%;
    margin-bottom: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   23.10.40 · O DESCOBRIR — cabeçalho de território, faixas em grelha e as
   páginas «Ver todas»
   --------------------------------------------------------------------------
   Bloco NOVO no fim do ficheiro, de propósito: outra sessão pode estar a
   editar patient.css ao mesmo tempo, e um bloco no fim não colide com regras
   existentes. (Mesma decisão da 23.10.29 para o Oráculo.)

   Três pedidos dela, a olhar para a tela em produção:
     «arrume o layout da pagina descobrir com eyebrow de acordo com todas as
      outras paginas bussola, caminho etc.»
     «os quadros dentro das trilhas estao muito desconfigurados … podemos
      pensar em 3 caixas por linha»
     «tire as trilhas do descobrir por enquanto, e no card do profissional
      tire o indice e o valor»
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1 · cabeçalho de território ─────────────────────────────────────────
   Mesma anatomia de .bus-head, .cam-head, .p-livro-terr, .p-perf-terr e
   .p-ora-terr — símbolo 56px, sobrancelha, título serifado, lede. Fica aqui
   a quinta duplicação consciente: quando as famílias convergirem num só
   `.p-terr`, estas regras saem inteiras. Não convergem já para não mexer em
   telas que estão em produção e a ser editadas noutra frente.
   A cor é a do território Explorar (§3.2 da MEC) — as variáveis existiam em
   hoje.css desde a Constituição e nunca tinham sido usadas por ninguém. */
.p-desc-terr {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: 15px;
  margin: 6px 0 18px;
}
.p-desc-terr-sym {
  width: 56px; height: 56px; flex: 0 0 56px; margin-top: 2px;
  color: var(--t-explorar-accent, #4d7ba6); display: flex;
}
.p-desc-terr-sym svg { width: 56px; height: 56px; }
.p-desc-terr-txt { flex: 1; min-width: 0; }
.p-desc-terr-eyebrow {
  margin: 5px 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--t-explorar-text, #446c92);
}
.p-desc-terr-title {
  margin: 0 0 9px; font-family: var(--mec-serif, Georgia, "Times New Roman", serif);
  font-weight: 400; font-size: 27px; line-height: 1.1; color: var(--mec-plum, #43213f);
  letter-spacing: -.01em;
}
.p-desc-terr-lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 46ch; }
@media (max-width: 520px) {
  .p-desc-terr-sym, .p-desc-terr-sym svg { width: 44px; height: 44px; }
  .p-desc-terr-sym { flex: 0 0 44px; }
  .p-desc-terr-title { font-size: 23px; }
}

/* ── 2 · a coluna larga ──────────────────────────────────────────────────
   Três cartões não cabem em 520px: dariam ~160px cada. Reusa-se o 1060 do
   Hoje (23.10.21) em vez de inventar um número novo — é o mesmo que o
   Oráculo herdou na 23.10.37. Abaixo de 1024 nada muda. */
@media (min-width: 1024px) {
  #app-shell.patient-mode.descobrir-view:not(.no-chrome) main#view {
    max-width: 1060px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* O bloco de entrada (frase de cuidado + busca) NÃO acompanha a coluna
   larga: uma caixa de busca de mil pixels lê-se como um campo vazio. */
.p-desc-lead { max-width: 640px; }

/* ── 3 · as faixas em grelha ─────────────────────────────────────────────
   Substitui .p-mkt-hscroll no Descobrir. O carrossel horizontal cortava os
   cartões na borda da coluna e obrigava a arrastar para ver o terceiro. */
.p-mkt-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px)  { .p-mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .p-mkt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
/* O cartão preenche a célula; o respiro entre linhas é do gap, não da
   margem de cada cartão (senão as duas somam-se e a linha desalinha). A
   coluna flex existe para que o preço da oferta possa ser empurrado para o
   fundo e as linhas alinharem entre cartões de títulos desiguais. */
.p-mkt-grid > .p-card { margin-bottom: 0; height: 100%; display: flex; flex-direction: column; }
.p-mkt-grid .p-mkt-o-price { margin-top: auto; padding-top: 10px; }

/* ── 4 · cabeçalho de faixa, com a porta para a listagem ─────────────── */
.p-desc-secthead { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.p-desc-secthead .p-h2 { margin: 0; }
.p-desc-secthead .lnk {
  margin-left: auto; font-size: 12px; font-weight: 700;
  color: var(--p-gold-deep); text-decoration: none; white-space: nowrap;
}
.p-desc-secthead .lnk:hover { text-decoration: underline; }

/* ── 5 · a casca das páginas «Ver todas» ─────────────────────────────── */

/* O regresso fica ACIMA da cabeça e não dentro dela: é navegação, não
   conteúdo — e assim a cabeça é a mesma peça em todas as listagens.
   `chevron-down` não existe em icons.js: roda-se o chevron-right 180°, como
   já se faz no `.legal-back` (armadilha anotada na R15). */
.p-desc-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px;
  font-size: 12.5px; font-weight: 600; color: var(--p-text-muted); text-decoration: none;
}
.p-desc-back:hover { color: var(--t-explorar-text, #446c92); }
.p-desc-back svg { transform: rotate(180deg); }

/* Cabeça leve: a sobrancelha é o TERRITÓRIO e o título é o nome da faixa.
   O símbolo de 56px é do território e fica no hub — repeti-lo aqui diria
   "chegou a outro lugar" quando se chegou a um lugar DENTRO do mesmo. */
.p-desc-subhead { margin: 2px 0 16px; }
.p-desc-subhead .eb {
  margin: 0 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--t-explorar-text, #446c92);
  display: flex; align-items: center; gap: 7px;
}
.p-desc-subhead h1 {
  margin: 0 0 8px; font-family: var(--mec-serif, Georgia, "Times New Roman", serif);
  font-weight: 400; font-size: 27px; line-height: 1.1; color: var(--mec-plum, #43213f);
  letter-spacing: -.01em;
}
.p-desc-subhead .lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 52ch; }
@media (max-width: 520px) { .p-desc-subhead h1 { font-size: 23px; } }

/* Barra de ferramentas. É GRELHA e não flex, e a razão vale a pena ficar
   escrita: `#app-shell.patient-mode input/select { width:100% }` é uma
   regra de especificidade altíssima neste ficheiro — num flex, isso faz
   cada campo ocupar a linha inteira (foi o que aconteceu na 1.ª tentativa
   do mock). Numa grelha, o 100% resolve contra a CÉLULA e o layout obedece,
   sem se discutir especificidade. */
.p-desc-tools { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 10px; max-width: 760px; }
@media (min-width: 640px) {
  .p-desc-tools { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); grid-template-columns: none; }
  .p-desc-tools .grow { grid-column: span 2; }
}

/* A linha de contagem fica ENTRE os filtros e a grelha, para que o número
   mude à vista de quem filtra. Mesmo truque da caixa de largura própria
   para o <select> da ordenação. */
.p-desc-count {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 12px; font-size: 12.5px; color: var(--p-text-muted);
}
.p-desc-count b { color: var(--p-text); font-weight: 700; }
.p-desc-count .right {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--p-text-soft);
}
.p-desc-count .right .box { width: 224px; }
.p-desc-count .right .box select { padding: 8px 12px; font-size: 12.5px; }
@media (max-width: 639px) {
  .p-desc-count .right { width: 100%; margin-left: 0; }
  .p-desc-count .right .box { flex: 1; width: auto; }
}

/* Fim de lista declarado — quem chega ao fim fica a saber que chegou. */
.p-desc-end { text-align: center; margin: 20px 0 4px; font-size: 12px; color: var(--p-text-soft); }

/* Vazio com saída, nunca um beco. */
.p-desc-empty { text-align: center; padding: 34px 20px; }
.p-desc-empty .ic { color: var(--t-explorar-accent, #4d7ba6); opacity: .6; }
.p-desc-empty h4 { margin: 12px 0 4px; font-size: 15px; color: var(--p-text); }
.p-desc-empty p { margin: 0 0 16px; font-size: 12.5px; color: var(--p-text-muted); }

/* ── 6 · duas correções que a tela nova tornou visíveis ────────────────── */

/* (a) COLISÃO DE CLASSE `.p-star`, ativa em produção desde que a Roda ganhou
   o seu céu: patient.css declara `.p-star` DUAS vezes — na linha ~1863 são
   as estrelinhas decorativas do `.p-fold-stars` (`position:absolute`,
   `opacity:0`, animação de cintilar) e na ~2353 são as estrelas de
   AVALIAÇÃO (`display:inline-flex`). A segunda regra ganha o `display` e a
   `color`, mas NÃO desfaz o `position`, a `opacity` nem a `animation` da
   primeira: as estrelas da avaliação saíam da linha, espalhavam-se pelo
   cartão e piscavam. Via-se nos cartões do Descobrir a cada abertura.
   Corrige-se onde dói e só aí — dentro de `.p-stars`, que é a fila de
   avaliação e nada mais. As decorativas ficam exatamente como estão. */
.p-stars .p-star {
  position: static;
  opacity: 1;
  animation: none;
  font-size: inherit;
}

/* (b) O filtro de cidade das sessões presenciais era um input de largura
   total. Em 520px passava despercebido; na coluna de 1060 fica uma caixa de
   mil pixels para escrever "Porto". */
.p-mkt-city-filter { max-width: 320px; }

/* ══════════════════════════════════════════════════════════════════════════
   23.10.41 · A PÁGINA DO PROFISSIONAL entra no layout do Descobrir
   --------------------------------------------------------------------------
   Pedido dela, a olhar para a tela em produção: «a pagina do profissional
   tambem deve ser o layout de descobrir».

   Saiu o hero centrado — um cartão com avatar, nome, headline, cidade,
   estrelas, barra do Índice MIC360 e chips, tudo empilhado ao meio, que era
   a única tela do território ainda alinhada ao centro. Entra a mesma
   anatomia das listagens: regresso, sobrancelha do território, título,
   frase — no eixo esquerdo. A diferença é que aqui o símbolo de 56px é a
   PESSOA (as iniciais dela), porque a página é dela.
   ══════════════════════════════════════════════════════════════════════════ */

.p-desc-phead { display: flex; align-items: flex-start; gap: 15px; margin: 2px 0 18px; }
.p-desc-phead-av {
  width: 56px; height: 56px; flex: 0 0 56px; margin-top: 2px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fffaf2;
  background: linear-gradient(140deg, var(--p-gold-soft, #e3c684), var(--p-gold-deep, #a9832f));
  box-shadow: 0 6px 18px rgba(169, 131, 47, .22);
}
.p-desc-phead-txt { flex: 1; min-width: 0; }
.p-desc-phead .eb {
  margin: 4px 0 2px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--t-explorar-text, #446c92);
  display: flex; align-items: center; gap: 7px;
}
.p-desc-phead h1 {
  margin: 0 0 6px; font-family: var(--mec-serif, Georgia, "Times New Roman", serif);
  font-weight: 400; font-size: 27px; line-height: 1.1; color: var(--mec-plum, #43213f);
  letter-spacing: -.01em;
}
.p-desc-phead .lede { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--p-text-muted); max-width: 52ch; }
.p-desc-phead-meta { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 10px; }
.p-desc-phead-meta .it { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--p-text-soft); }
@media (max-width: 520px) {
  .p-desc-phead-av { width: 44px; height: 44px; flex: 0 0 44px; font-size: 18px; }
  .p-desc-phead h1 { font-size: 23px; }
}

/* Duas colunas no desktop: à esquerda o que se lê e o que se faz (sobre,
   serviços e marcação, ofertas, avaliações); à direita o que se consulta de
   relance (índice, modalidade, idiomas, áreas, certificações, vídeo).
   Abaixo de 1024 a grelha desaparece e manda a ordem do DOM — por isso a
   coluna principal vem primeiro no HTML. Mesma decisão do Perfil (23.10.31)
   e os mesmos números. */
.p-desc-tcols { display: grid; grid-template-columns: 1fr; gap: 0; align-items: start; }
@media (min-width: 1024px) {
  #app-shell.patient-mode.descobrir-view:not(.no-chrome) .p-desc-tcols {
    grid-template-columns: minmax(0, 1fr) 360px;
    column-gap: 26px;
  }
}
.p-desc-tmain { min-width: 0; }
.p-desc-tside { min-width: 0; }

/* A grelha de ofertas vive DENTRO da coluna principal (~600px a 1440), não
   na largura da página. Três por linha dariam cartões de ~190px com o título
   partido em duas linhas — a mesma queixa que motivou a 23.10.40. Dentro
   desta coluna a grelha é de dois. */
@media (min-width: 1024px) {
  #app-shell.patient-mode.descobrir-view:not(.no-chrome) .p-desc-tmain .p-mkt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   23.10.53 · O ORÁCULO ALINHA AS DUAS CARTAS (era a 23.10.52 paralela)
   --------------------------------------------------------------------------
   Bloco NOVO no fim do ficheiro, de propósito: outra sessão pode estar a
   editar patient.css ao mesmo tempo (mesma decisão da 23.10.29 e da 23.10.40).

   > «arrume este espaço entre a visualização dos cards, e depois de tirada a
   >  carta, deixe perguntas para refletir também na mesma altura»

   A 23.10.37 pôs os dois cartões lado a lado e mandou-os esticar
   (`align-items: stretch` + `height: 100%`), porque ela tinha pedido «os
   quadros do mesmo tamanho». Ficaram — POR FORA. Por dentro continuava fluxo
   normal, e o cartão da Carta Vibracional tem uma peça que o do Tarot não tem:
   a nota fixa do hotfix v21.1.1 (`.pg-vib-note`, ~45px). Tudo o que vinha
   depois dela descia 45px de um lado e não do outro — e o botão do Tarot
   acabava 64px acima do fim do seu próprio cartão. Esse retângulo vazio é o
   que ela marcou a vermelho.

   Depois de tirada a carta a diferença crescia: o Tarot tem LUZ e SOMBRA entre
   a carta e as perguntas, e a Carta Vibracional não tem nada — as duas caixas
   «Perguntas para refletir» ficavam a 79px uma da outra.

   A CORREÇÃO: cada cartão passa a ser uma SUBGRELHA das linhas da grelha do
   Oráculo. Sete linhas partilhadas pelos dois:

       1 cabeçalho · 2 nota · 3 carta · 4 luz · 5 sombra · 6 perguntas · 7 botão

   A altura de cada linha é a maior dos dois cartões, e cada peça é colocada
   pela sua CLASSE, não pela ordem no DOM. É isso que faz o Tarot deixar a
   linha 2 vazia (não tem nota) e mesmo assim começar a carta à mesma altura, e
   a Carta Vibracional deixar as linhas 4 e 5 vazias e mesmo assim ter as
   perguntas na linha 6, ao lado das do Tarot.

   ⚠️ NENHUM elemento-fantasma foi acrescentado ao HTML. Uma linha vazia num
   cartão continua a ser medida pelo outro. `games.js` NÃO é tocado.

   Colocar por classe, e não por ordem, é o que segura os ESTADOS MISTOS: uma
   carta tirada e a outra por tirar, um baralho desligado pelo profissional.

   ⚠️ A ARMADILHA, registada para não se repetir:
   > Uma subgrelha herda as goteiras da grelha-mãe, e `row-gap: 0` NELA é
   > ignorado.
   A primeira versão alinhava tudo e trazia de volta 54px de vazio — agora dos
   dois lados — porque os 18px de `row-gap` da grelha do Oráculo passavam a
   aplicar-se entre as sete linhas de DENTRO do cartão. Só se viu porque a
   prova mede píxeis; a olho, parecia respiro. Solução: `row-gap: 0` na
   grelha-mãe e os 18px como MARGEM de cada peça.

   Abaixo dos 1024px nada disto existe: sem grelha, um cartão debaixo do outro.
   Alinhar duas colunas só faz sentido quando há duas colunas.
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  /* 23.10.67 — row-gap real entre linhas (Anjo/Kin ↔ Dica do dia).
     Antes estava a 0 e a margem só não bastava entre faixas full-width. */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid { row-gap: 20px; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > * { margin-bottom: 0; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .p-card { margin-bottom: 0; }

  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-row: span 7;
    row-gap: 0;
  }

  /* `display: contents` para que a luz, a sombra e as perguntas sejam peças da
     subgrelha do cartão, e não filhas de um invólucro que as arrasta juntas. */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .pg-details {
    display: contents;
  }

  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .p-card-title { grid-row: 1; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .pg-vib-note  { grid-row: 2; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .pg-flip      { grid-row: 3; }
  /* o baralho desligado ocupa a LINHA DA CARTA, não uma linha sua */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .pg-deck-off  { grid-row: 3; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-chip-block:nth-child(1) { grid-row: 4; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-chip-block:nth-child(2) { grid-row: 5; }
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-questions   { grid-row: 6; }
  /* o botão vive na última linha e encosta ao fundo: é isso que fecha o
     estado misto (uma tirada, outra por tirar) sem vazio nenhum */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck > .p-btn {
    grid-row: 7; align-self: end;
  }

  /* o `gap: 10px` do `.pg-details` deixou de existir (é `display: contents`):
     o respiro entre as peças de dentro volta como margem, para o ecrã ficar
     igual ao que estava */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-chip-block,
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-questions {
    margin-bottom: 10px;
  }
  /* o `gap` do flex separava as peças ENTRE si e não deixava rasto no fim; a
     margem tem de fazer o mesmo, senão sobra-lhe 10px no fundo do cartão */
  #app-shell.patient-mode.oraculo-view:not(.no-chrome) .p-ora-grid > .pg-deck .pg-details > *:last-child {
    margin-bottom: 0;
  }
}


/* 23.10.67 — indicação visual do mudra no detalhe da frequência */
.pfd-mudra-img {
  display: block;
  width: min(100%, 220px);
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--p-border, #eadfc9);
  background: #fbf6ec;
}
.pfd-mudra .pfd-mini-text { margin-bottom: 2px; }


/* 23.10.67 — Oráculo: ar entre as energias do dia e a Dica do dia */
.p-ora-grid > .p-ora-full + .p-ora-full,
.p-ora-grid > .p-card + .p-ora-full {
  margin-top: 8px;
}
#pg-tail,
#pg-reading {
  margin-top: 8px;
}
.p-ora-grid > .p-ora-day + .p-ora-day,
.p-ora-grid > .p-card.p-ora-day + .p-card {
  /* mobile empilhado: Anjo e Kin não colados */
}
@media (max-width: 1023px) {
  .p-ora-grid > .p-card { margin-bottom: 14px; }
  .p-ora-grid > .p-ora-full { margin-bottom: 10px; }
  #pg-tail, #pg-reading { margin-top: 6px; }
}

/* 23.10.76 — Roda do Autocuidado (o bloco veio do protótipo; a geometria
   da roda mudou no JS: pontas rectas e intervalo real entre segmentos) */
.ac-page { padding-bottom: 48px; }
.ac-quest {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(145deg, #f8f1e0, #f4ead4);
  border: 1px solid #f0d9a8; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px;
}
.ac-quest-ic {
  width: 36px; height: 36px; border-radius: 12px;
  background: #fff; border: 1px solid #f0d9a8;
  display: flex; align-items: center; justify-content: center;
  color: #b98d3e; flex-shrink: 0;
}
.ac-quest-kicker {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: #b98d3e; margin: 0 0 4px;
}
.ac-quest-text { margin: 0; font-size: 14.5px; color: #3f3a52; line-height: 1.4; }
.ac-wheel-card { padding: 18px 16px 16px; }
.ac-wheel-wrap { position: relative; width: min(320px, 100%); margin: 0 auto 8px; }
.ac-svg { width: 100%; height: auto; display: block; }
.ac-seg { cursor: pointer; }
.ac-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none; text-align: center;
}
.ac-center strong {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 28px; font-weight: 400; color: #3f3a52; line-height: 1;
}
.ac-center strong span { font-size: 14px; color: #9a95a8; }
.ac-center em { font-style: normal; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #9a95a8; margin-top: 4px; }
.ac-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px;
}
.ac-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid #eadfc9;
  background: #faf6ee; cursor: pointer; text-align: left; font-family: inherit;
}
.ac-chip.done { background: #f4f9f4; border-color: rgba(107,143,113,.4); }
.ac-chip.quest { border-color: #f0d9a8; box-shadow: 0 0 0 2px rgba(217,171,82,.18); }
.ac-dot { width: 8px; height: 8px; border-radius: 50%; margin-bottom: 4px; }
.ac-chip-name { font-size: 13px; font-weight: 600; color: #3f3a52; }
.ac-chip-meta { font-size: 11px; color: #75708a; }
.ac-voice {
  font-style: italic; color: #75708a; font-size: 14.5px;
  border-left: 3px solid #f0d9a8; padding: 4px 0 4px 14px; margin: 18px 0 0;
}
.ac-voice-kicker { font-style: normal; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #8474ad; font-weight: 700; margin: 0 0 6px; }
.ac-sheet-desc { font-size: 13.5px; color: #75708a; margin: 0 0 14px; }
.ac-quest-note { font-size: 12.5px; color: #b98d3e; margin: 0 0 14px; }
.ac-q { margin-bottom: 16px; }
.ac-q-num { font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: #9a95a8; font-weight: 700; margin: 0 0 4px; }
.ac-q-text { font-size: 15px; color: #3f3a52; margin: 0 0 10px; line-height: 1.4; }
.ac-likert { display: flex; gap: 6px; }
.ac-lk {
  flex: 1; padding: 10px 0; border-radius: 10px; border: 1px solid #eadfc9;
  background: #fff; font-size: 13px; font-weight: 600; color: #75708a;
  cursor: pointer; font-family: inherit;
}
.ac-lk.on { background: linear-gradient(145deg, #e8c878, #c9a04a); border-color: transparent; color: #2a2218; }
.ac-likert-labs { display: flex; justify-content: space-between; font-size: 10px; color: #9a95a8; margin-top: 4px; }

/* ==========================================================================
   23.10.108 — a Roda dentro de uma folha, e o check-in passo a passo.

   O anel ganhou uma coroa: o `viewBox` passou de 320 para 374 com o desenho
   deslocado 27px, porque o tracejado do meio-caminho vive a r+27 e num
   `viewBox` de 320 saía cortado pela borda do SVG. A roda desenhada é a mesma
   — só deixou de estar encostada à moldura.
   ========================================================================== */

/* A folha da Hoje: a Roda inteira por cima da tela.
   ⚠️ 23.10.112 — AQUI NÃO SE ROLA. A `.p-sheet` já tem `max-height: 86vh` e
   `overflow-y: auto` desde sempre (linha ~405); a 23.10.108 acrescentou um
   segundo `overflow-y: auto` neste contentor «para o telemóvel não a empurrar
   para fora do ecrã» — e o telemóvel já estava tratado pela folha. O resultado
   foram DUAS barras de rolagem encostadas uma à outra, que a titular viu logo:
   *«esta melhor, mas para que duas barras de rolagem?»*
   Um contentor que rola dentro de outro que rola parte o gesto em dois: a roda
   sobe até ao seu fim e só depois a folha começa a subir. */
.ac-folha .ac-wheel-card { padding: 14px 12px 12px; }
.ac-folha .ac-wheel-wrap { width: min(280px, 100%); }

/* ==========================================================================
   23.10.111 — a roda em FATIAS (o desenho C, escolhido pela titular).

   Seis fatias cheias com um ícone por pilar, o nome por baixo e o certinho de
   «já olhei» na borda. A cor da fatia caminha de `claro` para `cor` conforme a
   média — a resposta vê-se, nunca se lê. As cores vivem no JS
   (`_rodaAutocuidado.js`), porque são por pilar; aqui fica só o comportamento.
   ========================================================================== */
/* O centro tem de caber no BURACO da roda, não por cima das fatias. O raio
   interior é 76 num viewBox de 374 — 40% do lado. A caixa do centro é o
   quadrado todo, por isso limita-se aqui, senão «olhados hoje» transborda
   para cima dos pilares (foi o que aconteceu à primeira). */
.ac-wheel-wrap .ac-center { padding: 0 32%; }
.ac-wheel-wrap .ac-center strong { font-size: 30px; }
.ac-wheel-wrap .ac-center em { font-size: 9px; letter-spacing: .05em; line-height: 1.25; }

.ac-seg { cursor: pointer; }
.ac-seg .ac-fatia { transition: filter 200ms ease, transform 200ms ease; transform-origin: 187px 187px; }
.ac-seg:hover .ac-fatia { filter: brightness(1.04); }
.ac-seg-meio { cursor: pointer; }

/* A pintura do pilar acabado de olhar. Discreta de propósito: é a roda a
   confirmar o gesto, não uma festa por cima dele. */
@keyframes ac-pinta {
  0%   { opacity: .35; transform: scale(.965); }
  55%  { opacity: 1;   transform: scale(1.015); }
  100% { opacity: 1;   transform: scale(1); }
}
.ac-seg-pinta .ac-fatia { animation: ac-pinta 820ms cubic-bezier(.22,.8,.3,1) 1; }
@media (prefers-reduced-motion: reduce) { .ac-seg-pinta .ac-fatia { animation: none; } }

/* Os chips, com o mesmo ícone da fatia. */
.ac-chip {
  flex-direction: row; align-items: center; gap: 9px; padding: 9px 10px;
}
.ac-chip-ic {
  width: 27px; height: 27px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.ac-chip-txt { min-width: 0; flex: 1; }
.ac-chip-txt b { display: block; font-size: 12.5px; font-weight: 600; color: #3f3a52; }
.ac-chip-txt i { display: block; font-style: normal; font-size: 10.5px; color: #75708a; }
.ac-chip-ok {
  width: 19px; height: 19px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.ac-chip.done { background: #fff; border-color: var(--ac-cor, #eadfc9); }
.ac-chip.meio { background: #fdf7ec; border-color: #e6cd9c; }
.ac-chip.meio .ac-chip-txt i { color: #b98d3e; font-weight: 600; }

/* A linha de retomada, no topo da roda. Não diz «não terminou»: diz onde se
   pode voltar. */
.ac-retomar {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: #fdf7ec; border: 1px solid #e6cd9c; border-radius: 14px;
  padding: 11px 14px; margin-bottom: 12px; cursor: pointer; font-family: inherit;
}
.ac-retomar-ic { color: #b98d3e; display: flex; flex-shrink: 0; }
.ac-retomar strong { display: block; font-size: 13.5px; color: #3f3a52; font-weight: 600; }
.ac-retomar span span { display: block; font-size: 12px; color: #75708a; margin-top: 2px; }

/* ---------------------------------------------------------------- check-in */
.ac-ci-topo { padding: 2px 0 14px; border-bottom: 1px solid #efe7d8; margin-bottom: 16px; }
.ac-ci-back {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0;
  padding: 0 0 10px; color: #8474ad; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.ac-ci-nome {
  margin: 0; font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 20px; color: #3f3a52; font-weight: 400;
}
.ac-ci-desc { margin: 3px 0 12px; font-size: 12.5px; color: #75708a; line-height: 1.4; }
.ac-ci-passo { display: flex; align-items: center; gap: 10px; }
.ac-ci-passo > span {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #9a95a8; font-weight: 700; white-space: nowrap;
}
.ac-ci-barras { display: flex; gap: 5px; flex: 1; }
.ac-ci-barra {
  height: 4px; flex: 1; border-radius: 3px; background: #efe7d8;
  transition: background 260ms ease;
}
.ac-ci-barra.feita { background: #c9a04a; }
.ac-ci-barra.agora { background: linear-gradient(90deg, #c9a04a 55%, #efe7d8 55%); }

.ac-ci-corpo { min-height: 210px; display: flex; flex-direction: column; }
.ac-ci-pergunta {
  margin: 6px 0 22px; font-size: 17.5px; line-height: 1.35; color: #3f3a52;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
}

/* As bolinhas. Grandes de propósito: o alvo do polegar é o que faz um
   check-in de um minuto ser mesmo de um minuto. */
.ac-bolinhas { display: flex; gap: 8px; justify-content: space-between; }
.ac-bolinha {
  flex: 1; aspect-ratio: 1; max-width: 58px; border-radius: 50%;
  border: 1px solid #eadfc9; background: #fff; cursor: pointer; font-family: inherit;
  font-size: 17px; font-weight: 600; color: #75708a;
  transition: transform 160ms ease, background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.ac-bolinha:hover { transform: translateY(-2px); }
.ac-bolinha.on {
  background: linear-gradient(145deg, #e8c878, #c9a04a);
  border-color: transparent; color: #2a2218;
  box-shadow: 0 8px 20px -8px rgba(201,160,74,.8);
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) { .ac-bolinha { transition: none; } }
.ac-ci-dica { margin: auto 0 0; padding-top: 18px; font-size: 11.5px; color: #9a95a8; }

/* --------------------------------------------------------------- revisão */
.ac-ci-revisao-titulo { margin: 4px 0 12px; font-size: 13.5px; color: #75708a; }
.ac-rev {
  display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left;
  background: #faf6ee; border: 1px solid #eadfc9; border-radius: 12px;
  padding: 11px 13px; margin-bottom: 8px; cursor: pointer; font-family: inherit;
}
.ac-rev-n {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #e8c878, #c9a04a); color: #2a2218;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ac-rev strong { display: block; font-size: 13.5px; font-weight: 500; color: #3f3a52; line-height: 1.35; }
.ac-rev-edit { display: block; font-size: 11px; color: #9a95a8; margin-top: 3px; }
.ac-largar {
  display: block; width: 100%; margin-top: 10px; background: none; border: 0;
  color: #9a95a8; font-size: 12px; text-decoration: underline; cursor: pointer;
  font-family: inherit; padding: 6px 0;
}

/* 23.10.76 — Descoberta de hoje (a tela do convite, quando não é ferramenta) */
.desc-page { padding-bottom: 48px; }
.desc-card { padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.desc-pergunta { font-size: 17px; line-height: 1.45; color: #3f3a52; margin: 0; }
.desc-min { font-size: 12.5px; color: #9a95a8; margin: 0; }
.desc-opcoes { display: flex; flex-direction: column; gap: 8px; }
.desc-opcao {
  text-align: left; padding: 13px 15px; border-radius: 12px;
  border: 1px solid #eadfc9; background: #faf6ee; font-family: inherit;
  font-size: 14.5px; color: #3f3a52; cursor: pointer; line-height: 1.35;
}
.desc-opcao:hover { border-color: #d9ab52; }
.desc-opcao.on { background: linear-gradient(145deg, #e8c878, #c9a04a); border-color: transparent; color: #2a2218; }
.desc-opcao:disabled { cursor: default; opacity: .75; }
.desc-done { padding: 22px 18px; display: flex; flex-direction: column; gap: 8px; }
/* 23.10.76 — a folha do convite, aberta por cima da Home. Reaproveita a
   `.p-sheet` do Território de propósito: o convite não inventa uma linguagem
   visual só para si. Só precisa do empilhamento. */
.desc-sheet { display: flex; flex-direction: column; gap: 14px; }
.desc-sheet .desc-opcoes { margin-top: 2px; }
.desc-obrigado { font-family: Georgia, "Iowan Old Style", Palatino, serif; font-size: 20px; color: #3f3a52; margin: 0; }
.desc-done p { margin: 0; color: #75708a; font-size: 14.5px; }

/* ==========================================================================
   Mapa de Valores — 23.10.91
   Seis rótulos, zero dígitos. A barra mostra onde vai; é o que dispensa o
   número (P4). Nada aqui pinta uma nota, uma percentagem ou uma posição.
   ========================================================================== */
.val-intro-title { margin: 14px 0 8px; font-size: 17px; line-height: 1.35; }
.val-intro-p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.val-badge { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; }
.val-badge-chip { flex: 0 0 auto; }
.val-badge-note { font-size: 11.5px; line-height: 1.45; color: var(--text-muted); }

.val-bar { height: 3px; border-radius: 2px; background: var(--surface-2, rgba(0,0,0,.08)); overflow: hidden; margin-bottom: 18px; }
.val-bar-fill { height: 100%; width: 0; background: var(--gold, #d9ab52); transition: width .25s ease; }

.val-item { margin: 0 0 18px; font-size: 16px; line-height: 1.5; min-height: 4.5em; }
.val-scale { display: flex; flex-direction: column; gap: 6px; }
.val-opt {
  width: 100%; text-align: left; padding: 11px 14px; font: inherit; font-size: 14px;
  border: 1px solid var(--border, rgba(0,0,0,.12)); border-radius: 10px;
  background: transparent; color: inherit; cursor: pointer;
}
.val-opt:hover { border-color: var(--gold, #d9ab52); }
.val-opt.selected { border-color: var(--gold, #d9ab52); background: var(--gold-soft, rgba(217,171,82,.12)); }
.val-prev { margin-top: 14px; }

.val-frame { margin: 4px 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.val-read { padding: 14px 0; border-top: 1px solid var(--border, rgba(0,0,0,.10)); }
.val-read-name { font-size: 15.5px; margin-bottom: 5px; }
.val-read-text { font-size: 14px; line-height: 1.55; }
.val-read-toggle {
  margin-top: 8px; padding: 0; font: inherit; font-size: 12.5px;
  background: none; border: 0; color: var(--gold-ink, #8a6d2a); cursor: pointer; text-align: left;
}
.val-read-more[hidden] { display: none !important; }
.val-read-more { margin-top: 10px; }
.val-read-label { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-top: 10px; }
.val-read-line { font-size: 13.5px; line-height: 1.55; margin-top: 3px; }

.val-tension { margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--surface-2, rgba(0,0,0,.04)); }
.val-tension-title { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.val-tension-pair { font-size: 15px; margin: 4px 0 6px; }
.val-tension-text { font-size: 13.5px; line-height: 1.55; }

.val-closing { margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }

/* ==========================================================================
   23.10.121 — Anamnese Integrativa
   A lista é o ecrã de entrada, e é uma lista de ESTADO: quanto falta, secção
   a secção, antes de se ver uma única pergunta. Uma secção aberta de cada vez.

   23.10.123 — as variáveis são as QUE EXISTEM neste tema.
   O bloco nasceu a usar `--p-border` e `--p-surface-strong`, que não estão
   definidas em lado nenhum: `border: 1px solid var(--p-border)` sem fallback
   é declaração inválida, e os chips «Sim/Não» apareceram em produção como
   texto solto, sem contorno nem forma de botão. Passam a ser
   `--p-glass-border` e `--p-glass-strong`, com hexadecimal por trás.
   ========================================================================== */
.pa-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pa-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  border: 1px solid var(--p-glass-border, #eadfc9); border-radius: 13px; padding: 12px 13px;
  background: var(--p-glass-strong, #fdfaf3); cursor: pointer; font: inherit; color: inherit;
}
.pa-row:hover { border-color: var(--p-gold-soft, #f0d9a8); }
.pa-row-n {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--p-text-muted);
  background: #fff; border: 1px solid var(--p-glass-border, #eadfc9);
}
.pa-row-t { font-size: 13.5px; font-weight: 550; line-height: 1.3; }
.pa-row-s { margin-left: auto; font-size: 11px; color: var(--p-text-soft, #a29dbb); white-space: nowrap; }
.pa-row-em_curso .pa-row-n { color: var(--p-gold-deep); border-color: var(--p-gold-soft, #f0d9a8); }
.pa-row-em_curso .pa-row-s { color: var(--p-gold-deep); font-weight: 700; }
.pa-row-concluida .pa-row-n { background: #e6f4ec; color: #4e8f6b; border-color: #cfe8da; }
.pa-row-concluida .pa-row-s { color: #4e8f6b; font-weight: 700; }

/* Uma pergunta que NASCEU de outra resposta entra marcada, para que se veja
   que apareceu agora — e não que estava escondida à espera. */
.pa-nasceu { border-left: 2px solid var(--p-gold-soft, #f0d9a8); padding-left: 11px; }
.pa-hint { display: block; font-weight: 400; font-size: 11px; color: var(--p-text-soft, #a29dbb); margin-top: 2px; }

.pa-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pa-chip {
  font-size: 12.5px; border: 1px solid var(--p-glass-border, #eadfc9); background: #fff;
  border-radius: 999px; padding: 6px 13px; color: var(--p-text-muted);
  cursor: pointer; font-family: inherit;
}
.pa-chip.pa-on { background: #efeaf7; border-color: #c9bfe0; color: #6c5c93; font-weight: 650; }
.pa-chip.pa-topo { border-color: var(--p-gold-soft, #f0d9a8); }
.pa-chip.pa-topo.pa-on { background: #faf1dd; border-color: var(--p-gold-soft, #f0d9a8); color: var(--p-gold-deep); }

.pa-triple { display: flex; flex-direction: column; gap: 6px; }
.pa-triple input { width: 100%; }

.p-anamnese-autosave.pa-pending { color: var(--p-gold-deep); }
.p-anamnese-autosave.pa-pending .pas-dot { background: var(--p-gold, #d9ab52); }

.pa-versao {
  display: flex; align-items: baseline; gap: 10px; padding: 8px 0;
  border-top: 1px dashed var(--p-glass-border, #eadfc9); font-size: 13px;
}
.pa-versao:first-of-type { border-top: none; }
.pa-versao-data { margin-left: auto; font-size: 12px; color: var(--p-text-soft, #a29dbb); }

/* 23.10.125 — um campo só de leitura é um VALOR, não um input desativado.
   O e-mail vem da conta: mostrá-lo numa caixa de texto convidava a escrever
   nele, e escrever nele seria mudar a credencial de acesso a meio de uma
   anamnese. */
.pa-fixo {
  border: 1px dashed var(--p-glass-border, #eadfc9);
  background: var(--p-glass-strong, #fdfaf3);
  border-radius: 10px; padding: 9px 12px;
  font-size: 13px; color: var(--p-text-muted, #75708a);
}
.pa-fixo-valor { font-weight: 600; color: var(--p-text, #3f3a52); }

/* 23.10.129 — um valor guardado que já não está na lista continua a aparecer,
   marcado. As listas mudam; o que ficou escrito na ficha de alguém não pode
   evaporar-se do ecrã por causa disso. */
.pa-chip.pa-orfao { border-style: dashed; opacity: .85; }

/* 23.10.130 — uma lista vazia diz que está vazia.
   Um campo cujas opções vêm de fora pode não ter nenhuma. Desenhar rótulo,
   ajuda e nada é indistinguível de estar avariado: quem olha não sabe se não
   tem opções ou se o produto se partiu. */
.pa-vazio {
  margin: 0;
  border: 1px dashed var(--p-glass-border, #eadfc9);
  background: var(--p-glass-strong, #fdfaf3);
  border-radius: 10px; padding: 9px 12px;
  font-size: 13px; color: var(--p-text-muted, #75708a);
}
