/* =============================================
   Ver.1382 - Fixed output thumbnail contracts
   - Representative thumbnails: fixed 147x200 portrait output box.
   - Cover thumbnails: fixed 320x216 landscape output box.
   - This mirrors image-service style URLs such as ?w=147&h=200: the UI box
     stays consistent even when original images have different intrinsic ratios.
   ============================================= */
:root{
  --javyun-rep-output-ratio:147 / 200;
  --javyun-cover-output-ratio:320 / 216;
}

/* Representative image thumbnails: HOME latest/recommended. */
html body.page-home .home .home-workgrid > .home-worktile,
html body.public-dark.page-home .home .home-workgrid > .home-worktile{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  min-height:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
}

html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img,
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img,
html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img.is-wd-matte-trimmed,
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img.is-wd-matte-trimmed,
html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode],
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode]{
  position:relative !important;
  display:block !important;
  width:100% !important;
  inline-size:100% !important;
  height:auto !important;
  block-size:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:var(--javyun-rep-output-ratio) !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:hidden !important;
  line-height:0 !important;
}

html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img > img,
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img > img,
html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img.is-wd-matte-trimmed > img,
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img.is-wd-matte-trimmed > img,
html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode] > img,
html body.public-dark.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode] > img{
  display:block !important;
  position:static !important;
  inset:auto !important;
  width:100% !important;
  inline-size:100% !important;
  height:100% !important;
  block-size:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
  aspect-ratio:auto !important;
  object-fit:cover !important;
  object-position:center top !important;
  transform:none !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

/* Cover image thumbnails: every list/search/my/detail/badged work thumbnail. */
html body :is(
  .work-list-page .works-category-grid .work-thumb,
  .maker-detail-page .works-category-grid .work-thumb,
  .search-page .works-grid.search-results-grid .work-thumb,
  .my-grid.works .my-thumb,
  .actor-detail-page .actor-film-thumb,
  .wd-best-thumb,
  .wd-sim-thumb,
  .wd-related-thumb
){
  position:relative !important;
  display:block !important;
  width:100% !important;
  inline-size:100% !important;
  height:auto !important;
  block-size:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:var(--javyun-cover-output-ratio) !important;
  overflow:hidden !important;
  line-height:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

html body :is(
  .work-list-page .works-category-grid .work-thumb > img,
  .work-list-page .works-category-grid .work-thumb > .work-cover,
  .maker-detail-page .works-category-grid .work-thumb > img,
  .maker-detail-page .works-category-grid .work-thumb > .work-cover,
  .search-page .works-grid.search-results-grid .work-thumb > img,
  .search-page .works-grid.search-results-grid .work-thumb > .work-cover,
  .my-grid.works .my-thumb > img,
  .actor-detail-page .actor-film-thumb > img,
  .wd-best-thumb > img,
  .wd-sim-thumb > img,
  .wd-related-thumb > img
){
  display:block !important;
  position:static !important;
  width:100% !important;
  inline-size:100% !important;
  height:100% !important;
  block-size:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
  aspect-ratio:auto !important;
  object-fit:cover !important;
  object-position:center center !important;
  transform:none !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
