:root {
  --bg: #0b0d11;
  --card: #15181f;
  --card2: #1d2129;
  --card3: #252a34;
  --borda: #262b35;
  --borda2: #323845;
  --texto: #f1f3f7;
  --sub: #8a92a3;
  --acento: #c6f432;
  --acento2: #a5d10f;
  --acento-bg: rgba(198, 244, 50, .1);
  --acento-borda: rgba(198, 244, 50, .32);
  --acento-txt: #0b0d11;
  --bi: #5fa8ff;
  --bi-bg: rgba(95, 168, 255, .1);
  --perigo: #ff6363;
  --raio: 16px;
  --sombra: 0 8px 28px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--texto);
  font: 16px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--acento); text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0 0 4px; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: 1.05rem; margin: 22px 0 10px; letter-spacing: -.01em; font-weight: 700; }
h2:first-child { margin-top: 0; }
h3 { font-size: 1rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.sub { color: var(--sub); margin: 0 0 16px; font-size: .92rem; }
.muted { color: var(--sub); font-size: .86rem; }
.ic { flex: none; display: block; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topo e abas ---------- */
.topo {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(11, 13, 17, .85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--borda);
}
.marca { display: flex; align-items: center; gap: 7px; color: var(--texto); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; }
.marca .ic { color: var(--acento); }
.marca > span { color: var(--texto); }
.sair { color: var(--sub); padding: 6px; margin: -6px; }
.conteudo { max-width: 680px; margin: 0 auto; padding: 18px 16px; }
.abas {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: rgba(21, 24, 31, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom);
}
.abas a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 10px; color: var(--sub); font-size: .7rem; font-weight: 500;
}
.abas a.on { color: var(--acento); }

/* ---------- cartoes e listas ---------- */
.cartao { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; margin-bottom: 14px; }
.estreito { max-width: 420px; margin: 28px auto; }
.lista { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 13px 14px;
  color: var(--texto); transition: border-color .15s, background .15s;
}
a.item:active, .item a:active { background: var(--card2); }
.item .grow { flex: 1; min-width: 0; }
.item .titulo { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item > .ic:last-child { color: var(--sub); }
.letra {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  background: var(--acento-bg); color: var(--acento); border: 1px solid var(--acento-borda);
}
.letra.neutra { background: var(--card2); color: var(--sub); border-color: var(--borda); }
.linha { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.vazio { text-align: center; color: var(--sub); padding: 30px 12px; }
.voltar { display: inline-flex; align-items: center; gap: 2px; color: var(--sub); font-size: .9rem; margin-bottom: 10px; }
.voltar .ic { transform: rotate(180deg); }

/* ---------- botoes e forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--borda2); background: var(--card2); color: var(--texto);
  border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .08s, background .15s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn.primario { background: var(--acento); color: var(--acento-txt); border-color: var(--acento); }
.btn.primario:active { background: var(--acento2); }
.btn.perigo { color: var(--perigo); }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--sub); }
.btn.bloco { width: 100%; }
.btn.grande { padding: 15px 18px; font-size: 1.05rem; border-radius: 14px; }
.btn.peq { padding: 7px 11px; font-size: .86rem; border-radius: 10px; }
.btn.icone { padding: 8px; border-radius: 10px; }
.btn:disabled { opacity: .4; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, label.campo { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--sub); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--texto); background: var(--bg);
  border: 1px solid var(--borda2); border-radius: 11px; padding: 11px 12px; width: 100%;
  min-width: 0;
}
input::placeholder { color: #565d6b; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acento); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--acento); }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.flash { background: var(--acento-bg); border: 1px solid var(--acento-borda); color: var(--acento); padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; font-size: .92rem; }
.erro { background: rgba(255, 99, 99, .1); border: 1px solid rgba(255, 99, 99, .35); color: var(--perigo); padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--card2); color: var(--sub); white-space: nowrap; }
.tag.per { background: var(--acento-bg); color: var(--acento); }
.tag.bi { background: var(--bi-bg); color: var(--bi); }

/* ---------- inicio ---------- */
.ola { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.ola .sub { margin: 0; }
.sequencia { display: flex; align-items: center; gap: 5px; font-weight: 700; color: #ffb547; font-size: .9rem; white-space: nowrap; }
.semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.semana .dia { text-align: center; padding: 8px 0 9px; border-radius: 12px; background: var(--card); border: 1px solid var(--borda); }
.semana .dia small { display: block; font-size: .66rem; color: var(--sub); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.semana .dia b { display: block; font-size: .95rem; margin-top: 2px; }
.semana .dia i { display: block; width: 6px; height: 6px; border-radius: 50%; margin: 5px auto 0; background: transparent; }
.semana .dia.feito { background: var(--acento-bg); border-color: var(--acento-borda); }
.semana .dia.feito i { background: var(--acento); }
.semana .dia.hoje { border-color: var(--texto); }
.destaque { background: linear-gradient(140deg, #232d0d 0%, #15181f 65%); border-color: #3a4a12; padding: 18px; }
.destaque .rotulo { color: var(--acento); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.destaque h2 { margin: 6px 0 4px; font-size: 1.35rem; }
.destaque .grupos { color: var(--sub); font-size: .88rem; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--sub); font-size: .74rem; }

/* ---------- editor de ficha ---------- */
.ed-bloco { margin-bottom: 10px; }
.ed-bloco.bi { border: 1px solid rgba(95, 168, 255, .35); border-radius: calc(var(--raio) + 4px); padding: 4px; background: var(--bi-bg); }
.ed-bloco.bi > .bi-rotulo { display: flex; align-items: center; gap: 6px; color: var(--bi); font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: 6px 10px 6px; }
.ed-bloco.bi .ex-ficha { margin-bottom: 4px; }
.ed-bloco.bi .ex-ficha:last-child { margin-bottom: 0; }
.ex-ficha { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); margin-bottom: 10px; }
.ex-ficha > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.ex-ficha > summary::-webkit-details-marker { display: none; }
.ex-ficha > summary .grow { flex: 1; min-width: 0; }
.ex-ficha > summary .ic.seta { color: var(--sub); transition: transform .2s; }
.ex-ficha[open] > summary .ic.seta { transform: rotate(90deg); }
.ex-ficha .ordem { width: 26px; height: 26px; border-radius: 8px; background: var(--card2); color: var(--sub); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.ex-ficha .corpo { padding: 0 14px 14px; border-top: 1px solid var(--borda); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ex-ficha .grade4 label { font-size: .7rem; }
.ex-ficha .grade4 input { padding: 9px 4px; text-align: center; }
.ex-ficha .acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.salvo { font-size: .75rem; color: var(--acento); opacity: 0; transition: opacity .3s; }
.salvo.on { opacity: 1; }
.chk-linha { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--texto); cursor: pointer; }

/* ---------- treino ---------- */
.treino-topo {
  position: sticky; top: calc(53px + env(safe-area-inset-top)); z-index: 20;
  background: rgba(11, 13, 17, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  margin: -18px -16px 14px; padding: 12px 16px 10px; border-bottom: 1px solid var(--borda);
}
.treino-topo h1 { font-size: 1.25rem; margin: 0; }
.treino-topo .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--sub); font-size: .82rem; margin-top: 2px; }
.progresso { height: 5px; background: var(--card2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progresso i { display: block; height: 100%; background: var(--acento); width: 0; transition: width .35s; border-radius: 99px; }
.sync { display: inline-flex; align-items: center; gap: 5px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acento); }
.sync.pendente::before { background: #ffb547; }
.sync.erro::before { background: var(--perigo); }

.bloco-ex { background: var(--card); border: 1px solid var(--borda); border-radius: calc(var(--raio) + 2px); margin-bottom: 14px; overflow: hidden; transition: border-color .2s; }
.bloco-ex.bi { border-color: rgba(95, 168, 255, .35); }
.bloco-ex.completo { border-color: var(--acento-borda); }
.bloco-ex .bi-rotulo { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bi-bg); color: var(--bi); font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: 7px 14px; }
.bloco-ex.completo .bi-rotulo { background: var(--acento-bg); color: var(--acento); }
.ex-treino { padding: 14px; }
.ex-treino + .ex-treino { border-top: 1px dashed var(--borda2); }
.ex-treino .cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.ex-treino .cab .grow { min-width: 0; }
.ex-treino .prescricao { color: var(--sub); font-size: .84rem; margin-top: 2px; }
.ex-treino .prescricao b { color: var(--texto); font-weight: 650; }
.ex-treino .nota { font-size: .8rem; color: var(--sub); margin: 6px 0 0; padding: 7px 10px; background: var(--card2); border-radius: 10px; }
.ex-treino .nota.ultimo b { color: var(--texto); font-weight: 600; }
.btn-video { flex: none; display: inline-flex; align-items: center; gap: 5px; color: #ff6b6b; background: rgba(255, 70, 70, .1); border: 1px solid rgba(255, 70, 70, .25); border-radius: 10px; padding: 6px 9px; font-size: .76rem; font-weight: 600; }
.btn-video .ic { width: 18px; height: 18px; }
.series { margin-top: 10px; }
.serie-cab, .serie { display: grid; grid-template-columns: 30px 1fr 1fr 52px; gap: 8px; align-items: center; }
.serie-cab { font-size: .68rem; color: var(--sub); text-align: center; margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.serie { margin-bottom: 7px; }
.serie .n { color: var(--sub); font-weight: 700; text-align: center; font-size: .9rem; }
.serie input { text-align: center; padding: 11px 4px; font-size: 1.08rem; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--card2); border-color: transparent; }
.serie .chk {
  height: 46px; border-radius: 12px; border: 1px solid var(--borda2); background: var(--card2);
  color: var(--sub); cursor: pointer; display: grid; place-items: center; transition: background .15s, transform .08s;
}
.serie .chk:active { transform: scale(.92); }
.serie.feito .chk { background: var(--acento); color: var(--acento-txt); border-color: var(--acento); }
.serie.feito input { background: var(--acento-bg); color: var(--acento); }
.serie.feito .n { color: var(--acento); }
.mais-serie { margin-top: 2px; }

/* timer de descanso */
.timer {
  position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40;
  max-width: 656px; margin: 0 auto;
  background: #1f2430; border: 1px solid var(--acento-borda); border-radius: 18px; padding: 12px 14px 14px;
  display: none; flex-direction: column; gap: 10px; box-shadow: var(--sombra);
}
.timer.on { display: flex; }
.timer .linha1 { display: flex; align-items: center; gap: 12px; }
.timer .tempo { font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 96px; letter-spacing: -.03em; }
.timer .grow { flex: 1; min-width: 0; font-size: .82rem; color: var(--sub); }
.timer .grow b { color: var(--texto); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer .btn { padding: 8px 10px; }
.timer .barra { height: 4px; background: var(--card3); border-radius: 99px; overflow: hidden; }
.timer .barra i { display: block; height: 100%; background: var(--acento); width: 100%; transition: width .25s linear; }
.timer.fim { background: var(--acento); color: var(--acento-txt); border-color: var(--acento); animation: pisca .6s 4; }
.timer.fim .grow, .timer.fim .grow b { color: var(--acento-txt); }
.timer.fim .btn { background: rgba(0,0,0,.12); border-color: transparent; color: var(--acento-txt); }
@keyframes pisca { 50% { opacity: .6; } }

/* ---------- historico ---------- */
.hist-ex { padding: 10px 0; border-top: 1px solid var(--borda); }
.hist-ex:first-of-type { border-top: 0; padding-top: 0; }
.hist-series { color: var(--sub); font-size: .86rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pr { color: #ffb547; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.mes { color: var(--sub); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 10px 2px 0; }
.grafico { position: relative; height: 260px; }

/* ---------- exercicios ---------- */
.busca { position: sticky; top: calc(53px + env(safe-area-inset-top)); z-index: 10; background: var(--bg); padding: 4px 0 10px; }
.ex-cat { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--borda); }
.ex-cat:first-child { border-top: 0; }
.ex-cat .grow { flex: 1; min-width: 0; }
.ex-cat .titulo { font-weight: 600; }
.grupo-tit { color: var(--sub); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 18px 2px 4px; }

/* ---------- periodizacao ---------- */
.fase-cab, .fase-linha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fase-cab { font-size: .7rem; color: var(--sub); text-align: center; font-weight: 600; }
.fase-linha { margin-bottom: 6px; }
.fase-linha input { text-align: center; padding: 9px 4px; }
.fase-linha.atual input { border-color: var(--acento-borda); background: var(--acento-bg); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.7); display: none; align-items: flex-end; justify-content: center; }
.modal.on { display: flex; }
.modal .caixa { background: var(--card); width: 100%; max-width: 680px; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.modal iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; background: #000; }

@media (min-width: 560px) {
  .modal { align-items: center; }
  .modal .caixa { border-radius: 20px; }
}

/* icones dentro de texto */
.prescricao .ic, .muted .ic, .tag .ic, .sub .ic, label .ic { display: inline-block; vertical-align: -2px; }
.marca b { color: var(--acento); font-weight: 800; }

/* ---------- carrossel do treino ---------- */
.resumo-feito { display: none; }
.passos { display: flex; gap: 6px; overflow-x: auto; margin: 10px -16px 0; padding: 2px 16px 2px; scrollbar-width: none; }
.passos::-webkit-scrollbar { display: none; }
.passo {
  flex: none; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px;
  border: 1px solid var(--borda2); background: var(--card); color: var(--sub);
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s;
}
.passo.bi { border-color: rgba(95, 168, 255, .45); }
.passo.feito { background: var(--acento-bg); border-color: var(--acento-borda); color: var(--acento); }
.passo.atual { background: var(--texto); border-color: var(--texto); color: var(--bg); }
.passo.feito.atual { background: var(--acento); border-color: var(--acento); color: var(--acento-txt); }
.carrossel {
  display: flex; align-items: flex-start; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px;
}
.carrossel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.slide-cab { margin: 0 2px 8px; font-weight: 600; }
.slide-nav { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0 18px; }
.slide-nav .btn { flex: 1; }
.slide-nav .btn:only-child { flex: 0 1 auto; }
.bloco-ex.completo + .slide-nav .btn:last-child { background: var(--acento); color: var(--acento-txt); border-color: var(--acento); }
/* player de video */
.video-quadro { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-quadro iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sub); font-size: .9rem; text-align: center; padding: 16px; }
.video-acoes { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.modal .caixa { box-shadow: var(--sombra); }
button.btn-video { font: inherit; font-size: .76rem; cursor: pointer; }

/* =========== modo treino (tela cheia, foco no exercicio) =========== */
body.modo-treino { padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
.modo-treino .topo, .modo-treino .abas { display: none; }
.modo-treino .conteudo { padding-top: calc(10px + env(safe-area-inset-top)); }
.treino-barra { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.btn-redondo {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--card2); border: 1px solid var(--borda2); color: var(--texto); cursor: pointer; font: inherit;
}
.btn-redondo:active, .btn-pilula:active { transform: scale(.95); }
.btn-pilula {
  display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 18px; border-radius: 99px;
  background: var(--card2); border: 1px solid var(--borda2); color: var(--texto); font: inherit; font-weight: 650; cursor: pointer;
}
.btn-pilula.fina { height: 36px; padding: 0 14px; font-size: .84rem; font-weight: 600; }
.pilula-atividade {
  display: table; margin: 4px auto -13px; position: relative; z-index: 2;
  background: var(--texto); color: var(--bg); font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  padding: 5px 14px; border-radius: 99px;
}
.modo-treino .bloco-ex { border-radius: 22px; padding-top: 8px; }
.modo-treino .bloco-ex.bi { border-color: rgba(95, 168, 255, .45); }
.modo-treino .bloco-ex.completo { border-color: var(--acento-borda); }
.modo-treino .ex-treino { padding: 16px 14px 10px; }
.modo-treino .ex-treino + .ex-treino { border-top: 1px dashed var(--borda2); }
.ex-topo { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ex-grupo { color: var(--sub); font-size: .86rem; font-weight: 500; }
.btn-busca-video {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px;
  border: 1px solid rgba(255, 90, 90, .35); background: rgba(255, 70, 70, .1); color: #ff7b7b; font-size: .84rem; font-weight: 600;
}
.ex-nome { text-align: center; font-size: 1.4rem; margin: 10px 0 8px; letter-spacing: -.02em; }
.ex-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag.recorde { background: rgba(255, 196, 0, .14); color: #ffcf40; }
.modo-treino .nota { text-align: center; }
.tabela-series { margin-top: 8px; }
.tabela-series .serie-cab, .tabela-series .serie {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 12px minmax(0, 1fr) 62px 40px; gap: 6px; align-items: center;
}
.tabela-series .serie-cab { font-size: .68rem; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
.tabela-series .serie-cab span:nth-child(5) { text-align: left; }
.tabela-series .serie { padding: 5px 6px; margin: 0 -6px 4px; border-radius: 12px; }
.tabela-series .serie:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.tabela-series .serie .x { color: var(--sub); text-align: center; font-size: .85rem; }
.tabela-series .serie input { padding: 12px 2px; border-radius: 12px; border: 1px solid var(--borda2); background: var(--bg); }
.tabela-series .serie.feito input { border-color: var(--acento-borda); }
.ultimo-val {
  background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--texto);
  text-decoration: underline; text-decoration-color: var(--borda2); text-underline-offset: 3px; cursor: pointer; text-align: left;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ultimo-val.vazio { color: var(--sub); text-decoration: none; cursor: default; }
.tabela-series .chk { width: 36px; height: 36px; border-radius: 50%; justify-self: end; }
.tabela-series .chk .ic { opacity: .35; }
.tabela-series .serie.feito .chk .ic { opacity: 1; }
.ex-rodape { display: flex; justify-content: space-between; margin-top: 4px; }

.treino-rodape {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(11, 13, 17, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--borda);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}
.treino-rodape > * { max-width: 648px; margin-left: auto; margin-right: auto; }
.rodape-info { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rodape-info b { font-size: .95rem; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rodape-info .num { font-weight: 800; font-size: 1.05rem; }
.rodape-info .num.descanso { color: var(--acento); }
.rodape-meio { display: flex; justify-content: space-between; align-items: center; margin: 8px auto 10px; gap: 10px; }
.treino-rodape .passos { display: flex; gap: 5px; margin: 0 auto 12px; padding: 6px 0 8px; overflow: visible; }
.treino-rodape .passo {
  flex: 1; min-width: 0; height: 6px; padding: 0; border: 0; border-radius: 99px; background: var(--card3); position: relative;
}
.treino-rodape .passo::before { content: ""; position: absolute; inset: -9px 0; } /* area de toque maior */
.treino-rodape .passo.bi { background: rgba(95, 168, 255, .3); }
.treino-rodape .passo.feito { background: var(--acento); }
.treino-rodape .passo.fim { flex: .5; }
.treino-rodape .passo.atual { background: var(--texto); }
.treino-rodape .passo.atual.feito { background: var(--acento); }
.treino-rodape .passo.atual::after {
  content: ""; position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--acento); border-top: 0;
}
.rodape-acoes { display: grid; grid-template-columns: 1fr 1.9fr; gap: 10px; }
.rodape-acoes .btn { border-radius: 99px; padding: 14px 10px; font-size: .98rem; }
.rodape-acoes .ic-x { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 99, 99, .2); color: var(--perigo); display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.rodape-acoes.escondido { display: none; }
.modo-treino .timer { top: calc(66px + env(safe-area-inset-top)); bottom: auto; }
.fim-treino { margin-top: 0; border-radius: 22px; padding-top: 26px; }
/* timer de descanso dentro do rodape do treino */
.treino-rodape .timer { position: static; margin: 8px auto 0; padding: 8px 10px 10px; box-shadow: none; border-radius: 16px; gap: 6px; }
.treino-rodape .timer .tempo { font-size: 1.6rem; min-width: 74px; }
.treino-rodape .timer .btn { padding: 7px 9px; font-size: .85rem; }
.treino-rodape .timer.on ~ .rodape-meio { display: none; }
.treino-rodape .timer.on ~ .passos { margin-top: 10px; }
body.modo-treino { padding-bottom: calc(250px + env(safe-area-inset-bottom)); }
/* carrossel controlado pelo gesto proprio (sem rolagem lateral nativa) */
.modo-treino .carrossel { overflow-x: hidden; scroll-snap-type: none; touch-action: pan-y; }
.modo-treino .slide { scroll-snap-align: none; }

/* =========== treino completo =========== */
body.modo-concluido { padding-bottom: 24px; }
.festa {
  position: relative; height: 250px; margin: -10px -16px 0; overflow: hidden;
  background: radial-gradient(circle at 50% 70%, rgba(198, 244, 50, .22), transparent 60%), linear-gradient(180deg, #1b2110, var(--bg));
  display: grid; place-items: end center;
}
.medalha { margin-bottom: 10px; animation: medalha .9s cubic-bezier(.2, 1.4, .4, 1) both; filter: drop-shadow(0 10px 24px rgba(198, 244, 50, .35)); }
@keyframes medalha { from { transform: translateY(-120px) rotate(-12deg) scale(.6); opacity: 0; } }
.confetes { position: absolute; inset: 0; pointer-events: none; }
.confetes i { position: absolute; top: -20px; border-radius: 2px; opacity: .9; animation: cair linear infinite; }
@keyframes cair { to { transform: translateY(290px) rotate(var(--giro)); opacity: .2; } }
.concluido { text-align: center; }
.concluido h1 { font-size: 1.8rem; margin-top: 14px; }
.comparativo {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--acento-bg); border: 1px solid var(--acento-borda); border-radius: var(--raio);
  padding: 14px 16px; margin: 4px 0 14px; font-size: 1rem; line-height: 1.4;
}
.comparativo .emoji { font-size: 2.4rem; line-height: 1; flex: none; }
.comparativo b { color: var(--acento); }
.recordes { text-align: left; }
.recordes .rotulo { font-weight: 800; color: #ffcf40; margin-bottom: 6px; }
.recordes .linha { padding: 6px 0; border-top: 1px solid var(--borda); font-size: .92rem; flex-wrap: nowrap; }
.recordes .linha:first-of-type { border-top: 0; }
.frase { color: var(--sub); font-style: italic; margin: 0 0 16px; }
.estrelas {
  display: inline-flex; flex-direction: row-reverse; justify-content: center; gap: 4px; align-self: center;
  background: var(--card2); border: 1px solid var(--borda2); border-radius: 99px; padding: 6px 16px;
}
.estrelas input { position: absolute; opacity: 0; pointer-events: none; }
.estrelas label { font-size: 2rem; color: var(--card3); cursor: pointer; transition: color .15s, transform .1s; padding: 0 2px; line-height: 1.2; }
.estrelas label:active { transform: scale(.85); }
.estrelas input:checked ~ label, .estrelas label:hover, .estrelas label:hover ~ label { color: #ffcf40; }
.concluido .form { text-align: left; margin-top: 4px; }
.acoes-fim { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.acoes-fim .btn { border-radius: 99px; }
.avaliacao-hist { color: #ffcf40; letter-spacing: 2px; }
.recordes .linha .num { white-space: nowrap; flex: none; }
.recordes .linha span:first-child { min-width: 0; text-align: left; }

/* =========== convites e contas =========== */
.convite.expirado { opacity: .55; }
.convite.novo { border-color: var(--acento-borda); box-shadow: 0 0 0 3px var(--acento-bg); }
.link-convite { margin: 10px 0 8px; font-size: .82rem; color: var(--sub); background: var(--bg); }
.convite-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.zap { background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .4); color: #3ee07f; }
.item.inativo { opacity: .55; }
.acoes-conta { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; justify-content: flex-end; }
.senha-tmp { width: 100%; background: var(--acento-bg); border: 1px solid var(--acento-borda); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.senha-tmp b { color: var(--acento); font-size: 1.1rem; letter-spacing: .05em; }
