.klc-exam-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: #1f2937;
}
.klc-exam-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
}
.klc-exam-label {
  margin: 0 0 8px;
  color: #2563eb;
  font-weight: 700;
  letter-spacing: .04em;
}
.klc-exam-header h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.35;
}
.klc-exam-meta {
  margin: 0;
  line-height: 1.7;
}
.klc-exam-timer {
  flex: 0 0 auto;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  white-space: nowrap;
}
.klc-exam-main .klc-exam-timer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  min-width: 132px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
}
body.admin-bar .klc-exam-main .klc-exam-timer {
  top: 50px;
}
.klc-exam-main .klc-exam-timer span {
  font-size: 20px;
  letter-spacing: .04em;
}
.klc-exam-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.klc-question-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.klc-question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.klc-question-head span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}
.klc-question-number { background: #2563eb; color: #fff; }
.klc-question-category { background: #eef2ff; color: #3730a3; }
.klc-question-point { background: #f3f4f6; color: #374151; }
.klc-question-text {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}
.klc-choice-list {
  display: grid;
  gap: 10px;
}
.klc-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  line-height: 1.7;
  background: #fff;
}
.klc-choice:hover {
  background: #f9fafb;
  border-color: #bfdbfe;
}
.klc-choice input {
  margin-top: .45em;
}
.klc-exam-submit-area {
  text-align: center;
  padding: 24px 0;
}
.klc-submit-button {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  background: #9ca3af;
  color: #fff;
  font-weight: 700;
}
.klc-exam-error {
  max-width: 900px;
  margin: 20px auto;
  padding: 16px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
}
@media (max-width: 720px) {
  .klc-exam-header {
    display: block;
    padding: 18px;
  }
  .klc-exam-timer {
    display: inline-block;
    margin-top: 14px;
  }
  .klc-exam-main .klc-exam-timer {
    top: auto;
    right: 12px;
    bottom: 12px;
    min-width: 120px;
    padding: 10px 14px;
  }
  body.admin-bar .klc-exam-main .klc-exam-timer {
    top: auto;
  }
  .klc-question-card {
    padding: 16px;
  }
  .klc-question-text {
    font-size: 16px;
  }
}
.klc-submit-button {
  background: #2563eb;
  cursor: pointer;
}
.klc-submit-button:hover {
  background: #1d4ed8;
}
.klc-result-hero {
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
}
.klc-result-hero.is-pass {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.klc-result-hero.is-fail {
  border-color: #fecaca;
  background: #fef2f2;
}
.klc-result-main {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.klc-result-status {
  font-size: 36px;
  font-weight: 800;
}
.klc-result-score {
  font-size: 46px;
  font-weight: 800;
}
.klc-result-score span {
  font-size: 20px;
  margin-left: 4px;
  color: #4b5563;
}
.klc-result-note {
  margin: 10px 0 0;
  line-height: 1.8;
}
.klc-result-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 20px;
}
.klc-result-section h3 {
  margin: 0 0 14px;
  font-size: 22px;
}
.klc-category-result-list {
  display: grid;
  gap: 10px;
}
.klc-category-result-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 12px;
}
.klc-category-name {
  font-weight: 700;
}
.klc-category-score {
  font-weight: 800;
}
.klc-category-correct {
  color: #4b5563;
}
.klc-answer-detail {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.klc-answer-detail summary {
  cursor: pointer;
  padding: 13px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #f9fafb;
}
.klc-answer-detail summary strong {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 13px;
}
.klc-answer-detail.is-correct summary strong {
  background: #dcfce7;
  color: #166534;
}
.klc-answer-detail.is-wrong summary strong {
  background: #fee2e2;
  color: #991b1b;
}
.klc-answer-detail summary em {
  font-style: normal;
  color: #4b5563;
}
.klc-answer-body {
  padding: 14px;
  line-height: 1.8;
}
.klc-answer-body p {
  margin: 0 0 10px;
}
.klc-answer-question {
  font-weight: 700;
}
.klc-explanation {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
}
@media (max-width: 720px) {
  .klc-category-result-row {
    grid-template-columns: 1fr;
  }
  .klc-result-status {
    font-size: 30px;
  }
  .klc-result-score {
    font-size: 38px;
  }
}

/* 1問ずつ表示する試験画面 */
.klc-exam-progress-area {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.klc-exam-progress-text {
  font-weight: 800;
  margin-bottom: 10px;
}
.klc-exam-progress-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.klc-exam-progress-bar span {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width .2s ease;
}
.klc-question-stage {
  min-height: 360px;
}
.klc-question-card {
  display: none;
}
.klc-question-card.is-active {
  display: block;
}
.klc-choice.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}
.klc-exam-nav-area {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 18px 0 22px;
}
.klc-nav-button,
.klc-submit-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.4;
}
.klc-prev-button {
  background: #f3f4f6;
  color: #374151;
}
.klc-next-button {
  background: #2563eb;
  color: #fff;
}
.klc-review-button {
  background: #111827;
  color: #fff;
}
.klc-nav-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.klc-review-panel {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 22px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.klc-review-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.klc-review-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.klc-review-head p {
  margin: 0;
  line-height: 1.7;
  color: #4b5563;
}
.klc-review-count {
  flex: 0 0 auto;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}
.klc-question-jump-list {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}
.klc-jump-button {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  border-radius: 10px;
  padding: 10px 4px;
  font-weight: 800;
  cursor: pointer;
}
.klc-jump-button.is-answered {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.klc-jump-button.is-unanswered {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.klc-jump-button.is-current {
  outline: 3px solid rgba(37, 99, 235, .25);
}
.klc-exam-submit-area {
  margin-top: 20px;
}
@media (max-width: 720px) {
  .klc-exam-nav-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .klc-review-button {
    grid-column: 1 / -1;
    order: 3;
  }
  .klc-question-jump-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .klc-review-head {
    display: block;
  }
  .klc-review-count {
    display: inline-block;
    margin-top: 12px;
  }
}

/* 開始前画面 */
.klc-exam-start-screen {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.klc-exam-start-screen h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.35;
}
.klc-exam-start-lead {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.8;
}
.klc-start-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.klc-start-summary div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.klc-start-summary strong {
  display: block;
  font-size: 28px;
  color: #1d4ed8;
  line-height: 1.1;
}
.klc-start-summary span {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: #4b5563;
}
.klc-start-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 15px 34px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}
.klc-start-button:hover {
  background: #1d4ed8;
}

/* あとで見直す */
.klc-review-later-status {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}
.klc-review-later-area {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.klc-mark-review-button {
  appearance: none;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff7ed;
  color: #92400e;
  font-weight: 800;
  cursor: pointer;
}
.klc-mark-review-button.is-marked {
  background: #f59e0b;
  color: #fff;
}
.klc-review-counts {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}
.klc-review-counts span {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  text-align: center;
}
.klc-jump-button {
  position: relative;
  min-height: 52px;
}
.klc-jump-button span,
.klc-jump-button em {
  display: block;
}
.klc-jump-button em {
  font-style: normal;
  margin-top: 3px;
  font-size: 10px;
  color: #92400e;
}
.klc-jump-button.is-review-later {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.klc-jump-button.is-review-later::after {
  content: "★";
  position: absolute;
  top: -7px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}

@media (max-width: 720px) {
  .klc-exam-start-screen {
    padding: 20px;
  }
  .klc-start-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .klc-review-counts {
    display: inline-grid;
    margin-top: 12px;
  }
}

.klc-result-redirect,
.klc-result-empty {
  max-width: 960px;
  margin: 40px auto;
  padding: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.klc-result-link {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* My page exam history */
.klc-history-wrap {
  max-width: 1100px;
  margin: 32px auto;
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
}
.klc-history-wrap h2 {
  margin: 0 0 10px;
  font-size: 26px;
}
.klc-history-note {
  margin: 0 0 20px;
  color: #4b5563;
  line-height: 1.8;
}
.klc-history-table-wrap {
  overflow-x: auto;
}
.klc-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.klc-history-table th,
.klc-history-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  text-align: left;
}
.klc-history-table th {
  background: #f8fafc;
  color: #374151;
  font-weight: 800;
  white-space: nowrap;
}
.klc-history-badge {
  display: inline-block;
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.klc-history-badge.is-pass {
  background: #dcfce7;
  color: #166534;
}
.klc-history-badge.is-fail {
  background: #fee2e2;
  color: #991b1b;
}
.klc-history-button {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}
.klc-history-button:hover {
  color: #fff;
  opacity: .9;
}
.klc-history-button.is-download {
  background: #16a34a;
}
.klc-history-muted {
  color: #6b7280;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .klc-history-wrap {
    padding: 20px;
  }
  .klc-history-table,
  .klc-history-table thead,
  .klc-history-table tbody,
  .klc-history-table th,
  .klc-history-table td,
  .klc-history-table tr {
    display: block;
  }
  .klc-history-table thead {
    display: none;
  }
  .klc-history-table tr {
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
  }
  .klc-history-table td {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
  }
  .klc-history-table td::before {
    content: attr(data-label);
    font-weight: 800;
    color: #374151;
  }
}

.klc-history-button.is-waiting {
  background: #f59e0b;
}
.klc-certificate-wrap {
  max-width: 920px;
  margin: 0 auto;
}
.klc-certificate-hero,
.klc-certificate-card,
.klc-certificate-notice,
.klc-certificate-form,
.klc-certificate-preview,
.klc-result-certificate-cta {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 26px;
  margin: 18px 0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.klc-certificate-hero {
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
}
.klc-certificate-hero h2,
.klc-certificate-card h3,
.klc-certificate-notice h3,
.klc-certificate-preview h3 {
  margin-top: 0;
}
.klc-certificate-dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin: 0;
}
.klc-certificate-dl dt,
.klc-certificate-dl dd {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  margin: 0;
}
.klc-certificate-dl dt {
  background: #f8fafc;
  font-weight: 800;
  color: #374151;
}
.klc-certificate-dl dd {
  background: #fff;
}
.klc-certificate-dl dt:last-of-type,
.klc-certificate-dl dd:last-of-type {
  border-bottom: none;
}
.klc-certificate-notice.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.klc-certificate-notice.is-waiting {
  border-color: #fed7aa;
  background: #fff7ed;
}
.klc-certificate-note {
  font-weight: 700;
  color: #374151;
}
.klc-certificate-preview {
  text-align: center;
  padding: 44px 34px;
  border: 8px double #1e3a8a;
  background: #fff;
}
.klc-cert-small {
  color: #1d4ed8;
  font-weight: 900;
  letter-spacing: .2em;
}
.klc-cert-name {
  font-size: 28px;
  font-weight: 900;
  margin: 24px 0;
}
.klc-certificate-preview .klc-certificate-dl {
  max-width: 640px;
  margin: 24px auto 0;
  text-align: left;
}
@media (max-width: 720px) {
  .klc-certificate-dl {
    grid-template-columns: 1fr;
  }
  .klc-certificate-dl dt {
    border-bottom: none;
  }
  .klc-certificate-dl dd {
    border-bottom: 1px solid #e5e7eb;
  }
  .klc-certificate-preview {
    padding: 28px 18px;
  }
}
