/* =============================================================
   GENTE DE VERDADE — style.css  v2.1
   Layout: App Shell + Desktop Grid 2 colunas
   ============================================================= */

:root {
  --gv-blue : #3b6bb0;
  --gv-red  : #9e2a2b;
  --gv-gold : #CFB069;
  --gv-dark : #1e293b;
  --gv-bg   : #f8fafc;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  height: 100%; margin: 0; padding: 0;
  overflow: hidden;
  font-family: 'Jost', sans-serif;
  background: var(--gv-bg); color: var(--gv-dark);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: 'Cormorant Garamond', serif; }

#app { width: 100%; height: 100dvh; position: relative; }

/* Views */
.view { display: none; opacity: 0; transition: opacity 0.3s ease; width: 100%; height: 100%; }
.view.active { display: flex; flex-direction: column; opacity: 1; }

/* Área interna rolável */
.view-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(59,107,176,0.2) transparent;
}
.view-scroll::-webkit-scrollbar { width: 4px; }
.view-scroll::-webkit-scrollbar-thumb { background: rgba(59,107,176,0.2); border-radius: 4px; }

/* Header fixo */
.app-header {
  height: 60px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; padding: 0 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

/* Logo */
.logo-mark { display: flex; align-items: center; gap: 8px; }
.logo-icon {
  width: 34px; height: 34px; background: var(--gv-blue);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 900;
  font-size: 13px; box-shadow: 0 4px 10px rgba(59,107,176,0.3);
}

/* Badge */
.badge-pill {
  display: inline-block; background: #eff6ff; color: var(--gv-blue);
  padding: 3px 14px; border-radius: 9999px;
  font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.2em;
}

/* Book card */
.book-card {
  background: var(--gv-blue); border-radius: 2rem;
  padding: 2.5rem; color: #fff;
  box-shadow: 0 20px 50px rgba(59,107,176,0.3);
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%; min-height: 300px;
}

/* Cards centalizados (termos, ident) */
.centered-card-wrap {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 12px;
  overflow-y: auto;
}
.centered-card {
  background: #fff; border-radius: 2rem; padding: 2rem;
  width: 100%; max-width: 540px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  border: 1px solid #f1f5f9;
}
@media (max-height: 680px) { .centered-card { padding: 1.25rem; border-radius: 1.5rem; } }

/* Termos scroll */
.terms-scroll-box {
  max-height: 33vh; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59,107,176,0.2) transparent;
}
.terms-scroll-box::-webkit-scrollbar { width: 4px; }
.terms-scroll-box::-webkit-scrollbar-thumb { background: rgba(59,107,176,0.2); border-radius: 4px; }

.term-item {
  display: flex; gap: 11px; align-items: flex-start;
  margin-bottom: 11px; padding-bottom: 11px;
  border-bottom: 1px solid #f8fafc;
  font-size: 12px; color: #475569; line-height: 1.6;
}
.term-num {
  flex-shrink: 0; width: 21px; height: 21px; background: #f1f5f9;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; color: #64748b; margin-top: 1px;
}
.term-item-highlight { background: #fefce8; border: 1px solid rgba(207,176,105,0.3); border-radius: 10px; padding: 10px; }
.term-num-gold  { background: rgba(207,176,105,0.2); color: #92400e; }
.term-title     { display: block; font-weight: 700; color: #1e293b; margin-bottom: 2px; font-size: 12px; }
.term-title-gold { display: block; font-weight: 700; color: #92400e; margin-bottom: 2px; font-size: 12px; }

/* Inputs */
.ident-input {
  width: 100%; padding: 13px 16px;
  background: #f8fafc; border: 2px solid transparent;
  border-radius: 12px; outline: none;
  font-weight: 600; color: #1e293b; font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Jost', sans-serif;
}
.ident-input:focus { border-color: var(--gv-blue); background: #fff; }
.ident-input::placeholder { color: #94a3b8; font-weight: 400; }
.ident-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.campo-erro-inline { font-size: 12px; color: var(--gv-red); min-height: 16px; padding: 0 3px; }

/* Quiz */
.quiz-inner {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  align-items: center; padding: 16px; gap: 14px;
}
.quiz-card {
  background: #fff; border-radius: 2rem;
  box-shadow: 0 16px 50px rgba(0,0,0,0.08);
  border: 1px solid #f1f5f9;
  padding: 1.75rem; width: 100%; max-width: 540px;
}
@media (max-width: 460px) { .quiz-card { padding: 1.25rem; } }

/* Spinners */
.spinner {
  border: 3px solid rgba(59,107,176,0.15); border-left-color: var(--gv-blue);
  border-radius: 50%; width: 22px; height: 22px;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}
.spinner-sm {
  border: 2px solid rgba(59,107,176,0.15); border-left-color: var(--gv-blue);
  border-radius: 50%; width: 14px; height: 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* AI glow */
.ai-glow { animation: glow 2.5s ease-in-out infinite alternate; }
@keyframes glow {
  0%   { box-shadow: 0 0 0 rgba(59,107,176,0); }
  100% { box-shadow: 0 0 20px rgba(59,107,176,0.13); }
}

/* Chart */
.chart-container { position: relative; width: 100%; height: 220px; }
@media (max-height: 700px) { .chart-container { height: 170px; } }

/* =============================================================
   PORTAL GRID — Mobile first
   ============================================================= */
.portal-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.portal-row   { display: grid; gap: 14px; }
.portal-row-3 { grid-template-columns: 3fr 2fr 1fr; }
.portal-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .portal-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .portal-row-3, .portal-row-2 { grid-template-columns: 1fr; } }

/* Cards do portal */
.p-card {
  background: #fff; border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  padding: 1.25rem;
  /* overflow removed — AI text must expand freely */
}

/* Barras dimensões */
.dim-bar-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.dim-bar-label span:last-child { color: var(--gv-blue); }
.dim-bar-track { height: 5px; background: #f1f5f9; border-radius: 5px; overflow: hidden; margin-bottom: 2px; }
.dim-bar-fill  { height: 100%; border-radius: 5px; transition: width 0.7s ease; }
.dim-bar-cap   { font-size: 10px; color: #94a3b8; }

/* Toast */
#toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  transition: transform 0.3s; z-index: 9999;
  background: var(--gv-red); color: #fff;
  padding: 10px 22px; border-radius: 9999px;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  white-space: nowrap; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* Timeline */
.timeline-card {
  background: #fff; border-radius: 1.25rem; border: 1px solid #f1f5f9;
  padding: 14px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start;
}
.timeline-card.atual { border-color: var(--gv-blue); }
.timeline-data  { display: flex; flex-direction: column; align-items: center; }
.timeline-dia   { font-size: 20px; font-weight: 900; color: var(--gv-blue); line-height: 1; font-family: 'Cormorant Garamond', serif; }
.timeline-mes   { font-size: 8px; letter-spacing: 2px; text-transform: uppercase; color: #94a3b8; }
.timeline-ano   { font-size: 8px; color: #cbd5e1; }
.tag-atual      { display: inline-block; font-size: 8px; font-weight: 700; background: #eff6ff; color: var(--gv-blue); border-radius: 20px; padding: 1px 6px; margin-left: 4px; }
.mini-barra-row  { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.mini-barra-nome { font-size: 9px; text-transform: uppercase; color: #94a3b8; width: 60px; flex-shrink: 0; }
.mini-barra-track { flex: 1; height: 3px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.mini-barra-fill-ev { height: 100%; border-radius: 3px; }
.mini-barra-val  { font-size: 9px; color: #94a3b8; width: 22px; text-align: right; flex-shrink: 0; }
.legenda-item   { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; }
.legenda-dot    { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Stats evolução */
.ev-stat { background: #fff; border-radius: 1.25rem; border: 1px solid #f1f5f9; padding: 14px; text-align: center; }
.ev-stat p    { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 3px; }
.ev-stat span { font-size: 1.75rem; font-weight: 900; color: var(--gv-blue); display: block; }

/* =============================================================
   HERO ROW — Perfil + Imagem da Alma
   ============================================================= */
.hero-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.hero-image-wrap {
  width: 160px;
  flex-shrink: 0;
  min-height: 160px;
}
@media (max-width: 560px) {
  .hero-row { flex-direction: column; }
  .hero-image-wrap { width: 100%; min-height: 200px; }
}

/* Perfil hero */
.perfil-hero { flex: 1; display: flex; flex-direction: column; }

/* =============================================================
   COMBO INSIGHT — Opção B
   Insight de combinação integrado no card de perfil
   ============================================================= */
.combo-insight-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.combo-insight-card p {
  color: #7c2d12;
  margin: 0;
}
.combo-insight-card--pos {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.combo-insight-card--pos p { color: #14532d; }
.combo-insight-card--2nd {
  margin-top: 8px;
}

/* =============================================================
   DESKTOP ≥ 1024px — Grid 2 colunas
   ============================================================= */
@media (min-width: 1024px) {

  /* Cards centralizados mais largos */
  .centered-card {
    max-width: 720px;
    padding: 2.5rem;
  }

  /* Quiz mais largo */
  .quiz-card {
    max-width: 720px;
  }

  /* Portal: grid 2 colunas */
  .portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1440px;
    gap: 20px;
    padding: 24px 40px 32px;
  }

  .portal-span-full {
    grid-column: 1 / -1;
  }

  .hero-image-wrap {
    width: 220px;
    min-height: 220px;
  }

  .book-card {
    max-height: 480px;
  }
}

@media (min-width: 1280px) {
  .portal-grid {
    padding: 28px 60px 40px;
    gap: 24px;
  }
}

/* =============================================================
   PRINT / PDF
   ============================================================= */
@media print {
  html, body { overflow: visible !important; height: auto !important; background: #f8fafc !important; }
  #app { height: auto !important; }
  .view { display: none !important; }
  #view-portal { display: flex !important; flex-direction: column !important; height: auto !important; overflow: visible !important; }
  .view-scroll { overflow: visible !important; height: auto !important; flex: none !important; }
  .app-header { display: none !important; }
  .portal-grid { display: flex !important; flex-direction: column !important; padding: 16px !important; max-width: 100% !important; }
  #btn-pdf, #btn-download, #btn-ver-evolucao, #tts-controls { display: none !important; }
  .p-card { break-inside: avoid; page-break-inside: avoid; }
  .hero-row { flex-direction: row !important; }
  .hero-image-wrap { width: 160px !important; }
  #toast { display: none !important; }
  canvas { max-height: 220px !important; }
}

/* =============================================================
   LIVRO CARD — VIEW IDENTIFICAÇÃO  v2.7
   Card do livro exibido antes do formulário de dados
   ============================================================= */

/* Wrapper geral da view-ident — rola verticalmente */
.ident-scroll-wrap {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 32px;
  gap: 16px;
}

/* Card do livro na tela de identificação — responsivo */
.livro-card-ident {
  width: 100%;
  max-width: 580px;
  background: linear-gradient(135deg, #1e293b 0%, #2d4a7a 55%, #3b6bb0 100%);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(59,107,176,0.32);
}

.livro-card-ident-inner {
  display: flex;
  align-items: stretch;
}

/* Capa: visível em todas as telas */
.livro-capa-wrap {
  flex-shrink: 0;
  width: 100px;
  background: #2a3f62;
  overflow: hidden;
  border-radius: 1.5rem 0 0 1.5rem;
}

.livro-capa-img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.livro-capa-fallback {
  width: 100%;
  min-height: 160px;
  background: linear-gradient(180deg, #1e3a5f 0%, #3b6bb0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  font-family: 'Cormorant Garamond', serif;
}

.livro-card-content {
  flex: 1;
  padding: 14px 14px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0; /* evita overflow do texto */
}

.livro-card-badge {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #93c5fd;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.livro-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1px;
}

.livro-card-autor {
  font-size: 9.5px;
  color: #7dd3fc;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.livro-card-text {
  font-size: 10.5px;
  color: #bfdbfe;
  line-height: 1.6;
  margin: 0 0 10px;
}

.livro-card-text strong {
  color: #fff;
  font-weight: 700;
}

.livro-card-btn {
  display: inline-block;
  background: #CFB069;
  color: #1e293b;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 20px;
  transition: opacity 0.2s;
  align-self: flex-start;
  white-space: nowrap;
}

.livro-card-btn:hover { opacity: 0.88; }

/* Telas muito pequenas (< 360px): texto ainda menor */
@media (max-width: 360px) {
  .livro-capa-wrap { width: 80px; }
  .livro-card-title { font-size: 0.95rem; }
  .livro-card-text { font-size: 10px; }
}

/* Tablet e desktop: card mais generoso */
@media (min-width: 480px) {
  .livro-capa-wrap { width: 120px; }
  .livro-card-content { padding: 18px 20px 18px 16px; }
  .livro-card-badge { font-size: 9px; }
  .livro-card-title { font-size: 1.2rem; }
  .livro-card-autor { font-size: 11px; }
  .livro-card-text { font-size: 12px; }
  .livro-card-btn { font-size: 11px; padding: 8px 18px; }
}

@media (min-width: 768px) {
  .livro-capa-wrap { width: 140px; }
  .livro-card-title { font-size: 1.35rem; }
}

/* Formulário logo abaixo do card do livro */
.centered-card-wrap--form {
  width: 100%;
  flex: none;       /* não estica — só ocupa o tamanho do conteúdo */
  padding: 0;
  align-items: center;
  display: flex;
  justify-content: center;
}

/* Mobile: capa um pouco mais estreita */
@media (max-width: 400px) {
  .livro-capa-wrap { width: 96px; }
  .livro-card-title { font-size: 1rem; }
}

/* =============================================================
   LIVRO CARD — VIEW PORTAL (full-width, mesmo estilo AI Insight)
   ============================================================= */

.livro-portal-card {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #2d4a7a 55%, #3b6bb0 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 32px rgba(59,107,176,0.30) !important;
}

.livro-portal-inner {
  display: flex;
  align-items: stretch;
  min-height: 200px;
}

.livro-portal-capa-wrap {
  flex-shrink: 0;
  width: 170px;   /* um pouco mais largo para mostrar a capa melhor */
  overflow: hidden;
  background: #3b6bb0;
}

.livro-portal-capa-img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* mostra a capa inteira sem cortar */
  background: #3b6bb0;   /* fundo azul GV */
  display: block;
}

.livro-capa-fallback--portal {
  width: 148px;
  min-height: 200px;
}

.livro-portal-content {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.livro-card-badge--portal {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #93c5fd;
  margin: 0 0 8px;
}

.livro-portal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 4px;
}

.livro-portal-autor {
  font-size: 11px;
  color: #7dd3fc;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

.livro-portal-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #bfdbfe;
  line-height: 1.7;
  font-style: italic;
  margin: 0 0 20px;
  max-width: 680px;
}

.livro-portal-text strong {
  color: #fff;
  font-style: normal;
  font-weight: 700;
}

.livro-portal-btn {
  display: inline-block;
  background: #CFB069;
  color: #1e293b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 24px;
  border-radius: 24px;
  align-self: flex-start;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.livro-portal-btn:hover { opacity: 0.88; transform: translateY(-1px); }

@media (max-width: 600px) {
  .livro-portal-inner { flex-direction: column; }
  .livro-portal-capa-wrap { width: 100%; height: 260px; }
  .livro-portal-capa-img { object-fit: contain; background: #3b6bb0; }
  .livro-portal-content { padding: 20px; }
  .livro-portal-title { font-size: 1.25rem; }
}

/* Print: mantém o card do livro no PDF */
@media print {
  .livro-portal-card { break-inside: avoid; page-break-inside: avoid; }
  .livro-card-ident  { display: none; } /* não precisa no PDF */
}

/* ================================================================
   QUIZ v3 — Novo layout: bloco no topo, progresso no rodapé
   ================================================================ */

/* ── View quiz layout ─────────────────────────────────────────── */
/* When quiz is active, override the default .view styles */
#view-quiz.active {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header do bloco (topo) ──────────────────────────────────── */
.quiz-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1.5px solid transparent;
  flex-shrink: 0;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.quiz-back-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.quiz-back-btn:hover { color: #1e293b; background: rgba(0,0,0,0.06); }

.quiz-block-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-block-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.quiz-block-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 12px;
  border-radius: 20px;
  transition: color 0.4s, background 0.4s;
}

/* ── Área do card (cresce para ocupar espaço disponível) ─────── */
.quiz-inner {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: flex-start;
  padding: 16px 16px 0;
}

.quiz-card {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  will-change: transform, opacity;
}

/* Pergunta */
.quiz-question-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin: 0 0 20px;
}

/* ── Opções de resposta ──────────────────────────────────────── */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-opt {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid #dde4ee;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.15s, background 0.15s, transform 0.1s, opacity 0.2s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.quiz-opt--idle:hover,
.quiz-opt--idle:focus-visible {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.quiz-opt--selected {
  /* cores injetadas via JS style por bloco */
  border-width: 2px;
}

.quiz-opt--dim {
  pointer-events: none; /* evita double-tap acidental */
}

.quiz-opt-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  flex: 1;
  padding-right: 12px;
}

.quiz-opt-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #475569;
  transition: background 0.2s, color 0.2s;
}

/* ── Rodapé: progresso ───────────────────────────────────────── */
.quiz-footer {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.quiz-progress-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.quiz-progress-pct {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.quiz-progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.quiz-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
  background: #3b6bb0; /* sobrescrito via JS com cor do bloco */
}

/* ── Animações de transição entre questões ───────────────────── */
@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.quiz-slide-out-left  { animation: slideOutLeft  0.18s ease forwards; }
.quiz-slide-out-right { animation: slideOutRight 0.18s ease forwards; }
.quiz-slide-in-right  { animation: slideInRight  0.3s  cubic-bezier(0.22,1,0.36,1) forwards; }
.quiz-slide-in-left   { animation: slideInLeft   0.3s  cubic-bezier(0.22,1,0.36,1) forwards; }

/* ── Mobile: ajuste de tamanhos ──────────────────────────────── */
@media (max-width: 400px) {
  .quiz-card { padding: 22px 16px 20px; border-radius: 18px; }
  .quiz-question-text { font-size: 1.25rem; }
  .quiz-opt { padding: 12px 14px; }
  .quiz-opt-label { font-size: 12px; }
}

/* Desktop: card centralizado com mais espaço */
@media (min-width: 1024px) {
  .quiz-block-header { padding: 18px 40px 14px; }
  .quiz-inner { padding: 24px 40px 0; align-items: center; }
  .quiz-card { padding: 36px 40px 32px; }
  .quiz-question-text { font-size: 1.7rem; }
  .quiz-footer { padding: 16px 40px 28px; }
}
