.mp120-shell {
  margin: 0 auto;
  padding: 0 26px 28px;
  background: linear-gradient(90deg, #f3f7f3 0, #f3f7f3 11%, #fff 11%, #fff 89%, #f3f7f3 89%, #f3f7f3 100%);
}

.mp120-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 18px;
  color: #1f2933;
  font-family: Arial, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.mp120-wrapper *,
.mp120-wrapper *::before,
.mp120-wrapper *::after {
  box-sizing: border-box;
}

.mp120-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 0 14px;
  border-bottom: 2px solid #d4d4d4;
}

.mp120-tab {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d4d4d4;
  border-radius: 7px;
  background: #fff;
  color: #777;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.mp120-tab.is-active {
  border-color: #27ae60;
  background: #27ae60;
  color: #fff;
}

.mp120-title,
.mp120-current-line strong {
  margin: 24px 0 16px;
  color: #20ad55;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
}

.mp120-current-line,
.mp120-exam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid #26b563;
}

.mp120-current-line strong {
  margin: 0;
}

.mp120-current-line span {
  font-weight: 700;
}

.mp120-exam-head span {
  color: #111827;
  font-size: 22px;
  font-weight: 800;
}

.mp120-exam-head span strong,
.mp120-exam-head .mp120-count-current {
  color: #df2525;
  font-size: 30px;
}

.mp120-guide {
  margin: 24px 0;
  padding: 26px 34px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #fff;
}

.mp120-guide-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 800;
}

.mp120-guide-title::after {
  content: "▾";
  color: #444;
}

.mp120-guide ul {
  margin: 0;
  padding-left: 20px;
}

.mp120-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 20px 0;
}

.mp120-field {
  display: grid;
  gap: 6px;
  min-width: 220px;
  font-weight: 700;
}

.mp120-select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd5d1;
  border-radius: 6px;
  background: #fff;
  color: #111827;
}

.mp120-question-grid {
  margin: 20px 0 26px;
}

.mp120-question-button,
.mp120-status-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border: 2px solid #24b75c;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.mp120-question-chapter {
  margin: 22px 0 10px;
  color: #15803d;
  font-size: 20px;
  font-weight: 800;
}

.mp120-question-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.mp120-question-card {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #d6d6d6;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font-weight: 700;
  cursor: pointer;
}

.mp120-question-card span {
  padding: 10px 12px;
  text-align: left;
}

.mp120-question-card strong {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f1f1;
}

.mp120-question-card.is-active {
  border-color: #f2b500;
  box-shadow: 0 0 0 2px rgba(242, 181, 0, 0.25);
}

.mp120-question-card.is-done strong {
  background: #27ae60;
  color: #fff;
}

.mp120-question-button.is-active,
.mp120-status-button.is-active {
  border-color: #f2b500;
  background: #fff7d6;
}

.mp120-question-button.is-done,
.mp120-status-button.is-done {
  background: #25b15b;
  color: #fff;
}

.mp120-exam-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0 20px;
  padding: 16px;
  border: 1px solid #c9dfd2;
  border-radius: 10px;
  background: #eef9f2;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.mp120-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mp120-button {
  min-height: 42px;
  padding: 9px 18px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #1f2933;
  font-weight: 800;
  cursor: pointer;
}

.mp120-button:hover {
  filter: brightness(0.96);
}

.mp120-space {
  min-height: 54px;
  border-color: #27ae60;
  background: #27ae60;
  color: #fff;
  font-size: 18px;
}

.mp120-submit-button {
  min-width: 150px;
  min-height: 52px;
  background: #ff7a1a;
  color: #fff;
  font-size: 22px;
  letter-spacing: 1px;
}

.mp120-nav-button {
  background: #858585;
  color: #fff;
}

.mp120-small-button {
  background: #59616a;
  color: #fff;
}

.mp120-hint-button {
  background: #ff871f;
  color: #fff;
}

.mp120-danger {
  border: 1px solid #ff7a1a;
  background: #fff;
  color: #9a3412;
}

.mp120-video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.25);
}

.mp120-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  background: #000;
}

.mp120-empty {
  margin: 0 auto 10px;
  padding: 80px 20px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  text-align: center;
}

.mp120-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 4px 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  color: #111827;
}

.mp120-score-pill {
  min-width: 56px;
  color: #22a853;
  font-family: Arial, Roboto, sans-serif;
  font-size: 18px;
}

.mp120-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: Arial, Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.mp120-toggle input {
  width: 14px;
  height: 14px;
}

.mp120-progress-track,
.mp120-score-scale {
  width: calc(100% - 48px);
  height: 18px;
  margin: 8px auto;
  overflow: hidden;
  border-radius: 4px;
  background: #d2d2d2;
}

.mp120-flag-row {
  position: relative;
  width: calc(100% - 48px);
  height: 16px;
  margin: -2px auto 0;
}

.mp120-flag-row span {
  position: absolute;
  top: -12px;
  left: -999px;
  transform: translateX(-50%);
  font-size: 20px;
}

.mp120-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: #27ae60;
}

.mp120-score-scale {
  position: relative;
  height: 36px;
  overflow: visible;
  background: #d2d2d2;
}

.mp120-score-scale.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
}

.mp120-score-window {
  position: absolute;
  top: 0;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.mp120-score-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #12603a;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
}

.mp120-score-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  color: #334155;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.mp120-score-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13px;
  width: 2px;
  height: 22px;
  background: #e11d48;
  transform: translateX(-50%);
}

.mp120-score-tick-start {
  transform: translateX(-8%);
}

.mp120-score-tick-end {
  transform: translateX(-92%);
}

.mp120-score-zone-5 { background: #83d66d; }
.mp120-score-zone-4 { background: #f2d23b; }
.mp120-score-zone-3 { background: #ffb347; }
.mp120-score-zone-2 { background: #f18a75; }
.mp120-score-zone-1 { background: #d96153; }

.mp120-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.mp120-actions-primary {
  display: grid;
  grid-template-columns: 170px 1fr 170px;
  margin: 14px 24px 10px;
}

.mp120-actions-secondary {
  margin: 0 24px 12px;
}

.mp120-scale,
.mp120-hint,
.mp120-scorebar,
.mp120-message {
  color: #475569;
}

.mp120-scale,
.mp120-hint {
  margin: 12px 24px;
  padding: 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
}

.mp120-hint-image,
.mp120-hint-video {
  display: block;
  max-width: 100%;
  margin: 8px auto;
}

.mp120-scorebar {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px 24px;
  border-top: 1px solid #d7dee8;
}

.mp120-share-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 20px;
}

.mp120-share-button {
  background: #16a34a;
  color: #fff;
}

.mp120-result-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 20px;
}

.mp120-pass {
  color: #047857;
  font-weight: 800;
}

.mp120-fail {
  color: #b91c1c;
  font-weight: 800;
}

.mp120-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.mp120-result-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.mp120-result-table th,
.mp120-result-table td {
  padding: 10px;
  border: 1px solid #d7dee8;
  text-align: left;
  vertical-align: top;
}

.mp120-result-table th {
  background: #eef2f7;
}

.mp120-popup-host {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.mp120-popup {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.2);
  font-family: Arial, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  animation: mp120-popup-in 0.18s ease-out;
  pointer-events: auto;
}

.mp120-popup-success {
  border-left: 5px solid #16a34a;
}

.mp120-popup-warning {
  border-left: 5px solid #f59e0b;
}

.mp120-popup-info {
  border-left: 5px solid #2563eb;
}

.mp120-popup button {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mp120-popup.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes mp120-popup-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 782px) {
  .mp120-shell {
    padding: 0 10px 20px;
    background: #fff;
  }

  .mp120-popup-host {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .mp120-tabs,
  .mp120-exam-strip,
  .mp120-actions-primary {
    grid-template-columns: 1fr;
  }

  .mp120-title,
  .mp120-current-line strong {
    font-size: 24px;
  }

  .mp120-question-grid {
    margin-top: 16px;
  }

  .mp120-question-list {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .mp120-status-grid {
    justify-content: center;
  }

  .mp120-time-row {
    font-size: 16px;
  }

  .mp120-progress-track,
  .mp120-score-scale,
  .mp120-actions-primary,
  .mp120-actions-secondary,
  .mp120-scale,
  .mp120-hint {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .mp120-button,
  .mp120-submit-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .mp120-question-list {
    grid-template-columns: 1fr;
  }
}
