
    /* ==========================================================================
       4. TRILHA DA ESCOLA (MAPA DAS 5 FASES CONECTADAS)
       ========================================================================== */
    .trail-header {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .overall-progress-wrap {
      background: #f1f5f9;
      border-radius: 14px;
      padding: 12px 16px;
      margin-bottom: 20px;
      border: 1px solid #e2e8f0;
    }

    .overall-progress-top {
      display: flex;
      justify-content: space-between;
      font-size: 0.88rem;
      font-weight: 800;
      color: var(--primary-dark);
      margin-bottom: 6px;
    }

    .stages-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
      position: relative;
    }

    .stage-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 18px;
      border-radius: var(--radius-md);
      border: 2px solid #cbd5e1;
      background: #ffffff;
      transition: all 0.25s ease;
    }

    .stage-item.unlocked {
      border-color: var(--primary);
      background: linear-gradient(90deg, #f0fdfa 0%, #ffffff 100%);
      box-shadow: 0 6px 18px rgba(15, 118, 110, 0.16);
      transform: translateX(4px);
    }

    .stage-item.completed {
      border-color: var(--success);
      background: #f0fdf4;
    }

    .stage-item.locked {
      opacity: 0.65;
      background: #f8fafc;
    }

    .stage-info {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .stage-icon {
      width: 58px;
      height: 58px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      background: #e2e8f0;
      flex-shrink: 0;
    }

    .stage-item.unlocked .stage-icon {
      background: var(--primary);
      color: #fff;
      animation: pulseGlow 2s infinite;
    }

    @keyframes pulseGlow {
      0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.45); }
      70% { box-shadow: 0 0 0 10px rgba(15, 118, 110, 0); }
      100% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
    }

    .stage-item.completed .stage-icon {
      background: var(--success);
      color: #fff;
    }

    .stage-details h4 {
      font-size: 1.08rem;
      font-weight: 800;
      color: var(--text-main);
    }

    .stage-details p {
      font-size: 0.88rem;
      color: var(--text-muted);
    }

    .medal-badge {
      display: inline-block;
      margin-top: 6px;
      font-size: 0.8rem;
      font-weight: 800;
      color: var(--success);
      background: var(--success-bg);
      padding: 3px 10px;
      border-radius: 999px;
      border: 1px solid #86efac;
    }

    /* ==========================================================================
       5. TELA DE DESAFIO (PERGUNTAS E FEEDBACK CONSTRUTIVO)
       ========================================================================== */
    .guide-bubble {
      display: flex;
      align-items: center;
      gap: 12px;
      background: #eff6ff;
      border: 2px solid #bfdbfe;
      border-radius: 14px;
      padding: 10px 14px;
      margin-bottom: 16px;
      font-size: 0.92rem;
      color: #1e3a8a;
      font-weight: 600;
    }

    .guide-avatar {
      font-size: 1.8rem;
      background: #ffffff;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #93c5fd;
      flex-shrink: 0;
    }

    .quiz-meta {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
    }

    .subject-tag {
      padding: 6px 14px;
      border-radius: 999px;
      font-weight: 800;
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .subject-tag.portugues {
      background: #ede9fe;
      color: #5b21b6;
      border: 1px solid #c4b5fd;
    }

    .subject-tag.matematica {
      background: #dbeafe;
      color: #1e40af;
      border: 1px solid #93c5fd;
    }

    .bncc-tag {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text-muted);
      background: #f1f5f9;
      padding: 5px 12px;
      border-radius: 999px;
    }

    .progress-bar-bg {
      width: 100%;
      height: 12px;
      background: #e2e8f0;
      border-radius: 999px;
      overflow: hidden;
      margin-bottom: 20px;
    }

    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #0f766e, #10b981);
      border-radius: 999px;
      transition: width 0.35s ease;
    }

    .question-box {
      font-size: 1.18rem;
      font-weight: 700;
      color: var(--text-main);
      margin-bottom: 18px;
      line-height: 1.5;
    }

    .question-visual {
      background: #f8fafc;
      border: 2px dashed #cbd5e1;
      border-radius: var(--radius-md);
      padding: 14px;
      margin-bottom: 18px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .options-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-bottom: 20px;
    }

    .option-btn {
      width: 100%;
      text-align: left;
      background: #f8fafc;
      border: 2px solid #cbd5e1;
      border-radius: var(--radius-md);
      padding: 16px 18px;
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--text-main);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 14px;
      transition: all 0.15s ease;
    }

    .option-btn:hover:not(:disabled) {
      border-color: var(--primary);
      background: #f0fdfa;
      transform: translateX(4px);
    }

    .option-letter {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: #e2e8f0;
      color: var(--text-main);
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .option-btn.correct {
      background: var(--success-bg);
      border-color: var(--success);
      color: #14532d;
    }

    .option-btn.correct .option-letter {
      background: var(--success);
      color: #ffffff;
    }

    .option-btn.gentle-wrong {
      background: var(--warning-bg);
      border-color: #f97316;
      color: var(--warning-text);
    }

    .option-btn.gentle-wrong .option-letter {
      background: #f97316;
      color: #ffffff;
    }

    .feedback-panel {
      border-radius: var(--radius-md);
      padding: 18px;
      margin-bottom: 18px;
      display: none;
      animation: fadeSlideIn 0.25s ease;
    }

    .feedback-panel.show {
      display: block;
    }

    .feedback-panel.is-correct {
      background: var(--success-bg);
      border: 2px solid #86efac;
      color: #14532d;
    }

    .feedback-panel.is-learning {
      background: #fff7ed;
      border: 2px solid #fdba74;
      color: #7c2d12;
    }

    .feedback-title {
      font-weight: 800;
      font-size: 1.08rem;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* ==========================================================================
       6. CERTIFICADO DIGITAL PERSONALIZÁVEL
       ========================================================================== */
    .certificate-frame {
      background: #fffbeb;
      border: 8px double #b45309;
      border-radius: 20px;
      padding: 32px 24px;
      text-align: center;
      position: relative;
      box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
      margin-bottom: 20px;
    }

    .cert-header {
      color: #0f766e;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-size: 0.92rem;
      margin-bottom: 6px;
    }

    .cert-title {
      font-size: clamp(1.5rem, 3.5vw, 2.2rem);
      font-weight: 900;
      color: #78350f;
      margin: 10px 0 16px;
      font-family: Georgia, 'Times New Roman', serif;
    }

    .cert-student-name {
      font-size: clamp(1.4rem, 3vw, 2rem);
      font-weight: 900;
      color: var(--primary-dark);
      border-bottom: 2px solid #d97706;
      display: inline-block;
      padding: 4px 24px;
      margin: 10px 0 18px;
    }

    .cert-body {
      font-size: 1.02rem;
      color: #334155;
      max-width: 680px;
      margin: 0 auto 20px;
      line-height: 1.65;
    }

    .cert-stats {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 14px;
      margin-bottom: 24px;
    }

    .cert-stat-box {
      background: #ffffff;
      border: 2px solid #fde68a;
      border-radius: 12px;
      padding: 10px 18px;
      font-weight: 800;
      color: #92400e;
    }

    .cert-signatures {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      gap: 24px;
      margin-top: 28px;
      padding-top: 12px;
    }

    .sig-line {
      border-top: 2px solid #64748b;
      padding-top: 6px;
      min-width: 220px;
      font-size: 0.85rem;
      font-weight: 700;
      color: #475569;
    }