.question-renderer,
.question-renderer-content {
  color: inherit;
}

.question-renderer-title {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
}

.question-renderer-title .question-renderer-content,
.question-renderer-content {
  display: flow-root;
}

.question-renderer-content img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  vertical-align: top;
  cursor: zoom-in;
}

.question-renderer-content video {
  display: block;
  width: min(100%, 760px);
  max-width: 100%;
  margin: 14px auto;
  border-radius: 8px;
}

.question-renderer-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.question-renderer-content td,
.question-renderer-content th {
  border: 1px solid var(--line, #e5e7eb);
  padding: 8px;
  vertical-align: top;
}

.question-renderer-content pre,
.question-renderer-content code {
  font-family: Consolas, "Courier New", monospace;
}

.question-renderer-content pre {
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}

.question-renderer-content .question-image {
  display: block;
  width: 100%;
  margin: 12px 0;
  text-align: center;
}

.question-renderer-content .question-image.align-left { text-align: left; }
.question-renderer-content .question-image.align-center { text-align: center; }
.question-renderer-content .question-image.align-right { text-align: right; }

.question-renderer-content .question-image img {
  display: inline-block;
  width: var(--question-image-width, auto);
  max-width: 100%;
  margin: 0;
}

.question-renderer-content .question-image-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: 100%;
  margin: 12px 0;
}

.question-renderer-content .question-image-row .question-image-item {
  flex: 0 1 auto;
  max-width: 48%;
  margin: 0;
}

.question-renderer-content .question-image-row .question-image-item img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.question-renderer-content .question-image-layout {
  display: grid;
  gap: 16px;
  align-items: start;
  margin: 12px 0;
}

.question-renderer-content .question-image-layout.layout-horizontal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-renderer-content .question-image-layout.layout-large-left {
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
}

.question-renderer-content [data-width="25%"] img,
.question-renderer-content img[data-width="25%"] { width: 25%; }
.question-renderer-content [data-width="50%"] img,
.question-renderer-content img[data-width="50%"] { width: 50%; }
.question-renderer-content [data-width="75%"] img,
.question-renderer-content img[data-width="75%"] { width: 75%; }
.question-renderer-content [data-width="100%"] img,
.question-renderer-content img[data-width="100%"] { width: 100%; }

.question-renderer-options {
  margin-top: 12px;
}

.question-renderer-option.preview-option {
  padding: 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 768px) {
  .question-renderer-content .question-image-row {
    flex-direction: column;
  }

  .question-renderer-content .question-image-row .question-image-item {
    max-width: 100%;
    width: 100%;
  }
}
