@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg: #eef2ff;
  --surface: #ffffff;
  --surface2: #e5ebff;
  --surface3: #cdd9ff;
  --accent: #4361ee;
  --accent2: #06b6d4;
  --accent-hover: #3451d1;
  --text: #0f1c3f;
  --text-muted: #56708a;
  --success: #10b981;
  --error: #f43f5e;
  --warn: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(15,28,63,0.10);
  --shadow-sm: 0 3px 14px rgba(15,28,63,0.07);
  --shadow-accent: 0 8px 28px rgba(67,97,238,0.22);
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(67,97,238,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 100%, rgba(6,182,212,0.06) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────── */
header {
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(67,97,238,0.13);
  padding: 0.9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(67,97,238,0.08), 0 6px 24px rgba(15,28,63,0.05);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-titles { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

header h1 {
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2b3fb0 0%, #0e7ea0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

header p, header > span { color: var(--text-muted); font-size: 0.85rem; font-weight: 400; }

/* Link discreto de download APK */
.btn-apk-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
}
.btn-apk-link:hover { opacity: 1; color: var(--accent-hover); }
.apk-icon { font-size: 1.1rem; line-height: 1; }
.apk-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.btn-modelo-link {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.btn-voltar {
  color: var(--accent-hover);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  padding: 0.2rem 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.btn-voltar:hover { opacity: 1; text-decoration: underline; }

/* ── Layout Principal ───────────────────────────────────── */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.75rem 1rem 4rem;
}

/* ── Grid de Trilhas ────────────────────────────────────── */
.grid-trilhas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}

.card-container { position: relative; }

.card-trilha {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.1);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  transition: border-color 0.22s, transform 0.2s, box-shadow 0.22s;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-trilha::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.22s;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-trilha:hover {
  border-color: rgba(67,97,238,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(67,97,238,0.16);
}

.card-trilha:hover::before { opacity: 1; }

.card-icon { font-size: 2.3rem; margin-bottom: 0.1rem; }
.card-trilha h2 { font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.card-label {
  font-size: 0.77rem;
  color: var(--accent-hover);
  font-weight: 600;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.card-label::after { content: '→'; }

.card-badge-faltam {
  background: rgba(245,158,11,0.1);
  color: #d97706;
  font-size: 0.72rem;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid rgba(245,158,11,0.22);
}
.card-badge-completo {
  background: rgba(16,185,129,0.1);
  color: #059669;
  font-size: 0.72rem;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid rgba(16,185,129,0.22);
}

.btn-quiz-flutuante {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(67,97,238,0.12);
  border: 1px solid rgba(67,97,238,0.25);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  z-index: 5;
}
.btn-quiz-flutuante:hover {
  background: var(--accent);
  transform: scale(1.12) rotate(-5deg);
  box-shadow: var(--shadow-accent);
}

/* ── Módulos ───────────────────────────────────────────── */
.card-modulo {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.1);
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.card-modulo:hover { box-shadow: var(--shadow); }

.modulo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: linear-gradient(135deg, var(--surface2) 0%, #dde8ff 100%);
  border-bottom: 1px solid var(--surface3);
}

.modulo-header h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.modulo-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }

.modulo-badge {
  font-size: 0.78rem;
  background: rgba(67,97,238,0.1);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  color: var(--accent-hover);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(67,97,238,0.15);
}

.modulo-fases {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Cards de Fase (lista) ──────────────────────────────── */
.card-fase-sm {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(67,97,238,0.03);
  transition: border-color 0.2s, background 0.2s, transform 0.18s;
}
.card-fase-sm:hover {
  border-color: rgba(67,97,238,0.3);
  background: rgba(67,97,238,0.06);
  transform: translateX(3px);
}

.card-fase {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.1);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, background 0.2s, transform 0.18s;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.card-fase:hover {
  border-color: rgba(67,97,238,0.35);
  background: rgba(67,97,238,0.03);
  transform: translateX(4px);
}

.fase-num {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(67,97,238,0.35);
}

.fase-info { flex: 1; min-width: 0; }
.fase-info h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.estrelas, .stars-list { display: block; font-size: 0.82rem; margin: 0.1rem 0; letter-spacing: 1px; }
.pontos-faltam, .pontos { font-size: 0.74rem; color: var(--text-muted); font-weight: 500; }

.fase-arrow { font-size: 1.4rem; color: var(--surface3); }

/* ── Ações de Fase ──────────────────────────────────────── */
.fase-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-iniciar {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(67,97,238,0.25);
}
.btn-iniciar:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-reset {
  background: none;
  border: 1.5px solid var(--surface3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  color: var(--text-muted);
}
.btn-reset:hover { border-color: var(--error); color: var(--error); background: rgba(244,63,94,0.07); }

.btn-correcao {
  text-decoration: none;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--surface3);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}
.btn-correcao:hover { border-color: var(--accent); color: var(--accent); background: rgba(67,97,238,0.07); }

/* ── Audio Player ───────────────────────────────────────── */
.audio-player-bar {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--surface3);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.audio-player-bar.is-playing {
  position: sticky;
  top: 0;
  box-shadow: 0 4px 24px rgba(67,97,238,0.28);
  background: rgba(255,255,255,0.95);
  border-color: rgba(67,97,238,0.4);
  z-index: 40;
}
.player-label { font-size: 0.84rem; color: var(--text-muted); font-weight: 500; }

.btn-audio {
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.05rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-audio:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
  box-shadow: var(--shadow-accent);
}

/* ── Seções de Conteúdo ─────────────────────────────────── */
.secao {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.secao h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent-hover);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}
.texto-conteudo {
  line-height: 1.9;
  color: var(--text-muted);
  white-space: pre-wrap;
  font-size: 0.96rem;
}

/* ── Questões ───────────────────────────────────────────── */
.questao {
  background: rgba(238,242,255,0.5);
  border: 1.5px solid rgba(67,97,238,0.12);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin-bottom: 1rem;
  transition: border-color 0.25s;
}
.questao.correta { border-color: var(--success); background: rgba(16,185,129,0.04); }
.questao.errada  { border-color: var(--error);   background: rgba(244,63,94,0.04); }
.questao.travada .opcao-label { cursor: not-allowed; }
.questao.travada .opcoes { pointer-events: none; }

.pergunta {
  font-size: 0.97rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 500;
}

.opcoes { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.opcao-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--surface3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.92rem;
  min-height: 46px;
  background: var(--surface);
}
.opcao-label:hover { border-color: rgba(67,97,238,0.45); background: rgba(67,97,238,0.04); }
.opcao-label input { display: none; }

.opcao-label.correta { background: rgba(16,185,129,0.12); border-color: var(--success); border-width: 2px; }
.opcao-label.errada  { background: rgba(244,63,94,0.1);   border-color: var(--error);   border-width: 2px; }
.opcao-label.correta .opcao-letra { background: var(--success); color: #fff; }
.opcao-label.errada  .opcao-letra { background: var(--error);   color: #fff; }

.opcao-letra {
  font-weight: 700;
  color: var(--accent);
  min-width: 1.65rem;
  height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(67,97,238,0.1);
  font-size: 0.83rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.opcao-label:has(input:checked):not(.correta):not(.errada) .opcao-letra { background: var(--accent); color: #fff; }

.feedback { margin-top: 0.6rem; font-size: 0.87rem; font-weight: 600; }
.feedback.ok  { color: var(--success); }
.feedback.err { color: var(--error); }

.feedback-explicacoes {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
}
.feedback-explicacoes summary {
  cursor: pointer;
  color: var(--accent-hover);
  font-weight: 700;
}
.feedback-explicacoes ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.opcao-label.explicavel {
  cursor: pointer;
}

.opcao-explicacao {
  margin-top: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: rgba(67,97,238,0.05);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}
.opcao-explicacao.ok {
  border-left-color: var(--success);
  background: rgba(16,185,129,0.08);
}
.opcao-explicacao.err {
  border-left-color: var(--error);
  background: rgba(244,63,94,0.07);
}
.opcao-explicacao p {
  margin: 0.3rem 0 0;
}
.opcao-explicacao ul {
  margin: 0.35rem 0 0;
  padding-left: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ── SOS ────────────────────────────────────────────────── */
.btn-sos {
  background: var(--error);
  color: #fff;
  border: none;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: bold;
  margin-left: 8px;
  animation: pulse 2s infinite;
  vertical-align: middle;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.sos-box {
  background: rgba(67,97,238,0.07);
  border-left: 3px solid var(--accent);
  padding: 0.9rem;
  margin-top: 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  line-height: 1.6;
  display: none;
  animation: fadeIn 0.4s ease;
}

.btn-ia-audio-sm {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ia-audio-sm:hover { background: var(--accent); color: #fff; }

/* Alemão: palavra/expressão destacada clicável para TTS */
.de-inline {
  color: #0a8a4f;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.de-inline:hover {
  color: #066a3c;
}

/* ── Dicas ───────────────────────────────────────────────── */
.dicas-box {
  background: rgba(245,158,11,0.04);
  border: 1.5px solid rgba(245,158,11,0.18);
}
.dicas-box ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.dicas-box li { font-size: 0.92rem; color: var(--text-muted); line-height: 1.55; }

.btn-dica {
  background: rgba(245,158,11,0.1);
  border: 1.5px solid rgba(245,158,11,0.28);
  color: #b45309;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.6rem;
  transition: background 0.2s;
}
.btn-dica:hover { background: rgba(245,158,11,0.2); }

.dica-questao {
  background: rgba(245,158,11,0.07);
  border-left: 3px solid var(--warn);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

/* ── IA Seção de Revisão (Index) ────────────────────────── */
.secao-ia-revisao {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.28);
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(67,97,238,0.1);
}
.ia-revisao-header {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(100deg, var(--accent) 0%, #6b8aff 60%, var(--accent2) 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.93rem;
  letter-spacing: -0.01em;
}
.ia-revisao-body { padding: 1.3rem; }
.ia-card { display: none; }
.ia-card.active { display: block; animation: fadeIn 0.4s ease; }
.ia-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.ia-pergunta { font-size: 0.95rem; margin-bottom: 1rem; color: var(--text-muted); line-height: 1.55; }
.ia-explanacao {
  line-height: 1.7;
  background: rgba(67,97,238,0.04);
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 0.93rem;
  border: 1.5px solid rgba(67,97,238,0.1);
}
.ia-explanacao br:first-child { display: none; }
.ia-md-list {
  margin: 0.4rem 0 0.4rem 1.3rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ia-md-list li { line-height: 1.6; }
.ia-md-h1, .ia-md-h2, .ia-md-h3 {
  margin: 0.6rem 0 0.2rem;
  font-weight: 700;
  line-height: 1.4;
}
.ia-md-h1 { font-size: 1.05rem; color: var(--accent); }
.ia-md-h2 { font-size: 0.97rem; color: var(--accent); }
.ia-md-h3 { font-size: 0.93rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ia-controles { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.btn-ia-audio {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-ia-audio:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ia-del {
  background: rgba(244,63,94,0.08);
  border: 1px solid rgba(244,63,94,0.25);
  color: var(--error);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.btn-ia-del:hover { background: rgba(244,63,94,0.18); }

.ia-card-actions { display: flex; gap: 0.4rem; align-items: center; }

.btn-ia-regen {
  background: rgba(67,97,238,0.08);
  border: 1px solid rgba(67,97,238,0.25);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.btn-ia-regen:hover { background: rgba(67,97,238,0.18); }
.btn-ia-regen:disabled { opacity: 0.5; cursor: default; }

.btn-toggle-opcoes {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 0 0.6rem 0;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.btn-toggle-opcoes:hover { color: var(--text); }

.ia-opcoes-panel {
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ia-opcao {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: rgba(67,97,238,0.04);
  border: 1px solid rgba(67,97,238,0.1);
}
.ia-opcao-letra {
  font-weight: 700;
  min-width: 1.1rem;
  color: var(--text-muted);
}
.ia-opcao-certa {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: #065f46;
}
.ia-opcao-certa .ia-opcao-letra { color: var(--success); }
.ia-opcao-errada {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.25);
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.85;
}
.ia-opcao-errada .ia-opcao-letra { color: var(--error); }

.ia-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface2);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.btn-nav {
  background: var(--surface2);
  border: 1.5px solid var(--surface3);
  color: var(--text);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-nav:hover { border-color: var(--accent); color: var(--accent-hover); transform: translateY(-1px); }

/* ── IA Botão na Trilha ─────────────────────────────────── */
.btn-ia-action {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(245,158,11,0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-ia-action:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Questão Extra IA (V ou F) ──────────────────────────── */
.ia-extra-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--surface3);
  text-align: center;
}
.ia-vf-box {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.4rem;
  text-align: left;
  animation: slideIn 0.4s ease;
  box-shadow: var(--shadow-accent);
}
.ia-vf-pergunta { font-size: 1.05rem; margin-bottom: 1.3rem; line-height: 1.55; font-weight: 500; }
.ia-vf-acoes { display: flex; gap: 0.9rem; justify-content: center; }
.btn-vf {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  min-width: 120px;
}
.btn-vf.v { background: var(--success); color: #fff; box-shadow: 0 3px 12px rgba(16,185,129,0.3); }
.btn-vf.f { background: var(--error);   color: #fff; box-shadow: 0 3px 12px rgba(244,63,94,0.25); }
.btn-vf:hover:not(:disabled) { transform: translateY(-3px); opacity: 0.9; }
.btn-vf:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Navegação de Fase ─────────────────────────────────── */
.navegacao {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6b8aff);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: var(--shadow-accent);
  letter-spacing: -0.01em;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-2px); }

.btn-secondary {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(16,185,129,0.28);
}
.btn-secondary:hover { opacity: 0.92; transform: translateY(-2px); }

/* ── Quiz Modal ─────────────────────────────────────────── */
.quiz-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15,28,63,0.35);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 600px) {
  .quiz-modal { align-items: center; padding: 1rem; }
}

.quiz-modal-content {
  background: var(--surface);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 2rem 1.5rem 2.2rem;
  border: 1.5px solid rgba(67,97,238,0.2);
  border-bottom: none;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(15,28,63,0.15);
}

@media (min-width: 600px) {
  .quiz-modal-content {
    border-radius: var(--radius);
    border-bottom: 1.5px solid rgba(67,97,238,0.2);
    max-height: none;
    box-shadow: 0 24px 60px rgba(15,28,63,0.2);
  }
}

.quiz-close {
  position: absolute;
  top: 0.9rem; right: 1rem;
  background: var(--surface2);
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-close:hover { color: var(--text); background: var(--surface3); }

.quiz-pergunta-texto {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.3rem;
  color: var(--text);
  font-weight: 500;
}

.btn-quiz-opcao {
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.6rem;
  width: 100%;
  transition: all 0.15s;
  min-height: 50px;
  font-family: inherit;
}
.btn-quiz-opcao:hover { border-color: rgba(67,97,238,0.4); background: rgba(67,97,238,0.07); }

.btn-quiz-opcao span {
  background: rgba(67,97,238,0.15);
  color: var(--accent-hover);
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.83rem;
  flex-shrink: 0;
}

.quiz-pisca-verde { animation: blinkGreen 0.5s infinite alternate; border-color: var(--success) !important; background: rgba(16,185,129,0.1) !important; }
@keyframes blinkGreen { from { opacity: 1; } to { opacity: 0.3; } }

.quiz-acerto-anim { background: rgba(16,185,129,0.12) !important; border-color: var(--success) !important; }
.quiz-erro-anim   { background: rgba(244,63,94,0.1)  !important; border-color: var(--error)   !important; }

/* ── Correção de Erros ──────────────────────────────────── */
.comparacao-respostas {
  display: flex;
  gap: 0.75rem;
  margin: 0.9rem 0;
  flex-wrap: wrap;
}
.revisao-item {
  flex: 1;
  min-width: 120px;
  background: var(--surface2);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid var(--surface3);
}
.revisao-item span { color: var(--text-muted); font-size: 0.77rem; font-weight: 500; }
.tag-erro { color: var(--error); font-size: 1rem; font-weight: 700; }
.tag-acerto { color: var(--success); font-size: 1rem; font-weight: 700; }

.revisao-opcoes ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.opcao-revisao {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--surface3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--surface);
}
.opcao-revisao.correta-destaque { border-color: var(--success); background: rgba(16,185,129,0.08); }
.opcao-revisao.erro-destaque    { border-color: var(--error);   background: rgba(244,63,94,0.08); }

/* ── Categorias ─────────────────────────────────────────── */
.grid-categorias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}
.card-categoria {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.1);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}
.card-categoria:hover {
  border-color: rgba(67,97,238,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(67,97,238,0.14);
}
.cat-icon { font-size: 2.1rem; }
.card-categoria h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.card-categoria p { font-size: 0.83rem; color: var(--text-muted); }

/* ── IA Revisão Contextual (trilha.html) ────────────────── */
#ia-revisao-contextual {
  border: 1.5px solid rgba(67,97,238,0.28);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(67,97,238,0.1);
}

/* ── Misc ────────────────────────────────────────────────── */
.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--text-muted); }
.empty p { font-size: 1rem; margin-bottom: 0.5rem; font-weight: 500; }
.empty small { font-size: 0.82rem; }
.empty code {
  background: var(--surface2);
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  font-size: 0.82rem;
  border: 1px solid var(--surface3);
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  animation: pulse 1.5s infinite;
}

/* ── Caixa Preta — Card no Index ───────────────────────── */
.card-caixa-preta {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #edf2ff 0%, #dde8ff 60%, #d0deff 100%);
  border: 1.5px solid rgba(67,97,238,0.18);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}
.card-caixa-preta:hover {
  border-color: rgba(67,97,238,0.32);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(67,97,238,0.14);
}
.cb-index-icon { font-size: 2.1rem; flex-shrink: 0; }
.cb-index-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.cb-index-info strong { font-size: 1rem; font-weight: 700; }
.cb-index-info span { font-size: 0.82rem; color: var(--text-muted); }
.cb-index-arrow { font-size: 1.3rem; color: var(--surface3); }

/* ── Caixa Preta — Página ───────────────────────────────── */
.cb-main { max-width: 700px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

.cb-total-badge {
  background: rgba(67,97,238,0.1);
  border: 1.5px solid rgba(67,97,238,0.2);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.9rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Chips de trilha */
.cb-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}
.cb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid var(--surface3);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.cb-chip.active {
  border-color: var(--accent);
  background: rgba(67,97,238,0.12);
  color: var(--text);
}
.cb-chip:hover { border-color: var(--accent-hover); }
.cb-chip-count {
  background: rgba(67,97,238,0.1);
  padding: 0.06rem 0.48rem;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 700;
}
.cb-chip.active .cb-chip-count { background: rgba(67,97,238,0.22); }

/* Card da questão */
.cb-card {
  background: var(--surface);
  border: 1.5px solid rgba(67,97,238,0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.cb-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.cb-meta-trilha {
  background: rgba(67,97,238,0.13);
  color: var(--accent-hover);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cb-meta-sep { color: var(--surface3); font-size: 0.85rem; }
.cb-meta-titulo { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }

.cb-pergunta {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

/* Opções da Caixa Preta */
.cb-opcoes { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }

.cb-opcao {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--surface3);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
  background: var(--surface);
}

/* Opção clicável (antes de responder, ou neutras após erro) */
.cb-opcao-clicavel {
  cursor: pointer;
  color: var(--text);
  border-color: var(--surface3);
}
.cb-opcao-clicavel:hover {
  border-color: rgba(67,97,238,0.45);
  background: rgba(67,97,238,0.05);
  transform: translateX(2px);
}
.cb-opcao-clicavel:active { transform: scale(0.99); }

/* Após responder */
.cb-opcao-respondida { cursor: default; }

.cb-opcao-certa {
  border-color: var(--success);
  background: rgba(16,185,129,0.1);
  color: var(--text);
  font-weight: 600;
}
.cb-opcao-errada {
  border-color: var(--error);
  background: rgba(244,63,94,0.08);
  color: var(--error);
  font-weight: 600;
}
.cb-opcao-neutra {
  opacity: 0.45;
}

/* Feedback acerto/erro */
.cb-feedback {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  animation: slideIn 0.25s ease;
}
.cb-feedback-ok  { background: rgba(16,185,129,0.1); color: #059669; border-left: 3px solid var(--success); }
.cb-feedback-err { background: rgba(244,63,94,0.08); color: #e11d48;  border-left: 3px solid var(--error); }

/* Dica da questão */
.cb-dica {
  background: rgba(245,158,11,0.07);
  border-left: 3px solid var(--warn);
  padding: 0.7rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Ações */
.cb-acoes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.cb-btn-conteudo {
  background: var(--surface2);
  border: 1.5px solid var(--surface3);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.cb-btn-conteudo:hover { border-color: var(--accent); color: var(--accent-hover); }

.cb-btn-ia-comentario {
  background: rgba(67,97,238,0.08);
  border: 1.5px solid rgba(67,97,238,0.28);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.cb-btn-ia-comentario:hover { background: rgba(67,97,238,0.16); }
.cb-btn-ia-comentario:disabled { opacity: 0.5; cursor: default; }

.cb-ia-response {
  margin-top: 1rem;
  background: rgba(67,97,238,0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  animation: slideIn 0.25s ease;
}

.cb-chip-aprender {
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  color: #fff;
  padding: 0.52rem 1.3rem;
  border-radius: 20px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
  box-shadow: 0 3px 12px rgba(16,185,129,0.3);
}
.cb-chip-aprender:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.cb-chip-aprender:disabled { opacity: 0.45; cursor: not-allowed; }

/* Caixa de conteúdo do tópico */
.cb-conteudo-box {
  margin-top: 1.3rem;
  padding-top: 1.3rem;
  border-top: 1px dashed var(--surface3);
  animation: slideIn 0.3s ease;
}
.cb-conteudo-titulo {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cb-dicas-lista {
  list-style: none;
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cb-dicas-lista li {
  font-size: 0.87rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}
.cb-dicas-lista li::before {
  content: '💡';
  position: absolute;
  left: -0.2rem;
  font-size: 0.75rem;
}

/* Navegação */
.cb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cb-nav-btn {
  background: var(--surface2);
  border: 1.5px solid var(--surface3);
  color: var(--text);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.15s;
  min-height: 46px;
  font-family: inherit;
}
.cb-nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-hover); transform: translateY(-1px); }
.cb-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.cb-nav-info { color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }

/* Estado vazio */
.cb-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  animation: fadeIn 0.4s ease;
}
.cb-empty-icon { font-size: 4.5rem; margin-bottom: 1.2rem; }
.cb-empty h2 { font-size: 1.6rem; margin-bottom: 0.5rem; font-weight: 800; letter-spacing: -0.02em; }
.cb-empty p  { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }

/* ── Animações ──────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; }              to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.quiz-confetti::after {
  content: "🎉✨🎊";
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9rem;
  z-index: 2000;
  pointer-events: none;
  animation: fadeUp 1.5s forwards;
}
@keyframes fadeUp {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  to   { opacity: 0; transform: translate(-50%, -160%) scale(1.5); }
}

/* ── Focus acessível ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Mobile Responsivo ──────────────────────────────────── */
@media (max-width: 600px) {
  /* Header */
  header { padding: 0.8rem 1rem; }
  header h1 { font-size: 1.15rem; }
  header p  { font-size: 0.79rem; }

  /* Layout */
  main { padding: 1rem 0.75rem 5rem; }

  /* Grid de trilhas: 2 colunas compactas */
  .grid-trilhas { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .card-container { border-radius: var(--radius); }
  .card-trilha {
    padding: 1rem 0.9rem 0.85rem;
    gap: 0.45rem;
    border-radius: var(--radius);
  }
  .card-icon { font-size: 1.75rem; }
  .card-trilha h2 { font-size: 0.87rem; line-height: 1.25; }
  .card-desc { display: none; }
  .card-label { font-size: 0.72rem; }
  .card-badge-faltam, .card-badge-completo { font-size: 0.68rem; padding: 0.15rem 0.5rem; }
  .btn-quiz-flutuante { top: 7px; right: 7px; font-size: 0.9rem; padding: 0.25rem 0.35rem; }

  /* Módulos */
  .modulo-header { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding: 0.85rem 1rem; }
  .modulo-badge { align-self: flex-start; }
  .modulo-fases { padding: 0.5rem; gap: 0.35rem; }

  /* Fases */
  .card-fase-sm {
    padding: 0.65rem 0.75rem;
    gap: 0.6rem;
    border-radius: 8px;
  }
  .fase-num { width: 1.85rem; height: 1.85rem; font-size: 0.8rem; }
  .fase-info h3 { font-size: 0.84rem; }
  .estrelas, .stars-list { font-size: 0.78rem; }
  .pontos-faltam { font-size: 0.7rem; }
  .btn-iniciar { padding: 0.38rem 0.7rem; font-size: 0.78rem; }
  .btn-reset, .btn-correcao { font-size: 0.9rem; padding: 0.25rem 0.4rem; }
  .fase-actions { gap: 0.4rem; }

  .card-fase { padding: 0.85rem 1rem; margin-bottom: 0.45rem; }
  .fase-arrow { font-size: 1.2rem; }

  /* Audio player */
  .audio-player-bar {
    margin: 0 0 0.9rem;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem;
    gap: 0.75rem;
  }
  .player-label { font-size: 0.78rem; }
  .btn-audio { width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }

  /* Conteúdo */
  .secao { padding: 0.95rem; border-radius: var(--radius-sm); }
  .secao h2 { font-size: 0.93rem; }
  .texto-conteudo { font-size: 0.92rem; line-height: 1.8; }

  /* Questões */
  .questao { padding: 0.9rem; border-radius: var(--radius-sm); margin-bottom: 0.75rem; }
  .pergunta { font-size: 0.92rem; margin-bottom: 0.75rem; }
  .opcao-label { padding: 0.7rem 0.85rem; font-size: 0.88rem; min-height: 46px; border-radius: 8px; }
  .opcao-letra { min-width: 1.45rem; height: 1.45rem; font-size: 0.8rem; }
  .feedback { font-size: 0.83rem; }
  .btn-sos { font-size: 0.74rem; padding: 0.18rem 0.5rem; }

  /* IA seções */
  .secao-ia-revisao { border-radius: var(--radius-sm); margin-bottom: 1rem; }
  .ia-revisao-header { padding: 0.75rem 1rem; font-size: 0.87rem; }
  .ia-revisao-body { padding: 0.9rem; }
  .ia-explanacao { font-size: 0.88rem; padding: 0.85rem; }
  .ia-card-top { font-size: 0.83rem; }
  .ia-pergunta { font-size: 0.88rem; }
  .btn-ia-audio { font-size: 0.78rem; padding: 0.4rem 0.8rem; }
  .ia-controles { gap: 0.5rem; }

  /* Quiz modal — sheet de baixo */
  .quiz-modal { padding: 0; align-items: flex-end; }
  .quiz-modal-content {
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.4rem 1rem 1.8rem;
    border-bottom: none;
    max-height: 88vh;
  }
  .quiz-pergunta-texto { font-size: 0.95rem; }
  .btn-quiz-opcao { padding: 0.75rem 0.9rem; font-size: 0.87rem; min-height: 48px; }

  /* Questão extra IA */
  .ia-extra-section { margin-top: 1.5rem; padding-top: 1.5rem; }
  .ia-vf-box { padding: 1.1rem; border-radius: var(--radius-sm); }
  .ia-vf-pergunta { font-size: 0.97rem; }
  .ia-vf-acoes { flex-direction: row; gap: 0.6rem; }
  .btn-vf { flex: 1; padding: 0.75rem 0.5rem; font-size: 0.92rem; min-width: 0; }

  /* Navegação */
  .navegacao { justify-content: stretch; margin-top: 1.5rem; }
  .btn-primary, .btn-secondary { flex: 1; text-align: center; padding: 0.85rem 1rem; font-size: 0.92rem; }

  /* Correção */
  .comparacao-respostas { gap: 0.5rem; }
  .revisao-item { padding: 0.55rem 0.8rem; }
  .opcao-revisao { padding: 0.55rem 0.85rem; font-size: 0.85rem; }

  /* Botão IA action */
  .btn-ia-action { font-size: 0.8rem; padding: 0.45rem 0.9rem; }

  /* Dicas */
  .dicas-box li { font-size: 0.88rem; }

  /* Caixa Preta mobile */
  .cb-main { padding: 0.85rem 0.75rem 5rem; }
  .card-caixa-preta { padding: 0.9rem 1rem; gap: 0.75rem; }
  .cb-index-icon { font-size: 1.7rem; }
  .cb-index-info strong { font-size: 0.9rem; }
  .cb-chip { font-size: 0.78rem; padding: 0.35rem 0.72rem; }
  .cb-card { padding: 1.1rem; }
  .cb-pergunta { font-size: 0.95rem; }
  .cb-opcao { font-size: 0.87rem; padding: 0.65rem 0.9rem; }
  .cb-acoes { gap: 0.5rem; }
  .cb-btn-conteudo { font-size: 0.8rem; padding: 0.45rem 0.9rem; }
  .cb-chip-aprender { font-size: 0.82rem; padding: 0.45rem 1rem; }
  .cb-nav-btn { padding: 0.55rem 1rem; font-size: 0.84rem; }
}
