/* Works media frames follow the complete source image rather than a mismatched
   fixed crop. Hero, feature and background layouts are marked separately. */
html body.weiyaworks.weiya-visual .media.weiya-native-frame {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  aspect-ratio: var(--weiya-image-ratio) !important;
}
/* The catalogue's original grid rule is more specific than the shared frame. */
html body.weiyaworks.weiya-visual .main-project-gallery .main-project-gallery-card .media.weiya-native-frame {
  aspect-ratio: var(--weiya-image-ratio) !important;
}
/* Confine the moving thumbnail strip to its own slider at tablet widths. */
html body.weiyaworks.weiya-frame-fill .latest-work-slider {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
html body.weiyaworks.weiya-visual .media.weiya-native-frame > picture,
html body.weiyaworks.weiya-visual .media.weiya-native-frame > img,
html body.weiyaworks.weiya-visual .media.weiya-native-frame > picture > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  clip-path: none !important;
}
/* Legacy padding-based card frames must not add a second empty frame. */
html body.weiyaworks.weiya-visual .main-project-gallery[data-style="grid-style"] .main-project-gallery-card .media-link:has(.weiya-native-frame),
html body.weiyaworks.weiya-visual .project-card .media-wrap:has(.weiya-native-frame),
html body.weiyaworks.weiya-visual .news-card .media-wrap:has(.weiya-native-frame) {
  height: auto !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* A tall studio sculpture need not become a multi-screen image on a wide page.
   This only bounds its display size; its complete original pixels remain visible. */
html body.weiyaworks.weiya-visual .project-gallery .media.weiya-native-frame[data-weiya-orientation="portrait"] {
  max-width: min(100%, 760px, calc(88vh * var(--weiya-image-aspect))) !important;
  margin-inline: auto !important;
}
html body.weiyaworks.weiya-visual .project-gallery .gallery-item:has(.weiya-native-frame) {
  min-height: 0 !important;
  height: auto !important;
  align-self: flex-start !important;
}
/* Override the old detail-gallery height:auto rule with enough specificity. */
html body.weiyaworks.weiya-visual .project-gallery .media.weiya-native-frame > img.weiya-complete-image,
html body.weiyaworks.weiya-visual .project-gallery .media.weiya-native-frame > picture > img.weiya-complete-image {
  height: 100% !important;
  aspect-ratio: auto !important;
}
/* The scene itself supplies the full hero rectangle on every screen. */
html body.weiyaworks.weiya-frame-fill .section-topbannerhome {
  height:auto!important; min-height:0!important; aspect-ratio:1672/941;
}
html body.weiyaworks.weiya-frame-fill .homepage_top_swiper,
html body.weiyaworks.weiya-frame-fill .homepage_top_swiper .media {
  height:100%!important; min-height:0!important;
}
html body.weiyaworks.weiya-frame-fill .top-banner-home{
 position:absolute!important;inset:0!important;box-sizing:border-box;
 height:100%!important;min-height:0!important;
}
html body.weiyaworks.weiya-frame-fill .latest-work{bottom:24px!important}
html body.weiyaworks.weiya-frame-fill .layout-background-media,
html body.weiyaworks.weiya-frame-fill .section-featureproject {
  height:auto!important; min-height:0!important;
  aspect-ratio:var(--weiya-scene-ratio,1672/941)!important;
}
html body.weiyaworks.weiya-frame-fill .section-project-top .media,
html body.weiyaworks.weiya-frame-fill .section-topbanner .media,
html body.weiyaworks.weiya-frame-fill .section-article-top .media {
  height:auto!important; min-height:0!important;
  aspect-ratio:var(--weiya-image-ratio)!important;
}
html body.weiyaworks.weiya-frame-fill .section-project-top,
html body.weiyaworks.weiya-frame-fill .section-topbanner,
html body.weiyaworks.weiya-frame-fill .section-article-top {min-height:0!important}
@media(max-width:767px){
 html body.weiyaworks.weiya-frame-fill .section-topbannerhome{
  display:flex!important;flex-direction:column;aspect-ratio:auto;
  padding:88px 0 0!important;box-sizing:border-box;
 }
 html body.weiyaworks.weiya-frame-fill .homepage_top_swiper{
  position:relative!important;inset:auto!important;order:0;width:100%;
  height:auto!important;aspect-ratio:1672/941;
 }
 html body.weiyaworks.weiya-frame-fill .top-banner-home{
  position:relative!important;inset:auto!important;order:1;padding:24px 6vw;
  width:100%!important;height:auto!important;min-height:0!important;box-sizing:border-box;
 }
 html body.weiyaworks.weiya-frame-fill .top-banner-home__heading-wrap{
  position:relative!important;inset:auto!important;margin:0 0 24px;
 }
 html body.weiyaworks.weiya-frame-fill .top-banner-home__heading{font-size:34px;line-height:1.1}
 html body.weiyaworks.weiya-frame-fill .latest-work{position:relative!important;inset:auto!important;margin:0;width:100%!important}
 html body.weiyaworks.weiya-frame-fill .layout-background-media{aspect-ratio:auto!important}
 html body.weiyaworks.weiya-frame-fill .layout-background-media>.media{
  position:relative!important;inset:auto!important;height:auto!important;
  aspect-ratio:var(--weiya-image-ratio)!important;
 }
}
