.lms-widget-section {
  padding: 48px 20px;
  background: #f6f8fb;
  border-top: 1px solid #e7ebf1;
  border-bottom: 1px solid #e7ebf1;
}

.lms-widget {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 12px 32px -24px rgba(15, 30, 60, 0.35);
}

/* Embedded directly on an enrollment card (learning.html) instead of its
   own full-bleed page section -- no .lms-widget-section wrapper there, so
   give the card itself a bit of separation from whatever's above it. */
.lms-widget-root:not([hidden]) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 20px;
}

.lms-widget-root .lms-widget {
  max-width: none;
  box-shadow: none;
}

.lms-widget-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0b58bf;
  margin-bottom: 8px;
}

.lms-widget h2 {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.4;
  word-break: keep-all;
}

.lms-widget-checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lms-widget-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #56606e;
}

.lms-widget-check__mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #d7dde3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.lms-widget-check.is-done {
  color: #101418;
}

.lms-widget-check.is-done .lms-widget-check__mark {
  background: #1c8a3c;
  border-color: #1c8a3c;
}

.lms-widget-check em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: #97a1ac;
}

.lms-widget-assignments {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 860px) {
  .lms-widget-assignments {
    grid-template-columns: 1fr 1fr;
  }
}

.lms-widget-assignment {
  min-width: 0;
  border: 1px solid #e2e7ee;
  border-radius: 12px;
  padding: 16px;
}

.lms-widget-assignment b {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.lms-widget-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #fff3d6;
  color: #6d4900;
}

.lms-widget-tag.is-approved {
  background: #e5f6ea;
  color: #187a35;
}

.lms-widget-tag.is-rejected {
  background: #fde8e8;
  color: #c62828;
}

.lms-widget-assignment-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.lms-widget-assignment-form input,
.lms-widget-assignment-form select,
.lms-widget-assignment-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.lms-widget-assignment-form input:focus-visible,
.lms-widget-assignment-form select:focus-visible,
.lms-widget-assignment-form textarea:focus-visible,
.lms-widget-question input:focus-visible {
  border-color: #0e6071;
  outline: 3px solid rgba(14, 96, 113, 0.2);
  outline-offset: 2px;
}

.lms-widget-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #34404c;
}

.lms-widget-field select,
.lms-widget-field input {
  flex: 1;
}

.lms-widget-note {
  font-size: 13px;
  color: #5f6b78;
  margin: 8px 0;
}

.lms-widget-form-status {
  margin: 0;
  font-size: 12.5px;
  color: #56606e;
  min-height: 1.4em;
}

.lms-widget-form-status.is-error,
.lms-widget-error {
  color: #9f1d22;
}

.lms-widget-error {
  padding: 18px;
  border: 1px solid #e8b8ba;
  border-left: 4px solid #b4232a;
  border-radius: 8px;
  background: #fff7f7;
}

.lms-widget-error h2,
.lms-widget-error p {
  margin-top: 0;
  color: #7f1d1d;
}

.lms-widget [aria-invalid="true"] {
  border-color: #b4232a;
  box-shadow: 0 0 0 3px rgba(180, 35, 42, 0.13);
}

.lms-widget-question[aria-invalid="true"] {
  padding: 12px;
  border: 2px solid #b4232a;
  border-radius: 8px;
}

.lms-widget-action {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.lms-widget-action::after {
  content: "\2192";
  flex: none;
  font-size: 16px;
  line-height: 1;
  transition: transform 180ms ease;
}

.lms-widget-action--primary {
  border-color: #0e6071;
  background: #0e6071;
  color: #fff;
  box-shadow: 0 10px 24px -16px rgba(14, 96, 113, 0.9);
}

.lms-widget-action--primary:hover {
  border-color: #0a4f5e;
  background: #0a4f5e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px rgba(14, 96, 113, 0.95);
}

.lms-widget-action--secondary {
  border-color: #0e6071;
  background: #fff;
  color: #0e6071;
}

.lms-widget-action--secondary:hover {
  background: #f0f7f6;
  color: #0a4f5e;
  transform: translateY(-2px);
}

.lms-widget-action:hover::after {
  transform: translateX(3px);
}

.lms-widget-action:active {
  transform: translateY(0);
  box-shadow: none;
}

.lms-widget-action:focus-visible {
  outline: 3px solid rgba(14, 96, 113, 0.28);
  outline-offset: 3px;
}

.lms-widget-action:disabled,
.lms-widget-action[aria-disabled="true"] {
  border-color: #ccd5d8;
  background: #e8edef;
  color: #758287;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.lms-widget-action:disabled::after,
.lms-widget-action[aria-disabled="true"]::after {
  transform: none;
}

.lms-widget-exam {
  border-top: 1px dashed #e2e7ee;
  padding-top: 20px;
}

.lms-widget-exam p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #34404c;
}

.lms-widget-exam.is-locked p,
.lms-widget-exam.is-passed p {
  color: #187a35;
}

.lms-widget-exam.is-locked p {
  color: #596673;
}

.lms-widget-exam-body {
  margin-top: 16px;
}

.lms-widget-question {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.lms-widget-question legend {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0;
}

.lms-widget-question label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: 13.5px;
  color: #34404c;
  cursor: pointer;
}

.lms-birthdate-fieldset {
  padding: 16px;
  background: #f7f9fb;
  border-radius: 16px;
  margin-bottom: 22px;
}

.lms-birthdate {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

.lms-birthdate-cell {
  display: flex;
  align-items: baseline;
  gap: 5px;
  background: #fff;
  border: 1.5px solid #e2e7ee;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.lms-birthdate-cell:focus-within {
  border-color: #0e6071;
  box-shadow: 0 0 0 4px rgba(14, 96, 113, 0.2);
  transform: translateY(-1px);
}

.lms-birthdate-cell input {
  border: 0;
  outline: 0;
  padding: 0;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #16202b;
  background: transparent;
  width: 2.6ch;
  text-align: right;
}

.lms-birthdate-cell--year input {
  width: 4.2ch;
}

.lms-birthdate-cell input::placeholder {
  color: #c3cad3;
  font-weight: 600;
}

.lms-birthdate-suffix {
  font-size: 13.5px;
  font-weight: 600;
  color: #8992a0;
  white-space: nowrap;
}

.lms-birthdate-hint {
  margin: 0;
}

@media (max-width: 420px) {
  .lms-birthdate-cell {
    padding: 10px 13px;
  }
  .lms-birthdate-cell input {
    font-size: 17px;
  }
}

.lms-widget-no-motion,
.lms-widget-no-motion * {
  transition: none !important;
  animation: none !important;
}

@media (max-width: 640px) {
  .lms-widget {
    padding: 24px 18px;
  }

  .lms-widget-action {
    width: 100%;
  }

  .lms-widget-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lms-birthdate {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lms-birthdate-cell {
    min-width: 0;
    justify-content: center;
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lms-widget-action,
  .lms-widget-action::after {
    transition: none;
  }

  .lms-widget-action:hover {
    transform: none;
  }
}

/* 자격시험: 남은 시간 표시 · 결과/오답 화면 (2026-08-26) */
.lms-widget-timer {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1.5px solid #d5dfdd;
  border-radius: 12px;
  background: #f4f7f7;
}

.lms-widget-timer__label {
  font-size: 12px;
  font-weight: 700;
  color: #4a5c60;
}

.lms-widget-timer__value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #14323b;
}

.lms-widget-timer__note {
  flex-basis: 100%;
  font-size: 12px;
  color: #5f7074;
}

.lms-widget-timer.is-urgent {
  border-color: #c62828;
  background: #fdf1f1;
}

.lms-widget-timer.is-urgent .lms-widget-timer__value {
  color: #b02020;
}

.lms-widget-exam-intro {
  padding: 20px;
  border: 1px solid #d5dfdd;
  border-radius: 12px;
  background: #fff;
}

.lms-widget-exam-intro h4 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #14323b;
}

.lms-widget-exam-facts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.lms-widget-exam-facts li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4f3;
  font-size: 13px;
  color: #33474c;
}

.lms-widget-exam-facts b {
  color: #14323b;
}

.lms-widget-result {
  padding: 22px;
  border: 1.5px solid #d5dfdd;
  border-radius: 12px;
  background: #fff;
}

.lms-widget-result:focus {
  outline: 3px solid rgba(14, 96, 113, 0.35);
  outline-offset: 2px;
}

.lms-widget-result h3 {
  margin: 0 0 6px;
  font-size: 21px;
  color: #14323b;
}

.lms-widget-result.is-passed {
  border-color: #187a35;
}

.lms-widget-result.is-failed {
  border-color: #c1852a;
}

.lms-widget-result-meta {
  margin: 0 0 6px;
  font-size: 14px;
  color: #43555a;
}

.lms-widget-review {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2ebea;
}

.lms-widget-review h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #14323b;
}

.lms-widget-review-list {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0 0 0 4px;
  list-style: none;
}

.lms-widget-review-list li {
  padding: 12px 14px;
  border-left: 3px solid #c1852a;
  border-radius: 0 8px 8px 0;
  background: #fbf7f0;
}

.lms-widget-review-list b {
  font-size: 12px;
  color: #8a5f16;
}

.lms-widget-review-question {
  margin: 4px 0 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #21333a;
}

.lms-widget-review-answer {
  margin: 0;
  font-size: 13px;
  color: #5f7074;
}

@media (max-width: 480px) {
  .lms-widget-timer {
    padding: 10px 12px;
  }
  .lms-widget-timer__value {
    font-size: 19px;
  }
}

.lms-widget-review--collapsed {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.lms-widget-review--collapsed > summary {
  padding: 8px 0;
  color: #0e6071;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lms-widget-review--collapsed > summary:focus-visible {
  outline: 2px solid rgba(14, 96, 113, 0.45);
  outline-offset: 2px;
}

/* Assignment flow: scoped to LMS cards and the final-start dialog. */
.lms-widget-progress { margin-bottom: 20px; }
.lms-widget-progress .lms-widget-checklist { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 12px; }
.lms-widget-progress-message { margin: 0; color: #14323b; font-size: 15px; font-weight: 700; line-height: 1.6; }
.lms-widget-sharing-guide { margin-bottom: 20px; padding: 14px 16px; border-radius: 10px; background: #f6f8fb; color: #34404c; font-size: 14px; line-height: 1.6; }
.lms-widget-sharing-guide p { margin: 0 0 8px; }
.lms-widget-sharing-guide p:last-child { margin-bottom: 0; }
.lms-widget-submission-details { margin: 14px 0; font-size: 13px; line-height: 1.6; }
.lms-widget-submission-details dt { margin-top: 10px; color: #5f6b78; }
.lms-widget-submission-details dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #21333a; }
.lms-widget-assignment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lms-widget-text-action { display: inline-block; padding: 8px 2px; border: 0; background: transparent; color: #0e6071; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.lms-widget-sharing-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; font-size: 13px; line-height: 1.6; color: #34404c; cursor: pointer; }
.lms-widget-assignment-form .lms-widget-sharing-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: #0e6071; }
.lms-widget-assignment-form .lms-widget-field { grid-template-columns: 1fr; gap: 6px; }
.lms-widget-link-warning { padding: 12px; border-radius: 8px; background: #fff3d6; color: #6d4900; font-size: 13px; line-height: 1.6; }
.lms-widget-confirm { box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid #d5dfdd; border-radius: 16px; color: #21333a; }
.lms-widget-confirm::backdrop { background: rgba(15, 30, 45, .5); }
.lms-widget-confirm h3 { margin: 0 0 14px; font-size: 20px; line-height: 1.4; }
.lms-widget-confirm p { margin: 0 0 20px; font-size: 14px; line-height: 1.7; }
.lms-widget-assignment [data-assignment-heading]:focus { outline: 2px solid #0e6071; outline-offset: 4px; }
@media (max-width: 640px) {
  .lms-widget-progress .lms-widget-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .lms-widget-check { gap: 6px; font-size: 12px; }
  .lms-widget-confirm { padding: 20px; }
}
