.input-field {
  width: 100%;
  max-width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  padding: 0.625rem 1rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.input-field:focus {
  border-color: #0062FF;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.2);
}

.flex > .input-field,
.flex > .editor-link-input-wrap {
  min-width: 0;
}

main {
  min-width: 0;
  overflow-x: clip;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background-color: #0062FF;
  padding: 0.625rem 1.25rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s;
}
.btn-primary:hover { background-color: #0052d9; }
.btn-primary:disabled { opacity: 0.5; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 2px solid #39CC39;
  background-color: white;
  padding: 0.625rem 1.25rem;
  font-weight: 700;
  color: #39CC39;
  transition: background-color 0.15s;
}
.btn-secondary:hover { background-color: #f0fdf4; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background-color: #dc2626;
  padding: 0.5rem 1rem;
  font-weight: 700;
  color: white;
  transition: background-color 0.15s;
}
.btn-danger:hover { background-color: #b91c1c; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  transition: background-color 0.15s;
}
.btn-ghost:hover { background-color: #f1f5f9; }

.editor-nav .btn-ghost .fa-solid {
  font-size: 0.875rem;
  line-height: 1;
}

.checkbox-field {
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 0.25rem;
  border-color: #cbd5e1;
  accent-color: #0062FF;
}

.card {
  background-color: white;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

/* Landing page hero */
.landing-hero {
  position: relative;
  width: 100%;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  overflow: hidden;
}

.landing-hero__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(165deg, #f0f7ff 0%, #eef6ff 48%, #ecfdf5 100%);
  border-bottom: 1px solid #e2e8f0;
  pointer-events: none;
}

.landing-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.landing-hero__orb--blue {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(0, 98, 255, 0.3) 0%, transparent 70%);
}

.landing-hero__orb--green {
  width: 24rem;
  height: 24rem;
  bottom: -6rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(57, 204, 57, 0.24) 0%, transparent 70%);
}

.landing-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 98, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 98, 255, 0.04) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  opacity: 0.85;
}

.landing-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  max-width: 56rem;
  margin: 0 auto 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .landing-hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.landing-hero__content {
  text-align: center;
}

@media (min-width: 900px) {
  .landing-hero__content {
    text-align: left;
  }
}

.landing-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 98, 255, 0.2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 1.25rem;
}

.landing-hero__badge-icon {
  width: 0.875rem;
  height: 0.875rem;
  color: #0062FF;
}

.landing-hero__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.12;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.landing-hero__title-accent {
  display: block;
  background: linear-gradient(135deg, #0062FF 0%, #39CC39 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero__subtitle {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #475569;
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

@media (min-width: 900px) {
  .landing-hero__subtitle {
    margin-left: 0;
    margin-right: 0;
  }
}

.landing-hero__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

@media (min-width: 900px) {
  .landing-hero__highlights {
    justify-content: flex-start;
  }
}

.landing-hero__highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.landing-hero__highlight-icon {
  width: 1rem;
  height: 1rem;
  color: #39CC39;
  flex-shrink: 0;
}

.landing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 900px) {
  .landing-hero__actions {
    justify-content: flex-start;
  }
}

.landing-hero__cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 0.85rem;
  border: none;
  background: linear-gradient(135deg, #0062FF 0%, #0052d9 100%);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 98, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-hero__cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 98, 255, 0.38);
}

.landing-hero__cta-primary:active {
  transform: translateY(0);
}

.landing-hero__cta-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.landing-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.landing-hero__cta-secondary:hover {
  background: #fff;
  border-color: #0062FF;
  color: #0062FF;
}

.landing-hero__cta-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s;
}

.landing-hero__cta-secondary:hover .landing-hero__cta-arrow {
  transform: translateX(3px);
}

.landing-hero__visual {
  position: relative;
  display: none;
}

@media (min-width: 900px) {
  .landing-hero__visual {
    display: block;
  }
}

.landing-hero__preview {
  border-radius: 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(0, 98, 255, 0.06);
  overflow: hidden;
  transform: perspective(800px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.35s ease;
}

.landing-hero__preview:hover {
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg) translateY(-4px);
}

.landing-hero__preview-header {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.landing-hero__preview-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.landing-hero__preview-dot:first-child { background: #f87171; }
.landing-hero__preview-dot:nth-child(2) { background: #fbbf24; }
.landing-hero__preview-dot:nth-child(3) { background: #4ade80; }

.landing-hero__preview-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.landing-hero__preview-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.landing-hero__preview-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.landing-hero__preview-question {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.landing-hero__preview-qnum {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.375rem;
  background: #eff6ff;
  color: #0062FF;
  font-size: 0.75rem;
  font-weight: 800;
}

.landing-hero__preview-options {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.landing-hero__preview-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.8125rem;
  color: #475569;
}

.landing-hero__preview-option.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.landing-hero__preview-radio {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
}

.landing-hero__preview-option.is-selected .landing-hero__preview-radio {
  border-color: #0062FF;
  background: #0062FF;
  box-shadow: inset 0 0 0 2px #fff;
}

.landing-hero__preview-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
}

.landing-hero__preview-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
}

.landing-hero__preview-score-value {
  font-size: 1.125rem;
  font-weight: 800;
  color: #15803d;
}

.landing-hero__preview-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  animation: landingHeroFloat 4s ease-in-out infinite;
}

.landing-hero__preview-float svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.landing-hero__preview-float--link {
  top: 12%;
  left: -8%;
  color: #1d4ed8;
}

.landing-hero__preview-float--link svg {
  color: #0062FF;
}

.landing-hero__preview-float--check {
  bottom: 8%;
  right: -6%;
  color: #166534;
  animation-delay: -2s;
}

.landing-hero__preview-float--check svg {
  color: #39CC39;
}

@keyframes landingHeroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.landing-hero__steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .landing-hero__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.landing-hero__step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-hero__step:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.landing-hero__step-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
}

.landing-hero__step-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.landing-hero__step-icon--blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #0062FF;
}

.landing-hero__step-icon--green {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #16a34a;
}

.landing-hero__step-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.landing-hero__step-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.landing-hero__step-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero__cta-primary,
  .landing-hero__preview,
  .landing-hero__step {
    transition: none;
  }

  .landing-hero__preview-float {
    animation: none;
  }
}

/* Public quiz waterfall gallery (home page) */
.public-quiz-waterfall {
  width: 100%;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-top: 1px solid #e2e8f0;
}

.public-quiz-waterfall__header {
  max-width: 48rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.public-quiz-waterfall__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  scroll-margin-top: 5.5rem;
}

.public-quiz-waterfall__subtitle {
  color: #475569;
  font-size: 1rem;
}

.public-quiz-waterfall__empty {
  text-align: center;
  color: #475569;
  font-size: 0.875rem;
}

.public-quiz-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  margin-bottom: 1.5rem;
}

.public-quiz-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.public-quiz-category-chip:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.public-quiz-category-chip.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.public-quiz-category-chip__count {
  font-weight: 500;
  opacity: 0.85;
}

.my-quizzes-panel {
  display: flex;
  flex-direction: column;
}

.my-quizzes-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.my-quizzes-panel--has-toolbar .my-quizzes-panel__section {
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  margin-top: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.my-quizzes-panel--has-toolbar .my-quizzes-panel__toolbar {
  border-bottom: 1px solid #f1f5f9;
  box-shadow: none;
}

.my-quiz-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-quiz-list--compact .my-quiz-item {
  padding-bottom: 0.5rem;
}

.my-quiz-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  min-width: 0;
}

.my-quiz-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.my-quiz-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.my-quiz-item__title {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  line-height: 1.35;
}

.my-quiz-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.my-quiz-item__date {
  margin: 0;
}

.my-quiz-item__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}

.my-quiz-item__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.my-quiz-item__generating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0062FF;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 0.65rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.my-quiz-item__generating:hover {
  background: #dbeafe;
}

.quiz-play-url-copy.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.my-quiz-item__action .fa-solid {
  font-size: 0.875rem;
  line-height: 1;
}

.filter-dropdown {
  position: relative;
  flex: 1 1 10rem;
  min-width: min(100%, 9.5rem);
  max-width: 16rem;
}

.filter-dropdown__trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.35rem 0.5rem;
  width: 100%;
  padding: 0.3rem 0.45rem 0.3rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font: inherit;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.filter-dropdown__trigger:hover,
.filter-dropdown.is-open .filter-dropdown__trigger {
  background-color: #fff;
  border-color: #cbd5e1;
}

.filter-dropdown.is-open .filter-dropdown__trigger {
  box-shadow: 0 0 0 2px rgba(0, 98, 255, 0.12);
}

.filter-dropdown__prefix {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}

.filter-dropdown__value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-dropdown__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 1.1rem;
  text-align: right;
}

.filter-dropdown__chevron {
  display: block;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.filter-dropdown.is-open .filter-dropdown__chevron {
  transform: rotate(180deg);
}

.filter-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  max-height: 14rem;
  overflow-y: auto;
}

.filter-dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.filter-dropdown__option:hover {
  background-color: #f1f5f9;
}

.filter-dropdown__option.is-selected {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.filter-dropdown__option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-dropdown__option-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.filter-dropdown__option.is-selected .filter-dropdown__option-count {
  color: #3b82f6;
}

.scoring-mode-dropdown {
  position: relative;
  width: 100%;
  max-width: 26rem;
}

.scoring-mode-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.scoring-mode-row__mode,
.scoring-strictness-field {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: none;
}

.scoring-mode-row__mode {
  display: flex;
  flex-direction: column;
}

.scoring-strictness-field {
  display: none !important;
}

.scoring-strictness-field.is-visible {
  display: flex !important;
  flex-direction: column;
}

.scoring-mode-row .scoring-mode-dropdown {
  max-width: none;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scoring-mode-row .scoring-mode-dropdown__trigger {
  flex: 1;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .scoring-mode-row__mode,
  .scoring-strictness-field {
    flex: 1 1 100%;
    max-width: none;
  }
}

.scoring-mode-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%);
  font: inherit;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.scoring-mode-dropdown__trigger:hover,
.scoring-mode-dropdown.is-open .scoring-mode-dropdown__trigger {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.1);
}

.scoring-mode-dropdown__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #eff6ff;
  color: #2563eb;
  flex-shrink: 0;
}

.scoring-mode-dropdown__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.scoring-mode-dropdown__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.scoring-mode-dropdown__subtitle {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

.scoring-mode-dropdown__chevron {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.scoring-mode-dropdown.is-open .scoring-mode-dropdown__chevron {
  transform: rotate(180deg);
}

.scoring-mode-dropdown__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.scoring-mode-dropdown__option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s;
}

.scoring-mode-dropdown__option:hover {
  background: #f8fafc;
}

.scoring-mode-dropdown__option.is-selected {
  background: #eff6ff;
}

.scoring-mode-dropdown__option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: #f1f5f9;
  color: #475569;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.scoring-mode-dropdown__option-icon--ai {
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  color: #7c3aed;
}

.scoring-mode-dropdown__option.is-selected .scoring-mode-dropdown__option-icon {
  background: #dbeafe;
  color: #2563eb;
}

.scoring-mode-dropdown__option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.scoring-mode-dropdown__option-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}

.scoring-mode-dropdown__option-subtitle {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.35;
}

.question-short-text-scoring {
  margin-bottom: 1rem;
}

.simple-scoring-callout {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.65rem;
  background: #eff6ff;
  color: #1e3a5f;
}

.simple-scoring-callout__block {
  display: flex;
  gap: 0.65rem;
}

.simple-scoring-callout__block.is-hidden {
  display: none;
}

.simple-scoring-callout.is-hidden {
  display: none;
}

.simple-scoring-callout__icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #2563eb;
  font-size: 1rem;
  line-height: 1;
}

.simple-scoring-callout__title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1e40af;
}

.simple-scoring-callout__paths {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.simple-scoring-callout__path {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.simple-scoring-callout__path-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2563eb;
}

.simple-scoring-callout__path-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #334155;
}

.simple-scoring-callout__or {
  display: flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
}

.settings-scoring-mode-field .simple-scoring-callout {
  margin-top: 0.65rem;
}

.keyword-chip-field {
  width: 100%;
}

.keyword-chip-field__surface {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.125rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #f8fafc;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.keyword-chip-field__chips {
  display: contents;
}

.keyword-chip-field__surface:focus-within {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 98, 255, 0.08);
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.15rem 0.35rem 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.keyword-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.keyword-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 0.625rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.keyword-chip__remove:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.keyword-chip-field__input {
  flex: 1 1 6rem;
  min-width: 5.5rem;
  padding: 0.15rem 0.25rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  color: #0f172a;
  outline: none;
}

.keyword-chip-field__input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.keyword-chip-field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #94a3b8;
}

.settings-scoring-mode-field .wizard-label {
  margin-bottom: 0.5rem;
}

.public-quiz-waterfall__grid {
  column-count: 1;
  column-gap: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
}

@media (min-width: 640px) {
  .public-quiz-waterfall__grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .public-quiz-waterfall__grid {
    column-count: 3;
  }
}

@media (min-width: 1280px) {
  .public-quiz-waterfall__grid {
    column-count: 4;
  }
}

@media (min-width: 1600px) {
  .public-quiz-waterfall__grid {
    column-count: 5;
  }
}

@media (min-width: 1920px) {
  .public-quiz-waterfall__grid {
    column-count: 6;
  }
}

.public-quiz-waterfall__item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  display: inline-block;
  width: 100%;
}

.public-quiz-card {
  display: flex;
  flex-direction: column;
  height: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-quiz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.quiz-audience-badges {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding-left: 2px;
  padding-right: 2px;
  max-width: 100%;
  box-sizing: border-box;
}

.quiz-audience-badges--compact {
  margin-bottom: 0.375rem;
}

.quiz-audience-badges > li {
  display: flex;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.quiz-audience-badges .quiz-audience-badge {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-sizing: border-box;
  padding-left: 0.33rem;
  padding-right: 0.33rem;
  line-height: 1.25;
  max-width: 100%;
}

.quiz-audience-badge__icon {
  display: block;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  flex: 0 0 1rem;
  color: #64748b;
}

.quiz-audience-badges svg.quiz-audience-badge__icon {
  width: 1rem;
  height: 1rem;
  overflow: visible;
}

.quiz-audience-badge__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-quiz-card .quiz-audience-badges {
  margin-bottom: 0.5rem;
}

.public-quiz-card__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.public-quiz-card--tall {
  min-height: 22rem;
  padding: 2rem 1.75rem;
}

.public-quiz-card--medium {
  min-height: 16rem;
  padding: 1.75rem 1.5rem;
}

.public-quiz-card--short {
  min-height: 11rem;
  padding: 1.25rem 1.25rem;
}

.public-quiz-card__title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.public-quiz-card--tall .public-quiz-card__title {
  font-size: 1.375rem;
}

.public-quiz-card--medium .public-quiz-card__title {
  font-size: 1.125rem;
}

.public-quiz-card--short .public-quiz-card__title {
  font-size: 1rem;
}

.public-quiz-card__description {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1rem;
  flex: 1;
}

.public-quiz-card--tall .public-quiz-card__description {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-quiz-card--medium .public-quiz-card__description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-quiz-card--short .public-quiz-card__description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-quiz-card__meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.public-quiz-card__cta {
  margin-top: auto;
  width: 100%;
  font-size: 0.875rem;
}

/* Local fallbacks for brand utility classes if Tailwind CDN is slow/unavailable */
.text-brand-blue { color: #0062FF; }
.text-brand-green { color: #39CC39; }
.border-brand-green { border-color: #39CC39; }
.border-brand-blue\/20 { border-color: rgba(0, 98, 255, 0.2); }
.bg-blue-50\/50 { background-color: rgba(239, 246, 255, 0.5); }

/* Professional editor system */
main.editor-page-main {
  max-width: 56rem;
}

.editor-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.editor-shell > * {
  min-width: 0;
  max-width: 100%;
}

#question-list,
#question-cards {
  min-width: 0;
  max-width: 100%;
}

.question-card form {
  min-width: 0;
  max-width: 100%;
}

.editor-header {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 5.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.editor-title {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
}

.editor-subtitle {
  margin-top: 0.35rem;
  min-height: 1.35rem;
  color: #475569;
  font-size: 0.95rem;
}

.editor-nav {
  margin-bottom: 0;
}

.editor-notices {
  display: grid;
  gap: 1rem;
}

.editor-notices:empty {
  display: none;
}

#quiz-readiness-banner:empty {
  display: none;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
}

.editor-toolbar h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.question-insert-slot {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
  min-height: 2.25rem;
}

.question-insert-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.question-insert-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
  opacity: 1;
}

.question-insert-actions {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.question-insert-actions__questions,
.question-insert-actions__media {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
}

.question-insert-actions__divider {
  display: block;
  width: 1px;
  height: 1.35rem;
  background: #cbd5e1;
  flex-shrink: 0;
  margin: 0 0.1rem;
}

.question-insert-type-btn--media {
  color: #0f766e;
}

.question-insert-slot:hover .question-insert-actions,
.question-insert-actions:focus-within {
  opacity: 1;
}

.question-insert-slot:hover .question-insert-label {
  color: #475569;
}

.question-insert-type-btn {
  position: relative;
  color: #1d4ed8;
}

.question-insert-type-btn .fa-solid {
  font-size: 0.95rem;
  line-height: 1;
}

.has-instant-tooltip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.55rem;
  border-radius: 0.4rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 30;
}

.has-instant-tooltip[data-tooltip]:hover::after,
.has-instant-tooltip[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.question-type-locked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.question-type-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.question-type-locked-hint {
  font-size: 0.8rem;
  color: #64748b;
}

.editor-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.25rem;
}

.mb3 {
  margin-top: 0.75rem;
}

.question-card {
  border-radius: 0.9rem;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  padding: 1rem 1rem 1.1rem;
  min-width: 0;
}

.question-card-top {
  margin-bottom: 0.85rem;
}

.question-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
}

.question-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.question-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  flex: 1;
}

.question-position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.question-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
}

.question-type-badge .fa-solid {
  font-size: 0.72rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.question-type-badge--single {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.question-type-badge--multiple {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.question-type-badge--matching {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.question-type-badge--short_text {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.question-type-badge--media {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #be185d;
}

.question-type-header-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.question-type-header-option {
  position: relative;
  cursor: pointer;
}

.question-type-header-option .question-type-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.question-type-header-option-content {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.question-type-header-option-content .fa-solid {
  font-size: 0.72rem;
}

.question-type-header-option:hover .question-type-header-option-content {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.question-type-header-option .question-type-input:checked + .question-type-header-option-content {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.question-type-header-option .question-type-input:focus-visible + .question-type-header-option-content {
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.2);
}

.question-card-toggle {
  cursor: pointer;
  margin-bottom: 0.35rem;
}

.question-preview-wrap {
  min-width: 0;
  width: 100%;
}

.question-preview-text {
  margin-top: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.question-preview-text.is-empty {
  color: #94a3b8;
  font-style: italic;
}

.question-card-body {
  overflow: hidden;
  min-width: 0;
  max-height: 1400px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
}

.question-card.is-collapsed .question-card-body {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.question-card.is-collapsed {
  padding-bottom: 0.85rem;
}

.question-controls {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: center;
}

.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  min-width: 2rem;
  border-radius: 0.6rem;
  border: 1px solid #dbe4ef;
  background: #fff;
  color: #475569;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0 0.55rem;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-mini:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-mini-danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-mini-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.btn-mini-icon {
  width: 2rem;
  min-width: 2rem;
  padding: 0;
}

.btn-mini-icon .fa-solid {
  font-size: 0.85rem;
  line-height: 1;
}

.btn-mini-collapse .collapse-icon-closed {
  display: none;
}

.question-card.is-collapsed .btn-mini-collapse .collapse-icon-open {
  display: none;
}

.question-card.is-collapsed .btn-mini-collapse .collapse-icon-closed {
  display: inline-block;
}

.question-section-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  font-weight: 700;
}

.question-type-group {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.question-type-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #334155;
  font-size: 0.92rem;
}

.question-type-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.question-type-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.question-type-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.question-type-chip-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 4rem;
  border-radius: 0.8rem;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.question-type-chip-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.question-type-chip-subtitle {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.2;
}

.mono-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  color: currentColor;
}

.question-type-chip:hover .question-type-chip-content {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.question-type-input:checked + .question-type-chip-content {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.question-type-input:focus-visible + .question-type-chip-content {
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.2);
}

.ai-generate-wrap {
  display: none;
}

.ai-generate-wrap.is-visible {
  display: block;
}

.ai-generate-wrap.is-entering {
  animation: aiGenerateWrapIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ai-generate-wrap.is-entering .ai-generate-prominent {
  animation: aiGenerateBtnIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both,
    aiGenerateBtnGlow 1.15s ease-in-out 0.2s 1;
}

@keyframes aiGenerateWrapIn {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aiGenerateBtnIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes aiGenerateBtnGlow {
  0%,
  100% {
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.16);
  }
  50% {
    box-shadow: 0 8px 22px rgba(29, 78, 216, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-generate-wrap.is-entering,
  .ai-generate-wrap.is-entering .ai-generate-prominent {
    animation: none;
  }
}

.ai-generate-prominent {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid #1d4ed8;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.16);
}

.ai-generate-prominent:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .question-type-segmented {
    grid-template-columns: 1fr;
  }

  .question-card-header-row {
    flex-wrap: wrap;
  }

  .question-controls {
    margin-left: auto;
  }

  .question-type-header-toggle {
    width: 100%;
  }
}

.option-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  padding: 0.5rem 0.6rem;
  background: #fff;
  min-width: 0;
}

.autogrow-field {
  display: grid;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: #fff;
  border-radius: 0.75rem;
}

.autogrow-field > textarea,
.autogrow-field > .autogrow-mirror {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.35;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.autogrow-field > .autogrow-mirror {
  visibility: visible;
  pointer-events: none;
  border-color: transparent;
  color: #1e293b;
  z-index: 1;
  background: transparent;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.autogrow-field > textarea {
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #1e293b;
  z-index: 2;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.autogrow-field > textarea:focus {
  border-color: #0062FF;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.2);
}

.autogrow-field > textarea::placeholder {
  color: #94a3b8;
}

.option-text-input {
  min-height: 2.5rem;
  max-height: 12rem;
}

.question-text-input {
  min-height: 2.75rem;
  max-height: 16rem;
}

.short-text-reference-input,
.acceptable-text-input {
  min-height: 1.75rem;
  max-height: 12rem;
}

.reference-answer-field {
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0062ff;
  border-radius: 0.8rem;
  padding: 0.3rem 0.45rem;
  background: #fff;
}

.reference-answer-field .autogrow-field {
  background: transparent;
}

.reference-answer-field .autogrow-field > textarea,
.reference-answer-field .autogrow-field > .autogrow-mirror {
  border-color: transparent;
  padding: 0.15rem 0.25rem;
  font-size: 0.875rem;
  line-height: 1.3;
}

.reference-answer-field .autogrow-field > textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.reference-answer-field:focus-within {
  border-color: #0062ff;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.08);
}

.reference-answer-field__hint,
.acceptable-answer-rows__hint {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.acceptable-answer-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.acceptable-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  padding: 0.3rem 0.45rem;
  background: #fff;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.acceptable-answer-row .autogrow-field {
  background: transparent;
}

.acceptable-answer-row .autogrow-field > textarea,
.acceptable-answer-row .autogrow-field > .autogrow-mirror {
  border-color: transparent;
  padding: 0.15rem 0.25rem;
  font-size: 0.875rem;
  line-height: 1.3;
}

.acceptable-answer-row .autogrow-field > textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.acceptable-answer-row:focus-within {
  border-color: #0062ff;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.08);
}

.add-acceptable-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.answer-rows-wrapper {
  position: relative;
  border-radius: 0.8rem;
  min-width: 0;
}

.answer-rows-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: rgba(148, 163, 184, 0.32);
  backdrop-filter: blur(1px);
  z-index: 10;
}

.answer-rows-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 3px solid #cbd5e1;
  border-top-color: #1d4ed8;
  animation: answerRowsSpin 0.85s linear infinite;
}

.answer-rows-wrapper.is-loading .answer-rows {
  opacity: 0.45;
}

.answer-rows-wrapper.is-loading .answer-rows-overlay {
  display: flex;
}

@keyframes answerRowsSpin {
  to {
    transform: rotate(360deg);
  }
}

.option-correct-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  border: 1px solid #d1fae5;
  background: #f0fdf4;
  color: #166534;
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.option-remove-btn {
  color: #64748b;
}

.option-remove-btn:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.editor-empty {
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  padding: 1.25rem;
  color: #64748b;
  background: #f8fafc;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-neutral {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.status-saving {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.status-error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.has-pending-review-badge {
  position: relative;
}

.pending-review-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 2px solid #ffffff;
  pointer-events: none;
}

.editor-question-nav {
  position: fixed;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  max-height: min(70vh, calc(100vh - 8rem));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem;
  border-radius: 0.85rem;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.editor-question-nav::-webkit-scrollbar {
  width: 4px;
}

.editor-question-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.editor-question-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.editor-question-nav__entry {
  margin: 0;
  padding: 0;
}

.editor-question-nav__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 11.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.editor-question-nav__item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

.editor-question-nav__item:focus-visible {
  outline: 2px solid #0062ff;
  outline-offset: 2px;
}

.editor-question-nav__item.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.editor-question-nav__index {
  flex-shrink: 0;
  min-width: 1.25rem;
  font-weight: 800;
  color: inherit;
}

.editor-question-nav__type-icon {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.8;
  color: inherit;
}

.editor-question-nav__media-icon {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.75;
  color: inherit;
}

.editor-question-nav__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: inherit;
}

/* Compact mode: numbers only (JS-driven or narrow viewport) */
.editor-question-nav.is-compact {
  padding: 0.3rem;
  max-height: min(50vh, calc(100vh - 10rem));
}

.editor-question-nav.is-compact .editor-question-nav__list {
  gap: 0.15rem;
}

.editor-question-nav.is-compact .editor-question-nav__item {
  justify-content: center;
  max-width: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 9999px;
}

.editor-question-nav.is-compact .editor-question-nav__label,
.editor-question-nav.is-compact .editor-question-nav__media-icon,
.editor-question-nav.is-compact .editor-question-nav__type-icon {
  display: none;
}

.editor-question-nav.is-compact .editor-question-nav__index {
  min-width: 0;
  font-size: 0.7rem;
}

/* Expand compact nav on hover / keyboard focus */
.editor-question-nav.is-compact:hover,
.editor-question-nav.is-compact:focus-within {
  z-index: 55;
  padding: 0.35rem;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.editor-question-nav.is-compact:hover .editor-question-nav__list,
.editor-question-nav.is-compact:focus-within .editor-question-nav__list {
  gap: 0.2rem;
}

.editor-question-nav.is-compact:hover .editor-question-nav__item,
.editor-question-nav.is-compact:focus-within .editor-question-nav__item {
  justify-content: flex-start;
  max-width: 11.5rem;
  width: 100%;
  height: auto;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
}

.editor-question-nav.is-compact:hover .editor-question-nav__label,
.editor-question-nav.is-compact:focus-within .editor-question-nav__label {
  display: block;
}

.editor-question-nav.is-compact:hover .editor-question-nav__type-icon,
.editor-question-nav.is-compact:focus-within .editor-question-nav__type-icon,
.editor-question-nav.is-compact:hover .editor-question-nav__media-icon,
.editor-question-nav.is-compact:focus-within .editor-question-nav__media-icon {
  display: inline-block;
}

.editor-question-nav.is-compact:hover .editor-question-nav__index,
.editor-question-nav.is-compact:focus-within .editor-question-nav__index {
  min-width: 1.25rem;
  font-size: inherit;
}

@media (max-width: 1023px) {
  .editor-question-nav {
    right: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editor-question-nav__item {
    transition: none;
  }
}

.floating-add-anchor {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.floating-add-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.floating-add-panel.is-open {
  display: flex;
}

.floating-add-actions {
  opacity: 1;
}

.floating-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.floating-add-btn:hover {
  background: #eff6ff;
}

.floating-add-anchor.is-visible .floating-add-trigger {
  animation: floating-add-appear 900ms cubic-bezier(0.2, 0.75, 0.25, 1),
             floating-add-pulse 1200ms ease-in-out 900ms 2;
}

@keyframes floating-add-appear {
  0% {
    transform: translateY(10px) scale(0.96);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes floating-add-pulse {
  0%, 100% {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(29, 78, 216, 0.14), 0 12px 26px rgba(15, 23, 42, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .question-insert-actions,
  .floating-add-btn {
    transition: none;
  }

  .floating-add-anchor.is-visible .floating-add-trigger {
    animation: none;
  }
}

.editor-link-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.editor-link-input {
  padding-right: 2.65rem;
}

.editor-eye-btn {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  background: #fff;
}

#copy-editor-link-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quiz-countdown-float {
  position: fixed;
  top: 5.2rem;
  right: 1.25rem;
  z-index: 70;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1e3a8a;
  border-radius: 0.85rem;
  padding: 0.55rem 0.75rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 0.1rem;
  min-width: 8.5rem;
}

.quiz-countdown-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
}

.quiz-countdown-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.quiz-countdown-expired {
  font-size: 0.72rem;
  font-weight: 600;
  color: #b91c1c;
  margin-top: 0.15rem;
}

.quiz-countdown-float.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.completion-attempt {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.completion-attempt--pending {
  border-left: 3px solid #dc2626;
}

.results-ai-scoring__track {
  margin-top: 0.25rem;
}

.results-ai-scoring__bar {
  transition: width 0.35s ease;
}

.completion-attempt__summary {
  display: grid;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  align-items: center;
}

.completion-attempt__summary::-webkit-details-marker {
  display: none;
}

.completion-attempt__identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.completion-attempt__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.completion-attempt__duration {
  color: inherit;
}

.completion-attempt__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.completion-attempt__scores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.completion-attempt__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.completion-attempt__chevron {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.completion-attempt[open] .completion-attempt__chevron {
  transform: rotate(180deg);
}

.completion-attempt__body {
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

.completion-question-row {
  min-width: 0;
  overflow-wrap: anywhere;
}

.completion-question-row .flex-1 {
  min-width: 0;
}

@media (min-width: 721px) {
  .completion-attempt__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .completion-attempt__identity {
    grid-column: 1;
    grid-row: 1;
  }

  .completion-attempt__meta {
    grid-column: 1;
    grid-row: 2;
  }

  .completion-attempt__stats {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
}

.completion-duration--limit {
  color: #b91c1c;
  font-weight: 600;
}

.completion-duration-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 999px;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .my-quiz-item__action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .my-quiz-item__action {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
  }

  .floating-add-anchor {
    right: 0.9rem;
    bottom: 0.9rem;
  }

  .floating-add-btn {
    padding: 0.65rem 0.9rem;
  }

  .quiz-countdown-float {
    top: 4.8rem;
    right: 0.9rem;
  }
}

.profile-dropdown {
  position: relative;
}

.profile-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: white;
  padding: 0.375rem 0.625rem 0.375rem 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.profile-dropdown-trigger:hover,
.profile-dropdown.is-open .profile-dropdown-trigger {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.profile-dropdown.is-open .profile-dropdown-trigger {
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.15);
}

.profile-dropdown-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background-color: #0062FF;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.profile-dropdown-name {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-chevron {
  display: block;
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  flex: 0 0 1rem;
  color: #64748b;
  transition: transform 0.15s;
}

.profile-dropdown.is-open .profile-dropdown-chevron {
  transform: rotate(180deg);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 50;
  min-width: 11rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: white;
  padding: 0.375rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.profile-dropdown-item {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  transition: background-color 0.15s;
}

.profile-dropdown-item:hover {
  background-color: #f1f5f9;
}

.profile-dropdown-item-danger {
  color: #b91c1c;
}

.profile-dropdown-item-danger:hover {
  background-color: #fef2f2;
}

.profile-dropdown-logout-form {
  margin: 0;
  padding: 0;
}

.profile-dropdown-logout-form button {
  border: none;
  background: none;
  cursor: pointer;
}

@media (max-width: 480px) {
  .profile-dropdown-name {
    display: none;
  }

  .profile-dropdown-trigger {
    padding: 0.375rem;
  }
}

.quiz-play-url-copy {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.125rem 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  color: #0062FF;
  transition: color 0.15s;
}

.quiz-play-url-copy:hover {
  color: #0052d9;
}

.quiz-play-url-copy.is-copied {
  color: #15803d;
}

.quiz-play-url-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-play-url-icon {
  display: inline-flex;
  flex: 0 0 1rem;
  color: currentColor;
}

.quiz-play-url-icon[hidden] {
  display: none;
}

.quiz-play-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.quiz-play-header__content {
  flex: 1 1 12rem;
  min-width: 0;
}

.quiz-play-edit-btn {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 2px solid #0062FF;
  background-color: #fff;
  padding: 0.4375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0062FF;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 98, 255, 0.12);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.quiz-play-edit-btn:hover {
  background-color: #eff6ff;
  border-color: #0052d9;
  color: #0052d9;
}

/* Quiz start screen */
.quiz-start-hero {
  margin-bottom: 1.75rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 98, 255, 0.15);
  background: linear-gradient(135deg, #f0f7ff 0%, #eef6ff 52%, #f0fdf4 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.quiz-start-hero__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.quiz-start-hero__content {
  flex: 1 1 12rem;
  min-width: 0;
}

.quiz-start-hero__title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

@media (min-width: 768px) {
  .quiz-start-hero__title {
    font-size: 2rem;
  }
}

.quiz-start-hero__category {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0062FF;
}

.quiz-start-hero__badges {
  margin-top: 0.5rem;
}

.quiz-start-hero__description {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
}

.quiz-start-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.quiz-start-meta__item {
  display: inline-flex;
  align-items: center;
  padding: 0.3125rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 98, 255, 0.12);
}

.quiz-start-meta__item--warning {
  color: #b45309;
  background-color: #fffbeb;
  border-color: rgba(245, 158, 11, 0.25);
}

.quiz-start-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .quiz-start-layout {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    align-items: start;
  }

  .quiz-start-layout--form-only {
    grid-template-columns: minmax(0, 22rem);
  }

  .quiz-start-layout__form {
    order: 2;
  }

  .quiz-start-layout__preview {
    order: 1;
  }
}

.quiz-start-form-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
}

@media (min-width: 768px) {
  .quiz-start-form-card {
    position: sticky;
    top: 1rem;
  }
}

.quiz-start-form-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.quiz-start-form-card__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4375rem;
  border-radius: 0.625rem;
  color: #0062FF;
  background-color: #eff6ff;
}

.quiz-start-form-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.quiz-start-form-card__subtitle {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  color: #64748b;
}

.quiz-start-form-card__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.quiz-start-form-card__hint {
  font-size: 0.8125rem;
  color: #64748b;
}

.quiz-start-form-card__cta {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 1.0625rem;
  padding: 0.75rem 1.5rem;
}

.quiz-start-preview {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.quiz-start-preview__heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.quiz-start-preview__note {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.quiz-start-preview__list {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-start-preview__item {
  display: flex;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #334155;
}

.quiz-start-preview__item--media {
  display: block;
  padding: 0;
  background: transparent;
  border: none;
}

.quiz-start-preview__item--media .quiz-media-block {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.quiz-start-preview__number {
  flex-shrink: 0;
  font-weight: 700;
  color: #0062FF;
}

.quiz-start-preview__text {
  min-width: 0;
}

/* Wizard */
.wizard-shell {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  gap: 1.5rem;
}

.wizard-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hero */
.wizard-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 98, 255, 0.15);
  background: linear-gradient(135deg, #f0f7ff 0%, #eef6ff 52%, #f0fdf4 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wizard-hero__text {
  max-width: 38rem;
}

.wizard-hero__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid rgba(0, 98, 255, 0.2);
  color: #0062FF;
  box-shadow: 0 4px 12px rgba(0, 98, 255, 0.12);
}

.wizard-hero__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.wizard-hero__title {
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

.wizard-hero__subtitle {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #475569;
}

/* Step progress */
.wizard-progress {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  padding: 0 0.25rem;
}

.wizard-progress-steps {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.wizard-progress-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  color: #64748b;
  font-weight: 800;
  font-size: 0.875rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.wizard-progress-num {
  line-height: 1;
}

.wizard-progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.2;
  transition: color 0.2s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-progress-step.is-active .wizard-progress-dot {
  border-color: #0062FF;
  color: #0062FF;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.12);
}

.wizard-progress-step.is-active .wizard-progress-label {
  color: #0062FF;
}

.wizard-progress-step.is-complete .wizard-progress-dot {
  border-color: #39CC39;
  color: #fff;
  background: #39CC39;
}

.wizard-progress-step.is-complete .wizard-progress-label {
  color: #15803d;
}

.wizard-progress-step.is-generating .wizard-progress-dot {
  border-color: #0062FF;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.12);
}

.wizard-progress-step.is-generating .wizard-progress-label {
  color: #0062FF;
}

.wizard-progress-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #0062FF;
  animation: wizardProgressPulse 1.2s ease-in-out infinite;
}

@keyframes wizardProgressPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.wizard-progress-connector {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2px;
  margin-top: 1.1rem;
  background: #e2e8f0;
  border-radius: 1px;
  transition: background 0.25s;
}

.wizard-progress-connector.is-filled {
  background: linear-gradient(90deg, #39CC39, #0062FF);
}

@media (min-width: 480px) {
  .wizard-progress-connector {
    width: 3.5rem;
  }

  .wizard-progress-label {
    font-size: 0.8125rem;
  }
}

/* Panels & forms */
.wizard-panel {
  width: 100%;
  max-width: none;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.wizard-panel--step1 {
  padding: 1.65rem 1.85rem;
}

.wizard-panel__header {
  margin-bottom: 1.25rem;
}

.wizard-panel__header--centered {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.wizard-panel__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-panel__lead {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.wizard-field-grid {
  display: grid;
  gap: 1rem;
}

.wizard-field-grid--2col {
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .wizard-field-grid--2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Step 1: single-card, vertically stacked sections (standard wizard pattern) */
.wizard-step1-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wizard-step-section {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.wizard-step-section-divider {
  height: 1px;
  margin: 1.35rem 0;
  background: #e2e8f0;
  border: none;
}

.wizard-step-section__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-step-section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wizard-step-section__lead {
  margin: -0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.wizard-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.wizard-optional-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.wizard-required-mark {
  color: #dc2626;
  font-weight: 800;
  margin-left: 0.1rem;
}

.wizard-hint--optional-note {
  margin: -0.35rem 0 0;
  text-align: center;
  color: #64748b;
}

.wizard-content-divider--optional {
  margin-top: 0.15rem;
}

.wizard-source-upload--optional {
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.wizard-source-upload--optional.has-files {
  border-style: solid;
  border-color: rgba(57, 204, 57, 0.35);
  background: #f7fef7;
}

.wizard-audience-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .wizard-audience-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.35rem;
    align-items: start;
  }

  .wizard-audience-row > .wizard-field {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    gap: 0.35rem;
    min-width: 0;
  }
}

.wizard-audience-hints {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.1rem;
}

.wizard-audience-hints .wizard-hint {
  margin: 0;
}

.wizard-step-section .wizard-field select,
.wizard-step-section .wizard-field input,
.wizard-step-section .wizard-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wizard-hint--block {
  margin: 0;
  padding-top: 0.1rem;
}

.wizard-field {
  display: grid;
  gap: 0.35rem;
}

.wizard-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
}

.wizard-label--secondary {
  font-weight: 600;
  color: #64748b;
}

.wizard-hint {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}

.wizard-hint--ai {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #1d4ed8;
}

.wizard-field-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin: 0;
}

.wizard-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.wizard-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.wizard-alert-list {
  margin: 0;
  padding-left: 1.1rem;
}

.wizard-age-block {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.wizard-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.75rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  transition: border-color 0.15s, background 0.15s;
}

.wizard-checkbox-row--inline {
  margin-bottom: 0;
  padding: 0.35rem 0;
  border: none;
  background: transparent;
}

.wizard-checkbox-row--inline:hover {
  background: transparent;
}

.wizard-checkbox-row:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.wizard-age-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  transition: opacity 0.2s;
}

.wizard-age-fields .wizard-field {
  min-width: 0;
}

.wizard-age-fields.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.wizard-field.is-disabled select {
  color: #94a3b8;
  cursor: not-allowed;
  background-color: #f8fafc;
  border-color: #e2e8f0;
  pointer-events: none;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.wizard-actions--split,
.wizard-actions--bar {
  justify-content: space-between;
}

.wizard-actions--bar {
  flex-direction: row-reverse;
}

.wizard-actions--bar .btn-primary {
  min-width: 9.5rem;
}

.wizard-skip-btn {
  font-size: 0.875rem;
}

.wizard-btn-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Step 2 intro & choices */
.wizard-step-intro {
  width: 100%;
  max-width: none;
}

.wizard-step-intro--centered {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.wizard-step-intro__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-step-intro__lead {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

/* Path toggle (Manual / AI) */
.wizard-path-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
}

.wizard-path-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #dbe4ef;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.wizard-path-tab:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.wizard-path-tab.is-active {
  border-color: rgba(0, 98, 255, 0.45);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 4px 16px rgba(0, 98, 255, 0.1);
}

.wizard-path-tab__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid rgba(0, 98, 255, 0.2);
}

.wizard-path-tab__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
}

.wizard-path-tab__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.wizard-path-tab__icon--manual {
  background: #f1f5f9;
  color: #475569;
}

.wizard-path-tab__icon--ai {
  background: #eff6ff;
  color: #0062FF;
}

.wizard-path-tab__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding-right: 3.5rem;
}

.wizard-path-tab:first-child .wizard-path-tab__text {
  padding-right: 0;
}

.wizard-path-tab__title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-path-tab__subtitle {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

.wizard-path-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.wizard-path-panel--ai {
  border-color: rgba(0, 98, 255, 0.18);
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

.wizard-path-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  margin-bottom: 0.85rem;
}

.wizard-path-panel__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.wizard-path-panel__icon--manual {
  background: #f1f5f9;
  color: #475569;
}

.wizard-path-panel__title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-path-panel__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.wizard-path-panel__form {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.wizard-path-panel--ai .wizard-path-panel__form {
  margin-top: 0;
}

.wizard-path-panel__btn {
  width: 100%;
  margin-top: 0.25rem;
}

.wizard-path-panel__btn--primary {
  box-shadow: 0 8px 20px rgba(0, 98, 255, 0.22);
}

.wizard-content-source {
  display: grid;
  gap: 0.85rem;
}

.wizard-source-mode {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid rgba(0, 98, 255, 0.2);
}

.wizard-source-mode--files {
  color: #15803d;
  background: #dcfce7;
  border-color: rgba(57, 204, 57, 0.25);
}

.wizard-source-mode--both {
  color: #7c3aed;
  background: #ede9fe;
  border-color: rgba(124, 58, 237, 0.2);
}

.wizard-content-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wizard-content-divider::before,
.wizard-content-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.wizard-gen-settings {
  display: grid;
  gap: 1rem;
}

.wizard-gen-settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .wizard-gen-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wizard-gen-settings__title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-upload-status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0062FF;
}

.wizard-type-grid--count-only .wizard-type-row--count-only {
  grid-template-columns: 1fr auto;
}

.wizard-source-file-item.is-uploading {
  opacity: 0.7;
}

.wizard-source-file-item.is-uploading .wizard-source-file-item__meta::after {
  content: "…";
  margin-left: 0.25rem;
}

.wizard-source-upload {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.wizard-source-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.1rem 1rem;
  min-height: auto;
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  color: #475569;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.wizard-source-dropzone:hover,
.wizard-source-dropzone:focus-visible,
.wizard-source-dropzone.is-dragover {
  border-color: #0062ff;
  background: #eff6ff;
  outline: none;
}

.wizard-source-dropzone.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.wizard-source-dropzone__text {
  font-size: 0.875rem;
  font-weight: 600;
}

.wizard-source-dropzone__hint {
  font-size: 0.75rem;
  color: #94a3b8;
}

.wizard-source-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.wizard-source-file-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.wizard-source-file-item__body {
  flex: 1;
  min-width: 0;
}

.wizard-source-file-item__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-source-file-item__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #64748b;
}

.wizard-source-file-item__preview {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.wizard-source-truncated-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
}

.wizard-source-file-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.35rem;
}

.wizard-source-file-remove:hover {
  color: #dc2626;
  background: #fef2f2;
}

.wizard-topic-chip--sources {
  max-width: min(100%, 20rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-type-panel {
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.wizard-type-summary {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.4;
  transition: color 0.2s;
}

.wizard-type-summary--valid {
  color: #475569;
}

.wizard-type-summary--error {
  color: #dc2626;
}

.wizard-question-count-field {
  position: relative;
  border-radius: 0.65rem;
  transition: box-shadow 0.2s ease;
}

.wizard-question-count-field.wizard-limit-attention {
  animation: wizardLimitShake 0.5s ease-in-out;
}

.wizard-question-count-field.wizard-limit-attention .input-field {
  border-color: #0062ff;
  animation: wizardLimitInputGlow 1.4s ease-out 2;
}

.wizard-question-count-field.wizard-limit-attention .wizard-label {
  color: #0062ff;
  animation: wizardLimitLabelPulse 1.4s ease-out 2;
}

.wizard-question-count-field.wizard-limit-attention::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 0.75rem;
  border: 2px solid rgba(0, 98, 255, 0.55);
  pointer-events: none;
  animation: wizardLimitRing 1.4s ease-out 2;
}

@keyframes wizardLimitShake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px); }
  36% { transform: translateX(5px); }
  54% { transform: translateX(-4px); }
  72% { transform: translateX(4px); }
  90% { transform: translateX(-2px); }
}

@keyframes wizardLimitInputGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 98, 255, 0);
  }
  35% {
    box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.28);
  }
  70% {
    box-shadow: 0 0 0 2px rgba(0, 98, 255, 0.12);
  }
}

@keyframes wizardLimitLabelPulse {
  0%, 100% { opacity: 1; }
  35% { opacity: 1; transform: scale(1.02); }
  70% { opacity: 0.92; transform: scale(1); }
}

@keyframes wizardLimitRing {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  25% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-question-count-field.wizard-limit-attention {
    animation: none;
  }

  .wizard-question-count-field.wizard-limit-attention .input-field {
    animation: none;
    box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.22);
  }

  .wizard-question-count-field.wizard-limit-attention .wizard-label {
    animation: none;
  }

  .wizard-question-count-field.wizard-limit-attention::before {
    animation: none;
    opacity: 1;
  }
}

.wizard-type-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.wizard-type-dot--single {
  background: #0062FF;
}

.wizard-type-dot--multiple {
  background: #39CC39;
}

.wizard-type-dot--matching {
  background: #a855f7;
}

.wizard-type-dot--short-text {
  background: #f59e0b;
}

.wizard-step-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.wizard-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0062FF;
  text-decoration: none;
  transition: color 0.15s;
}

.wizard-back-link:hover {
  color: #0052d9;
  text-decoration: underline;
}

.wizard-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border-color: rgba(0, 98, 255, 0.22);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(240, 253, 244, 0.5) 100%);
}

.wizard-banner__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid rgba(0, 98, 255, 0.2);
  color: #0062FF;
}

.wizard-banner__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.wizard-banner__text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #334155;
  margin: 0;
}

.wizard-banner__link {
  font-weight: 700;
  color: #0062FF;
  text-decoration: none;
  white-space: nowrap;
}

.wizard-banner__link:hover {
  text-decoration: underline;
}

/* Wizard progressive generation */
.wizard-generating {
  width: 100%;
  max-width: none;
}

.wizard-generating__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.wizard-generating__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.wizard-generating__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.wizard-generating__subtitle {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.wizard-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid rgba(0, 98, 255, 0.2);
  word-break: break-word;
}

.wizard-generating-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  padding-right: 0.25rem;
  scroll-behavior: smooth;
}

.wizard-generating-list::-webkit-scrollbar {
  width: 6px;
}

.wizard-generating-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.wizard-generating-progress-wrap {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.wizard-generating-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
}

.wizard-generating-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.wizard-generating-pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #0062FF;
  animation: wizardProgressPulse 1.2s ease-in-out infinite;
}

.wizard-generating-count {
  font-variant-numeric: tabular-nums;
  color: #0062FF;
}

.wizard-generating-count-sep {
  color: #94a3b8;
  font-weight: 600;
  margin: 0 0.1rem;
}

.wizard-generating-progress-track {
  height: 0.625rem;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
}

.wizard-generating-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0062FF, #39CC39);
  transition: width 0.45s ease;
  box-shadow: 0 0 12px rgba(0, 98, 255, 0.35);
}

.wizard-generating--boot .wizard-generating-progress-track {
  position: relative;
}

.wizard-generating--boot .wizard-generating-progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 45%,
    transparent 90%
  );
  background-size: 200% 100%;
  animation: wizard-generating-shimmer 1.8s linear infinite;
  pointer-events: none;
}

@keyframes wizard-generating-shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.wizard-generating--boot .wizard-generating-progress-bar {
  transition: none;
}

.wizard-generating--done .wizard-generating-pulse-dot {
  display: none;
}

.wizard-generating--done .wizard-generating-progress-bar {
  box-shadow: 0 0 12px rgba(57, 204, 57, 0.35);
}

.wizard-generating-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 0.85rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  animation: wizardDoneReveal 0.4s ease-out both;
}

@keyframes wizardDoneReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-generating-done__icon {
  color: #15803d;
}

.wizard-generating-done__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.wizard-generating-done__text {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #166534;
  margin: 0;
}

.wizard-generating-loader {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.wizard-generating-loader[hidden] {
  display: none;
}

.wizard-generating-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #cbd5e1;
  border-top-color: #0062FF;
  border-radius: 50%;
  animation: wizardSpin 0.8s linear infinite;
}

@keyframes wizardSpin {
  to { transform: rotate(360deg); }
}

.wizard-generating-error {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
}

.wizard-generating-error[hidden],
.wizard-generating-done[hidden] {
  display: none;
}

.wizard-generated-question {
  animation: wizardQuestionReveal 0.55s ease-out both;
  border-color: #e2e8f0;
}

.wizard-generated-question:hover {
  border-color: #cbd5e1;
}

@keyframes wizardQuestionReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-type-grid {
  display: grid;
  gap: 0.75rem;
}

.wizard-type-row {
  display: grid;
  gap: 0.35rem;
}

@media (min-width: 480px) {
  .wizard-type-row {
    grid-template-columns: 7rem 1fr;
    align-items: center;
  }
}

.wizard-type-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.wizard-type-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.wizard-type-count {
  width: 4.5rem;
  min-width: 4.5rem;
}

.wizard-type-percent {
  width: 4.5rem;
  min-width: 4.5rem;
}

.wizard-type-unit {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.wizard-generated-question-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.wizard-generated-question-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border-radius: 0.375rem;
  padding: 0.125rem 0.5rem;
}

.wizard-generated-question-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0062FF;
}

.wizard-generated-question-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
}

.wizard-generated-question-text {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.wizard-generated-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.wizard-generated-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #334155;
}

.wizard-generated-option.is-correct {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
  font-weight: 600;
}

.wizard-generated-option-mark {
  flex-shrink: 0;
  font-weight: 800;
}

.wizard-description-editor {
  position: relative;
}

.wizard-description-loader {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.wizard-description-loader__content {
  display: grid;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}

.wizard-description-loader__content p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.wizard-description-progress-track {
  width: 100%;
}

.wizard-description-loader[hidden] {
  display: none;
}

textarea.wizard-description-loading {
  opacity: 0.45;
  pointer-events: none;
}

.wizard-generated-skeleton {
  position: relative;
  overflow: hidden;
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.wizard-skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.65) 50%,
    transparent 60%
  );
  animation: wizardSkeletonShimmer 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wizardSkeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.wizard-skeleton-line {
  height: 0.75rem;
  border-radius: 0.375rem;
  background: #e2e8f0;
  margin-bottom: 0.5rem;
}

.wizard-skeleton-line-short {
  width: 35%;
}

.wizard-skeleton-line-badge {
  width: 22%;
  margin-left: auto;
}

.wizard-skeleton-line-title {
  height: 1rem;
  width: 88%;
  margin: 0.75rem 0 1rem;
}

.wizard-skeleton-options {
  display: grid;
  gap: 0.35rem;
}

.wizard-skeleton-caption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.question-options-panel.is-hidden,
.question-matching-panel.is-hidden,
.question-short-text-panel.is-hidden {
  display: none;
}

.match-pair-fields {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.match-pair-arrow {
  flex-shrink: 0;
  color: #64748b;
  font-weight: 700;
}

.match-pair-row .match-pair-fields .autogrow-field {
  flex: 1;
  min-width: 0;
}

.matching-question {
  position: relative;
}

.matching-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 0.5rem 1.25rem;
}

.matching-column-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0;
}

.matching-column-label--left {
  grid-column: 1;
  grid-row: 1;
}

.matching-column-label--right {
  grid-column: 2;
  grid-row: 1;
}

.matching-column-hint {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
}

.matching-rows {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  min-height: 4rem;
}

.matching-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.matching-row-cell {
  min-height: 3.25rem;
  display: flex;
  align-items: stretch;
}

.matching-row-card-slot {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 3.25rem;
}

.matching-row-card-slot:empty::before {
  content: '';
  display: block;
  flex: 1;
  min-height: 3.25rem;
  border: 2px dashed #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.matching-lines {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: #0062ff;
  overflow: visible;
  z-index: 2;
}

.matching-drop-zone,
.matching-drag-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-sizing: border-box;
}

/* Fixed left anchors — not draggable */
.matching-drop-zone {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.matching-drop-zone.is-drag-over,
.matching-drop-zone.is-pending {
  border-color: #0062ff;
  background: #e8f1ff;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.12);
}

.matching-drop-zone.is-filled {
  border-color: #64748b;
  background: #e2e8f0;
}

.matching-drop-zone.is-aligned {
  border-color: #0062ff;
  background: #dbeafe;
  box-shadow: inset 3px 0 0 #0062ff;
}

/* Draggable right cards */
.matching-drag-card {
  gap: 0.5rem;
  background: #fff;
  border: 2px solid #93c5fd;
  box-shadow: 0 1px 3px rgba(0, 98, 255, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s,
    opacity 0.15s,
    transform 0.28s ease;
}

.matching-drag-ghost {
  position: fixed;
  z-index: 9999;
  margin: 0;
  pointer-events: none;
  opacity: 0.95;
  box-shadow: 0 10px 28px rgba(0, 98, 255, 0.22);
  transform: scale(1.02);
}

.matching-card-grip {
  flex-shrink: 0;
  width: 0.35rem;
  height: 1.25rem;
  pointer-events: none;
  border-radius: 0.2rem;
  background: repeating-linear-gradient(
    to bottom,
    #93c5fd 0,
    #93c5fd 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.9;
}

.matching-card-text {
  flex: 1;
  font-weight: 600;
  color: #1e40af;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.matching-drag-card:active {
  cursor: grabbing;
}

.matching-drag-card.is-dragging {
  opacity: 0.4;
  box-shadow: none;
  cursor: grabbing;
}

.matching-drag-card.is-connected {
  border-color: #39cc39;
  background: #f0fdf4;
  box-shadow: 0 1px 3px rgba(57, 204, 57, 0.15);
}

.matching-drag-card.is-connected .matching-card-text {
  color: #166534;
}

.matching-drag-card.is-connected .matching-card-grip {
  background: repeating-linear-gradient(
    to bottom,
    #86efac 0,
    #86efac 2px,
    transparent 2px,
    transparent 4px
  );
}

.matching-drag-card.is-selectable {
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.25);
  border-color: #0062ff;
}

.matching-zone-label {
  font-weight: 600;
  color: #334155;
}

.wizard-generated-pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
}

.wizard-generated-pair-row {
  display: contents;
}

.wizard-generated-pair-left,
.wizard-generated-pair-right {
  padding: 0.25rem 0;
}

.wizard-type-dot--matching {
  background: #8b5cf6;
}

/* Quiz settings page */
.settings-page .settings-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.settings-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.settings-layout {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .settings-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.settings-layout__col {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.settings-section {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.settings-section__header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.settings-section__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: #eff6ff;
  color: #0062ff;
  font-size: 1rem;
}

.settings-section__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.settings-section__lead {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

.settings-field-grid--dates,
.settings-field-grid--audience {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .settings-field-grid--audience {
    grid-template-columns: 1fr;
  }
}

.settings-checkbox-title {
  display: block;
  font-weight: 700;
}

.settings-checkbox-hint {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
}

.settings-visibility-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.settings-visibility-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.settings-visibility-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.settings-visibility-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.settings-visibility-option:has(input:checked),
.settings-visibility-option.is-selected {
  border-color: #0062ff;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(0, 98, 255, 0.15);
}

.settings-visibility-option input[type="radio"] {
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  margin: 0;
  accent-color: #0062ff;
}

.settings-visibility-option__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
}

.settings-visibility-option:has(input:checked) .settings-visibility-option__icon,
.settings-visibility-option.is-selected .settings-visibility-option__icon {
  background: #dbeafe;
  color: #0062ff;
}

.settings-visibility-option__content {
  display: grid;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.settings-visibility-option__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.settings-visibility-option__hint {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #64748b;
}

.settings-share-panel .card {
  margin-bottom: 0;
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
}

.settings-share-panel h2 {
  font-size: 0.95rem;
}

.settings-inline-action {
  margin: 0.35rem 0 0;
}

#max-attempts-per-user-wrap.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.settings-save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  position: sticky;
  bottom: 0.75rem;
  z-index: 10;
}

/* Media blocks (editor + play) */
.media-card .question-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.media-card-thumb {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.media-editor-preview__img {
  display: block;
  max-width: 100%;
  max-height: 16rem;
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.media-upload-zone {
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
}

.media-upload-label {
  display: block;
  cursor: pointer;
}

.media-upload-label__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.media-upload-input {
  display: block;
  width: 100%;
  font-size: 0.875rem;
}

.quiz-media-block {
  text-align: center;
}

.quiz-media-block__img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 0.75rem;
}

.quiz-media-block__caption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #475569;
  text-align: center;
}
