.module8-drag-intro {
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.module8-option-bank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.module8-drag-option {
  display: flex;
  min-height: 46px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  cursor: grab;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.module8-drag-option:hover,
.module8-drag-option:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: none;
}

.module8-drag-option:active,
.module8-drag-option.is-dragging {
  cursor: grabbing;
  transform: scale(.985);
  opacity: .72;
}

.module8-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.module8-drop-target {
  position: relative;
  display: flex;
  min-height: 48px;
  min-width: min(100%, 420px);
  flex: 1 1 360px;
  align-items: center;
  padding: 10px 44px 10px 13px;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.module8-drop-target.is-empty {
  color: #64748b;
  font-weight: 500;
}

.module8-drop-target.has-value {
  border-style: solid;
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.module8-drop-target.is-over,
.module8-drop-target:focus-visible {
  border-color: #1d4ed8;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  outline: none;
}

.module8-drop-value {
  overflow-wrap: anywhere;
}

.module8-clear-answer {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: #dbeafe;
  color: #1e40af;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.module8-clear-answer[hidden] {
  display: none;
}

.q.correct .module8-drop-target {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #166534;
}

.q.incorrect .module8-drop-target {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.module8-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  background: rgba(15, 23, 42, .42);
}

.module8-picker-backdrop.is-open {
  display: block;
}

.module8-picker {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 9999;
  display: none;
  width: min(520px, calc(100vw - 32px));
  max-height: min(72vh, 620px);
  overflow: hidden;
  transform: translateX(-50%);
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.module8-picker.is-open {
  display: block;
}

.module8-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 750;
}

.module8-picker-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.module8-picker-list {
  display: grid;
  gap: 9px;
  max-height: calc(min(72vh, 620px) - 63px);
  padding: 14px;
  overflow-y: auto;
}

.module8-picker-choice {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.module8-picker-choice:hover,
.module8-picker-choice:focus-visible {
  border-color: #2563eb;
  background: #eff6ff;
  outline: none;
}

body.module8-picker-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .module8-option-bank {
    grid-template-columns: 1fr;
  }

  .module8-drag-option {
    cursor: pointer;
  }

  .module8-drop-target {
    min-width: 100%;
  }

  .module8-picker {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 78vh;
    transform: none;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module8-drag-option,
  .module8-drop-target {
    transition: none;
  }
}
