:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --card-border: #e5e8ee;
  --text: #1b2333;
  --text-muted: #647085;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --warn: #ca8a04;
  --warn-soft: rgba(202, 138, 4, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.07);
  /* Estados do check-in: 🎯 verde · 🌱 laranja/âmbar · ○ vermelho */
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: rgba(22, 163, 74, 0.12);
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 24px 16px 64px;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Perfil ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #dc2626);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
}

.profile-goal {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-metrics {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-metrics:empty {
  display: none;
}

.profile-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge .icon {
  width: 13px;
  height: 13px;
}

.badge-streak {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ---------- Botões ---------- */
.register {
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary:disabled {
  background: var(--card);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  box-shadow: none;
  cursor: default;
}

.btn-small {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

.btn-ghost {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-ghost .icon {
  width: 18px;
  height: 18px;
}

.register-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
}

/* ---------- Contagem regressiva ---------- */
.countdown {
  text-align: center;
}

.countdown[hidden] {
  display: none;
}

.countdown-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.countdown-cell {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.countdown-cell span {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.countdown-cell small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.countdown-sub {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Dashboard ---------- */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dashboard-header h2,
.calendar h2 {
  font-size: 16px;
  font-weight: 700;
}

.week-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
}

.week-score {
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    radial-gradient(closest-side, var(--card) 82%, transparent 83%),
    conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), var(--card-border) 0);
}

.score-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.score-max {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Resumo das 4 semanas */
.weeks-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.week-chip {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--card-border);
}

.week-chip.current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.week-chip .chip-label {
  font-size: 11px;
  color: var(--text-muted);
}

.week-chip .chip-score {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.dashboard-footer {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Grade dos 28 dias ---------- */
.calendar h2 {
  margin-bottom: 14px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.day-cell .icon {
  width: 15px;
  height: 15px;
}

.day-cell.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.day-cell.partial {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}

.day-cell.zero {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.day-cell.missed {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.day-cell.today {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.day-cell.future {
  opacity: 0.5;
}

/* ---------- Quiz ---------- */
.quiz {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.quiz[hidden] {
  display: none;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.quiz-progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--card-border);
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.3s ease;
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 48px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Centraliza verticalmente sem cortar quando o conteúdo é maior que a tela
   (margens automáticas permitem rolagem; justify-content: center não) */
.quiz-body > :first-child {
  margin-top: auto;
}

.quiz-body > :last-child {
  margin-bottom: auto;
}

.quiz-step {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.quiz-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.quiz-icon .icon {
  width: 36px;
  height: 36px;
}

.quiz-theme {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}

.quiz-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.quiz-details li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.quiz-details li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-answer:hover {
  transform: translateY(-1px);
}

.btn-yes {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}

.btn-no {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.btn-no:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-answer:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.quiz-top-spacer {
  width: 34px;
  flex-shrink: 0;
}

/* ---------- Cadastro (onboarding) ---------- */
.quiz-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  margin-bottom: 28px;
}

.quiz-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.photos-grid 
.quiz-skip {
  align-self: center;
  font-weight: 600;
}

@media (max-width: 420px) {
  }

/* Resumo do quiz */
.quiz-summary-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.quiz-summary-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.quiz-summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.quiz-summary-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}

.quiz-summary-list li .icon {
  color: var(--text-muted);
}

.quiz-summary-list li .points {
  margin-left: auto;
  font-weight: 800;
}

.quiz-summary-list li.yes .points {
  color: var(--accent-dark);
}

.quiz-summary-list li.no .points {
  color: var(--danger);
}

.quiz-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.quiz-total .total-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--accent-dark);
}

.quiz-total .total-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Login ---------- */
body.locked {
  overflow: hidden;
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  padding: 24px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.auth[hidden] {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto;
}

.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #dc2626);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.3);
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 20px;
}

.auth-accounts {
  width: 100%;
  margin-bottom: 18px;
}

.auth-accounts-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: left;
}

.auth-accounts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #dc2626);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label[hidden] {
  display: none;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
}

.auth-form input {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

.auth-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

#auth-pin,
#auth-pin2 {
  letter-spacing: 8px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.auth-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
}

.auth-error[hidden] {
  display: none;
}

.auth-form .btn-primary {
  margin-top: 4px;
  font-size: 16px;
}

.auth-toggle {
  margin-top: 8px;
  font-weight: 600;
  color: var(--accent-dark);
}

.auth-link {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
}

.auth-link[hidden] {
  display: none;
}

.auth-notice {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
}

.auth-notice[hidden] {
  display: none;
}

/* Tela de carregamento (sessão e dados do participante) */
.loading {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.loading[hidden] {
  display: none;
}

/* ---------- Perfil: ações ---------- */
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: flex-start;
}

/* ---------- Botão de ajuda ---------- */
.btn-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

.btn-help:hover {
  border-color: var(--accent);
  filter: brightness(0.98);
}

.dialog-wide {
  width: min(92vw, 440px);
}

/* ---------- Dialog ---------- */
.dialog {
  border: none;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  padding: 0;
  width: min(92vw, 400px);
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.2);
}

.dialog::backdrop {
  background: rgba(20, 26, 40, 0.45);
}

.dialog-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialog-form h3 {
  font-size: 18px;
}

.dialog-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.dialog-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* ≥16px evita zoom automático no iOS ao focar */
}

.dialog-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.dialog-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
}

.dialog-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 420px) {
  .quiz-question {
    font-size: 20px;
  }
}

/* ---------- Raiz 28: anamnese ---------- */
.welcome-tagline {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: -8px 0 16px;
}

.quiz-meta-line {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: -6px 0 22px;
}

.quiz-signature {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 20px;
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.opt-list.opt-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.opt {
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.opt-compact .opt {
  text-align: center;
}

.opt:hover {
  border-color: var(--accent);
}

.opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.scale-btn {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.scale-btn:hover {
  border-color: var(--accent);
}

.scale-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.duo-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.duo-inputs label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.duo-inputs .quiz-input {
  margin-bottom: 0;
}

#other-wrap {
  margin: -12px 0 24px;
}

#other-wrap[hidden] {
  display: none;
}

#other-wrap .quiz-input {
  margin-bottom: 0;
}

.encaixe-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
}

.encaixe-nudge {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

/* Legenda de referência abaixo de uma escala (ex.: qualidade do sono) */
.scale-legend {
  list-style: none;
  padding: 0;
  margin: -10px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.scale-legend li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.scale-legend strong {
  flex: 0 0 44px;
  color: var(--accent-dark);
  font-weight: 700;
}

/* Card explicativo dentro de uma pergunta da anamnese */
.quiz-note {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin: -8px 0 24px;
}

/* ---------- Check-in: estados 🎯🌱○ ---------- */
.btn-state {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1.5px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.btn-state:hover {
  transform: translateY(-1px);
}

.btn-state .state-dot {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.btn-state.s2 {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}

.btn-state.s1 {
  border-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}

.btn-state.s0 {
  border-color: var(--card-border);
  background: var(--card);
  color: var(--text-muted);
}

.btn-state.s0:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.quiz-summary-list li {
  align-items: center;
}

.quiz-summary-list li .state-dot {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.quiz-summary-list li div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.quiz-summary-list li div span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.quiz-summary-list li.s2 {
  border-color: var(--green);
  background: var(--green-soft);
}

.quiz-summary-list li.s1 {
  border-color: var(--warn);
  background: var(--warn-soft);
}

/* ---------- Metas e leitura por pilar ---------- */
.metas h2,
.results h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.metas-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metas-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.metas-list li div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.metas-list li strong {
  font-size: 14px;
}

.metas-list li div span {
  color: var(--text-muted);
  font-size: 13px;
}

.metas-onb {
  margin-bottom: 20px;
}

.metas-onb li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.meta-emoji {
  font-size: 18px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.pillars-breakdown {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pillars-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.pillar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.pillar-name {
  width: 132px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pillar-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--card-border);
  overflow: hidden;
  display: flex;
}

.pillar-bar i {
  display: block;
  height: 100%;
}

.seg-g { background: var(--green); }
.seg-a { background: var(--warn); }
.seg-r { background: var(--danger); }

.pillar-count {
  width: 42px;
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Resultados ---------- */
.results-headline {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.results-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.results-footer {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px 14px;
}

/* ---------- Como funciona ---------- */
.auth-tagline {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: 4px;
}

.how-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.how-pillars,
.how-states {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.how-states .state-dot {
  display: inline-block;
  width: 24px;
  text-align: center;
}
