/* =========================================================
   Meu Porto — interface "Modo Simples"
   Público principal: 40+, pouca prática com celular.
   Regras: alvo de toque >= 56px, nenhum texto abaixo de 15px,
   ícone sempre com palavra, uma ação principal por tela.
   Contrastes calculados (WCAG): texto 13:1, texto suave 6.5:1,
   botão principal branco sobre --porto-700 7.5:1.
   ========================================================= */
:root {
  /* Marca Meu Porto */
  --porto-900: #1F3E63;
  --porto-700: #2B5689;   /* botão principal e links — 7.5:1 com branco */
  --porto-500: #4A7AB0;   /* azul da marca: títulos grandes e ícones */
  --porto-300: #6B9BD1;
  --porto-100: #E6EFF8;
  --porto-50:  #F1F6FB;
  --abraco-700: #2F7563;  /* verde como texto — 5.5:1 */
  --abraco-500: #8FC9BB;  /* verde da marca: só preenchimento e acento */
  --abraco-100: #E3F2ED;
  --areia-700: #8A5A1F;
  --areia-300: #EAD9C2;
  --areia-100: #F7EFE3;
  --alerta-700: #A8362B;
  --alerta-600: #B23A2E;
  --alerta-100: #FBEDEB;
  --alerta-300: #E9C4BE;

  --texto: #233140;       /* 13:1 sobre branco */
  --texto-suave: #4B5B6B; /* 6.5:1 sobre o fundo */
  --fundo: #F4F8FB;
  --superficie: #FFFFFF;
  --borda: #D5E0EA;
  --sombra: 0 6px 24px rgba(31, 62, 99, .08);

  /* Escala controlada pelo A / A+ / A++ */
  --escala: 1;
  --raio: 16px;
  --alvo: 56px;
  --alvo-grande: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --tabbar: calc(72px + var(--safe-bottom));
  --curva: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html {
  font-size: calc(17px * var(--escala));
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--texto);
  background: linear-gradient(170deg, #E3EEF7, #EAF2ED 60%, var(--areia-100));
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--porto-700); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--porto-700); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.5rem; height: 1.5rem; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- moldura ---------- */
.app {
  position: relative;
  width: 100%; max-width: 560px; height: 100dvh;
  margin: 0 auto; overflow: hidden;
  background: var(--fundo);
  display: flex; flex-direction: column;
}
.screen {
  display: none; flex: 1; min-height: 0;
  flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
}
.screen.active { display: flex; }
.app.with-tabs .screen { padding-bottom: var(--tabbar); }
.content { padding: 8px 20px 32px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.lead { color: var(--texto-suave); margin-bottom: 4px; }
.note { color: var(--texto-suave); font-size: .9rem; line-height: 1.5; text-align: center; margin: 16px 4px 0; }
.section-title {
  margin: 28px 2px 12px; font-size: .9rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--texto-suave);
}
.eyebrow { font-size: .85rem; font-weight: 800; letter-spacing: .08em; color: var(--abraco-700); }
.card { background: var(--superficie); border: 2px solid var(--borda); border-radius: var(--raio); padding: 20px; }
.empty { color: var(--texto-suave); text-align: center; padding: 20px 12px; background: var(--superficie); border: 2px dashed var(--borda); border-radius: var(--raio); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + var(--safe-top)) 16px 12px;
  background: linear-gradient(var(--fundo) 82%, rgba(244, 248, 251, 0));
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h2 { font-size: 1.45rem; color: var(--porto-900); font-weight: 800; }
.topbar-title p { color: var(--texto-suave); font-size: .9rem; margin-top: 2px; }
.back-button {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 48px; padding: 0 14px 0 8px;
  border: 2px solid var(--borda); border-radius: 999px; background: var(--superficie);
  color: var(--porto-700); font-weight: 700; font-size: .95rem;
}
.help-pill, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.help-pill { border: 2px solid var(--alerta-300); background: var(--alerta-100); color: var(--alerta-700); }
.pill { border: 2px solid var(--borda); background: var(--superficie); color: var(--texto-suave); }
.pill[aria-pressed="true"] { border-color: var(--porto-700); background: var(--porto-100); color: var(--porto-700); }
.version-pill { padding: 8px 12px; border-radius: 999px; background: var(--superficie); border: 2px solid var(--borda); font-weight: 800; color: var(--porto-700); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--alvo); padding: 12px 22px;
  border: 2px solid transparent; border-radius: var(--raio);
  font-weight: 750; font-size: 1.05rem; line-height: 1.2; text-align: center;
  transition: transform .2s var(--curva), background-color .2s var(--curva);
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--porto-700); color: #fff; }
.btn-primary:hover { background: var(--porto-900); }
.btn-secondary { background: var(--superficie); border-color: var(--borda); color: var(--porto-700); }
.btn-secondary:hover { border-color: var(--porto-300); }
.btn-danger { background: var(--alerta-600); color: #fff; }
.btn-block { width: 100%; }
.btn-wide { min-width: 220px; }
.btn-small { min-height: 48px; padding: 8px 14px; font-size: .95rem; }
.link-button {
  border: 0; background: transparent; color: var(--porto-700);
  font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
  min-height: 48px; padding: 8px; align-self: center;
}

/* ---------- formulários ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend, .field-title { font-weight: 700; font-size: 1rem; color: var(--texto); padding: 0; }
.field-title { margin: 8px 0 12px; }
.optional { font-weight: 400; color: var(--texto-suave); }
.hint { color: var(--texto-suave); font-size: .9rem; }
input, textarea {
  width: 100%; min-height: var(--alvo);
  border: 2px solid var(--borda); border-radius: 14px;
  background: var(--superficie); color: var(--texto);
  padding: 12px 14px; font-size: 1.05rem; outline: none;
}
input:focus, textarea:focus { border-color: var(--porto-500); box-shadow: 0 0 0 3px var(--porto-100); }
textarea { resize: vertical; line-height: 1.5; }
input[aria-invalid="true"] { border-color: var(--alerta-600); }
.password-field { display: flex; gap: 8px; }
.password-field input { flex: 1; min-width: 0; }
.reveal {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: var(--alvo); padding: 0 12px;
  border: 2px solid var(--borda); border-radius: 14px; background: var(--superficie);
  color: var(--porto-700); font-weight: 700; font-size: .95rem;
}
.form-error { min-height: 0; color: var(--alerta-700); font-weight: 600; }
.form-ok { color: var(--abraco-700); font-weight: 600; background: var(--abraco-100); border-radius: 12px; padding: 10px 14px; }
.form-error:empty, .form-ok:empty { display: none; }
.check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 2px solid var(--borda); border-radius: 14px; background: var(--superficie);
  cursor: pointer;
}
.check input { width: 26px; height: 26px; min-height: 0; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--porto-700); }
.check small { display: block; color: var(--texto-suave); font-size: .9rem; }
.choice-row { display: flex; gap: 10px; }
.choice {
  flex: 1; min-height: var(--alvo); border: 2px solid var(--borda); border-radius: 14px;
  background: var(--superficie); font-weight: 700;
}
.choice.active { border-color: var(--porto-700); background: var(--porto-100); color: var(--porto-700); }

/* abas segmentadas */
.segmented { display: flex; gap: 6px; padding: 6px; background: var(--porto-50); border-radius: 18px; }
.segmented button {
  flex: 1; min-height: 52px; border: 0; border-radius: 13px; background: transparent;
  color: var(--texto-suave); font-weight: 750; font-size: 1rem;
}
.segmented button.active { background: var(--superficie); color: var(--porto-700); box-shadow: 0 2px 10px rgba(31, 62, 99, .12); }
.segmented.compact { padding: 4px; }
.segmented.compact button { min-height: 48px; padding: 0 12px; font-size: .95rem; }

/* ---------- entrar ---------- */
.auth-screen { background: radial-gradient(circle at 50% 0%, #EAF3FB, #E7F1EC 60%, var(--areia-100)); }
.auth-wrap {
  width: 100%; max-width: 440px; margin: 0 auto;
  padding: calc(24px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
  display: flex; flex-direction: column; align-items: stretch; gap: 18px;
}
.auth-logo { width: min(240px, 66vw); align-self: center; margin-bottom: -18px; }
.auth-title { text-align: center; font-size: 1.35rem; font-weight: 800; color: var(--porto-900); }
.auth-card { background: var(--superficie); border-radius: 24px; padding: 18px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 18px; }
.server-settings { color: var(--texto-suave); }
.server-settings summary { min-height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 600; }
.server-settings .field { margin: 8px 0 12px; }
.disclaimer { text-align: center; color: var(--texto-suave); font-size: .9rem; }

/* ---------- início ---------- */
.home-top { padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: min(1.15rem, 20px); font-weight: 800; color: var(--abraco-700); white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; }
.brand b { color: var(--porto-700); }
.font-size { display: flex; border: 2px solid var(--borda); border-radius: 14px; overflow: hidden; background: var(--superficie); flex: 0 0 auto; }
.font-size button {
  width: 44px; height: 48px; border: 0; background: transparent; color: var(--texto); font-weight: 800; line-height: 1;
}
.font-size button:nth-child(1) { font-size: 14px; }
.font-size button:nth-child(2) { font-size: 18px; }
.font-size button:nth-child(3) { font-size: 23px; }
.font-size button[aria-pressed="true"] { background: var(--porto-700); color: #fff; }
.avatar {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--abraco-500), var(--porto-500)); color: #fff; font-weight: 800; font-size: 1.15rem;
}
.avatar.big { width: 64px; height: 64px; font-size: 1.5rem; }
.greeting { margin: 6px 0 18px; }
.greeting h1 { font-size: 1.75rem; font-weight: 800; color: var(--porto-900); }
.greeting p { color: var(--texto-suave); margin-top: 4px; font-size: 1.1rem; }
.actions { display: flex; flex-direction: column; gap: 12px; }
.action {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: var(--alvo-grande); padding: 14px 16px;
  background: var(--superficie); border: 2px solid var(--borda); border-radius: 20px;
  text-align: left; color: var(--texto);
  transition: transform .2s var(--curva), border-color .2s var(--curva);
}
.action:hover { border-color: var(--porto-300); }
.action:active { transform: scale(.985); }
.action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.action-text b { font-size: 1.15rem; font-weight: 800; }
.action-text small { font-size: .95rem; color: var(--texto-suave); line-height: 1.35; }
.action .chevron { color: var(--porto-300); }
.seal { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto; background: var(--porto-100); color: var(--porto-700); }
.seal .icon { width: 28px; height: 28px; }
.seal.sand { background: var(--areia-100); color: var(--areia-700); }
.seal.green { background: var(--abraco-100); color: var(--abraco-700); }
.seal.sky { background: var(--porto-100); color: var(--porto-700); }
.action-primary { background: var(--porto-700); border-color: var(--porto-700); color: #fff; }
.action-primary:hover { border-color: var(--porto-900); background: var(--porto-900); }
.action-primary .action-text small { color: #DCE9F5; }
.action-primary .seal { background: rgba(255, 255, 255, .16); color: #fff; }
.action-primary .chevron { color: #BFD8EC; }
.sos {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px;
  min-height: var(--alvo-grande); padding: 14px 16px;
  background: var(--alerta-100); border: 2px solid var(--alerta-300); border-radius: 20px;
  color: var(--alerta-700); text-align: left;
}
.sos .icon { width: 30px; height: 30px; }
.sos b { display: block; font-size: 1.1rem; }
.sos small { font-size: .95rem; }

/* ---------- conversa ---------- */
.chat-screen { overflow: hidden; }
.chat {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 14px;
}
.bubble-wrap { display: flex; flex-direction: column; max-width: 88%; animation: rise .25s var(--curva); }
.bubble-wrap.assistant { align-self: flex-start; }
.bubble-wrap.user { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 1.05rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant .bubble { background: var(--superficie); border: 2px solid var(--borda); border-bottom-left-radius: 6px; }
.user .bubble { background: var(--porto-700); color: #fff; border-bottom-right-radius: 6px; }
.bubble-wrap.crisis .bubble { background: var(--alerta-100); border-color: var(--alerta-300); }
.bubble-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bubble-actions button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent;
  color: var(--porto-700); font-weight: 700; font-size: .95rem;
}
.bubble-actions button .icon { width: 1.25rem; height: 1.25rem; }
.bubble-actions button:hover { background: var(--porto-50); }
.bubble-actions .muted { color: var(--texto-suave); }
.bubble-actions .call-now { background: var(--alerta-600); color: #fff; padding: 0 14px; }
.bubble-actions .call-now:hover { background: var(--alerta-700); }
.system-line { align-self: center; max-width: 92%; text-align: center; color: var(--texto-suave); font-size: .9rem; background: var(--porto-50); border-radius: 12px; padding: 8px 12px; }
.voice-offer { align-self: stretch; background: var(--superficie); border: 2px dashed var(--porto-300); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.voice-offer .row { display: flex; gap: 10px; flex-wrap: wrap; }
.voice-offer .row .btn { flex: 1; min-width: 140px; }
.typing { display: inline-flex; gap: 6px; padding: 16px 18px; background: var(--superficie); border: 2px solid var(--borda); border-radius: 20px; align-self: flex-start; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--porto-500); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.topics { display: flex; gap: 8px; overflow-x: auto; padding: 6px 14px 8px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.topics button {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: 48px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--borda); background: var(--superficie); color: var(--porto-700); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.topics .more { color: var(--texto-suave); }
.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: var(--fundo); border-top: 1px solid var(--borda);
}
.app.with-tabs .composer { padding-bottom: 10px; }
.composer textarea {
  flex: 1; min-width: 0; min-height: var(--alvo); max-height: 160px; resize: none;
  border-radius: 28px; padding: 14px 18px; overflow-y: auto;
}
.round-button {
  width: var(--alvo); height: var(--alvo); flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--borda); background: var(--superficie); color: var(--porto-700);
}
.round-button.send { background: var(--porto-700); border-color: var(--porto-700); color: #fff; }
.composer:not(.has-text) .send { display: none; }
.composer.has-text #mic-button { display: none; }
.round-button.listening { background: var(--alerta-100); border-color: var(--alerta-600); color: var(--alerta-700); animation: pulse 1.2s ease-in-out infinite; }

/* ---------- respirar ---------- */
.breathe { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 16px 24px 32px; text-align: center; }
.orb-wrap { width: 230px; height: 230px; display: grid; place-items: center; }
.orb {
  width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #fff, var(--abraco-500) 55%, var(--porto-500));
  box-shadow: 0 0 50px rgba(143, 201, 187, .55);
  transition: transform 4s ease-in-out;
}
.orb.grow { transform: scale(1.38); }
.orb span { color: var(--porto-900); font-weight: 800; font-size: 1.25rem; background: rgba(255, 255, 255, .78); padding: 4px 12px; border-radius: 999px; }
.breath-hint { max-width: 320px; color: var(--texto); font-size: 1.1rem; }
.breath-count { min-height: 1.5em; color: var(--texto-suave); font-weight: 700; }

/* ---------- meu dia ---------- */
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.mood {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 84px; padding: 8px 2px; border: 2px solid var(--borda); border-radius: 16px; background: var(--superficie);
}
.mood .emoji { font-size: 30px; line-height: 1; }
.mood .mood-label { font-size: min(.9rem, 16px); font-weight: 700; color: var(--texto); line-height: 1.15; text-align: center; }
.mood[aria-checked="true"] { border-color: var(--porto-700); background: var(--porto-100); box-shadow: inset 0 0 0 1px var(--porto-700); }
#mood-note { margin-bottom: 4px; }
#save-mood { margin-top: 16px; }
.saved-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--abraco-100); color: var(--abraco-700); font-weight: 700; }
.mood-entry { background: var(--superficie); border: 2px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; }
.mood-entry time { display: block; color: var(--texto-suave); font-size: .9rem; }
.mood-entry b { display: block; font-size: 1.05rem; }
.mood-entry p { margin-top: 4px; white-space: pre-wrap; }

/* ---------- palavra de hoje ---------- */
.lantern {
  position: relative; overflow: hidden; text-align: center;
  padding: 26px 20px 20px; border-radius: 24px; border: 2px solid var(--areia-300);
  background: linear-gradient(168deg, #FDF7EE, #F7EADA 70%, #EFE0CC);
}
.lantern::before {
  content: ""; position: absolute; left: 50%; top: -70px; width: 220px; height: 220px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 241, 214, .95), rgba(255, 241, 214, 0) 68%);
}
.lantern > * { position: relative; }
.lantern-date { font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--areia-700); }
.lantern-title { margin: 8px 0 12px; font-size: 1.1rem; color: var(--areia-700); }
.lantern blockquote { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.45; color: var(--texto); }
.lantern cite { display: block; margin: 12px 0 18px; font-style: normal; font-weight: 700; color: var(--porto-700); }
.block { background: var(--superficie); border: 2px solid var(--borda); border-radius: 20px; padding: 18px; }
.block h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 1.1rem; color: var(--porto-700); }
.block p { font-size: 1.1rem; line-height: 1.65; }
.block.prayer { background: var(--abraco-100); border-color: #CFE6DD; }
.block.prayer h3 { color: var(--abraco-700); }
.block.prayer p { white-space: pre-line; font-weight: 600; color: #234E42; }
.invite {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: var(--alvo-grande); padding: 16px; border: 2px dashed var(--porto-300); border-radius: 20px;
  background: var(--superficie); color: var(--texto);
}
.invite .icon { color: var(--porto-700); width: 28px; height: 28px; }
.invite b { display: block; font-size: 1.1rem; line-height: 1.4; }
.invite small { display: block; color: var(--porto-700); font-weight: 700; margin-top: 4px; }
.comfort { background: var(--superficie); border: 2px solid var(--borda); border-radius: var(--raio); }
.comfort summary { min-height: var(--alvo); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 750; cursor: pointer; list-style: none; }
.comfort summary::-webkit-details-marker { display: none; }
.comfort summary::after { content: "+"; font-size: 1.4rem; color: var(--porto-500); }
.comfort[open] summary::after { content: "−"; }
.comfort .inside { padding: 0 16px 16px; }
.comfort blockquote { margin: 0 0 6px; font-size: 1.1rem; font-style: italic; color: var(--porto-900); }
.comfort cite { font-style: normal; font-weight: 700; color: var(--texto-suave); }

/* ---------- caminhos e plano ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: 0 0 auto; min-height: 48px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--borda); background: var(--superficie); color: var(--texto); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.filters button[aria-pressed="true"] { background: var(--porto-700); border-color: var(--porto-700); color: #fff; }
.theme-note { background: var(--porto-50); border-radius: 12px; padding: 10px 14px; color: var(--porto-900); }
.path-card { background: var(--superficie); border: 2px solid var(--borda); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.path-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.path-kind { font-size: .9rem; font-weight: 800; color: var(--porto-700); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--porto-50); color: var(--texto-suave); font-size: .85rem; font-weight: 700; }
.badge.ok { background: var(--abraco-100); color: var(--abraco-700); }
.badge.warn { background: var(--areia-100); color: var(--areia-700); }
.badge.danger { background: var(--alerta-100); color: var(--alerta-700); }
.path-card h3 { font-size: 1.15rem; }
.path-sub { color: var(--porto-700); font-weight: 700; }
.path-card p { color: var(--texto-suave); }
.path-price { font-size: 1.1rem; }
.path-card .btn { margin-top: 8px; }
.plan-mini { background: var(--superficie); border: 2px solid var(--abraco-500); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.plan-mini h3 { font-size: 1.2rem; color: var(--porto-900); margin-top: 4px; }
.plan-mini p { color: var(--texto-suave); }
.plan-mini-price b { font-size: 1.6rem; }
.plan-mini-price small { display: block; color: var(--texto-suave); }
.plan-card { background: var(--superficie); border: 2px solid var(--abraco-500); border-radius: 24px; padding: 24px 20px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.plan-card img { width: 88px; height: 88px; border-radius: 22px; }
.plan-card h3 { font-size: 1.35rem; color: var(--porto-900); }
.big-price { font-size: 2.4rem; font-weight: 900; }
.big-price small { font-size: 1rem; color: var(--texto-suave); font-weight: 700; }
.checklist { list-style: none; padding: 0; margin: 8px 0; text-align: left; align-self: stretch; }
.checklist li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.checklist .icon { color: var(--abraco-700); }

/* ---------- perfil ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.profile-head h3 { font-size: 1.3rem; }
.profile-head p { color: var(--texto-suave); overflow-wrap: anywhere; }
.settings, .menu { background: var(--superficie); border: 2px solid var(--borda); border-radius: 20px; overflow: hidden; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.setting + .setting { border-top: 1px solid var(--borda); }
.setting-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.setting-text small { color: var(--texto-suave); font-size: .9rem; }
.switch {
  position: relative; width: 64px; height: 38px; flex: 0 0 auto; border-radius: 999px;
  border: 2px solid var(--borda); background: #E4EAF0; padding: 0;
  transition: background-color .2s var(--curva);
}
.switch span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .2s var(--curva); }
.switch[aria-checked="true"] { background: var(--porto-700); border-color: var(--porto-700); }
.switch[aria-checked="true"] span { transform: translateX(26px); }
.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: var(--alvo); padding: 12px 16px; border: 0; background: transparent;
  text-align: left; text-decoration: none; color: var(--texto); font-weight: 650; font-size: 1.05rem;
}
.menu-row span { flex: 1; }
.menu-row + .menu-row { border-top: 1px solid var(--borda); }
.menu-row .icon:first-child { color: var(--porto-500); }
.menu-row .chevron { color: var(--porto-300); }
.menu-row:hover { background: var(--porto-50); }
.menu-row.danger, .menu-row.danger .icon:first-child { color: var(--alerta-700); }
.menu-spaced { margin-top: 28px; }

/* ---------- equipe: usuários e aprendizado ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--superficie); border: 2px solid var(--borda); border-radius: var(--raio); padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; color: var(--porto-700); line-height: 1.2; }
.stat span { color: var(--texto-suave); font-size: .9rem; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; }
.result-count { color: var(--texto-suave); font-size: .95rem; }
.user-card, .admin-card { background: var(--superficie); border: 2px solid var(--borda); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.user-card.is-blocked { border-color: var(--alerta-300); background: #FFFBFA; }
.user-head { display: flex; align-items: center; gap: 12px; }
.user-head .avatar { width: 44px; height: 44px; font-size: 1rem; }
.user-head h4 { font-size: 1.1rem; overflow-wrap: anywhere; }
.user-head p { color: var(--texto-suave); font-size: .95rem; overflow-wrap: anywhere; }
.user-meta { color: var(--texto-suave); font-size: .92rem; line-height: 1.5; }
.user-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.user-actions .btn { min-height: 48px; padding: 8px 10px; font-size: .92rem; }
.user-actions .danger-text { color: var(--alerta-700); }
.admin-card p { overflow-wrap: anywhere; }
.admin-card small { color: var(--texto-suave); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions .btn { flex: 1; min-width: 130px; min-height: 48px; font-size: .95rem; }
@media (max-width: 440px) { .admin-actions { flex-direction: column; } .admin-actions .btn { width: 100%; } }
.quote { border-left: 4px solid var(--abraco-500); padding-left: 12px; white-space: pre-wrap; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.triggers { display: flex; flex-wrap: wrap; gap: 6px; }
.triggers span { background: var(--porto-50); border-radius: 999px; padding: 3px 10px; font-size: .9rem; }
.proofs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.proof { border-radius: 10px; padding: 8px 4px; text-align: center; font-size: .9rem; font-weight: 750; background: var(--alerta-100); color: var(--alerta-700); }
.proof.pass { background: var(--abraco-100); color: var(--abraco-700); }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--superficie); border: 2px solid var(--borda); border-radius: 14px; padding: 12px 14px; }
.version-row.active { border-color: var(--abraco-500); }
.version-row small { display: block; color: var(--texto-suave); }

/* ---------- barra de abas ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 4px; padding: 6px 6px calc(6px + var(--safe-bottom));
  background: var(--superficie); border-top: 2px solid var(--borda);
}
.tabbar button {
  flex: 1; min-width: 0; min-height: 60px; border: 0; border-radius: 14px; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--texto-suave); font-weight: 700; font-size: min(.9rem, 16px);
}
.tabbar button .icon { width: 26px; height: 26px; }
.tabbar button[aria-current="page"] { color: var(--porto-700); background: var(--porto-100); }

/* ---------- janelas ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 50; display: none; align-items: flex-end;
  background: rgba(23, 37, 54, .55);
}
.overlay.open { display: flex; }
.sheet {
  width: 100%; max-height: 92%; overflow-y: auto;
  background: var(--superficie); border-radius: 26px 26px 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 14px;
  animation: slide .25s var(--curva);
}
.sheet h3 { font-size: 1.35rem; color: var(--porto-900); }
.sheet p { color: var(--texto-suave); }
.sheet-actions { display: flex; gap: 10px; margin-top: 4px; }
.sheet-actions .btn { flex: 1; }
.crisis-sheet h3 { color: var(--alerta-700); }
.call {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: var(--alvo-grande); padding: 12px 16px; border-radius: 18px;
  border: 2px solid var(--borda); background: var(--superficie); color: var(--texto); text-align: left; text-decoration: none;
}
.call > span:nth-child(2) { flex: 1; }
.call b { display: block; font-size: 1.05rem; }
.call small { color: var(--texto-suave); font-size: .95rem; }
.call-number { min-width: 64px; font-size: 1.5rem; font-weight: 900; color: var(--alerta-700); }
.call .icon { color: var(--alerta-700); }
.primary-call { background: var(--alerta-600); border-color: var(--alerta-600); color: #fff; }
.primary-call .call-number, .primary-call small, .primary-call .icon { color: #fff; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  min-height: 96px; padding: 14px; border-radius: 16px; border: 2px solid var(--borda); background: var(--superficie);
}
.theme-card .emoji { font-size: 26px; }
.theme-card b { font-size: 1.02rem; }
.theme-card small { color: var(--texto-suave); font-size: .9rem; line-height: 1.3; }
.temp-password {
  font: 800 1.6rem/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em;
  text-align: center; padding: 16px; border-radius: 16px; background: var(--porto-50); border: 2px dashed var(--porto-300);
  user-select: all; overflow-wrap: anywhere;
}
.toast {
  position: absolute; left: 50%; bottom: calc(var(--tabbar) + 16px); z-index: 60;
  transform: translate(-50%, 16px); width: max-content; max-width: calc(100% - 32px);
  background: #1F2D3B; color: #fff; border-radius: 14px; padding: 12px 18px; font-size: 1rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--curva), transform .2s var(--curva);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animações ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slide { from { transform: translateY(100%); } }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .5; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(178, 58, 46, .15); } }

/* ---------- telas maiores ---------- */
@media (min-width: 600px) {
  body { padding: 20px 0; }
  .app { height: calc(100dvh - 40px); border-radius: 28px; box-shadow: 0 24px 70px rgba(31, 42, 54, .18); }
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 26px; max-width: 520px; margin: 0 auto; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}
@media (max-width: 360px) {
  .content { padding-left: 14px; padding-right: 14px; }
  .font-size button { width: 38px; }
  .help-pill span, .pill span { display: none; }
  .user-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .orb.grow { transform: scale(1.15); }
}

/* ---------- páginas simples (privacidade, exclusão) ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 24px 20px 48px; }
.page .card { margin-top: 16px; }
.page h1 { font-size: 1.6rem; color: var(--porto-900); margin-bottom: 12px; }
.page h2 { font-size: 1.15rem; color: var(--porto-700); margin: 22px 0 6px; }
.page p { margin: 6px 0; }
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-top img { width: 180px; }
