/* Ver.182: image-led thumbnails and measured whitespace. All original photo assets are untouched. */
:root{--v182-paper:#f7f6f2;--v182-line:#e4e8e9;--v182-ink:#173653;--v182-gold:#b69b72}
/* Thumbnail aspect ratio is presentational: no source photo is modified or stretched. */
.home-story-gallery .story-photo{
  border:1px solid rgba(219,226,231,.45)!important;border-radius:14px!important;
  background:#fff!important;box-shadow:0 14px 34px rgba(3,19,34,.18)!important;
  overflow:hidden;transition:transform .25s ease,box-shadow .25s ease!important;
}
.home-story-gallery .story-photo:hover{transform:translateY(-4px);box-shadow:0 21px 40px rgba(3,19,34,.25)!important}
.home-story-gallery .story-photo::after{display:none!important}
.home-story-gallery .story-photo>img{
 display:block;width:100%;object-fit:contain!important;object-position:center center!important;
 background:#f1f3f3!important;transform:none!important;
}
.home-story-gallery .story-photo>span{
 position:relative!important;inset:auto!important;display:block!important;
 margin:0!important;padding:14px 17px 15px!important;
 background:#fff!important;color:var(--v182-ink)!important;
 border-top:1px solid var(--v182-line);min-height:84px;
}
.home-story-gallery .story-photo strong{font-size:15px!important;line-height:1.5;color:var(--v182-ink)!important}
.home-story-gallery .story-photo small{font-size:11px!important;line-height:1.65;color:#5d6d79!important;display:block}
.home-story-gallery .story-photo>span:before{content:'';display:block;width:28px;height:2px;background:var(--v182-gold);margin-bottom:10px}
/* Gallery thumbnails: calm white cards, pale photo mat, same caption rhythm across categories. */
.photo-gallery-card{
 border:1px solid #e1e7eb!important;border-radius:14px!important;
 box-shadow:0 8px 22px rgba(12,41,74,.07)!important;
 background:#fff!important;transition:box-shadow .25s ease,transform .25s ease;
}
.photo-gallery-card:hover{transform:translateY(-3px);box-shadow:0 17px 36px rgba(12,41,74,.13)!important}
.photo-gallery-card .photo-frame,
.photo-gallery-card.photo-uncropped .photo-frame,
.photo-gallery-card.photo-seminar-portrait .photo-frame,
.photo-gallery-card.v179-gallery-card .photo-frame{
 display:flex!important;align-items:center;justify-content:center;
 background:#f0f3f3!important;border-bottom:1px solid #e2e7ea;
 aspect-ratio:4/3!important;
}
.photo-gallery-card .photo-frame img,
.photo-gallery-card.photo-uncropped .photo-frame img,
.photo-gallery-card.photo-seminar-portrait .photo-frame img,
.photo-gallery-card.v179-gallery-card .photo-frame img{
 width:100%!important;height:100%!important;object-fit:contain!important;object-position:center center!important;
 transform:none!important;display:block;
}
.photo-gallery-card figcaption{padding:16px 18px 20px!important}
.photo-gallery-card figcaption strong{font-size:15px!important;color:var(--v182-ink)!important;line-height:1.55}
.photo-gallery-card figcaption span{font-size:12px!important;color:#5e7080!important;line-height:1.65}
.photo-gallery-card figcaption:before{content:'';display:block;width:26px;height:2px;background:var(--v182-gold);margin-bottom:10px}
/* NEWS cards: seamless latest+additional items, same visual system; no “さらに10件” divider. */
.article-list-compact{border-top:2px solid #173a59}
.article-line,.article-more-list>a{border-bottom:1px solid #e2e6e8!important;background:#fff!important}
.article-more-block{border-top:0!important;margin-top:0!important;padding-top:0!important}
.article-more-label{display:none!important}
.article-more-list>a{transition:background .2s ease!important}
.article-line:hover,.article-more-list>a:hover{background:#f6f7f5!important;transform:none!important}
.article-more-list time{font-variant-numeric:tabular-nums}
.article-more-list .article-more-category{font-size:11px!important;color:#466683!important;border:1px solid #ccd8e0;border-radius:100px;padding:4px 8px;justify-self:start}
.article-line span{border-radius:100px;padding:4px 8px}
.article-line strong,.article-more-list strong{color:#153654!important}
/* Mobile: full photo is visible, captions have sufficient contrast, swiping still works. */
@media(max-width:700px){
 .home-story-gallery .story-photo,.home-story-gallery .story-photo-main{
  height:auto!important;display:flex!important;flex-direction:column!important;
  min-height:0!important;flex:0 0 min(83vw,360px)!important;
 }
 .home-story-gallery .story-photo>img{height:clamp(250px,75vw,360px)!important;flex:0 0 auto}
 .home-story-gallery .story-photo>span{min-height:96px!important;flex:1}
 .photo-gallery-card{flex:0 0 82vw!important}
 .photo-gallery-card .photo-frame,
 .photo-gallery-card.photo-uncropped .photo-frame,
 .photo-gallery-card.photo-seminar-portrait .photo-frame,
 .photo-gallery-card.v179-gallery-card .photo-frame{
  height:clamp(260px,78vw,380px)!important;aspect-ratio:auto!important;
 }
 .photo-gallery-card figcaption{min-height:98px;padding:13px 15px 17px!important}
 .article-line,.article-more-list>a{padding-block:15px!important}
 .article-line strong,.article-more-list strong{font-size:12px!important;line-height:1.65}
 .article-more-list .article-more-category{font-size:9px!important;padding:2px 6px}
}
@media(prefers-reduced-motion:reduce){.home-story-gallery .story-photo,.photo-gallery-card{transition:none!important}}

/* Ver.182 curated eight-card rail on desktop; original photos are letterboxed, not cropped. */
@media(min-width:901px){
.home-story-gallery{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:auto!important;gap:18px!important}
.home-story-gallery .story-photo{display:flex!important;flex-direction:column!important;grid-row:auto!important;grid-column:auto!important;height:auto!important;min-height:0!important}
.home-story-gallery .story-photo>img{height:230px!important;flex:0 0 auto}
.home-story-gallery .story-photo>span{flex:1}
}
@media(min-width:701px) and (max-width:900px){
.home-story-gallery{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;gap:14px!important}
.home-story-gallery .story-photo{display:flex!important;flex-direction:column!important;grid-row:auto!important;grid-column:auto!important;height:auto!important;min-height:0!important}
.home-story-gallery .story-photo>img{height:250px!important;flex:0 0 auto}
.home-story-gallery .story-photo>span{flex:1}
}
@media(max-width:700px){
.home-story-gallery{display:flex!important;overflow-x:auto!important;scroll-snap-type:x mandatory!important;grid-template-columns:none!important;grid-template-rows:none!important}
.home-story-gallery .story-photo{scroll-snap-align:start!important;grid-row:auto!important;grid-column:auto!important}
}
