.theme-image {
  margin: var(--space-lg) 0;
}

.theme-image-variant {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.theme-image figcaption {
  margin-top: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.theme-image-render-error {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  background-color: var(--surface-muted);
}

html[data-theme="dark"] .theme-image-light {
  display: none;
}

html[data-theme="light"] .theme-image-dark {
  display: none;
}

@media (prefers-color-scheme: light) {
html:not([data-theme]) .theme-image-dark {
  display: none;
}
}

@media (prefers-color-scheme: dark) {
html:not([data-theme]) .theme-image-light {
  display: none;
}
}