/* Match packaging showroom client1.5: the artwork itself is the surface.
 * Explicit media selectors protect logos, certificates, transparent stage
 * cutouts and the full-bleed homepage hero. Captions and image content remain intact.
 */
:root { --yz-image-radius: 24px; }
@media (max-width: 760px) {
  :root { --yz-image-radius: 20px; }
}

/* Image-only viewports: clip animated layers at one shared outer edge. */
html body :is(
  .yz-proto-card, .yzp-poster, .home04-panorama,
  .packaging-editorial-media, .v3rf-development-body > figure, .yz-qm-image,
  .pzr-hero-canvas, .pzr-gallery-inner, .packaging-detail-visual,
  .hub-art, .hub-direction-art, .hub-format-art, .pc-art,
  .yz-design-preview, .pfv2-image, .pm-image-viewport,
  .px-formula-stage > figure, .px-texture-media > figure,
  .px-packaging-stage > figure, .px-quality-layout > figure,
  .sf-hero-visual, .sf-visual, .series-hero > figure,
  .series-product-card > figure, .mask-visual-grid > figure,
  .about-hero-media, .about-photo, .about-showroom,
  .mfgv1-media, .qcv1-media, .pdv1-media,
  .csv3-hero-visual > figure, .csv3-example-image,
  .csv3-workflow-intro > figure, .csv3-journal-card figure,
  .yzj-card-image, .yzj-featured-image, .yzj-hero-grid > figure,
  .yzj-figures > figure, .editorial-v2-hero-visual
) {
  border-radius: var(--yz-image-radius) !important;
  border: 0 !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the existing shadow. */
  overflow: hidden;
}

/* These figures also contain captions: round the photograph, not its text. */
html body :is(
  .pzr-entry, .pzr-finish-lead, .pzr-four > figure,
  .pzr-presentation-grid > figure, .pc-campaign,
  .hub-hero-worlds > a, .hub-product-index > a,
  .csv3-tab-picture, .series-selector
) > img,
html body :is(.yz-design-preview, .pc-art) img {
  border-radius: var(--yz-image-radius) !important;
  border: 0 !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the existing shadow. */
}

/* Artwork supplies its own dimensions: no fixed letterbox or decorative mat. */
html body :is(.yz-design-preview, .pc-art, .hub-format-art, .hub-direction-art) {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  background: transparent !important;
}
html body :is(.yz-design-preview, .pc-art, .hub-format-art, .hub-direction-art) img,
html body #hub-worlds .hub-product-index > a > img,
html body .about-photo > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  inline-size: 100% !important;
  block-size: auto !important;
  max-height: none !important;
  max-block-size: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: var(--yz-image-radius) !important;
}
html body .hub-format-art > .image-reveal__media {
  height: auto !important;
  background: transparent !important;
}
html body :is(.yz-design-card, .pc-campaign) {
  border: 0 !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the existing shadow. */
  background: transparent !important;
}

/* Homepage editorial rules use an ID and !important; override that exact scope.
 * The airless source is landscape, despite its historical portrait filename.
 * Intrinsic height avoids both letterboxing and cropping poster typography. */
html body[data-page="home"] #home-packaging.packaging-editorial-v2 .fc-material-panorama .packaging-editorial-media {
  display: block !important;
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
html body[data-page="home"] #home-packaging.packaging-editorial-v2 .fc-material-panorama img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: var(--yz-image-radius) !important;
  transform: none !important;
}

/* Packaging posters and the active hero layer determine their viewport height. */
html body #packaging-redesign.pzr-root .pzr-entry > img,
html body #packaging-redesign.pzr-root .packaging-detail-visual > img,
html body #packaging-redesign.pzr-root .pzr-gallery-layer > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: transparent !important;
  border-radius: var(--yz-image-radius) !important;
}
html body #packaging-redesign.pzr-root :is(.pzr-hero-canvas, .pzr-gallery-inner) {
  display: block !important;
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  background: transparent !important;
}
html body #packaging-redesign.pzr-root .pzr-gallery-layer {
  display: block !important;
  transform: none !important;
}
/* Both layers are active during a crossfade; only the selected one sizes the frame. */
html body #packaging-redesign.pzr-root .pzr-gallery-layer[aria-hidden="false"] { position: relative !important; }

/* Product material tabs already hide inactive figures. Remove their image caps. */
html body [data-product-materials] :is(.px-texture-media, .px-packaging-stage) img {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: transparent !important;
  border-radius: var(--yz-image-radius) !important;
}
html body [data-product-materials] :is(.px-texture-media, .px-packaging-stage) {
  background: transparent !important;
  box-shadow: none !important; /* taste-skill-ignore: removes the existing shadow. */
}

/* Caption-bearing figures must not round the caption in place of the image. */
html body :is(
  .v3rf-development-body > figure, .about-hero-media, .about-photo, .about-showroom,
  .px-packaging-stage > figure, .px-quality-layout > figure, .series-hero > figure,
  .pdv1-media-hero, .csv3-example-image, .csv3-workflow-intro > figure
) {
  border-radius: 0 !important;
  background: transparent !important;
}
html body :is(
  .v3rf-development-body > figure, .about-hero-media, .about-photo, .about-showroom,
  .px-packaging-stage > figure, .px-quality-layout > figure, .series-hero > figure,
  .pdv1-media-hero, .csv3-example-image, .csv3-workflow-intro > figure
) > img { border-radius: var(--yz-image-radius) !important; }
html body .about-showroom { padding: 0 !important; }

/* Balance the existing mosaic around the airless artwork's real 5:4 shape. */
@media (min-width: 801px) {
  html body[data-page="home"] #home-packaging.packaging-editorial-v2 .fc-material-panorama {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, .5fr)) !important;
  }
}

/* Product introductions also include wide sun-care and portrait scrub artwork. */
html body [data-product-materials] .pm-image-viewport {
  height: auto !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  background: transparent !important;
}
html body [data-product-materials] .pm-image-viewport img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: var(--yz-image-radius) !important;
}

/* A stage photo and its explanatory text are separate surfaces. Fixed heights
 * and the old 82px caption subtraction clipped the lower corners on later steps. */
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: transparent !important;
}
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure > .v3rf-w02-layer {
  position: absolute !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: var(--yz-image-radius) !important;
  transform: none !important;
}
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure > .v3rf-w02-layer.is-active {
  position: relative !important;
  display: block !important;
}
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure > .v3rf-w02-stage-note {
  position: relative !important;
  inset: auto !important;
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
}

/* picture/video elements need their own four corners when a caption follows. */
html body :is(.mfgv1-media, .qcv1-media, .pdv1-media) > :is(img, picture, video) {
  border-radius: var(--yz-image-radius) !important;
}
html body :is(.mfgv1-media, .qcv1-media, .pdv1-media) > picture { overflow: hidden; }
html body :is(.qcv1-illustrative-media, .qcv1-video-media) {
  border-radius: 0 !important;
  background: transparent !important;
}
html body .qcv1-video-media {
  height: auto !important;
  min-height: 0 !important;
  align-self: start;
}
/* A retired layer must not remain visible behind a shorter photo or its caption. */
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure > .v3rf-w02-layer:not(.is-active) {
  visibility: hidden !important;
}
html body[data-page="home"] #main #home-product-development
.v3rf-development .v3rf-development-body > figure > .v3rf-w02-layer.is-active {
  visibility: visible !important;
  opacity: 1 !important;
}
