body {
  font-family: system-ui, sans-serif;
  max-width: 32rem;
  margin: 4rem auto;
  padding: 0 1rem;
  color: #1a1a1a;
}

a {
  color: #1a1a1a;
}

/* Onboarding — mobile-first, uma pergunta por tela, sem menu. */

.onboarding {
  margin: 1.5rem auto;
  max-width: 28rem;
  padding: 0 1.25rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.onboarding .progresso {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.onboarding h1 {
  font-size: 1.6rem;
  margin: 0.25rem 0 1.5rem;
}

.onboarding label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.onboarding input[type="text"],
.onboarding input[type="tel"],
.onboarding input[type="number"],
.onboarding select {
  width: 100%;
  font-size: 1.25rem;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  border: 2px solid #ccc;
  border-radius: 0.5rem;
  box-sizing: border-box;
}

.onboarding .opcoes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.onboarding .opcao {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  border: 2px solid #ccc;
  border-radius: 0.5rem;
}

.onboarding .opcao input {
  width: 1.4rem;
  height: 1.4rem;
}

.onboarding button {
  width: 100%;
  font-size: 1.25rem;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

.onboarding button:active {
  opacity: 0.8;
}

.onboarding .aviso {
  background: #fdecea;
  border: 2px solid #d93025;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Tela de treino — mobile-first, alvos de toque grandes, uma decisão
   principal por vez, sem dashboard. Reaproveita a linguagem visual do
   onboarding (.opcao, .aviso, botão preto de largura total), mais
   simples ainda: menos texto, mais espaço em branco. */

.treino {
  margin: 1rem auto;
  max-width: 30rem;
  padding: 0 1rem 6rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

.treino h1 {
  font-size: 1.4rem;
  margin: 0.25rem 0 0.25rem;
}

.treino .topo {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 0.75rem 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 1rem;
  z-index: 5;
}

.treino .topo .dia {
  font-size: 0.95rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.treino .topo .progresso {
  font-size: 1.1rem;
  font-weight: 600;
}

.treino button {
  width: 100%;
  font-size: 1.2rem;
  padding: 1rem;
  border: none;
  border-radius: 0.6rem;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  min-height: 48px;
}

.treino button:active {
  opacity: 0.8;
}

.treino button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.treino button.secundario {
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #ccc;
}

.treino button.discreto {
  background: transparent;
  color: #666;
  border: none;
  font-size: 0.95rem;
  padding: 0.5rem;
  width: auto;
  min-height: 44px;
}

.treino button.perigo {
  background: #d93025;
}

.treino .cartao {
  border: 2px solid #ddd;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.treino .cartao.aberto {
  border-color: #1a1a1a;
}

.treino .cartao-cabecalho {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  min-height: 48px;
}

.treino .cartao-cabecalho .nome {
  font-weight: 600;
  font-size: 1.15rem;
}

.treino .cartao-cabecalho .selo {
  font-size: 0.85rem;
  color: #666;
  border: 1px solid #ccc;
  border-radius: 1rem;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

.treino .cartao-cabecalho .selo.adiado {
  color: #a06a00;
  border-color: #f0c674;
  background: #fff8e6;
}

.treino .cartao-cabecalho .selo.pulado {
  color: #666;
  border-color: #ccc;
  background: #f5f5f5;
}

.treino .cartao-corpo {
  padding: 0 1rem 1rem;
  border-top: 1px solid #eee;
}

.treino .cartao-corpo[hidden] {
  display: none;
}

.treino .prescricao {
  margin: 0.75rem 0 1rem;
}

.treino .prescricao .numeros {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.treino .prescricao .explicacao {
  color: #444;
  font-size: 1rem;
}

.treino .grade-opcoes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.treino .grade-opcoes.reps {
  grid-template-columns: repeat(auto-fit, minmax(3.2rem, 1fr));
}

.treino .grade-opcoes button {
  padding: 0.85rem 0.25rem;
  font-size: 1.1rem;
}

.treino .grade-opcoes button[aria-pressed="true"] {
  background: #1a1a1a;
  color: #fff;
  outline: 3px solid #9fd3ff;
  outline-offset: 2px;
}

.treino .grade-opcoes button:not([aria-pressed="true"]) {
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #ccc;
}

.treino .campo-carga {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.treino .campo-carga input {
  font-size: 1.3rem;
  padding: 0.6rem;
  width: 7rem;
  border: 2px solid #ccc;
  border-radius: 0.5rem;
  text-align: center;
}

.treino .link-discreto {
  background: none;
  border: none;
  color: #666;
  text-decoration: underline;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  width: auto;
  min-height: 44px;
}

.treino .descanso {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  color: #fff;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 10;
}

.treino .descanso[hidden] {
  display: none;
}

.treino .descanso .rotulo {
  font-size: 0.85rem;
  color: #ccc;
  text-transform: uppercase;
}

.treino .descanso .tempo {
  font-size: 1.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.treino .descanso button {
  width: auto;
  background: #fff;
  color: #1a1a1a;
  padding: 0.6rem 1rem;
  font-size: 1rem;
}

.treino .series-registradas {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #444;
}

.treino .series-registradas .serie {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.treino .erro-inline {
  color: #d93025;
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.treino .rodape-cartao {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.treino .rodape-cartao button {
  flex: 1;
}

.treino .resumo-fim .linha {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1.1rem;
}

.treino .resumo-fim .observacao {
  background: #eef6ff;
  border: 2px solid #9fd3ff;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

/* --- Camera Capture C0 -------------------------------------------------
   Estilo funcional mínimo, reaproveitando o que já existe. Não é
   redesign: o manual de marca ainda não chegou e o stash visual não foi
   aplicado. */

.cartao-camera { padding: 0 0.9rem 0.9rem; }

.camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #101014;
  color: #f2f2f2;
  padding: 1rem;
  overflow-y: auto;
}

.camera-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.camera-quadro {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #000;
  border-radius: 0.5rem;
  overflow: hidden;
}

.camera-quadro video,
#camera-playback {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: #000;
}

.camera-guia {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.camera-area-segura {
  position: absolute;
  inset: 8% 12%;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 0.5rem;
}

.camera-guia-texto {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0.25rem;
}

.camera-contagem {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.camera-gravando {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem 0;
  font-variant-numeric: tabular-nums;
}

.camera-ponto {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #e5484d;
}

.camera-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.camera-painel {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.75;
}

.camera-painel pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0 0;
}
