@charset "UTF-8";
/*======================================================================
  File   : /css/portrait-image-fit.css
  Title  : Portrait content images with side space and no cropping
  Version: 1.0
  Created: 2026-10-25 JST
  Updated: 2026-10-25 JST
  Author : R2Fish Project / Codex
======================================================================*/
/* Keep the existing card/grid frame; shrink only portrait image content. */
html body :is(#main_content, .l-mainContent, .p-postList) img.r2-portrait-fit{
  object-fit: contain !important;
  object-position: center !important;
  background-color: #f5f5f5;
  transform: none !important;
}
/* Hero images must also fit within a useful viewport height. */
html body :is(#main_content, .l-mainContent) .p-articleThumb img.r2-portrait-fit,
html body .post_content > p > img.r2-portrait-fit,
html body .post_content > figure > img.r2-portrait-fit,
html body .post_content > figure > a > img.r2-portrait-fit{
  width: 100% !important;
  height: min(75vh, 800px) !important;
  max-height: min(75vh, 800px) !important;
  aspect-ratio: auto !important;
}
