.exercise-confirmation,
.guided-exercise,
.guided-complete {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fffdf5, #f5edff);
  border: 1px solid rgba(91, 30, 190, .14);
}

.exercise-confirmation > span,
.guided-complete > span {
  color: #6b27c8;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.exercise-confirmation h3,
.guided-complete h3 {
  margin: 7px 0 10px;
  color: #28105d;
}

#detectedExerciseText {
  white-space: pre-wrap;
  padding: 14px 16px;
  border-radius: 15px;
  background: #fff;
  color: #2d2050;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 6px 20px rgba(54, 20, 104, .08);
}

.exercise-confirmation small { display: block; margin-top: 12px; color: #695d7e; }
.guided-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.guided-actions button,
#checkGuidedAnswer {
  min-height: 46px;
  padding: 10px 17px;
  border: 0;
  border-radius: 14px;
  background: #6121bf;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

#editDetectedExercise,
#showStepSolution { background: #ffcf2f; color: #351064; }

.guided-progress { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.guided-progress strong { color: #6521c2; }
.guided-progress progress { width: 100%; height: 12px; accent-color: #6d24c8; }
.guided-instruction {
  margin: 18px 0 10px;
  padding: 14px 16px;
  border-left: 5px solid #ffca25;
  border-radius: 8px 14px 14px 8px;
  background: #fff;
  color: #39255d;
  line-height: 1.55;
  white-space: pre-wrap;
}

#guidedQuestion { margin: 16px 0 10px; color: #28105d; font-size: 1.12rem; }
.guided-answer-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px auto; gap: 8px; }
.guided-answer-row input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 13px;
  border: 2px solid #d9c8f0;
  border-radius: 14px;
  font: inherit;
}

#speakGuidedAnswer { border: 0; border-radius: 14px; background: #ffcf2f; font-size: 1.2rem; cursor: pointer; }
#guidedFeedback { min-height: 24px; margin: 12px 0 0; font-weight: 800; }
#guidedFeedback.success { color: #197447; }
#guidedFeedback.try-again { color: #9a4b00; }
.guided-complete { text-align: center; background: linear-gradient(145deg, #5920b6, #7b35d5); color: #fff; }
.guided-complete > span, .guided-complete h3 { color: #ffda45; }
#guidedFinalAnswer { white-space: pre-wrap; line-height: 1.55; }

@media (max-width: 560px) {
  .exercise-confirmation, .guided-exercise, .guided-complete { padding: 16px; }
  .guided-answer-row { grid-template-columns: minmax(0, 1fr) 46px; }
  #checkGuidedAnswer { grid-column: 1 / -1; }
  .guided-actions button { flex: 1 1 100%; }
}
