/* Keep the rim proportional: small previews get a fine edge, reading images
   get a little more breathing room. Only explicitly marked content is styled. */
.content-image-frame {
  --image-rim: clamp(6px, 2.8%, 12px);
  --image-blur: 12px;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--image-rim);
  background: #f1f1ed;
}
.content-image-frame[data-image-variant="detail"],
.content-image-frame[data-image-variant="inline"] { --image-rim: clamp(8px, 2%, 14px); }
.content-image-frame[data-image-variant="thumb"] {
  --image-rim: clamp(3px, 3%, 5px);
  --image-blur: 6px;
}
.content-image-frame > img.content-image-source {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  border: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}
.content-image-frame > img.content-image-backdrop {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  border: 0;
  aspect-ratio: auto;
  object-fit: cover;
  filter: blur(var(--image-blur)) brightness(.82) saturate(.9);
  transform: scale(1.12);
  pointer-events: none;
  user-select: none;
}
.content-image-frame[hidden],
.content-image-frame > img[hidden] { display: none !important; }
.post-cover-frame {
  border-bottom: var(--line, 2px) solid var(--ink);
}
.post-cover-frame > img.content-image-source { height: auto; max-height: none; }
.image-preview > .content-image-frame {
  border: var(--ui-divider, 2px) solid var(--ink);
}
.recruit-gallery-main .content-image-frame {
  border: 0;
}
.recruit-gallery-main .content-image-frame > img.content-image-source { height: auto; }
.recruit-thumbnail-frame,
.upload-image-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.recruit-gallery-thumb { padding: 0; }
.upload-image-frame { aspect-ratio: 4 / 3; border-bottom: 2px solid var(--ink); }
.recruit-thumbnail-frame > img.content-image-source,
.upload-image-frame > img.content-image-source,
#recruit-image-previews .content-image-frame > img.content-image-source {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  aspect-ratio: auto;
  object-fit: contain;
}
#recruit-image-previews .content-image-frame > img.content-image-backdrop {
  height: 100%;
  border: 0;
  aspect-ratio: auto;
  object-fit: cover;
}
.portfolio-image-preview > .content-image-frame { width: fit-content; }
.portfolio-image-preview .content-image-source { width: auto; max-height: 300px; }
.image-viewer-stage > .image-viewer-frame {
  --image-rim: clamp(6px, 1vmin, 12px);
  flex: none;
  width: fit-content;
  max-width: none;
  transform-origin: center;
}
.image-viewer-frame > .content-image-source { max-width: none; max-height: none; }
.admin-event-thumb-frame {
  --image-rim: 3px;
  flex: none;
  width: 52px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd;
}
.admin-event-thumb-frame > img.content-image-source { width: 100%; height: 100%; background: transparent; }
.admin-poster-frame,
.admin-event-preview-frame,
.admin-review-image-frame { border: 1px solid #ddd; }
.admin-poster-frame > #poster-preview {
  width: 100%;
  height: auto;
  max-height: 380px;
  margin: 0;
  border: 0;
}
.admin-event-preview-frame > #preview-image { max-height: 500px; }
.admin-community-thumb-frame {
  height: 160px;
  display: grid;
  place-items: center;
  border: 1px solid #aaa;
}
.admin-community-body-frame { width: fit-content; margin: 16px 0; }
#community-review-view .content-image-frame > img {
  margin: 0;
  border: 0;
  background: transparent;
}
#community-review-view .admin-community-thumb-frame > .content-image-source { height: 100%; }
#community-review-view .admin-community-body-frame > .content-image-source { width: auto; max-width: 100%; height: auto; }
#community-review-view .content-image-frame > .content-image-backdrop { height: 100%; max-width: none; }
@media (max-width: 700px) {
  .poster-panel .admin-poster-frame {
    --image-rim: 4px;
    grid-row: 2 / 4;
    width: 110px;
  }
  .poster-panel .admin-poster-frame > #poster-preview {
    width: 100%;
    max-height: 150px;
    min-height: 90px;
  }
}
