/* Keep full-resolution article media inside the content column. */
.single-post :where(.wp-block-post-content, .entry-content) :where(img, video, iframe, embed, object, svg) {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Classic [caption width="..."] adds a large inline width to this wrapper. */
.single-post :where(.wp-block-post-content, .entry-content) .wp-caption {
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.single-post :where(.wp-block-post-content, .entry-content) .wp-caption.aligncenter {
  margin-inline: auto;
}

.single-post :where(.wp-block-post-content, .entry-content) .wp-caption :where(a, img) {
  display: block;
  max-width: 100% !important;
}

.single-post :where(.wp-block-post-content, .entry-content) .wp-caption img {
  width: auto;
  height: auto !important;
  margin-inline: auto;
}

.single-post :where(.wp-block-post-content, .entry-content) .wp-caption-text {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Normal image blocks stay constrained; intentional wide/full alignment remains available. */
.single-post :where(.wp-block-post-content, .entry-content) figure.wp-block-image:not(.alignwide):not(.alignfull) {
  max-width: 100%;
  box-sizing: border-box;
}

.single-post :where(.wp-block-post-content, .entry-content) img.size-full {
  max-width: 100% !important;
  height: auto !important;
}
