/*
VOICE: acolhedora e serena — um caderno japonês nas mãos, sem pressa.
IDEA: folha de papel washi com um carimbo hanko; cada etapa é uma casa da mandala.
PICTURE: a grade 9×9 que se monta do centro para fora.
COLOUR and TYPE: paleta terrosa do Cada Vez Melhor (sem azul), terracota como acento, 8 cores de pilar; EB Garamond + Lato.
LAYOUT: coluna única de até 640px no app; página larga (1180px) na venda; tudo pensado primeiro para o polegar.
*/
:root {
  color-scheme: light dark;
  --bg: light-dark(#f3eee2, #1d1915);
  --surface: light-dark(#fbf8f1, #27221d);
  --surface-2: light-dark(#efe7d6, #322b24);
  --ink: light-dark(#2b241e, #f1eadb);
  --ink-2: light-dark(#625649, #c4b8a5);
  --line: light-dark(#dcd1bb, #463c32);
  --accent: light-dark(#82452d, #d98f66);
  --accent-ink: light-dark(#fffaf2, #1d1915);
  --accent-soft: light-dark(#f0dfd3, #3c2a21);
  --gold: #c89d36;
  --ok: light-dark(#5f7048, #a9bd8a);
  --danger: light-dark(#a1352a, #ef8f80);
  --shadow: light-dark(0 1px 2px rgba(60, 40, 20, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4));
  --shadow-lg: light-dark(0 12px 32px -12px rgba(60, 40, 20, 0.28), 0 14px 36px -12px rgba(0, 0, 0, 0.7));
  --r: 14px;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: Lato, 'Helvetica Neue', Arial, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.6 var(--sans);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  background-image:
    radial-gradient(1200px 600px at 110% -10%, light-dark(rgba(200, 157, 54, 0.10), rgba(200, 157, 54, 0.06)), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, light-dark(rgba(130, 69, 45, 0.07), rgba(130, 69, 45, 0.10)), transparent 60%);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 8px; }
h1:focus { outline: none; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.block { display: block; }
.mono, code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.hidden-soft { display: none !important; }
svg { display: block; }

/* ------------------------------------------------------------------ */
/* Boot                                                                */
/* ------------------------------------------------------------------ */
#boot { min-height: 100dvh; display: grid; place-items: center; }
#boot .boot-l { width: 44px; height: 55px; animation: glow 1.6s ease-in-out infinite alternate; }

/* ------------------------------------------------------------------ */
/* Estrutura                                                           */
/* ------------------------------------------------------------------ */
#view { padding-bottom: calc(96px + var(--safe-b)); }
#view.wide { padding-bottom: 0; }
.screen { max-width: 640px; margin: 0 auto; padding: 8px 18px 24px; }
.band { padding: clamp(36px, 6vw, 80px) max(5vw, 18px); }

.top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 44px 1fr auto 44px; align-items: center; gap: 6px;
  padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top-title { font-weight: 700; font-size: 15px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-state { font-size: 12px; color: var(--ink-2); white-space: nowrap; min-width: 0; }
.save-state[data-state='offline'], .save-state[data-state='expired'] { color: var(--danger); }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 12px; color: var(--ink);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn-spacer { width: 44px; }

.title { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 7.4vw, 40px); line-height: 1.08; letter-spacing: -0.005em; margin: 18px 0 10px; text-wrap: balance; }
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 7vw, 66px); line-height: 1.02; margin: 0 0 16px; text-wrap: balance; letter-spacing: -0.01em; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 22px; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.lead { font-size: 17.5px; color: var(--ink-2); margin: 0 0 18px; text-wrap: pretty; }
.small-lead { font-size: 16px; }
.eyebrow { margin: 14px 0 0; color: var(--accent); font-weight: 700; font-size: 15px; }
.hint { font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------------------ */
/* Botões, campos, chips                                               */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.quiet { background: transparent; color: var(--ink-2); font-weight: 400; }
.btn.lg { min-height: 56px; font-size: 17px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.grow { flex: 1; }
.link, .link-btn { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 4px 2px; font-size: inherit; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; position: relative; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-weight: 700; font-size: 15px; }
.field em, legend em { font-style: normal; font-weight: 400; color: var(--ink-2); }
input[type='text'], input:not([type]), input[type='email'], input[type='password'], input[type='number'], input[type='search'], textarea, select {
  width: 100%; font-size: 16px; padding: 13px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: light-dark(#fffdf8, #1f1b17); color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.count { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--ink-2); pointer-events: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 1px; flex: none; }
.form-error { color: var(--danger); font-weight: 700; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 4px 0 -2px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: 14.5px; text-align: left; line-height: 1.25; display: inline-flex; gap: 6px; align-items: center;
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { border-color: var(--accent); }
.chip.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.ghost { border-style: dashed; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: inline-flex; min-height: 44px; align-items: center; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; }
.seg-opt input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }

.nav-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 22px; }
.nav-row.tight { margin-top: 14px; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.pbar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 12px 0 0; }
.pbar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s ease; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 14px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ */
/* Página inicial                                                      */
/* ------------------------------------------------------------------ */
.land-top { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) max(5vw, 16px) 0; max-width: 1280px; margin: 0 auto; }
.brand { white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; max-width: 1280px; margin: 0 auto; padding-top: clamp(20px, 4vw, 48px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 8px; }
.hero-fig { margin: 0; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6%; aspect-ratio: 1; padding: 3%; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.hb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; }
.hc { border-radius: 14%; background: color-mix(in srgb, var(--c) 18%, var(--surface)); display: grid; place-items: center; overflow: hidden; opacity: 0; transform: scale(0.6); animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards; animation-delay: var(--d); }
.hc i { font-style: normal; font-size: clamp(6px, 0.85vw, 11.5px); overflow-wrap: anywhere; line-height: 1.1; text-align: center; padding: 6%; font-weight: 700; display: none; }
.hc-pillar { background: var(--c); color: #fffaf0; }
.hc-center { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hc-center i { font-family: var(--serif); font-weight: 600; }
.hc-action::after { content: ''; width: 46%; height: 7%; border-radius: 4px; background: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0.55em 0 color-mix(in srgb, var(--c) 35%, transparent); transform: translateY(-0.25em); font-size: clamp(5px, 0.9vw, 10px); }
@media (min-width: 760px) { .hc i { display: block; } }
.hero-grid.still .hc { animation: none; opacity: 1; transform: none; }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
.legend { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend .dot.c { background: var(--accent); }
.legend .dot.p { background: #819072; }
.legend .dot.a { background: color-mix(in srgb, #c89d36 30%, var(--surface)); border: 1px solid #c89d36; }

.how, .get, .faq, .pricing { max-width: 1180px; margin: 0 auto; }
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.steps3 li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 6px; counter-increment: s; position: relative; }
.steps3 li::before { content: counter(s); font-family: var(--serif); font-size: 34px; color: var(--accent); line-height: 1; }
.steps3 b { font-size: 18px; }
.steps3 span { color: var(--ink-2); }
.origin { background: var(--surface-2); }
.origin-inner { max-width: 760px; margin: 0 auto; font-size: 17.5px; }
.get-list { display: grid; gap: 12px; padding: 0; list-style: none; margin: 0; max-width: 820px; }
.get-list li { padding-left: 34px; position: relative; }
.get-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 5px; background: var(--accent); box-shadow: 4px 4px 0 color-mix(in srgb, var(--gold) 60%, transparent); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 18px; justify-content: center; }
.plan { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 26px; display: grid; gap: 10px; align-content: start; }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.plan h3 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.price { font-family: var(--serif); font-size: 46px; font-weight: 600; margin: 0; line-height: 1; white-space: nowrap; }
.plan p { margin: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 820px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 17px; list-style-position: outside; }
.faq details p { color: var(--ink-2); margin: 8px 0 0; }
.foot { text-align: center; border-top: 1px solid var(--line); font-size: 15px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .hero-copy { display: contents; }
  .hero .display { order: 1; margin: 0; }
  .hero .lead { order: 2; margin: 0; }
  .hero-fig { order: 3; max-width: 420px; width: 100%; margin: 4px auto 0; }
  .hero-cta { order: 4; }
  .brand { font-size: 18px; }
  .steps3 { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Compra, login, obrigado                                             */
/* ------------------------------------------------------------------ */
.login-mark, .thanks-mark { display: grid; place-items: center; margin-top: 26px; }
.login-mark svg, .thanks-mark svg { animation: glow 2.4s ease-in-out infinite alternate; }
.code-input { text-align: center; font-size: 26px !important; letter-spacing: 0.18em; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; padding: 16px !important; }
.code-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.code-list li { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 4px 4px 4px 16px; }
.code-list code { font-size: 20px; font-weight: 700; }
.demo-note { background: color-mix(in srgb, var(--gold) 18%, var(--surface)); border: 1px dashed var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; }
.sim-badge { display: inline-block; margin-top: 14px; background: color-mix(in srgb, var(--gold) 25%, var(--surface)); border-radius: 99px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.thanks .card { margin-top: 12px; }

/* ------------------------------------------------------------------ */
/* Boas-vindas                                                         */
/* ------------------------------------------------------------------ */
.letter {
  font-family: var(--serif); font-size: 19px; line-height: 1.55; margin: 18px 0;
  background: light-dark(#fffaf0, #2b251f); border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; padding: 22px 22px 18px;
  box-shadow: var(--shadow-lg); position: relative;
}
.letter::before { content: ''; position: absolute; top: -10px; right: 22px; width: 38px; height: 38px; border-radius: 50%; background: #b4462b; opacity: 0.9; transform: rotate(-8deg); box-shadow: inset 0 0 0 3px light-dark(#fffaf0, #2b251f), inset 0 0 0 5px #b4462b; }
.letter p { margin: 0 0 12px; }
.letter-hi { font-size: 26px; font-weight: 600; }
.letter-sign { font-style: italic; }
.letter-sign span { font-style: normal; font-weight: 600; }
.member { text-align: center; color: var(--ink-2); margin: 0 0 16px; }

/* ------------------------------------------------------------------ */
/* Trilha                                                              */
/* ------------------------------------------------------------------ */
.trail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ring { width: 82px; height: 82px; flex: none; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 40px 40px; transition: stroke-dashoffset 0.6s ease; }
.ring text { font: 700 17px var(--sans); fill: var(--ink); }
.next-card { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 14px 0 22px; border-color: var(--accent); cursor: pointer; background: linear-gradient(135deg, var(--surface), var(--accent-soft)); }
.next-card.done { cursor: default; grid-template-columns: 1fr; }
.next-label { grid-column: 1; font-size: 13px; font-weight: 700; color: var(--accent); }
.next-title { grid-column: 1; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; }
.next-sub { grid-column: 1; color: var(--ink-2); font-size: 15px; }
.next-go { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.next-go svg { width: 22px; height: 22px; }
.stations { list-style: none; padding: 0; margin: 0 0 24px; position: relative; }
.stations::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.station button { width: 100%; display: flex; gap: 14px; align-items: center; background: none; border: 0; padding: 8px 0; text-align: left; }
.stone { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); border: 2px solid var(--line); font-weight: 700; color: var(--ink-2); position: relative; z-index: 1; }
.stone svg { width: 20px; height: 20px; }
.station.done .stone { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.station.current .stone { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.st-text { display: grid; }
.st-text b { font-size: 16.5px; }
.st-text small { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station.done .st-text b { color: var(--ink-2); }
.quote-card { margin: 8px 0 22px; padding: 22px; border-radius: var(--r); background: var(--surface-2); }
.quote-card blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.35; }
.quote-card figcaption { margin-top: 8px; color: var(--ink-2); font-size: 14px; }

/* ------------------------------------------------------------------ */
/* Aulas                                                               */
/* ------------------------------------------------------------------ */
.dots { display: flex; gap: 6px; margin-top: 14px; }
.dots span { flex: 1; height: 5px; border-radius: 9px; background: var(--surface-2); }
.dots span.done { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.dots span.on { background: var(--accent); }
.prose { font-size: 17.5px; line-height: 1.65; }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--ink); }
.takeaway { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 16px; border-radius: 0 12px 12px 0; margin: 20px 0; }
.takeaway span { font-size: 13px; font-weight: 700; color: var(--accent); }
.takeaway p { margin: 4px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.3; }

/* ------------------------------------------------------------------ */
/* Centro                                                              */
/* ------------------------------------------------------------------ */
.mini-m3 { display: grid; grid-template-columns: repeat(3, 22px); gap: 4px; margin-top: 18px; }
.mini-m3 span { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); }
.mini-m3 span.on { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); animation: glowbox 2s ease-in-out infinite alternate; }
.center-step .field { margin-bottom: 14px; }
.examples { margin: -6px 0 16px; }
.examples summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 15px; padding: 6px 0; }
.clarity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.clarity-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-right: 2px; }
#meter { display: contents; }
.cpill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); transition: background 0.25s ease; }
.cpill svg { width: 14px; height: 14px; }
.cpill.on { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Grade 3×3 (pilares e ações)                                         */
/* ------------------------------------------------------------------ */
.m3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 16px auto; max-width: 420px; transition: max-width 0.25s ease; }
.cell {
  aspect-ratio: 1; border-radius: 14px; border: 1.5px solid transparent; padding: 6px; position: relative;
  display: grid; place-items: center; text-align: center; overflow: hidden;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--ink);
  font-size: clamp(11px, 3.1vw, 14px); line-height: 1.15; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cell .ct:empty { display: none; }
.cell .ct { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; hyphens: auto; }
.cell .cl { font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, var(--ink)); opacity: 0.9; }
.cell .cn { position: absolute; top: 5px; left: 7px; font-size: 10px; font-weight: 700; opacity: 0.45; }
.cell.empty { border: 1.5px dashed color-mix(in srgb, var(--c) 55%, var(--line)); background: var(--surface); }
.cell.sel { border: 2.5px solid var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), var(--shadow-lg); transform: scale(1.04); z-index: 1; }
.cell.center { background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-weight: 600; font-size: clamp(12.5px, 3.5vw, 16px); }
.ring-m3 .cell.pillar.filled { background: var(--c); color: #fffaf0; }
.ring-m3 .cell.pillar.filled.sel { color: #fffaf0; }
.pillar-center { background: var(--c) !important; color: #fffaf0 !important; }
.block-m3 .cell.action.filled { font-weight: 400; font-size: clamp(10.5px, 2.9vw, 13px); }
button.cell:active { transform: scale(0.97); }

.editor { margin-top: 8px; border-top: 4px solid var(--c); display: grid; gap: 12px; }
.ed-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.ed-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; display: inline-block; }
.ed-count { margin-left: auto; color: var(--ink-2); font-weight: 400; font-size: 13px; }
.lens { color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.spark { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 0; }
.slices summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 4px 0 8px; }
.freq { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { flex: none; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line); background: transparent; font-size: 13.5px; }
.fchip.on { background: var(--c); border-color: var(--c); color: #fffaf0; font-weight: 700; }

.ptabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px -18px 0; padding: 4px 18px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { flex: none; scroll-snap-align: center; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13.5px; max-width: 180px; }
.pt-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.pt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-n { color: var(--ink-2); font-size: 12px; }
.ptab.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); font-weight: 700; }
.ptab.full .pt-n { color: var(--ok); font-weight: 700; }
.pillar-title { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pt-badge { width: 38px; height: 38px; border-radius: 11px; background: var(--c); color: #fffaf0; display: grid; place-items: center; font-family: var(--sans); font-size: 18px; font-weight: 700; flex: none; }

/* Enquanto digita no celular, a grade encolhe para o teclado não cobrir o campo */
@media (max-width: 700px) {
  .pillar-step.typing .m3 { max-width: 190px; gap: 4px; margin: 8px auto; }
  .pillar-step.typing .cell { border-radius: 9px; padding: 2px; font-size: 8px; }
  .pillar-step.typing .cell .cl, .pillar-step.typing .cell .cn { display: none; }
  .pillar-step.typing .pillar-title { font-size: 22px; margin: 8px 0 0; }
  .pillar-step.typing .pt-badge { width: 28px; height: 28px; font-size: 14px; }
}

/* ------------------------------------------------------------------ */
/* Rotinas                                                             */
/* ------------------------------------------------------------------ */
.rcount { font-size: 15px; color: var(--ink-2); }
.rcount b { color: var(--accent); font-size: 20px; }
.rgroup { margin: 16px 0; }
.rg-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 8px; }
.ritem { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; overflow: hidden; }
.ritem.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.rtoggle { width: 100%; display: flex; gap: 12px; align-items: center; background: none; border: 0; padding: 12px 14px; text-align: left; min-height: 52px; }
.rtoggle:disabled { opacity: 0.45; }
.rbox { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.ritem.on .rbox { background: var(--c); border-color: var(--c); color: #fffaf0; }
.rbox svg { width: 16px; height: 16px; }
.rtext { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.daily { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); color: var(--ink); font-weight: 700; }
.anchor { display: grid; gap: 6px; padding: 0 14px 14px 52px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.anchor em { font-style: normal; font-weight: 400; }
.anchor input { padding: 10px 12px; font-size: 16px; }
.rbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.rbar .rcount { margin: 0; }
.rfilter .fchip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sticky-nav { padding-right: 78px !important; }
.sticky-nav { position: sticky; bottom: calc(10px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 10px; margin: 14px -10px 0; border-radius: 16px; backdrop-filter: blur(8px); }

/* ------------------------------------------------------------------ */
/* Compromisso                                                         */
/* ------------------------------------------------------------------ */
.paper-area { font-family: var(--serif); font-size: 19px !important; line-height: 1.6 !important; background: light-dark(#fffaf0, #2b251f) !important; background-image: repeating-linear-gradient(transparent 0 29.4px, color-mix(in srgb, var(--line) 70%, transparent) 29.4px 30.4px) !important; background-position: 0 12px !important; min-height: 220px; }
.commit-step #starters { margin-bottom: 10px; }
.commit-step .check { margin: 12px 0; }
.sign { margin-top: 16px; }
.sign-row { display: flex; gap: 14px; align-items: center; }
.sign-row .grow { flex: 1; }
#seal { width: 96px; height: 96px; flex: none; }
.grow { flex: 1; }

/* ------------------------------------------------------------------ */
/* Mandala final                                                       */
/* ------------------------------------------------------------------ */
.poster-frame { margin: 12px 0 0; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); background: #f6f1e5; aspect-ratio: 4 / 5; cursor: zoom-in; display: grid; place-items: center; }
.poster-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster-loading { display: grid; justify-items: center; gap: 6px; color: #6b6054; font-size: 14px; }
.exports { display: grid; gap: 10px; margin: 18px 0; }
.exp { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); min-height: 64px; }
.exp:hover { border-color: var(--accent); }
.exp > svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.exp span { display: grid; }
.exp small { color: var(--ink-2); font-size: 13.5px; }
.exp.busy { opacity: 0.7; pointer-events: none; }
.edit-links { margin: 18px 0; }
.circle-cta { margin: 22px 0; padding: 18px; border-radius: var(--r); border: 1.5px dashed var(--line); display: grid; gap: 10px; justify-items: start; }
.circle-cta p { margin: 0; }
.zoom { position: fixed; inset: 0; z-index: 60; background: rgba(20, 16, 12, 0.92); display: grid; grid-template-rows: auto 1fr; }
.zoom-bar { display: flex; justify-content: space-between; align-items: center; color: #f1eadb; padding: max(8px, env(safe-area-inset-top)) 10px 8px 16px; font-size: 14px; }
.zoom-bar .icon-btn { color: #f1eadb; }
.zoom-scroll { overflow: auto; -webkit-overflow-scrolling: touch; display: grid; place-items: center; padding: 10px; }
.zoom-scroll img { width: min(100%, 720px); height: auto; cursor: zoom-in; border-radius: 6px; }
.zoom-scroll img.z { width: 260%; max-width: none; cursor: zoom-out; place-self: start; }

/* ------------------------------------------------------------------ */
/* Pesquisa                                                            */
/* ------------------------------------------------------------------ */
.q { margin: 0; }
.q legend { font-weight: 700; padding: 0; margin-bottom: 10px; font-size: 16px; float: left; width: 100%; }
.q legend + * { clear: both; }
.scale5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale5 label, .nps label { position: relative; }
.scale5 input, .nps input, .chip-check input { position: absolute; opacity: 0; }
.scale5 span { display: grid; justify-items: center; gap: 2px; padding: 10px 2px; border-radius: 12px; border: 1.5px solid var(--line); text-align: center; min-height: 64px; align-content: center; }
.scale5 b { font-size: 18px; }
.scale5 small { overflow-wrap: anywhere; font-size: 11px; color: var(--ink-2); line-height: 1.1; }
.nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.nps span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; }
.nps-ends { display: flex; justify-content: space-between; color: var(--ink-2); margin-top: 6px; }
.scale5 input:checked + span, .nps input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.scale5 input:checked + span small { color: var(--accent-ink); }
.scale5 input:focus-visible + span, .nps input:focus-visible + span, .chip-check input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.chip-check span { display: inline-flex; min-height: 40px; align-items: center; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); font-size: 14.5px; cursor: pointer; }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.survey .form { gap: 12px; }
@media (max-width: 420px) { .nps { grid-template-columns: repeat(6, minmax(0, 1fr)); } .nps-ends { display: none; } }

/* ------------------------------------------------------------------ */
/* Lanterna, folhas, avisos                                            */
/* ------------------------------------------------------------------ */
#lantern-root[hidden] { display: none; }
.lantern-fab {
  position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 40;
  width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-lg); display: grid; place-items: center;
}
.lantern-fab .lantern-svg { filter: drop-shadow(0 0 6px rgba(232, 180, 92, 0.55)); }
.lantern-fab.glow .lantern-svg { animation: glow 1.4s ease-in-out infinite alternate; }
.lantern-fab.muted .lantern-svg { filter: grayscale(0.7) opacity(0.7); }
@keyframes glow { from { filter: drop-shadow(0 0 3px rgba(232, 180, 92, 0.35)); } to { filter: drop-shadow(0 0 14px rgba(232, 180, 92, 0.95)); } }
@keyframes glowbox { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); } to { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 28%, transparent); } }
.lantern-bubble {
  position: fixed; right: 16px; bottom: calc(86px + var(--safe-b)); z-index: 41; width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 6px 18px; padding: 16px 16px 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.25s ease, transform 0.25s ease;
}
.lantern-bubble.in { opacity: 1; transform: none; }
.lantern-bubble::after { content: ''; position: absolute; right: 22px; bottom: -8px; width: 16px; height: 16px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.lb-icon { float: left; margin: 2px 10px 0 0; }
@media (max-width: 700px) {
  .lantern-bubble { top: calc(60px + env(safe-area-inset-top, 0px)); bottom: auto; left: 10px; right: 10px; width: auto; border-radius: 16px; transform: translateY(-12px) scale(0.98); }
  .lantern-bubble.in { transform: none; }
  .lantern-bubble::after { display: none; }
}
.lb-close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; border-radius: 10px; }
.lb-close svg { width: 18px; height: 18px; }
.lb-text { margin: 0 28px 0 0; font-size: 16px; line-height: 1.45; }
.lb-sub { margin: 8px 0 0; font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 16px; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lb-actions .chip { min-height: 38px; font-size: 14px; }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(25, 18, 12, 0.42); opacity: 0; transition: opacity 0.22s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-wrap.in .sheet { transform: none; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.sheet-title { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 4px 0 6px; }
.sheet-body p { margin: 0 0 12px; }
.sheet-actions { display: grid; gap: 8px; }
@media (min-width: 700px) { .sheet { bottom: 50%; transform: translateY(60%) scale(0.98); opacity: 0; border-radius: 22px; transition: transform 0.22s ease, opacity 0.22s ease; } .sheet-wrap.in .sheet { transform: translateY(50%); opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 10px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 99px; font-size: 15px; z-index: 70; opacity: 0; transition: all 0.25s ease; max-width: calc(100vw - 32px); text-align: center; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; width: 100vw; height: 100vh; }

.breathe { position: fixed; inset: 0; z-index: 65; background: color-mix(in srgb, var(--bg) 96%, transparent); display: grid; place-items: center; opacity: 0; transition: opacity 0.3s ease; }
.breathe.in { opacity: 1; }
.breathe-inner { display: grid; justify-items: center; gap: 22px; padding: 20px; text-align: center; }
.breathe-circle { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #f3cf86, #c89d36 60%, #9b6432); color: #2b241e; box-shadow: 0 0 60px rgba(232, 180, 92, 0.45); transition-property: width, height; transition-timing-function: ease-in-out; }
.breathe-circle.grow, .breathe-circle.hold { width: 230px; height: 230px; }
.breathe-circle.shrink { width: 120px; height: 120px; }
.breathe-word { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.breathe-sub { color: var(--ink-2); margin: 0; }

body.is-demo::before { content: 'Demonstração · nada é cobrado'; white-space: nowrap; position: fixed; left: 12px; bottom: calc(6px + var(--safe-b)); z-index: 30; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--gold) 85%, white); color: #2b241e; padding: 3px 10px; border-radius: 99px; pointer-events: none; opacity: 0.92; }

/* ------------------------------------------------------------------ */
/* Painel administrativo                                               */
/* ------------------------------------------------------------------ */
.admin { max-width: 1100px; }
.admin-top { grid-template-columns: auto 1fr auto auto; }
.atabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 18px; scrollbar-width: none; }
.atab { flex: none; min-height: 42px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; }
.atab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.tile span { font-size: 13px; color: var(--ink-2); }
.tile b { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; white-space: nowrap; }
.gen { margin-bottom: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.gen details summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 4px 0; }
.gen-result { border-top: 1px solid var(--line); padding-top: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters > * { flex: 1 1 180px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--ink-2); background: var(--surface-2); }
td.num { text-align: right; white-space: nowrap; }
td code { font-size: 15px; font-weight: 700; white-space: nowrap; }
.row-actions { display: flex; gap: 4px; align-items: center; }
.status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.s-available, .s-paid, .s-sent { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); }
.s-active { background: color-mix(in srgb, var(--gold) 26%, var(--surface)); }
.s-revoked, .s-failed, .s-expired { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }
.fb-list { display: grid; gap: 10px; }
.fb header { display: flex; justify-content: space-between; gap: 10px; }
.fb-scores { display: flex; gap: 16px; font-size: 14px; margin: 6px 0; }
.fb blockquote { margin: 8px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-family: var(--serif); font-size: 17px; }
.fb blockquote small { display: block; font-family: var(--sans); font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.mail summary { cursor: pointer; display: grid; gap: 2px; }
.mail pre { white-space: pre-wrap; font-size: 13.5px; background: var(--surface-2); padding: 10px; border-radius: 10px; }
@media (max-width: 700px) {
  table { font-size: 13.5px; }
  .stack thead { display: none; }
  .stack tr { display: grid; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .stack td { display: flow-root; border: 0; padding: 3px 0; padding-inline-start: 7.5em; text-align: start; }
  .stack td::before { content: attr(data-l); float: inline-start; width: 7em; margin-inline-start: -7.5em; color: var(--ink-2); font-size: 12px; }
  .stack td:empty { display: none; }
  td.num { text-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
