/* ==========================================================================
   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;
}
.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; }
.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); }

/* 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;
  }
}
