.selftest-banner {
  margin: 32px 0;
  padding: 1px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff3f3, #f6f9ff);
  cursor: pointer;
}

.selftest-banner-inner {
  padding: 26px;
  border-radius: 21px;
  background: #fff;
  border: 1px solid rgba(217, 28, 36, 0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
}

.selftest-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #fff1f1;
  color: #d91c24;
  font-size: 13px;
  font-weight: 700;
}

.selftest-banner strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #222;
}

.selftest-banner p {
  margin: 10px 0 18px;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

.selftest-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #222;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.selftest-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.48);
}

.selftest-overlay.is-open {
  display: flex;
}

body.selftest-opened {
  overflow: hidden;
}

.selftest-modal {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
}

.selftest-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #333;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.selftest-head {
  padding: 34px 34px 18px;
  text-align: center;
}

.selftest-step {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #fff1f1;
  color: #d91c24;
  font-size: 13px;
  font-weight: 700;
}

.selftest-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #222;
}

.selftest-subtitle {
  margin: 10px 0 0;
  color: #777;
  font-size: 14px;
  line-height: 1.6;
}

.selftest-progress {
  height: 6px;
  background: #f1f1f1;
}

.selftest-progress-bar {
  width: 0;
  height: 100%;
  background: #d91c24;
  transition: width 0.25s ease;
}

.selftest-body {
  padding: 34px;
}

.selftest-question {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.selftest-group {
  display: inline-flex;
  align-self: center;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #f8f8f8;
  color: #666;
  font-size: 13px;
  font-weight: 700;
}

.selftest-question p {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
  color: #222;
  word-break: keep-all;
}

.selftest-actions {
  display: flex;
  gap: 10px;
  padding: 0 34px 34px;
}

.selftest-actions button {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.selftest-prev {
  background: #f1f1f1;
  color: #555;
}

.selftest-prev:disabled {
  opacity: 0.4;
  cursor: default;
}

.selftest-no {
  background: #f6f6f6;
  color: #333;
}

.selftest-yes {
  background: #d91c24;
  color: #fff;
}

.selftest-result {
  text-align: center;
}

.selftest-score {
  margin-bottom: 16px;
}

.selftest-score strong {
  font-size: 56px;
  line-height: 1;
  color: #d91c24;
}

.selftest-score span {
  font-size: 18px;
  color: #777;
}

.selftest-result h4 {
  margin: 0 0 12px;
  font-size: 22px;
  color: #222;
}

.selftest-result p {
  margin: 0;
  color: #555;
  line-height: 1.75;
  word-break: keep-all;
}

.selftest-group-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 18px;
  background: #fff8f8;
  text-align: left;
}

.selftest-group-result h5 {
  margin: 0 0 8px;
  color: #d91c24;
  font-size: 15px;
}

.selftest-group-result strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: #222;
}

.selftest-group-list {
  margin-top: 18px;
  border-top: 1px solid #eee;
}

.selftest-group-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #eee;
  color: #333;
  font-size: 15px;
}

.selftest-notice {
  margin-top: 22px !important;
  padding: 14px;
  border-radius: 14px;
  background: #f8f8f8;
  color: #777 !important;
  font-size: 13px;
}


body.selftest-opened .selftest-overlay,
body.selftest-opened .selftest-modal,
body.selftest-opened .selftest-modal button,
body.selftest-opened .selftest-modal a {
  touch-action: manipulation;
}



@media (max-width: 640px) {
  .selftest-overlay {
    padding: 14px;
  }
  .selftest-head {
    padding: 30px 22px 16px;
  }
  .selftest-body {
    padding: 26px 22px;
  }
  .selftest-title {
    font-size: 21px;
  }
  .selftest-question p {
    font-size: 20px;
  }
  .selftest-actions {
    padding: 0 22px 26px;
  }

  .selftest-actions button,
  .selftest-open-btn,
  .selftest-close {
    font-size: 16px;
  }
}