/* 1.9.42: consistent compact media listings across archives and category pages. */
body.post-type-archive-imai_media .media-grid,
body.tax-imai_section .media-grid,
body.search .media-grid,
body .imai-library-grid.media-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:12px;align-items:stretch}
body.post-type-archive-imai_media .media-grid>.media-card,
body.tax-imai_section .media-grid>.media-card,
body.search .media-grid>.media-card,
body .imai-library-grid.media-grid>.media-card {display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px;min-height:108px!important;padding:10px!important;position:relative;overflow:hidden;box-shadow:none}
body.post-type-archive-imai_media .media-card>.card-image,
body.tax-imai_section .media-card>.card-image,
body.search .media-card>.card-image,
body .imai-library-grid.media-grid .media-card>.card-image {width:76px!important;min-width:76px!important;max-width:76px!important;height:76px!important;aspect-ratio:1!important;flex:0 0 76px!important;border-radius:10px;overflow:hidden;background:#e3f2e9}
body.post-type-archive-imai_media .media-card>.card-image img,
body.tax-imai_section .media-card>.card-image img,
body.search .media-card>.card-image img {width:100%!important;height:100%!important;object-fit:cover!important}
body.post-type-archive-imai_media .media-card .media-placeholder,
body.tax-imai_section .media-card .media-placeholder,
body.search .media-card .media-placeholder {font-size:24px!important}
body.post-type-archive-imai_media .media-card>.card-main,
body.tax-imai_section .media-card>.card-main,
body.search .media-card>.card-main,
body .imai-library-grid.media-grid .media-card>.card-main {min-width:0;flex:1;padding:0!important;display:flex;flex-direction:column;gap:3px}
body.post-type-archive-imai_media .media-card h3,
body.tax-imai_section .media-card h3,
body.search .media-card h3 {margin:0!important;font-size:clamp(.86rem,1.2vw,1rem)!important;line-height:1.45!important;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.post-type-archive-imai_media .media-card .card-actions,
body.tax-imai_section .media-card .card-actions,
body.search .media-card .card-actions {display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:2px 0 0;margin:0}
body.post-type-archive-imai_media .media-card .play-trigger,
body.tax-imai_section .media-card .play-trigger,
body.search .media-card .play-trigger {background:#075c39!important;color:white!important;min-width:36px;padding:5px 9px!important;border-radius:8px}
body.post-type-archive-imai_media .media-card .card-category,
body.tax-imai_section .media-card .card-category,
body.search .media-card .card-category {font-size:.73rem}
@media(max-width:720px){body.post-type-archive-imai_media .media-grid,body.tax-imai_section .media-grid,body.search .media-grid{grid-template-columns:minmax(0,1fr)!important}body.post-type-archive-imai_media .media-card>.card-image,body.tax-imai_section .media-card>.card-image,body.search .media-card>.card-image{width:64px!important;min-width:64px!important;max-width:64px!important;height:64px!important;flex-basis:64px!important}}
