/* Layout: app de celular numa coluna só (máx. 440px), uma tela por vez, navegação fixa embaixo.
   Visual único (escuro, paleta do @psique.quantica): carvão, bronze e champanhe. */
:root {
  --bg: #0d0b0a;
  --surface: #1a1614;
  --surface-2: #241e1a;
  --line: #3a302a;
  --fg: #f3ebe0;
  --muted: #a8998a;
  --bronze: #c99662;
  --champ: #e8c497;
  --ink-on-champ: #2a1a0e;
  --old: #7d7068;
  --ok: #9fc2a0;
  --font: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --r: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 90% 45% at 50% 0%, rgba(201,150,98,.16), transparent 70%);
}
.app {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto; min-height: 100%;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-block: 20px calc(96px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 18px;
}
.app.sem-nav { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 1.85rem; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; line-height: 1.25; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
em { font-style: normal; color: var(--champ); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); }

.marca { display: flex; align-items: center; gap: 10px; }
.marca svg { width: 30px; height: 30px; }
.marca b { font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }

.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 999px; padding: 16px 22px; width: 100%;
  background: var(--champ); color: var(--ink-on-champ); font-size: 1rem;
  transition: transform .15s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--fg); border: 1px solid var(--line); font-weight: 600; }
.btn:focus-visible, .opcao:focus-visible, .nav button:focus-visible, .dia:focus-visible, .check:focus-within, input:focus-visible, .link:focus-visible {
  outline: 2px solid var(--champ); outline-offset: 3px;
}
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card.destaque { background: linear-gradient(160deg, #2b211a, var(--surface) 60%); border-color: rgba(201,150,98,.45); }

/* barra de progresso do diagnóstico */
.barra { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--bronze); transition: width .3s ease; }

.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcao {
  text-align: left; font: inherit; color: var(--fg); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.opcao:hover { border-color: var(--bronze); }
.opcao.on { border-color: var(--champ); background: #2b211a; }

/* frases antiga x nova */
.frase-velha { color: var(--old); text-decoration: line-through; text-decoration-color: rgba(201,150,98,.6); font-weight: 500; }
.frase-nova { font-size: 1.3rem; font-weight: 700; line-height: 1.3; color: var(--champ); }
.seta { color: var(--bronze); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* trilha de 21 dias */
.grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dia {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  display: grid; place-items: center; font-variant-numeric: tabular-nums; max-width: 100%;
}
.dia.feito { background: var(--bronze); border-color: var(--bronze); color: var(--ink-on-champ); }
.dia.hoje { border-color: var(--champ); color: var(--champ); box-shadow: 0 0 0 3px rgba(232,196,151,.15); }
.dia.travado { opacity: .35; cursor: not-allowed; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.45rem; color: var(--champ); font-variant-numeric: tabular-nums; }
.stat span { font-size: .72rem; color: var(--muted); }

/* passos do dia */
.passo { display: flex; gap: 14px; }
.passo .n { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--bronze); color: var(--bronze); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.passo.ok .n { background: var(--bronze); color: var(--ink-on-champ); }
.passo > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.audio { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.audio .play { width: 44px; height: 44px; border-radius: 50%; background: var(--champ); border: 0; display: grid; place-items: center; flex: none; cursor: pointer; }
.audio .play[disabled] { opacity: .45; cursor: not-allowed; }
.onda { flex: 1; height: 26px; display: flex; align-items: center; gap: 3px; }
.onda i { flex: 1; background: var(--line); border-radius: 2px; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; background: var(--surface-2); border-radius: 14px; padding: 14px; }
.check input { width: 22px; height: 22px; accent-color: var(--bronze); flex: none; margin: 1px 0 0; }

.campo { width: 100%; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font: inherit; font-size: .95rem; }
.campo::placeholder { color: #6f6259; }

.evid { border-left: 2px solid var(--bronze); padding: 2px 0 2px 12px; display: flex; flex-direction: column; gap: 2px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: rgba(13,11,10,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 8px max(18px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
.nav div { max-width: 440px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nav button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .75rem; font-weight: 600; padding: 8px 4px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav button svg { width: 22px; height: 22px; }
.nav button.on { color: var(--champ); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--champ); color: var(--ink-on-champ); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem; z-index: 9; }
.teste { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }

.entra { animation: entra .35s ease both; }
@keyframes entra { from { opacity: .001; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .entra { animation: none; } .btn, .barra i { transition: none; } }

/* login */
.codigo { letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.erro { color: #f0a898; font-size: .9rem; }
.termos { font-size: .75rem; color: var(--muted); line-height: 1.45; }
