/* Painel da Loja · um produto MBZSoluções
   Paleta mbz-web-design (ink/teal/amber) + escalas do @mbzsolucoes/design-tokens
   (spacing 4/8/16/24/40/64, radius 6/10/14/20, motion 150/200/320ms).
   Tema escuro padrão, tema claro por prefers-color-scheme ou data-theme. */

:root {
  --ink: #0C1315;
  --panel: #141D20;
  --panel2: #1B2629;
  --bone: #E9EEEC;
  --teal: #4FD6C3;
  --amber: #EFB454;

  --bg: var(--ink);
  --surface: var(--panel);
  --surface-2: var(--panel2);
  --fg: var(--bone);
  --fg-2: #B9C6C3;
  --fg-3: #98A9A5;
  --line: rgb(233 238 236 / 0.09);
  --line-2: rgb(233 238 236 / 0.16);
  --accent: var(--teal);
  --accent-ink: #062723;
  --cta: var(--amber);
  --cta-ink: #231703;
  --ok: #6BDB6F;
  --warn: var(--amber);
  --bad: #F07A6A;
  --glow: rgb(79 214 195 / 0.16);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s10: 40px; --s16: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 9999px;
  --t-fast: 150ms; --t-base: 200ms; --t-slow: 320ms; --t-delight: 640ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3F6F5; --surface: #FFFFFF; --surface-2: #EAF0EE;
    --fg: #0C1315; --fg-2: #33433F; --fg-3: #5A6B67;
    --line: rgb(12 19 21 / 0.09); --line-2: rgb(12 19 21 / 0.18);
    --accent: #0E8C7C; --accent-ink: #FFFFFF;
    --cta: #E3A23A; --cta-ink: #231703;
    --ok: #1C9E58; --bad: #C8402E; --glow: rgb(14 140 124 / 0.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3F6F5; --surface: #FFFFFF; --surface-2: #EAF0EE;
  --fg: #0C1315; --fg-2: #33433F; --fg-3: #5A6B67;
  --line: rgb(12 19 21 / 0.09); --line-2: rgb(12 19 21 / 0.18);
  --accent: #0E8C7C; --accent-ink: #FFFFFF;
  --cta: #E3A23A; --cta-ink: #231703;
  --ok: #1C9E58; --bad: #C8402E; --glow: rgb(14 140 124 / 0.12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--glow), transparent 60%),
    var(--bg);
  color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--fg-3); font-size: 14px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico .fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

.skip-link { position: absolute; left: var(--s4); top: -60px; background: var(--cta); color: var(--cta-ink); padding: var(--s2) var(--s4); border-radius: var(--r-md); z-index: 50; }
.skip-link:focus { top: var(--s4); }

/* ------------------------------ estrutura ------------------------------ */
.shell { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 100dvh; }

.rail {
  position: sticky; top: 0; height: 100dvh; overflow: auto;
  display: flex; flex-direction: column; gap: var(--s6);
  padding: var(--s8) var(--s8) var(--s6);
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in oklab, var(--surface) 70%, var(--bg)) 100%);
  border-right: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: var(--s3); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark-bg { fill: var(--surface-2); stroke: var(--line-2); }
.brand-mark-stroke { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 780; font-size: 17px; letter-spacing: -0.01em; }
.brand-sign { font-size: 13px; color: var(--fg-3); }
.brand-sign strong { color: var(--accent); font-weight: 700; }

.store-chip { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.store-chip-label { font-size: 12px; color: var(--fg-3); }
.store-chip-name { font-weight: 650; }

.progress-compact { display: none; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.step { position: relative; display: flex; gap: var(--s4); align-items: flex-start; padding-bottom: var(--s4); }
.step:last-child { padding-bottom: 0; }
.step::before { /* linha vertical */
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px;
  background: var(--line-2); border-radius: 2px;
}
.step::after { /* preenchimento animado da linha */
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleY(0); transform-origin: top; transition: transform var(--t-delight) var(--ease-out);
}
.step:last-child::before, .step:last-child::after { display: none; }
.step.is-done::after { transform: scaleY(1); }
.step-dot {
  position: relative; width: 32px; height: 32px; flex: none; border-radius: var(--r-full);
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  border: 2px solid var(--line-2); color: var(--fg-3); background: var(--bg);
  transition: background var(--t-slow) var(--ease-out), border-color var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out);
}
.step-dot svg { position: absolute; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset var(--t-slow) var(--ease-out) 120ms; }
.step-copy { display: flex; flex-direction: column; padding-top: 4px; line-height: 1.25; }
.step-name { font-weight: 600; color: var(--fg-3); transition: color var(--t-base) var(--ease-std); }
.step-hint { font-size: 13px; color: var(--fg-3); }
.step.is-current .step-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 6px var(--glow); }
.step.is-current .step-name { color: var(--fg); font-weight: 700; }
.step.is-done .step-name { color: var(--fg-2); }
.step.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.is-done .step-num { opacity: 0; }
.step.is-done .step-dot svg { stroke-dashoffset: 0; }
.step-num { transition: opacity var(--t-fast) var(--ease-std); }

/* constelação de conexões */
.constellation { margin: auto 0 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-xl); background: color-mix(in oklab, var(--bg) 55%, transparent); }
.constellation-svg { width: 100%; height: auto; display: block; overflow: visible; }
.wire { fill: none; stroke: color-mix(in oklab, var(--fg-3) 55%, transparent); stroke-width: 1.5; stroke-dasharray: 2 5; transition: stroke var(--t-slow) var(--ease-out); }
.wire.is-live { stroke: var(--accent); stroke-dasharray: 6 6; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.node { fill: var(--bg); stroke: var(--fg-3); stroke-width: 1.5; transition: fill var(--t-slow) var(--ease-out), stroke var(--t-slow) var(--ease-out); }
.node.is-live { fill: var(--accent); stroke: var(--accent); }
.node-core { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.node-label, .node-label-core { font-family: var(--font); font-size: 13px; fill: var(--fg-2); text-anchor: middle; }
.node-glyph { font-family: var(--font); font-size: 11px; font-weight: 800; fill: var(--fg-2); text-anchor: middle; dominant-baseline: central; pointer-events: none; transition: fill var(--t-slow); }
.node.is-live + .node-glyph { fill: var(--accent-ink); }
.node-label-core { font-size: 11px; fill: var(--accent); font-weight: 700; letter-spacing: 0.04em; }
.constellation-cap { margin-top: var(--s2); font-size: 13px; color: var(--fg-3); }
.constellation-cap .mono { color: var(--accent); font-weight: 700; }
.rail-foot { font-size: 13px; color: var(--fg-3); line-height: 1.5; padding-bottom: var(--s2); text-wrap: pretty; }

/* ------------------------------ palco ------------------------------ */
.stage { display: flex; flex-direction: column; min-width: 0; padding: var(--s16) clamp(24px, 6vw, 96px) var(--s8); outline: none; }
.view { max-width: 1040px; width: 100%; }
.stage > .view { margin-top: auto; }
.view .lead, .view .title { max-width: 760px; }
.view.is-entering { animation: enter var(--t-slow) var(--ease-out) both; }
.view.is-entering.is-back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.view.is-entering > * { animation: rise var(--t-delight) var(--ease-out) both; }
.view.is-entering > *:nth-child(2) { animation-delay: 40ms; }
.view.is-entering > *:nth-child(3) { animation-delay: 80ms; }
.view.is-entering > *:nth-child(4) { animation-delay: 120ms; }
.view.is-entering > *:nth-child(5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kicker { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 650; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.kicker .mono { padding: 2px 7px; border-radius: var(--r-sm); background: var(--glow); }
.title { margin: var(--s3) 0 var(--s4); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; font-weight: 820; letter-spacing: -0.012em; text-wrap: balance; }
.lead { max-width: 60ch; font-size: 18px; color: var(--fg-2); text-wrap: pretty; }
.lead strong { color: var(--fg); }

.panel { position: relative; padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 24px 48px -32px rgb(0 0 0 / 0.6); }
.view > .panel, .split, .choices, .health, .assurances, .help-row { margin-top: var(--s8); }

/* botões */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 0 var(--s6); border-radius: var(--r-lg); border: 1px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; user-select: none;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std), border-color var(--t-base) var(--ease-std), opacity var(--t-base);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--cta); color: var(--cta-ink); box-shadow: 0 1px 0 rgb(255 255 255 / 0.25) inset; }
.btn-ghost { background: transparent; color: var(--fg-2); border-color: var(--line-2); }
.btn-google { width: 100%; background: var(--surface-2); color: var(--fg); border-color: var(--line-2); }
.btn-google .ico { width: 18px; height: 18px; stroke: none; }
.btn .ico-arrow { transition: transform var(--t-base) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in oklab, var(--cta) 88%, white); }
  .btn-primary:hover .ico-arrow { transform: translateX(3px); }
  .btn-ghost:hover { border-color: var(--fg-3); color: var(--fg); }
  .btn-google:hover { border-color: var(--fg-3); }
}
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; box-shadow: none; }
.btn-primary[disabled] { background: color-mix(in oklab, var(--fg) 7%, transparent); color: var(--fg-3); border-color: transparent; }
.btn-primary[disabled] .ico-arrow { opacity: 0.5; }
.nav-hint { font-size: 14px; color: var(--fg-3); margin-left: auto; text-align: right; }
.nav-hint + #btnNext { margin-left: 0 !important; }
.link { background: none; border: 0; padding: var(--s2); color: var(--fg-2); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-2); }
.link:hover { color: var(--fg); text-decoration-color: currentColor; }

/* passo 1 */
.hero-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero-copy { padding-top: var(--s2); }
.hero-split .assurances { flex-direction: column; gap: var(--s3); }
.hero-split > .panel { margin-top: 0; }
.auth-title { font-weight: 780; font-size: 20px; letter-spacing: -0.01em; margin-bottom: var(--s2); }
.auth { padding: var(--s8); box-shadow: 0 0 0 1px var(--line-2) inset, 0 30px 60px -36px rgb(0 0 0 / 0.75); }
.auth-stage { display: flex; flex-direction: column; gap: var(--s4); }
.auth-stage.is-entering { animation: rise var(--t-slow) var(--ease-out) both; }
.or { display: flex; align-items: center; gap: var(--s3); font-size: 14px; color: var(--fg-2); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.field { display: flex; flex-direction: column; gap: var(--s2); }
.field-label { font-size: 14px; font-weight: 650; color: var(--fg-2); }
.input { width: 100%; min-height: 52px; padding: var(--s3) var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg); transition: border-color var(--t-base), box-shadow var(--t-base); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
textarea.input { resize: none; min-height: 110px; }
.auth-note { color: var(--fg-2); }
.auth-note strong { color: var(--fg); overflow-wrap: anywhere; white-space: nowrap; }
@media (max-width: 420px) { .auth-note strong { display: block; white-space: normal; } }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.otp-box { min-width: 0; height: 60px; text-align: center; font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--accent); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); transition: border-color var(--t-base), transform var(--t-fast) var(--ease-out); }
.otp-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.otp-box.is-filled { border-color: color-mix(in oklab, var(--accent) 55%, transparent); animation: pop var(--t-base) var(--ease-out); }
@keyframes pop { 50% { transform: scale(1.06); } }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }

.assurances { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); color: var(--fg-2); font-size: 14px; }
.assurances li { display: inline-flex; align-items: center; gap: var(--s2); }
.assurances .ico { width: 30px; height: 30px; padding: 6px; border-radius: var(--r-md); background: var(--glow); color: var(--accent); }

/* passo 2 */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.connect { justify-content: flex-start !important; }
.connect .btn-connect, .connect .success { margin-top: auto; }
.connect-ai .btn-connect, .connect-ai .success { margin-top: 0; }
.account { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: 14px; color: var(--fg-2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.account .link { padding: 0; font-size: 14px; }
.account { flex-wrap: wrap; row-gap: var(--s2); }
.account-name { min-width: 0; overflow-wrap: anywhere; flex: 1 1 100%; }
.account-actions { display: inline-flex; gap: var(--s2); flex-wrap: wrap; margin-left: calc(-1 * var(--s2)); }
.account .account-actions .link { min-height: 44px; padding: 0 var(--s2); display: inline-flex; align-items: center; border-radius: var(--r-md); }
.link-danger { color: var(--bad); text-decoration-color: color-mix(in oklab, var(--bad) 45%, transparent); }
.link-danger[data-armed="1"] { color: var(--bad); background: color-mix(in oklab, var(--bad) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 60%, transparent); text-decoration: none; font-weight: 700; }
.account-warn { flex: 1 1 100%; margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.account-warn .link { min-height: 0; padding: 0; font-size: 14px; display: inline; }
.connect-note { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: var(--s2) var(--s3); margin: 0; padding: var(--s4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 15px; line-height: 1.5; color: var(--fg-2); animation: rise var(--t-slow) var(--ease-out) both; }
.note-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: var(--r-full); background: var(--fg-3); position: relative; }
.note-body { margin: 0; text-wrap: pretty; }
.note-title { color: var(--fg); font-weight: 700; }
.connect-note .link { grid-column: 2; justify-self: start; min-height: 44px; padding: 0; font-size: 15px; display: inline-flex; align-items: center; }
.connect-note[data-state="warn"] { border-color: color-mix(in oklab, var(--warn) 55%, transparent); background: color-mix(in oklab, var(--warn) 9%, var(--surface)); }
.connect-note[data-state="warn"] .note-dot { background: var(--warn); }
.connect-note[data-state="wait"] { border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.connect-note[data-state="wait"] .note-dot { background: var(--accent); }
.connect-note[data-state="wait"] .note-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 1.6s var(--ease-out) infinite; }
.btn-connect.is-waiting { background: transparent; color: var(--fg); border-color: var(--line-2); box-shadow: none; }
.badge-ok { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-full); background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }
.split > .panel { display: flex; flex-direction: column; gap: var(--s6); }
.howto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s4); }
.howto li { display: flex; gap: var(--s3); align-items: center; color: var(--fg-2); }
.howto strong { color: var(--fg); }
.howto-n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-full); background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--fg); font-size: 13px; font-weight: 700; }
.qr-panel { align-items: center; justify-content: center; text-align: center; }
.qr-frame { width: min(100%, 236px); aspect-ratio: 1; padding: var(--s3); border-radius: var(--r-lg); background: #FFFFFF; color: #0C1315; position: relative; overflow: hidden; }
.qr-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgb(79 214 195 / 0.0) 40%, rgb(79 214 195 / 0.35) 50%, rgb(79 214 195 / 0) 60%, transparent 100%); transform: translateY(-100%); animation: scan 2.8s var(--ease-std) infinite; }
@keyframes scan { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
.qr-svg { width: 100%; height: 100%; display: block; }
.qr-bg { fill: #FFFFFF; }
.qr-cap { font-size: 14px; color: var(--fg-2); max-width: 28ch; }
.qr-bot { font-size: 14px; color: var(--fg-2); margin-top: calc(-1 * var(--s3)); }

.status { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface-2); font-size: 14px; color: var(--fg-2); }
.status-dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: var(--r-full); background: var(--accent); }
.status[data-state="waiting"] .status-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 1.6s var(--ease-out) infinite; }
.status[data-state="ok"] { color: var(--fg); }
.status[data-state="ok"] .status-dot { background: var(--ok); }
@keyframes ping { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.6); opacity: 0; } }

/* passos 3-5 */
.connect { display: flex; flex-direction: column; gap: var(--s6); justify-content: space-between; }
.provider { display: flex; align-items: center; gap: var(--s4); }
.provider-logo { width: 52px; height: 52px; flex: none; border-radius: var(--r-lg); display: grid; place-items: center; font-weight: 850; font-size: 26px; }
.logo-bling { background: #1EB36B; color: #FFFFFF; font-family: var(--font); letter-spacing: -0.04em; }
.logo-ml { background: #FFE600; color: #2D3277; }
.logo-ml svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.provider-name { font-weight: 750; font-size: 18px; }
.provider-sub { font-size: 14px; color: var(--fg-3); }
.btn-connect { width: 100%; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn-connect.is-busy .spinner { display: inline-block; }
.btn-connect.is-busy { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border-radius: var(--r-lg); background: color-mix(in oklab, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--ok) 35%, transparent); animation: rise var(--t-slow) var(--ease-out) both; }
.success-title { font-weight: 750; }
.success-sub { font-size: 14px; color: var(--fg-2); }
.check { width: 44px; height: 44px; flex: none; fill: none; stroke: var(--ok); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: draw 520ms var(--ease-out) forwards; opacity: 0.9; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 360ms var(--ease-out) 380ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.check-xl { width: 64px; height: 64px; }

.perms-title { font-weight: 750; }
.perm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.perm { position: relative; padding-left: 30px; color: var(--fg-2); font-size: 15px; text-wrap: pretty; }
.perm em { white-space: nowrap; }
.perm::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: var(--r-full); background: var(--glow) no-repeat center / 12px; }
.perm.yes::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%234FD6C3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.perm.guard::before { background-color: rgb(239 180 84 / 0.16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='4' y='7' width='8' height='6' rx='1.2' fill='none' stroke='%23EFB454' stroke-width='1.8'/%3E%3Cpath d='M5.8 7V5.4a2.2 2.2 0 0 1 4.4 0V7' fill='none' stroke='%23EFB454' stroke-width='1.8'/%3E%3C/svg%3E"); }
.perm em { font-style: normal; color: var(--warn); font-weight: 650; }
.perms-foot { font-size: 13px; color: var(--fg-3); margin-top: auto; text-wrap: pretty; }
.perms { gap: var(--s4) !important; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.choice { position: relative; display: flex; gap: var(--s4); align-items: flex-start; text-align: left; padding: var(--s6); border-radius: var(--r-xl); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std), transform var(--t-fast) var(--ease-out); }
.choice:active { transform: scale(0.985); }
.choice[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 18px 40px -24px var(--accent); background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.choice-radio { width: 22px; height: 22px; flex: none; margin-top: 2px; border-radius: var(--r-full); border: 2px solid var(--fg-3); display: grid; place-items: center; transition: border-color var(--t-base); }
.choice-radio::after { content: ""; width: 10px; height: 10px; border-radius: inherit; background: var(--accent); transform: scale(0.4); opacity: 0; transition: transform var(--t-base) var(--ease-out), opacity var(--t-base); }
.choice[aria-checked="true"] .choice-radio { border-color: var(--accent); }
.choice[aria-checked="true"] .choice-radio::after { transform: scale(1); opacity: 1; }
.choice-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice-brand { font-weight: 780; font-size: 18px; }
.choice-model { font-size: 14px; color: var(--accent); font-weight: 650; }
.choice-model small { font-size: 13px; font-weight: 500; color: var(--fg-3); }
.choice-desc { font-size: 14px; color: var(--fg-2); }
.choice-tag { position: absolute; top: var(--s6); right: var(--s6); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); background: rgb(239 180 84 / 0.14); color: var(--warn); }
.connect-ai { margin-top: var(--s4) !important; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s4) var(--s6) !important; }
.connect-ai .success { grid-column: 1; }
.connect-ai .fine { align-self: center; }
.ai-box { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.ai-box-step { font-size: 14px; font-weight: 600; color: var(--fg); margin: 0; }
.ai-code-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.ai-code-text { font-family: var(--font-mono); font-size: 24px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); padding: var(--s2) var(--s4); background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--r-md); }
.ai-box-wait { font-size: 13px; color: var(--fg-2); display: flex; align-items: center; gap: var(--s2); margin: 0; }
.support-plan { grid-column: 1 / -1; margin-top: var(--s2); font-size: 13px; color: var(--fg-3); }
.support-plan-title { cursor: pointer; user-select: none; color: var(--fg-2); font-weight: 600; }
.support-plan-title:hover { color: var(--fg); }
.support-plan-body { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); margin-top: var(--s3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.fine { font-size: 13px; color: var(--fg-3); }

/* pronto · saúde */
.done-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); }
.done-head .title { margin-bottom: 0; }
.done-head + .lead { margin-top: var(--s4); }
.health { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.health-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.health-title { font-weight: 780; font-size: 18px; }
.health-meta { display: flex; align-items: center; gap: var(--s3); }
.demo-chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-full); background: var(--surface-2); color: var(--fg-2); }
.health-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: minmax(104px, auto); gap: var(--s3); }
.cell { display: flex; flex-direction: column; justify-content: flex-start; gap: var(--s2); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid transparent; opacity: 0; transform: translateY(8px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out), border-color var(--t-slow); }
.health.is-in .cell { opacity: 1; transform: none; }
.health.is-in .cell:nth-child(2) { transition-delay: 60ms; }
.health.is-in .cell:nth-child(3) { transition-delay: 120ms; }
.health.is-in .cell:nth-child(4) { transition-delay: 180ms; }
.health.is-in .cell:nth-child(5) { transition-delay: 240ms; }
.cell-hero { grid-row: span 2; justify-content: flex-start; gap: var(--s3); background: linear-gradient(160deg, color-mix(in oklab, var(--ok) 10%, var(--surface-2)), var(--surface-2) 70%); }

.cell-facts { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); font-size: 14px; color: var(--fg-2); }
.cell-facts b { color: var(--fg); font-weight: 650; }
.cell-label { font-size: 13px; color: var(--fg-3); font-weight: 650; }
.cell-value { display: flex; align-items: center; gap: var(--s2); font-weight: 750; font-size: 18px; color: var(--fg); }
.cell[data-state="ok"] .cell-state { color: var(--ok); }
.cell[data-state="warn"] .cell-state { color: var(--warn); }
.cell[data-state="bad"] .cell-state { color: var(--bad); }
.cell-hero .cell-value { font-size: 18px; }
.cell-detail { font-size: 14px; color: var(--fg-2); }
.dot { width: 10px; height: 10px; flex: none; border-radius: var(--r-full); background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 20%, transparent); margin-left: 3px; }
.cell[data-state="warn"] .dot { background: var(--warn); box-shadow: 0 0 0 4px rgb(239 180 84 / 0.2); }
.cell[data-state="bad"] { border-color: color-mix(in oklab, var(--bad) 45%, transparent); }
.cell[data-state="bad"] .dot { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in oklab, var(--bad) 22%, transparent); }
.help-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }

/* navegação */
.stepnav { display: flex; align-items: center; gap: var(--s3); max-width: 1040px; width: 100%; margin-top: var(--s10); padding-top: var(--s6); border-top: 1px solid var(--line); }
.stepnav #btnNext { margin-left: auto; }
.stepnav.is-final { display: none; }

.foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; max-width: 1040px; width: 100%; margin-top: auto; padding-top: var(--s10); font-size: 13px; color: var(--fg-3); }
.foot strong { color: var(--accent); }
.foot-links { display: flex; gap: var(--s4); flex-wrap: wrap; }
.foot a { color: var(--fg-3); text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* modal pedir ajuda */
.sheet { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--surface); color: var(--fg); box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.7); }
.sheet::backdrop { background: rgb(6 10 11 / 0.82); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in var(--t-slow) var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.sheet-body { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6); margin: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-full); border: 0; background: var(--surface-2); cursor: pointer; color: var(--fg-2); }
.topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) 6px; }
.topics legend { margin-bottom: var(--s2); padding: 0; }
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-full); border: 1px solid color-mix(in oklab, var(--fg) 22%, transparent); font-size: 14px; cursor: pointer; transition: background var(--t-base), border-color var(--t-base), color var(--t-base); }
.topic input:checked + span { background: var(--glow); border-color: var(--accent); color: var(--fg); }
.topic input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s3); }

.toast { position: fixed; left: 50%; bottom: var(--s6); transform: translateX(-50%); padding: var(--s3) var(--s6); border-radius: var(--r-full); background: var(--fg); color: var(--bg); font-weight: 650; font-size: 14px; box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.6); animation: toast-in var(--t-slow) var(--ease-out); z-index: 40; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }


/* ------------------------------ criar o aplicativo (sessão supervisionada) ------------------------------ */
.sheet-setup { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.sheet-setup.is-live { width: min(1280px, calc(100vw - 32px)); }
.sheet-setup .btn-ghost { border-color: rgb(233 238 236 / 0.32); color: var(--fg); }
.sheet-setup h2 { text-wrap: balance; }
.sheet-setup .kicker { margin-bottom: var(--s2); }
.setup-phase[data-phase="done"] .setup-lead { max-width: none; }
.live-wait .spinner { width: 16px; height: 16px; border-width: 2px; opacity: 0.9; }
.setup-fields { display: flex; flex-direction: column; gap: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.sheet-setup .sheet-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sheet-setup .sheet-head { align-items: flex-start; }
.setup-kicker { margin-bottom: var(--s1); }
.setup-body { gap: var(--s4); }
.setup-phase { display: flex; flex-direction: column; gap: var(--s4); }
.setup-phase[data-phase="form"] { max-width: 600px; }
.setup-lead { color: var(--fg-2); text-wrap: pretty; }
.setup-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); color: var(--fg-2); font-size: 15px; }
.setup-how li { display: flex; gap: var(--s3); align-items: flex-start; }
.setup-how strong { color: var(--fg); }
.consent { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; color: var(--fg); cursor: pointer; border-color: var(--line-2); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.setup-live { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s6); align-items: start; }
.live-col { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.live-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: 13px; color: var(--fg-3); }
.live-lock { display: inline-flex; align-items: center; gap: 6px; }
.live-lock .ico { width: 16px; height: 16px; }
.who-head, .who-head:not([hidden]) { display: none; }
.who { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px 12px; border-radius: var(--r-full); font-weight: 700; font-size: 13px; background: color-mix(in oklab, var(--cta) 16%, transparent); color: var(--cta); }
.who-dot { width: 8px; height: 8px; border-radius: var(--r-full); background: currentColor; }
.who[data-who="assistente"] { background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--accent); }
.who[data-who="assistente"] .who-dot { animation: pulse 1.4s var(--ease-std) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.screen { position: relative; width: 100%; aspect-ratio: 1024 / 700; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 24px 48px -32px rgb(0 0 0 / 0.7); cursor: pointer; outline: none; touch-action: manipulation; }
.screen:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.screen.is-mobile { aspect-ratio: 390 / 560; }
.screen.is-agent { box-shadow: 0 0 0 3px var(--accent), 0 24px 48px -32px rgb(0 0 0 / 0.7); }
.screen img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.screen img:not([src]) { visibility: hidden; }
.screen-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); background: var(--surface-2); color: var(--fg-2); font-size: 14px; }
.screen-wait .spinner { display: inline-block; width: 24px; height: 24px; color: var(--accent); }
.screen-veil { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); padding: var(--s2) var(--s4); border-radius: var(--r-md); background: rgb(12 19 21 / 0.86); color: #E9EEEC; font-size: 13px; text-align: center; pointer-events: none; }
.screen.is-agent { cursor: default; }
.typer { flex-direction: column; gap: var(--s2); }
.typer .input { min-height: 48px; }
.typer[hidden], .typer-desk[hidden] { display: none !important; }

.live-side { display: flex; flex-direction: column; gap: var(--s4); position: sticky; top: 0; padding-top: 38px; }
.live-wait { display: flex; align-items: center; gap: var(--s2); font-size: 14px; color: var(--fg-2); }
.live-wait .spinner { display: inline-block; color: var(--cta); }
.btn-pause { background: var(--accent); color: var(--accent-ink); }
.link-danger { color: var(--fg-2); min-height: 44px; text-decoration-color: color-mix(in oklab, var(--bad) 60%, transparent); }
.link-danger:hover { color: var(--bad); }
.typer { display: none; }
.typer-desk { display: block; }
@media (pointer: coarse), (max-width: 768px) { .typer { display: flex; } .typer-desk { display: none; } }
.live-msg { font-weight: 750; font-size: 18px; line-height: 1.35; text-wrap: pretty; }
.live-hint { color: var(--fg-2); font-size: 14px; text-wrap: pretty; }
.live-hint:empty { display: none; }
.live-err { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: color-mix(in oklab, var(--bad) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--bad) 40%, transparent); color: var(--fg); font-size: 14px; }
.live-actions { display: flex; flex-direction: column; gap: var(--s3); }
.live-actions .btn { width: 100%; }
.live-actions .link { align-self: flex-start; padding-left: 0; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.tl { position: relative; display: flex; gap: var(--s3); align-items: flex-start; padding-bottom: var(--s3); font-size: 14px; color: var(--fg-3); }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line-2); }
.tl-dot { width: 24px; height: 24px; flex: none; border-radius: var(--r-full); display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--bg); font-size: 11px; font-weight: 800; }
.tl-dot svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: none; }
.tl-text { padding-top: 2px; }
.tl[data-state="active"] { color: var(--fg); font-weight: 650; }
.tl[data-state="active"] .tl-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.tl[data-state="done"] { color: var(--fg-2); }
.tl[data-state="done"] .tl-dot { border-color: var(--ok); background: var(--ok); color: var(--ink); }
.tl[data-state="done"] .tl-dot svg { display: block; }
.tl[data-state="done"] .tl-num { display: none; }
.tl[data-state="done"]::before { background: var(--ok); }
#setupTimelineDone .tl[data-state="active"] .tl-dot { border-color: var(--cta); color: var(--cta); box-shadow: none; font-size: 12px; }
.setup-phase[data-phase="done"] .btn-ghost { font-weight: 600; color: var(--fg-2); }
#setupTimelineDone .tl:nth-last-child(2) { padding-bottom: var(--s3); }
#setupTimelineDone .tl:nth-last-child(2)::before { top: 28px; background: repeating-linear-gradient(to bottom, var(--cta) 0 4px, transparent 4px 8px); }
.live-wait .spinner { border-color: rgb(239 180 84 / 0.25); border-top-color: var(--cta); border-right-color: var(--cta); }
.setup-success { animation: none; }
.app-ready { font-size: 13px; color: var(--fg-3); display: flex; gap: var(--s2); align-items: center; }
.app-ready::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ok); }

@media (max-width: 900px) {
  .setup-live { grid-template-columns: minmax(0, 1fr); }
  .live-side { position: static; }
}
@media (max-width: 768px) {
  .sheet-setup, .sheet-setup.is-live { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .sheet-setup .sheet-body { padding: calc(var(--s4) + env(safe-area-inset-top)) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom)); min-height: 100%; }
  .live-side { padding-top: 0; }
  .sheet-setup { overflow: hidden; }
  .sheet-setup .setup-body { height: 100%; overflow-y: auto; padding-top: 0; }
  .sheet-setup .sheet-head { position: sticky; top: 0; z-index: 3; margin: 0 calc(-1 * var(--s4)); padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) var(--s3); background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
  .sheet-setup .live-bar .who { display: none; }
  .sheet-setup.is-live .who-head { display: inline-flex; margin-top: var(--s2); }
  .sheet-setup.is-live .kicker { display: none; }
  .sheet-setup .screen, .sheet-setup .screen.is-mobile { aspect-ratio: 390 / 560; height: auto; width: 100%; }
  .sheet-setup .live-hint { display: none; }
  .sheet-setup .sheet-actions { grid-template-columns: minmax(0, 1fr); position: sticky; bottom: calc(-1 * (var(--s6) + env(safe-area-inset-bottom))); z-index: 2; margin: 0 calc(-1 * var(--s4)); padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -12px 20px -12px rgb(0 0 0 / 0.6); }
  .setup-how { gap: var(--s2); font-size: 14px; }
  .setup-lead { font-size: 15px; }
  .sheet-setup .sheet-actions .btn-primary { order: -1; }
  .sheet-setup .icon-btn { width: 44px; height: 44px; }
  .sheet-setup .sheet-head h2 { font-size: 20px; }
  .setup-phase[data-phase="form"] { max-width: none; }
  .live-msg { font-size: 16px; }
  .screen, .screen.is-mobile { aspect-ratio: 390 / 560; }
  .live-side { gap: var(--s3); }
  .timeline { display: none; }
  .setup-phase[data-phase="done"] .timeline { display: flex; }
}

.setup-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.setup-row .link { padding-left: 0; }

/* ------------------------------ tablet ------------------------------ */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 300px minmax(0, 1fr); }
  .rail { padding: var(--s8) var(--s6); }
  .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
  .hero-split { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* ------------------------------ celular ------------------------------ */
@media (max-width: 768px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: sticky; top: 0; z-index: 20; height: auto; overflow: visible;
    flex-direction: column; gap: var(--s3);
    padding: calc(var(--s4) + env(safe-area-inset-top)) var(--s4) var(--s3);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; }
  .brand-sign { font-size: 12px; }
  .store-chip, .steps, .constellation, .rail-foot { display: none; }
  .progress-compact { display: flex; flex-direction: column; gap: var(--s2); }
  .progress-compact-row { display: flex; justify-content: space-between; font-size: 13px; }
  .progress-compact-label { font-weight: 650; color: var(--fg); }
  .progress-compact-time { color: var(--fg-3); }
  .progress-track { height: 4px; border-radius: var(--r-full); background: var(--line-2); overflow: hidden; }
  .progress-fill { height: 100%; width: 100%; background: var(--accent); border-radius: inherit; transform-origin: left; transform: scaleX(0.2); transition: transform var(--t-delight) var(--ease-out); }

  .stage { padding: var(--s6) var(--s4) calc(var(--s6) + 84px + env(safe-area-inset-bottom)); }
  .stage:has(.stepnav.is-final) { padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom)); }
  .title { font-size: 30px; }
  .lead { font-size: 16px; }
  .view > .panel, .split, .choices, .health, .assurances, .help-row { margin-top: var(--s6); }
  .panel { padding: var(--s4); border-radius: var(--r-lg); }
  .auth { max-width: none; padding: var(--s6) var(--s4); }
  .hero-split { gap: var(--s6); }
  .hero-split .assurances { margin-top: var(--s4); }
  .stage > .view { margin-top: 0; }
  .choice-tag { top: var(--s4); right: var(--s4); }
  .otp { gap: 6px; }
  .otp-box { height: 54px; font-size: 22px; }
  .choices { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .choice { padding: var(--s4); }
  .connect-ai { max-width: none; }
  .qr-panel { display: none !important; } /* no celular o botão abre o Telegram direto */
  .done-head { gap: var(--s4); }
  .check-xl { width: 56px; height: 56px; }
  .health { padding: var(--s4); }
  .health-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto; }
  .cell-hero { grid-row: auto; grid-column: span 2; }
  .connect-ai { grid-template-columns: minmax(0, 1fr); }
  .nav-hint { display: none; }
  .help-row .btn { width: 100%; }

  .stepnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; max-width: none;
    padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .stepnav #btnNext { flex: 1; }
  .stepnav .btn-ghost { padding: 0 var(--s4); }
  .stepnav .link { white-space: nowrap; font-size: 14px; padding: var(--s2) 0; }
  .stepnav { gap: var(--s2); }
  .foot { padding-top: var(--s8); flex-direction: column; align-items: flex-start; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ------------------------------ movimento reduzido ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .qr-frame::after { display: none; }
  .wire.is-live { animation: none; }
  .check circle, .check path { stroke-dashoffset: 0; }
}

/* telas baixas (notebook 1366x768, 1440x900) */
@media (min-width: 769px) and (max-height: 940px) {
  .rail { gap: var(--s4); padding-top: var(--s6); }
  .store-chip { padding: var(--s2) var(--s4); }
  .step { padding-bottom: var(--s3); }
  .step-hint { font-size: 12.5px; }
  .constellation-svg { max-height: 132px; }
  .stage { padding-top: var(--s10); }
}
@media (min-width: 769px) and (max-height: 800px) {
  .rail-foot { display: none; }
}
