/* Treina AI — mesmo padrão visual do Calcula AI: tema escuro por padrão, verde de marca,
   fonte Inter, cartões de vidro e botões arredondados. */

:root {
  --fundo: 238 243 239;
  --superficie: 255 255 255;
  --tinta: 18 27 22;
  --suave: 96 108 101;
  --linha: 220 228 222;
  --marca: 24 128 74;
  --marca-claro: 222 242 230;
  --marca-escuro: 22 122 70;
  --marca-vivo: 52 199 120;
  --perigo: 200 64 20;
  --perigo-claro: 253 230 218;
  --alerta: 191 128 6;
  --alerta-claro: 251 241 214;
  --alerta-texto: 122 83 6;
  --halo: 52 199 120;
  --halo-alpha: .22;
  --vidro-alpha: .62;
  --borda-vidro: 255 255 255;
  --borda-alpha: .75;
  --sombra-alpha: .1;
  --brilho-alpha: .9;
  --topo: env(safe-area-inset-top, 0px);
  --base: env(safe-area-inset-bottom, 0px);
}

html.dark {
  --fundo: 9 12 11;
  --superficie: 30 38 34;
  --tinta: 236 242 238;
  --suave: 143 156 149;
  --linha: 42 51 46;
  --marca: 74 222 140;
  --marca-claro: 18 52 35;
  --perigo: 248 128 82;
  --perigo-claro: 60 28 14;
  --alerta: 234 179 64;
  --alerta-claro: 54 42 14;
  --alerta-texto: 234 179 64;
  --halo-alpha: .3;
  --vidro-alpha: .55;
  --borda-alpha: .08;
  --sombra-alpha: .45;
  --brilho-alpha: .06;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: rgb(var(--fundo));
  color: rgb(var(--tinta));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 380px;
  background: radial-gradient(60% 100% at 50% 0%, rgb(var(--halo) / var(--halo-alpha)), transparent 72%);
  pointer-events: none;
  z-index: 0;
}
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }

.tela { padding: calc(var(--topo) + 16px) 20px calc(var(--base) + 112px); }
.tela.sem-nav { padding-bottom: calc(var(--base) + 130px); }

/* ---------- topo ---------- */
.topo-linha { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.marca-mini { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.marca-mini svg { color: rgb(var(--marca)); }
.verde { color: rgb(var(--marca)); }
.suave { color: rgb(var(--suave)); }

/* ---------- vidro / botões ---------- */
.vidro {
  background: rgb(var(--superficie) / var(--vidro-alpha));
  border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / var(--brilho-alpha)), 0 10px 30px -18px rgb(0 0 0 / var(--sombra-alpha));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-radius: 24px;
}
html:not(.dark) .vidro { border-color: rgb(var(--linha)); }

.botao-icone {
  width: 44px; height: 44px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--superficie) / var(--vidro-alpha));
  border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / var(--brilho-alpha)), 0 10px 30px -18px rgb(0 0 0 / var(--sombra-alpha));
}
html:not(.dark) .botao-icone { border-color: rgb(var(--linha)); }
.botao-icone.peq { width: 36px; height: 36px; box-shadow: none; }

.botao, .botao-vidro {
  width: 100%; height: 52px; border-radius: 9999px; font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: transform .12s ease, opacity .12s ease;
}
.botao { background: rgb(var(--marca-vivo)); color: #04140b; box-shadow: 0 10px 28px -14px rgb(var(--marca-vivo) / .9); }
.botao-vidro {
  background: rgb(var(--superficie) / var(--vidro-alpha));
  border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / var(--brilho-alpha)), 0 10px 30px -18px rgb(0 0 0 / var(--sombra-alpha));
}
html:not(.dark) .botao-vidro { border-color: rgb(var(--linha)); }
.botao:active, .botao-vidro:active { transform: scale(.985); }
.botao[disabled], .botao-vidro[disabled] { opacity: .45; pointer-events: none; }
.botao-perigo { color: rgb(var(--perigo)); }
.botao-texto { color: rgb(var(--suave)); font-weight: 500; font-size: 14px; padding: 10px; width: 100%; text-align: center; }

/* ---------- login ---------- */
.login-corpo { padding-top: 28px; }
.logo-tile {
  width: 56px; height: 56px; border-radius: 18px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgb(var(--marca-claro)); border: 1px solid rgb(var(--marca) / .25); color: rgb(var(--marca));
}
.titulo-grande { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.sub { margin-top: 12px; color: rgb(var(--suave)); font-size: 16px; line-height: 1.45; }
.cartao-google { margin-top: 28px; padding: 16px; }
.gsi-slot { min-height: 44px; display: flex; justify-content: center; }
.mini { margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: rgb(var(--suave)); }
.mini svg { color: rgb(var(--marca)); margin-top: 1px; }
.nota { font-size: 13px; color: rgb(var(--suave)); text-align: center; padding: 10px 6px; }
.divisor { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: rgb(var(--suave)); font-size: 13px; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: rgb(var(--linha)); }
.rotulo { display: block; font-size: 13px; font-weight: 500; color: rgb(var(--suave)); margin-bottom: 10px; }
.rodape { margin-top: 22px; display: flex; gap: 8px; align-items: flex-start; justify-content: center; font-size: 12.5px; color: rgb(var(--suave)); text-align: center; line-height: 1.4; }

/* ---------- campos ---------- */
.campo {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 16px; outline: none;
  background: rgb(var(--superficie) / var(--vidro-alpha));
  border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha)); font-size: 16px;
  margin-bottom: 12px;
}
html:not(.dark) .campo { border-color: rgb(var(--linha)); }
.campo::placeholder { color: rgb(var(--suave)); }
.campo:focus { border-color: rgb(var(--marca)); box-shadow: 0 0 0 3px rgb(var(--marca) / .18); }
textarea.campo { height: auto; min-height: 84px; padding: 14px 16px; resize: none; }
.grade-campos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grade-campos .campo { margin-bottom: 0; text-align: center; padding: 0 8px; }
.grade-campos label { display: block; font-size: 12px; color: rgb(var(--suave)); margin-bottom: 6px; text-align: center; }

/* ---------- chips e opções ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 14px; border-radius: 9999px; font-size: 14px; font-weight: 500; line-height: 1.2;
  background: rgb(var(--superficie) / var(--vidro-alpha));
  border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha));
  display: inline-flex; align-items: center; gap: 6px; text-align: center;
}
html:not(.dark) .chip { border-color: rgb(var(--linha)); }
.chip.sel { background: rgb(var(--marca-claro)); border-color: rgb(var(--marca)); color: rgb(var(--marca)); }
.chips.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chips.dias .chip { justify-content: center; padding: 12px 0; font-size: 13px; }

.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcao { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; width: 100%; }
.opcao .t { font-weight: 600; font-size: 16px; display: block; }
.opcao .s { font-size: 13px; color: rgb(var(--suave)); display: block; margin-top: 2px; line-height: 1.35; }
.opcao .corpo { flex: 1; }
.opcao .marca-ok {
  width: 24px; height: 24px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgb(var(--linha)); color: transparent;
}
.opcao.sel { border-color: rgb(var(--marca)); background: rgb(var(--marca-claro) / .7); }
.opcao.sel .marca-ok { background: rgb(var(--marca-vivo)); border-color: rgb(var(--marca-vivo)); color: #04140b; }

.sim-nao { display: flex; flex-direction: column; gap: 10px; }
.sim-nao .linha { padding: 14px 16px; border-radius: 20px; }
.sim-nao p { font-size: 15px; font-weight: 500; margin-bottom: 12px; line-height: 1.35; }
.sim-nao .chips .chip { flex: 1; justify-content: center; }
.bloco-pergunta { margin-top: 26px; }
.bloco-pergunta h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.bloco-pergunta .dica { font-size: 13px; color: rgb(var(--suave)); margin-bottom: 12px; }

/* ---------- avaliação ---------- */
.wiz-topo { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.progresso-trilha { flex: 1; height: 6px; border-radius: 9999px; background: rgb(var(--linha)); overflow: hidden; }
.progresso-trilha > i { display: block; height: 100%; border-radius: 9999px; background: rgb(var(--marca-vivo)); transition: width .25s ease; }
.etapa { font-size: 12.5px; color: rgb(var(--suave)); min-width: 56px; text-align: right; }
.wiz-titulo { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 28px; }
.wiz-sub { color: rgb(var(--suave)); margin: 10px 0 24px; font-size: 15px; line-height: 1.45; }
.barra-acao {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 16px 20px calc(var(--base) + 16px);
  background: linear-gradient(to top, rgb(var(--fundo)) 60%, rgb(var(--fundo) / 0));
}
.barra-acao > div { max-width: 480px; margin: 0 auto; }

.resumo-lista { padding: 6px 16px; border-radius: 20px; }
.resumo-lista .l { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 14px; border-bottom: 1px solid rgb(var(--linha)); }
.resumo-lista .l:last-child { border-bottom: 0; }
.resumo-lista .l span:first-child { color: rgb(var(--suave)); }
.resumo-lista .l span:last-child { text-align: right; font-weight: 500; }

.gerando { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.gerando .logo-tile { margin: 0 0 22px; animation: pulsar 1.2s ease-in-out infinite; }
@keyframes pulsar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- avisos ---------- */
.aviso { display: flex; gap: 10px; padding: 14px 16px; border-radius: 18px; font-size: 13.5px; line-height: 1.4; margin-top: 12px; }
.aviso svg { margin-top: 1px; }
.aviso.alerta { background: rgb(var(--alerta-claro)); color: rgb(var(--alerta-texto)); }
.aviso.info { background: rgb(var(--marca-claro)); color: rgb(var(--marca)); }
.aviso.perigo { background: rgb(var(--perigo-claro)); color: rgb(var(--perigo)); }

/* ---------- início ---------- */
.saudacao { margin-top: 14px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.saudacao-sub { margin-top: 8px; color: rgb(var(--suave)); font-size: 14.5px; }
.cartao { padding: 18px; margin-top: 18px; }
.cartao h3 { font-size: 13px; font-weight: 500; color: rgb(var(--suave)); margin-bottom: 4px; }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 9999px; background: rgb(var(--marca-claro)); color: rgb(var(--marca)); }
.etiqueta.cinza { background: rgb(var(--linha) / .6); color: rgb(var(--suave)); }
.etiqueta.alerta { background: rgb(var(--alerta-claro)); color: rgb(var(--alerta-texto)); }
.treino-nome { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 10px; }
.treino-foco { color: rgb(var(--suave)); font-size: 14px; margin-top: 2px; }
.lista-mini { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.lista-mini .i { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.lista-mini .i span:last-child { color: rgb(var(--suave)); white-space: nowrap; }
.lista-mini .mais { font-size: 13px; color: rgb(var(--suave)); }

.semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.semana .d { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: rgb(var(--suave)); }
.bolinha {
  width: 34px; height: 34px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgb(var(--linha)); font-size: 13px; font-weight: 600; color: rgb(var(--suave));
}
.bolinha.plan { border-color: rgb(var(--marca) / .55); color: rgb(var(--marca)); }
.bolinha.ok { background: rgb(var(--marca-vivo)); border-color: rgb(var(--marca-vivo)); color: #04140b; }
.bolinha.hoje { box-shadow: 0 0 0 3px rgb(var(--marca) / .25); }
.estatisticas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.estat { padding: 14px 10px; text-align: center; border-radius: 20px; }
.estat b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.estat span { font-size: 12px; color: rgb(var(--suave)); }

/* ---------- plano ---------- */
.titulo-aba { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin-top: 14px; }
.linha-tempo { display: grid; grid-template-columns: 4fr 4fr 3fr 1fr; gap: 4px; margin-top: 14px; }
.linha-tempo .seg { height: 8px; border-radius: 9999px; background: rgb(var(--linha)); overflow: hidden; position: relative; }
.linha-tempo .seg.on { background: rgb(var(--marca) / .35); }
.linha-tempo .seg.atual { background: rgb(var(--marca-vivo)); }
.legenda-bloco { display: grid; grid-template-columns: 4fr 4fr 3fr 1fr; gap: 4px; margin-top: 8px; font-size: 11px; color: rgb(var(--suave)); }
.sessao { margin-top: 12px; border-radius: 22px; overflow: hidden; }
.sessao-topo { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; }
.sessao-topo .dia { width: 44px; height: 44px; border-radius: 14px; background: rgb(var(--marca-claro)); color: rgb(var(--marca)); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.sessao-topo .corpo { flex: 1; min-width: 0; }
.sessao-topo .n { font-weight: 600; font-size: 16px; }
.sessao-topo .f { font-size: 13px; color: rgb(var(--suave)); margin-top: 1px; }
.sessao-itens { padding: 0 16px 16px; }
.sessao-itens .it { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgb(var(--linha)); font-size: 14px; }
.sessao-itens .it .m { color: rgb(var(--suave)); white-space: nowrap; font-size: 13px; }
.barra-vol { display: grid; grid-template-columns: 88px 1fr 70px; gap: 10px; align-items: center; margin-top: 10px; font-size: 13px; }
.barra-vol .trilha { height: 8px; border-radius: 9999px; background: rgb(var(--linha)); position: relative; overflow: visible; }
.barra-vol .trilha > i { display: block; height: 100%; border-radius: 9999px; background: rgb(var(--marca-vivo)); max-width: 100%; }
.barra-vol .trilha > u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgb(var(--tinta) / .4); }
.barra-vol .v { text-align: right; color: rgb(var(--suave)); font-size: 12px; }
.nota-regra { padding: 14px 0; border-top: 1px solid rgb(var(--linha)); }
.nota-regra:first-of-type { border-top: 0; }
.nota-regra b { font-size: 14px; display: block; }
.nota-regra p { font-size: 13.5px; color: rgb(var(--suave)); margin-top: 3px; line-height: 1.4; }
.nota-regra small { display: block; font-size: 12px; color: rgb(var(--marca)); margin-top: 4px; }
.sec-titulo { font-size: 13px; font-weight: 600; color: rgb(var(--suave)); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 0; }

/* ---------- treino (checklist) ---------- */
.treino-topo { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.treino-topo .tt { flex: 1; min-width: 0; }
.treino-topo .tt b { display: block; font-size: 17px; font-weight: 600; }
.treino-topo .tt span { font-size: 12.5px; color: rgb(var(--suave)); }
.ex { padding: 14px; margin-top: 12px; border-radius: 22px; }
.ex-topo { display: flex; align-items: center; gap: 12px; }
.check {
  width: 32px; height: 32px; border-radius: 9999px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgb(var(--suave) / .5); color: #04140b; transition: all .15s ease;
}
.check.on { background: rgb(var(--marca-vivo)); border-color: rgb(var(--marca-vivo)); }
.ex-info { flex: 1; min-width: 0; }
.ex-nome { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.ex-meta { font-size: 13px; color: rgb(var(--suave)); margin-top: 3px; }
.ex.feito .ex-nome { color: rgb(var(--suave)); text-decoration: line-through; text-decoration-color: rgb(var(--suave) / .6); }
.ex-linha { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.kg {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 9999px;
  border: 1px solid rgb(var(--linha)); background: rgb(var(--fundo) / .5); width: 112px; flex: none;
}
.kg input { width: 100%; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; font-weight: 600; text-align: right; }
.kg input::placeholder { color: rgb(var(--suave) / .7); font-weight: 400; font-size: 13px; }
.kg span { font-size: 13px; color: rgb(var(--suave)); }
.kg:focus-within { border-color: rgb(var(--marca)); }
.ex-linha .chip { flex: 1; justify-content: center; padding: 9px 10px; font-size: 13px; }
.ex-sug { font-size: 12.5px; color: rgb(var(--suave)); margin-top: 10px; line-height: 1.4; }
.ex-sug.subir { color: rgb(var(--marca)); font-weight: 500; }
.ex-dica { margin-top: 10px; padding: 12px; border-radius: 14px; background: rgb(var(--marca-claro) / .6); font-size: 13.5px; line-height: 1.45; }
.legenda-rpe { font-size: 12.5px; color: rgb(var(--suave)); margin-top: 14px; line-height: 1.45; }
.progresso-sessao { margin-top: 14px; }
.progresso-sessao .r { display: flex; justify-content: space-between; font-size: 13px; color: rgb(var(--suave)); margin-bottom: 8px; }

/* ---------- calendário ---------- */
.mes-topo { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.mes-topo h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.cal { padding: 14px 10px; margin-top: 16px; }
.cal-semana, .cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-semana span { text-align: center; font-size: 11.5px; color: rgb(var(--suave)); padding-bottom: 8px; }
.cal-grade { row-gap: 6px; }
.cel { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.cel button {
  width: 38px; height: 38px; border-radius: 9999px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; position: relative; text-align: center;
}
.cel.fora button { opacity: .0; pointer-events: none; }
.cel .treinou { background: rgb(var(--marca-vivo)); color: #04140b; font-weight: 700; }
.cel .plan { border: 1.5px solid rgb(var(--marca) / .55); color: rgb(var(--marca)); }
.cel .perdido { border: 1.5px dashed rgb(var(--suave) / .45); color: rgb(var(--suave)); }
.cel .hoje { box-shadow: 0 0 0 3px rgb(var(--marca) / .28); }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12.5px; color: rgb(var(--suave)); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 9999px; display: inline-block; }
.legenda .a { background: rgb(var(--marca-vivo)); }
.legenda .b { border: 1.5px solid rgb(var(--marca) / .7); }
.legenda .c { border: 1.5px dashed rgb(var(--suave) / .6); }

/* ---------- perfil ---------- */
.perfil-card { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 9999px; background: rgb(var(--marca-claro)); color: rgb(var(--marca)); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.perfil-card .n { font-weight: 600; font-size: 17px; }
.perfil-card .e { font-size: 13px; color: rgb(var(--suave)); word-break: break-all; }
.lista-acoes { margin-top: 14px; border-radius: 22px; overflow: hidden; }
.acao { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; font-size: 15px; font-weight: 500; border-top: 1px solid rgb(var(--linha)); }
.acao:first-child { border-top: 0; }
.acao svg:first-child { color: rgb(var(--suave)); }
.acao.perigo, .acao.perigo svg:first-child { color: rgb(var(--perigo)); }
.acao .fim { margin-left: auto; color: rgb(var(--suave)); font-size: 13px; }

/* ---------- navegação inferior ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--base) + 12px); z-index: 30;
  width: calc(100% - 32px); max-width: 488px; padding: 6px; border-radius: 9999px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
}
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 9999px; font-size: 11px; font-weight: 500; color: rgb(var(--suave)); }
.nav button.on { color: rgb(var(--marca)); background: rgb(var(--marca-claro) / .85); }

/* ---------- sheet ---------- */
.fundo-sheet { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .5); display: flex; align-items: flex-end; justify-content: center; animation: aparecer .15s ease; }
.sheet {
  width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; border-radius: 28px 28px 0 0;
  background: rgb(var(--fundo)); border: 1px solid rgb(var(--linha)); border-bottom: 0;
  padding: 10px 20px calc(var(--base) + 22px); animation: subir .2s ease;
}
.sheet .puxador { width: 40px; height: 4px; border-radius: 9999px; background: rgb(var(--linha)); margin: 0 auto 16px; }
.sheet h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; text-transform: none; }
.sheet .sub { margin: 6px 0 16px; font-size: 14px; }
.sheet .botao, .sheet .botao-vidro { margin-top: 10px; }
.sheet .it-sheet { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgb(var(--linha)); font-size: 14px; }
.sheet .it-sheet .m { color: rgb(var(--suave)); font-size: 13px; white-space: nowrap; }
.sheet .troca { width: 100%; padding: 14px 4px; border-top: 1px solid rgb(var(--linha)); font-size: 15px; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.sheet .troca small { color: rgb(var(--suave)); font-size: 12.5px; font-weight: 400; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--base) + 96px); z-index: 60;
  background: rgb(var(--tinta)); color: rgb(var(--fundo)); padding: 12px 18px; border-radius: 9999px;
  font-size: 14px; font-weight: 500; max-width: calc(100% - 40px); text-align: center; animation: aparecer .15s ease;
}

.vazio { text-align: center; color: rgb(var(--suave)); padding: 28px 12px; font-size: 14px; }
.espaco { height: 12px; }

/* ======================= v1.1: recursos extras ======================= */

/* topo com avatar */
.topo-linha .avatar-btn { width: 44px; height: 44px; border-radius: 9999px; overflow: hidden; border: 1px solid rgb(var(--borda-vidro) / var(--borda-alpha)); background: rgb(var(--marca-claro)); color: rgb(var(--marca)); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; }
html:not(.dark) .topo-linha .avatar-btn { border-color: rgb(var(--linha)); }
.topo-linha .avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* barra de instalação (PWA) */
.banner-pwa { margin-top: 14px; padding: 16px; }
.banner-pwa .cab { display: flex; gap: 12px; align-items: center; }
.banner-pwa .cab .logo-tile { width: 44px; height: 44px; border-radius: 14px; margin: 0; flex: none; }
.banner-pwa .cab b { display: block; font-size: 15px; }
.banner-pwa .cab span { font-size: 12px; color: rgb(var(--marca)); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.banner-pwa .feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.banner-pwa .feats div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid rgb(var(--linha)); font-size: 12px; color: rgb(var(--suave)); text-align: center; }
.banner-pwa .feats svg { color: rgb(var(--marca)); }
.banner-pwa .botao { height: 46px; }
.banner-pwa .ios { font-size: 13.5px; color: rgb(var(--suave)); line-height: 1.45; margin: 12px 0 4px; }

/* ações rápidas na tela inicial */
.acoes-rapidas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.acao-rapida { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 500; text-align: center; }
.acao-rapida svg { color: rgb(var(--marca)); }
.link-ver { color: rgb(var(--marca)); font-size: 13.5px; font-weight: 600; }
.cartao-topo { display: flex; justify-content: space-between; align-items: center; }

/* tour guiado */
.tour { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--base) + 100px); z-index: 70; width: calc(100% - 32px); max-width: 488px; padding: 18px; animation: subir .2s ease; background: rgb(var(--superficie)); }
.tour .passo { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: rgb(var(--marca)); }
.tour h3 { font-size: 18px; font-weight: 600; margin-top: 6px; }
.tour p { font-size: 14px; color: rgb(var(--suave)); line-height: 1.45; margin-top: 6px; }
.tour .rod { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.tour .pontos { display: flex; gap: 5px; }
.tour .pontos i { width: 6px; height: 6px; border-radius: 9999px; background: rgb(var(--linha)); }
.tour .pontos i.on { background: rgb(var(--marca)); width: 16px; }
.tour .bts { display: flex; gap: 8px; align-items: center; }
.tour .bts .botao { width: auto; height: 42px; padding: 0 20px; font-size: 15px; }
.tour .bts .pular { color: rgb(var(--suave)); font-size: 14px; font-weight: 500; padding: 10px; }
.realce { position: relative; z-index: 65; box-shadow: 0 0 0 3px rgb(var(--marca)), 0 0 0 9px rgb(var(--marca) / .25) !important; border-radius: 22px; transition: box-shadow .2s ease; }

/* abas segmentadas */
.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 9999px; margin-top: 16px; }
.segmentado button { padding: 10px 6px; border-radius: 9999px; font-size: 14px; font-weight: 600; text-align: center; color: rgb(var(--suave)); }
.segmentado button.on { background: rgb(var(--marca-claro)); color: rgb(var(--marca)); }

/* histórico + análise */
.hist-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; margin-top: 10px; border-radius: 20px; }
.hist-item .dt { width: 44px; text-align: center; flex: none; }
.hist-item .dt b { display: block; font-size: 20px; font-weight: 600; line-height: 1; }
.hist-item .dt span { font-size: 11px; color: rgb(var(--suave)); text-transform: uppercase; }
.hist-item .c { flex: 1; min-width: 0; }
.hist-item .c b { display: block; font-size: 15px; font-weight: 600; }
.hist-item .c span { font-size: 12.5px; color: rgb(var(--suave)); }
.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtros .chip { flex: none; }
.graf-barras { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 16px; }
.graf-barras .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.graf-barras .b i { width: 100%; max-width: 28px; border-radius: 8px 8px 4px 4px; background: rgb(var(--marca-vivo)); min-height: 3px; }
.graf-barras .b i.zero { background: rgb(var(--linha)); }
.graf-barras .b span { font-size: 10.5px; color: rgb(var(--suave)); }
.graf-barras .b em { font-size: 11px; font-style: normal; font-weight: 600; }
.pr-linha { display: grid; grid-template-columns: 1fr 64px 70px; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid rgb(var(--linha)); font-size: 14px; }
.pr-linha:first-of-type { border-top: 0; }
.pr-linha small { display: block; color: rgb(var(--suave)); font-size: 12px; }
.pr-linha .d { text-align: right; font-weight: 600; font-size: 13px; }
.pr-linha .d.up { color: rgb(var(--marca)); }
.pr-linha svg.spark { width: 64px; height: 24px; }

/* nutrição */
.meta-grande { padding: 18px; margin-top: 16px; }
.meta-grande .kcal { font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.meta-grande .kcal small { font-size: 16px; font-weight: 500; color: rgb(var(--suave)); letter-spacing: 0; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.macro { padding: 12px; border-radius: 16px; border: 1px solid rgb(var(--linha)); }
.macro b { display: block; font-size: 22px; font-weight: 600; }
.macro span { font-size: 12px; color: rgb(var(--suave)); }
.macro .t { height: 4px; border-radius: 9999px; background: rgb(var(--linha)); margin-top: 8px; overflow: hidden; }
.macro .t i { display: block; height: 100%; background: rgb(var(--marca-vivo)); }
.macro.c2 .t i { background: rgb(var(--alerta)); }
.macro.c3 .t i { background: rgb(var(--perigo)); }
.conta-linha { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid rgb(var(--linha)); font-size: 13.5px; }
.conta-linha:first-child { border-top: 0; }
.conta-linha span:last-child { color: rgb(var(--suave)); text-align: right; }
.dia-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.dia-nav b { font-size: 15px; text-transform: capitalize; }
.refeicao { padding: 14px 16px; margin-top: 10px; border-radius: 20px; }
.refeicao .rt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.refeicao .rt b { font-size: 15px; }
.refeicao .rt span { font-size: 12.5px; color: rgb(var(--suave)); white-space: nowrap; }
.refeicao ul { list-style: none; margin: 8px 0 0; padding: 0; }
.refeicao li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 6px 0; border-top: 1px solid rgb(var(--linha)); }
.refeicao li:first-child { border-top: 0; }
.refeicao li span:last-child { color: rgb(var(--suave)); text-align: right; white-space: nowrap; }
.refeicao li small { display: block; color: rgb(var(--suave)); font-size: 11.5px; }
.total-dia { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: rgb(var(--suave)); gap: 10px; flex-wrap: wrap; }
.total-dia b { color: rgb(var(--tinta)); }
.peso-form { display: flex; gap: 8px; margin-top: 12px; }
.peso-form .campo { margin-bottom: 0; height: 46px; flex: 1; min-width: 0; }
.peso-form .botao { width: auto; height: 46px; padding: 0 20px; flex: none; font-size: 15px; }
.graf-peso { width: 100%; height: 140px; margin-top: 14px; }
.graf-peso .linha { fill: none; stroke: rgb(var(--marca)); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.graf-peso .area { fill: rgb(var(--marca) / .12); }
.graf-peso .ponto { fill: rgb(var(--marca)); }
.graf-peso text { fill: rgb(var(--suave)); font-size: 10px; font-family: inherit; }
.graf-peso .grade { stroke: rgb(var(--linha)); stroke-width: 1; }
.peso-lista .it-peso { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgb(var(--linha)); font-size: 14px; }
.peso-lista .it-peso button { color: rgb(var(--suave)); padding: 6px; }
.supl { padding: 12px 0; border-top: 1px solid rgb(var(--linha)); }
.supl:first-of-type { border-top: 0; }
.supl b { font-size: 14px; }
.supl p { font-size: 13px; color: rgb(var(--suave)); margin-top: 3px; line-height: 1.4; }
.supl .nv { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 9999px; background: rgb(var(--marca-claro)); color: rgb(var(--marca)); margin-left: 6px; text-transform: uppercase; }

/* ajustes */
.cores { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 4px; }
.swatch { width: 44px; height: 44px; border-radius: 9999px; border: 3px solid transparent; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 0 0 2px rgb(0 0 0 / .15); }
.swatch.sel { border-color: rgb(var(--tinta)); }
.sheet h3.sec { font-size: 13px; font-weight: 600; color: rgb(var(--suave)); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 8px; }
.ajuste { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid rgb(var(--linha)); }
.ajuste:first-of-type { border-top: 0; }
.ajuste .tx b { display: block; font-size: 15px; font-weight: 600; }
.ajuste .tx span { font-size: 13px; color: rgb(var(--suave)); line-height: 1.35; display: block; margin-top: 2px; }
.interruptor { width: 50px; height: 30px; border-radius: 9999px; background: rgb(var(--linha)); position: relative; flex: none; transition: background .15s ease; }
.interruptor::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 9999px; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.interruptor.on { background: rgb(var(--marca-vivo)); }
.interruptor.on::after { transform: translateX(20px); }
.acao .tx { display: flex; flex-direction: column; min-width: 0; }
.acao .tx small { font-size: 12.5px; font-weight: 400; color: rgb(var(--suave)); margin-top: 1px; }
.foto-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.foto-edit .avatar { width: 72px; height: 72px; font-size: 28px; }
.foto-edit .bts { display: flex; flex-direction: column; gap: 8px; }
.foto-edit .bts .chip { justify-content: center; }
.fav-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid rgb(var(--linha)); font-size: 15px; }
.fav-linha small { display: block; color: rgb(var(--suave)); font-size: 12.5px; }

/* treino: estrela e cronômetro */
.estrela { color: rgb(var(--suave) / .7); }
.estrela.on { color: rgb(var(--alerta)); }
.estrela.on svg { fill: rgb(var(--alerta)); }
.timer-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--base) + 104px); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 9999px; }
.timer-pill .tempo { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; min-width: 52px; }
.timer-pill .chip { padding: 7px 12px; font-size: 13px; }
.timer-pill.fim { background: rgb(var(--marca-vivo)); color: #04140b; border-color: transparent; }
.timer-pill .x { width: 34px; height: 34px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; }
.fab-timer { position: fixed; right: 16px; bottom: calc(var(--base) + 104px); z-index: 40; width: 52px; height: 52px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: rgb(var(--marca)); }

/* bloqueio do app */
.bloqueio { position: fixed; inset: 0; z-index: 200; background: rgb(var(--fundo)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.bloqueio .logo-tile { margin-bottom: 18px; }
.bloqueio h1 { font-size: 26px; font-weight: 600; }
.bloqueio p { color: rgb(var(--suave)); font-size: 15px; margin: 10px 0 24px; max-width: 300px; }
.bloqueio .botao { max-width: 320px; }
.bloqueio .botao-texto { max-width: 320px; margin-top: 8px; }

/* aviso de computador (igual ao Calcula AI) */
.gate { display: none; }
@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  html[data-gate] body #app, html[data-gate] body .timer-pill, html[data-gate] body .fab-timer { display: none !important; }
  html[data-gate] body .gate { display: flex; min-height: 100vh; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 32px; position: relative; z-index: 1; }
  .gate .logo-tile { margin: 0 auto 18px; }
  .gate h1 { font-size: 22px; font-weight: 600; }
  .gate p { max-width: 380px; color: rgb(var(--suave)); font-size: 14.5px; line-height: 1.5; margin: 10px auto 18px; }
  .gate code { display: inline-block; padding: 8px 14px; border-radius: 12px; background: rgb(var(--superficie)); border: 1px solid rgb(var(--linha)); font-size: 13px; }
}
.timer-pill .chip, .conta-linha span:last-child, .refeicao .rt span { white-space: nowrap; }
.conta-linha span:first-child { min-width: 0; }

/* ======================= v1.2: demonstração dos exercícios ======================= */
.sessao-itens .it { width: 100%; text-align: left; align-items: center; }
.sessao-itens .it .m { display: inline-flex; align-items: center; gap: 6px; }
.sessao-itens .it .m svg { color: rgb(var(--marca)); }
.ex-thumb { position: relative; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex: none; background: rgb(var(--linha)); border: 1px solid rgb(var(--linha)); }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-thumb-play { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 9999px; background: rgb(0 0 0 / .6); color: #fff; display: flex; align-items: center; justify-content: center; }
.demo { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden; background: #111; border: 1px solid rgb(var(--linha)); }
.demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo img.b { opacity: 0; animation: demo-troca 1.9s ease-in-out infinite; }
.demo.pausado img.b { animation: none; opacity: 0; }
@keyframes demo-troca { 0%, 30% { opacity: 0; } 50%, 80% { opacity: 1; } 100% { opacity: 0; } }
.demo-dica { font-size: 12.5px; color: rgb(var(--suave)); margin-top: 8px; text-align: center; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .demo img.b { animation: none; } }

/* ---------- v1.3: topo fixo ---------- */
.topo-linha, .treino-topo, .wiz-topo {
  position: sticky; top: 0; z-index: 30;
  margin: calc(-1 * (var(--topo) + 16px)) -20px 8px;
  padding: calc(var(--topo) + 10px) 20px 10px;
  background: rgb(var(--fundo) / .82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

/* ---------- v1.5: pop-up de instalação ---------- */
.pwa-pop { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; justify-content: center; padding: 0 14px calc(var(--base) + 14px); pointer-events: none; animation: pwa-sobe .35s ease-out; }
.pwa-cartao { pointer-events: auto; width: 100%; max-width: 480px; padding: 16px; box-shadow: 0 18px 50px rgb(0 0 0 / .45); }
.pwa-cartao .cab { display: flex; gap: 12px; align-items: center; }
.pwa-cartao .cab .logo-tile { width: 44px; height: 44px; border-radius: 14px; margin: 0; flex: none; }
.pwa-cartao .cab span { display: block; font-size: 12.5px; color: rgb(var(--suave)); }
.pwa-cartao .cab b { font-size: 16px; font-weight: 600; }
.pwa-cartao .feats { display: flex; gap: 8px; margin: 14px 0; }
.pwa-cartao .feats div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: rgb(var(--suave)); text-align: center; }
.pwa-cartao .feats svg { color: rgb(var(--marca)); }
.pwa-cartao .ios { font-size: 13.5px; line-height: 1.4; color: rgb(var(--suave)); margin: 0 0 8px; }
.pwa-cartao .botao, .pwa-cartao .botao-texto { width: 100%; }
@keyframes pwa-sobe { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.login-corpo .sub { margin-bottom: 18px; }

/* ---------- v1.5.1: séries e repetições mais claras ---------- */
.ex-meta { font-size: 14px; color: rgb(var(--tinta)); margin-top: 3px; }
.ex-meta b { font-weight: 600; color: rgb(var(--marca)); }
.ex-meta2 { font-size: 12.5px; color: rgb(var(--suave)); margin-top: 2px; line-height: 1.35; }
.ex-series { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ex-series .lbl { font-size: 12.5px; color: rgb(var(--suave)); margin-right: 4px; white-space: nowrap; }
.serie { width: 38px; height: 38px; border-radius: 9999px; border: 1.5px solid rgb(var(--linha)); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: rgb(var(--suave)); text-align: center; }
.serie.on { background: rgb(var(--marca-vivo)); border-color: rgb(var(--marca-vivo)); color: rgb(var(--fundo)); }
.como-ler { font-size: 13px; line-height: 1.45; color: rgb(var(--suave)); margin: 10px 0 2px; }
.como-ler b { color: rgb(var(--tinta)); font-weight: 600; }
