.teacher-launch-dialog-inner-v8 {
  width: min(980px, calc(100vw - 32px));
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 16px);
  padding: 18px;
  overflow: hidden;
}

/* The live launcher is intentionally compact: keep every choice inside the
   modal instead of allowing the option grids to create a horizontal scroll. */
.teacher-launch-dialog-v8 {
  max-width: calc(100vw - 20px);
  overflow-x: hidden;
}

.teacher-launch-section-heading-v8 {
  flex-wrap: wrap;
}

.teacher-launch-option-grid-v8 {
  min-width: 0;
}

.teacher-launch-option-grid-v8.module-options-v8 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Homework's launch dialog adds a 4th "Selected" source option — let the
   Type grid adapt to however many options are actually visible (3 for Live
   Session, 4 for homework) instead of hardcoding a column count. */
.teacher-launch-option-grid-v8.source-options-v9 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.teacher-launch-concept-list-v1 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}

.teacher-launch-concept-option-v1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--eh-line, rgba(148, 163, 184, .22));
  border-radius: 10px;
  font-size: .82rem;
  cursor: pointer;
}

.teacher-launch-concept-option-v1:has(input:checked) {
  border-color: var(--eh-blue, #3fa6ff);
  background: rgba(63, 166, 255, .08);
}

.teacher-launch-concept-option-v1 span.concept-count {
  color: var(--eh-muted, #93a0bd);
  font-size: .74rem;
  white-space: nowrap;
}

.teacher-launch-concept-empty-v1 {
  font-size: .8rem;
  color: var(--eh-muted, #93a0bd);
  padding: 6px 2px;
}

.teacher-launch-option-grid-v8.level-options-v8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-launch-option-v8 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.teacher-launch-form-v8 {
  gap: 7px;
  min-height: 0;
}

.teacher-launch-section-v8 {
  gap: 5px;
}

.teacher-launch-section-heading-v8 span {
  font-size: .68rem;
}

.teacher-launch-section-heading-v8 p {
  font-size: .64rem;
}

.teacher-launch-option-v8 {
  min-height: 50px;
  padding: 7px 8px;
  border-radius: 12px;
}

.teacher-launch-option-v8 strong {
  font-size: .76rem;
}

.teacher-launch-option-v8 span {
  font-size: .6rem;
}

.teacher-launch-option-v8 .teacher-launch-module-icon-v8 {
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 9px;
}

.teacher-launch-option-v8 .teacher-launch-module-icon-v8 img {
  width: 28px;
  height: 28px;
}

.teacher-launch-app-picker-v9 {
  padding: 7px 9px;
  border-radius: 11px;
}

.teacher-launch-app-picker-v9 select {
  min-height: 36px;
}

.teacher-launch-section-v8.is-inactive {
  visibility: hidden;
  pointer-events: none;
}

.teacher-launch-section-v8.is-inactive select,
.teacher-launch-section-v8.is-inactive button {
  pointer-events: none;
}

.teacher-launch-option-grid-v8.count-options-v8 .teacher-launch-option-v8,
.teacher-launch-option-grid-v8.level-options-v8 .teacher-launch-option-v8 {
  min-height: 50px;
}

.teacher-launch-level-option-v10 .teacher-level-button-icon {
  width: 28px;
  height: 28px;
}

.teacher-launch-level-option-v10 {
  grid-template-columns: auto minmax(0, 1fr);
}

.teacher-launch-form-v8 .dialog-actions {
  padding-top: 4px;
}

@media (max-width: 760px) {
  .teacher-launch-option-grid-v8.module-options-v8,
  .teacher-launch-option-grid-v8.level-options-v8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .teacher-launch-dialog-inner-v8 {
    padding: 18px;
  }

  .teacher-launch-option-grid-v8.module-options-v8,
  .teacher-launch-option-grid-v8.count-options-v8,
  .teacher-launch-option-grid-v8.level-options-v8 {
    grid-template-columns: 1fr;
  }

  .teacher-launch-option-v8 {
    min-height: 58px;
  }
}

/* Loaded before the dashboard theme, so these scoped compact rules retain
   precedence over the legacy launcher dimensions. */
.teacher-dashboard-v5 .teacher-launch-dialog-inner-v8 {
  height: auto;
  max-height: calc(100vh - 16px);
  padding: 18px;
  overflow: hidden;
}
.teacher-dashboard-v5 .teacher-launch-form-v8 { gap: 7px; min-height: 0; }
.teacher-dashboard-v5 .teacher-launch-option-v8 { min-height: 50px; padding: 7px 8px; border-radius: 12px; }
.teacher-dashboard-v5 .teacher-launch-option-v8 .teacher-launch-module-icon-v8 { width: 34px; height: 34px; padding: 3px; border-radius: 9px; }
.teacher-dashboard-v5 .teacher-launch-option-v8 .teacher-launch-module-icon-v8 img { width: 28px; height: 28px; }
.teacher-dashboard-v5 .teacher-launch-app-picker-v9 { padding: 7px 9px; border-radius: 11px; }
.teacher-dashboard-v5 .teacher-launch-app-picker-v9 select { min-height: 36px; }
.teacher-dashboard-v5 .teacher-launch-level-option-v10 .teacher-level-button-icon { width: 28px; height: 28px; }

.planner-purpose-grid,
.planner-strategy-grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.planner-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.planner-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-size: 0.9rem;
}

.planner-check input {
  width: 18px;
  height: 18px;
  accent-color: #6941c6;
}

.question-set-preview {
  border: 1px solid rgba(105, 65, 198, 0.22);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(245, 243, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.question-set-preview h3,
.question-set-preview p {
  margin: 0;
}

.question-set-preview h3 {
  font-size: 1rem;
  color: #42307d;
}

.question-set-preview p {
  margin-top: 6px;
  color: #475467;
  line-height: 1.45;
}

.question-set-preview ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #7a2e0e;
}

.question-set-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  margin: 14px 0 0;
  padding-left: 24px;
  color: #344054;
}

.question-set-preview-list li span {
  display: block;
  color: #667085;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .planner-filter-grid {
    grid-template-columns: 1fr;
  }

  .question-set-preview-list {
    grid-template-columns: 1fr;
  }
}
