:root {
  --verde: #0f5132;
  --verde-claro: #f2f7f4;
  --texto: #1a1a1a;
  --muted: #666;
  --erro: #a3231f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--texto);
  background: #fff;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 60px;
  min-height: 100vh;
}
h1 { font-size: 1.3rem; color: var(--verde); margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }

.progresso {
  height: 5px;
  background: #eee;
  border-radius: 3px;
  margin-bottom: 22px;
  overflow: hidden;
}
.progresso > div {
  height: 100%;
  background: var(--verde);
  transition: width 0.2s;
}

.pergunta { font-size: 1.05rem; font-weight: 600; margin-bottom: 18px; line-height: 1.4; }

.escala { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.escala button {
  flex: 1 1 auto;
  min-width: 36px;
  padding: 10px 0;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}
.escala button.seleccionado {
  background: var(--verde);
  border-color: var(--verde);
  color: #fff;
}
.escala-legenda { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-bottom: 22px; }

textarea, input[type=text] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.opcoes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.opcoes button {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}
.opcoes button.seleccionado { background: var(--verde-claro); border-color: var(--verde); }

.btn-primario {
  width: 100%;
  padding: 13px;
  background: var(--verde);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}
.btn-primario:disabled { background: #aaa; cursor: not-allowed; }

.btn-secundario {
  width: 100%;
  padding: 13px;
  background: #fff;
  color: var(--verde);
  border: 1px solid var(--verde);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

.cartao {
  background: var(--verde-claro);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.erro { color: var(--erro); font-size: 0.85rem; margin-top: 8px; }
.ok { color: var(--verde); font-weight: 600; }

video#video-scan { width: 100%; border-radius: 10px; background: #000; }
