.cms-image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  min-height: 260px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--site-canvas);
  color: var(--site-text-color);
  padding: 1.4rem;
  text-align: center;
}

.cms-image-placeholder span {
  max-width: 18rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.cms-image-placeholder-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--site-muted-color);
}

.cms-responsive-picture {
  display: block;
  max-width: 100%;
}

.cms-responsive-picture > img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.public-image-block {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--site-canvas);
  color: var(--site-text-color);
}

.public-video-block {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #000000;
  color: #ffffff;
}

.public-image-block .cms-responsive-picture,
.public-image-block img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.public-image-block .cms-responsive-picture > img {
  max-height: 560px;
  object-fit: cover;
}

.cms-image-view-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.cms-image-view-trigger > :is(img, .cms-responsive-picture) {
  pointer-events: none;
}

.cms-image-view-trigger:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.cms-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(8px);
}

.cms-image-viewer__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(96vw, 1440px);
  max-height: min(92vh, 980px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #080b12;
  color: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.cms-image-viewer__toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 11, 18, 0.94);
}

.cms-image-viewer__button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.cms-image-viewer__button:hover,
.cms-image-viewer__button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.cms-image-viewer__button-icon {
  width: 2.25rem;
  padding-inline: 0;
}

.cms-image-viewer__stage {
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.cms-image-viewer__stage img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 7rem);
  object-fit: contain;
}

.cms-image-viewer__stage.is-zoomed {
  overflow: auto;
  place-items: start center;
}

.cms-image-viewer__stage.is-zoomed img {
  max-width: none;
  max-height: none;
}

.cms-image-viewer__caption {
  margin: 0;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.public-video-block video {
  display: block;
  width: 100%;
  min-height: var(--cms-block-min-height, 320px);
  max-height: 640px;
  background: #000000;
  object-fit: cover;
}

.public-image-block figcaption {
  color: var(--ink-muted);
  padding: 0.8rem 1rem;
}

.public-image-block.variant-bordered {
  border: 1px solid var(--line-strong);
}

.public-image-block.variant-polaroid {
  overflow: visible;
  border: 1px solid rgba(16, 19, 24, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #101318;
  padding: clamp(0.65rem, 1.4vw, 1.2rem) clamp(0.65rem, 1.4vw, 1.2rem) clamp(1.1rem, 2.2vw, 2rem);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.16);
}

.public-image-block.variant-polaroid img {
  border-radius: 4px;
}

.public-image-block.variant-polaroid figcaption {
  color: #38434f;
  padding: 0.85rem 0 0;
  text-align: center;
}

:root[data-site-theme=dark] .public-image-block.variant-polaroid,
:root[data-site-theme=light] .public-image-block.variant-polaroid {
  border: 1px solid rgba(16, 19, 24, 0.14);
  background: #ffffff;
  color: #101318;
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.16);
}

:root[data-site-theme=dark] .public-image-block.variant-polaroid figcaption,
:root[data-site-theme=light] .public-image-block.variant-polaroid figcaption {
  color: #38434f;
}

.cms-site-avatar-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cms-site-avatar-block > .cms-responsive-picture,
.cms-site-avatar-block > img,
.cms-site-avatar-block > span:first-child {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--site-canvas);
  color: var(--site-text-color);
  font-weight: 900;
  object-fit: cover;
}

.cms-site-avatar-block > .cms-responsive-picture > img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: cover;
}

.cms-site-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cms-block-gap, 1rem);
}

.cms-site-image-gallery.layout-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cms-site-image-gallery.layout-four-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cms-site-image-gallery.layout-stacked {
  grid-template-columns: 1fr;
}

.cms-site-image-gallery figure {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
}

.cms-site-image-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.cms-site-image-gallery figcaption {
  color: var(--site-muted-color);
  font-size: 0.86rem;
  font-weight: 650;
}

.public-image-block.layout-contained {
  width: min(var(--site-narrow-width), 100vw - var(--site-edge-gap) * 2);
}

.public-image-block.layout-full-bleed {
  width: 100%;
  border-radius: 0;
  border-inline: 0;
}

.public-video-block.layout-contained {
  width: min(var(--site-narrow-width), 100vw - var(--site-edge-gap) * 2);
}

.public-video-block.layout-full-bleed {
  width: 100%;
  border-radius: 0;
  border-inline: 0;
}

.public-image-block[style*="max-width:100%"],
.public-image-block[style*="max-width: 100%"],
.public-image-block[style*="max-width:100vw"],
.public-image-block[style*="max-width: 100vw"],
.public-video-block[style*="max-width:100%"],
.public-video-block[style*="max-width: 100%"],
.public-video-block[style*="max-width:100vw"],
.public-video-block[style*="max-width: 100vw"] {
  width: 100%;
}

@media (max-width: 960px) {
  .cms-site-image-gallery,
  .cms-site-image-gallery.layout-two-column,
  .cms-site-image-gallery.layout-three-column,
  .cms-site-image-gallery.layout-four-column {
    grid-template-columns: 1fr;
  }
  .public-video-block video {
    min-height: 0 !important;
    max-height: 420px;
    aspect-ratio: 16/9;
  }
  .cms-image-viewer {
    padding: 0.5rem;
  }
  .cms-image-viewer__panel {
    width: 100%;
    max-height: 94vh;
  }
  .cms-image-viewer__toolbar {
    justify-content: space-between;
  }
  .cms-image-viewer__button span {
    display: none;
  }
}
