/* KITT英語 Lesson12以降 Step確認 / Lesson15以降 Gate5問 追加CSS */

.kitt-step-check {
  margin: 24px 0 18px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fffdf7;
}

.kitt-step-check-title,
.kitt-gate-question-title,
.kitt-gate-result-title,
.kitt-gate-hint-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.kitt-step-check-question,
.kitt-gate-question-text {
  margin-bottom: 12px;
}

.kitt-step-check-area,
.kitt-gate-answer-area {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.kitt-step-check-answer,
.kitt-gate-answer {
  max-width: 360px;
  width: 100%;
}

.kitt-gate-answer {
  flex: 1 1 260px;
}

.kitt-gate-hint-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.kitt-gate-hint-button:hover,
.kitt-gate-hint-button:focus {
  filter: brightness(0.95);
}

.kitt-gate-hint-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.kitt-gate-inline-hint {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.kitt-gate-question.is-hint-used {
  border-color: #bfdbfe;
}

.kitt-step-check-feedback {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.kitt-step-check-feedback.is-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.kitt-step-check-feedback.is-error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.kitt-step-check-explanation {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.kitt-gate-multi {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.kitt-gate-question {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.kitt-gate-question.is-correct {
  border-color: #86efac;
  background: #f0fdf4;
}

.kitt-gate-question.is-incorrect {
  border-color: #fdba74;
  background: #fff7ed;
}

.kitt-gate-result {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.kitt-gate-result-summary {
  margin-bottom: 14px;
  font-weight: 700;
}

.kitt-gate-result-item {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.kitt-gate-result-item.is-correct {
  border-color: #bbf7d0;
}

.kitt-gate-result-item.is-incorrect {
  border-color: #fed7aa;
}

.kitt-gate-result-answer,
.kitt-gate-result-explanation {
  margin: 6px 0 0;
}

.kitt-gate-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.kitt-gate-modal.is-open {
  display: block;
}

.kitt-gate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.kitt-gate-modal-panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  margin: 40px auto;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.kitt-gate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.kitt-gate-modal-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.kitt-gate-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  line-height: 1;
}

.kitt-gate-hint-item {
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.kitt-gate-hint-item + .kitt-gate-hint-item {
  margin-top: 10px;
}

.kitt-gate-hint-text {
  margin: 0;
}

/* Step確認：確認操作の押し忘れ防止 */
.kitt-step-check-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-weight: 700;
}

.kitt-step-check-notice.is-complete {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.kitt-step-check-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.kitt-step-check-button:hover,
.kitt-step-check-button:focus {
  filter: brightness(0.95);
}

.kitt-step-check-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.js-step-next.is-step-check-locked,
.js-step-next:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .kitt-step-check-area,
  .kitt-gate-answer-area {
    align-items: stretch;
    flex-direction: column;
  }

  .kitt-step-check-answer,
  .kitt-step-check-button,
  .kitt-gate-answer,
  .kitt-gate-hint-button {
    max-width: none;
    width: 100%;
  }
}
