/* FIXED117: compact cards without cropping posters in detail view. */
.wait117 .w71-shelf-grid,
.wait117 .w71-shelf.shelf-game .w71-shelf-grid,
.wait117 .w71-shelf.shelf-device .w71-shelf-grid{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:stretch
}
.wait117 .w71-shelf-grid>.w71-card{height:100%;min-width:0;border-radius:14px}
/* The original 2/3 portrait created 470px-high images. A predictable viewport
   keeps lists navigable while the details page retains the uncropped original. */
.wait117 .w71-shelf-grid .w71-media,
.wait117 .w71-shelf-grid .w71-card.media-portrait .w71-media,
.wait117 .w71-shelf-grid .w71-card.media-landscape .w71-media,
.wait117 .w71-shelf-grid .w71-card.media-product .w71-media{
 aspect-ratio:auto;height:196px;max-height:196px;min-height:0;padding:0;overflow:hidden;position:relative
}
.wait117 .w71-shelf-grid .w71-media img{width:100%;height:100%;object-fit:contain;object-position:center;background:var(--panel-2);border-radius:0}
.wait117 .w71-shelf-grid .w71-card.media-portrait .w71-media img{object-fit:cover;object-position:center 34%}
.wait117 .w71-shelf-grid .w105-artwork{width:100%;height:100%;min-height:0;max-height:196px;overflow:hidden}
.wait117 .w71-shelf-grid .w71-card.is-shelf .w105-artwork-title{font-size:clamp(13px,1.2vw,18px);max-height:4.4em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.wait117 .w71-shelf-grid .w71-card-body{padding:10px 11px 11px;gap:0}
.wait117 .w71-shelf-grid .w71-card-top{margin:0 0 7px;gap:5px;align-items:start}
.wait117 .w71-shelf-grid .w109-card-top-right{gap:3px;align-items:flex-end;flex:0 1 auto;max-width:55%}
.wait117 .w71-shelf-grid h3{font-size:13px;line-height:1.38;margin:0 0 7px;min-height:0;max-height:3em;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.wait117 .w71-shelf-grid .w71-card-facts,
.wait117 .w71-shelf-grid .w71-card.is-shelf .w71-card-facts{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;margin:4px 0 9px}
.wait117 .w71-shelf-grid .w71-card-facts>div,
.wait117 .w71-shelf-grid .w71-card.is-shelf .w71-card-facts>div{min-width:0;padding:5px 7px;border-radius:8px;display:flex;align-items:baseline;gap:5px;overflow:hidden}
.wait117 .w71-shelf-grid .w71-card-facts dt{flex:0 0 auto;font-size:9px;line-height:1.2}
.wait117 .w71-shelf-grid .w71-card-facts dd{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.25;font-weight:750}
.wait117 .w71-shelf-grid .w71-card-facts>div:nth-child(n+3){display:none}
.wait117 .w71-shelf-grid .w71-card footer{margin-top:auto;padding-top:8px;gap:4px}
.wait117 .w71-shelf-grid .w71-card footer span{font-size:10px}
.wait117 .w71-shelf-grid .w71-card footer a{font-size:11px}
.wait117 .w71-shelf-grid .w74-card-progress{margin:4px 0 6px}
.wait117 .w71-grid.w84-layout-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,205px),1fr));gap:12px}
.wait117 .w71-grid.w84-layout-grid .w71-card.media-portrait .w71-media{aspect-ratio:auto;height:230px}
.wait117 .w71-grid.w84-layout-grid .w71-card.media-landscape .w71-media,.wait117 .w71-grid.w84-layout-grid .w71-card.media-product .w71-media{aspect-ratio:auto;height:170px}
.wait117 .w71-grid.w84-layout-grid .w71-card-facts{grid-template-columns:minmax(0,1fr);gap:5px}
.wait117 .w71-grid.w84-layout-grid .w71-card-facts>div{padding:7px 9px}
/* Detail template: sidebar and content don't fight the poster for space. */
.wait117 .w71-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,260px);gap:14px;align-items:start}
.wait117 .w71-detail-layout>main{min-width:0}
.wait117 .w71-detail-card,.wait117 .w71-detail-card.media-landscape,.wait117 .w71-detail-card.media-product{display:grid;grid-template-columns:minmax(0,230px) minmax(0,1fr);gap:0;align-items:start;overflow:hidden}
.wait117 .w71-detail-card.media-landscape,.wait117 .w71-detail-card.media-product{grid-template-columns:minmax(0,270px) minmax(0,1fr)}
.wait117 .w71-detail-media{width:100%;min-width:0;max-width:100%;min-height:0;height:auto;max-height:365px;overflow:hidden;display:grid;place-items:center;background:var(--panel-2);cursor:zoom-in}
.wait117 .w71-detail-media.is-landscape,.wait117 .w71-detail-media.is-product{max-height:255px}
.wait117 .w71-detail-media img{width:100%;height:100%;max-height:inherit;object-fit:contain;object-position:center}
.wait117 .w71-detail-copy{min-width:0;padding:18px;gap:9px}
.wait117 .w71-detail-copy h1{font-size:clamp(23px,2.2vw,34px);line-height:1.17;overflow-wrap:anywhere}
.wait117 .w71-detail-copy .w71-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.wait117 .w71-detail-copy .w71-facts>div{padding:9px 10px;min-height:0;min-width:0}
.wait117 .w71-detail-copy .w71-facts dd{overflow-wrap:anywhere;white-space:normal}
.wait117 .w71-side .w71-panel{padding:15px}
.wait117 .w71-source-links a,.wait117 .w84-actionbar .w71-btn{min-width:0;overflow-wrap:anywhere}
.wait117 .w71-section,.wait117 .w71-panel{min-width:0}
.wait117 .w71-seasons .w71-season,.wait117 .w71-episode-list{min-width:0;max-width:100%}
.wait117 .w71-related{grid-template-columns:repeat(auto-fill,minmax(min(100%,145px),1fr));gap:10px}
.wait117 .w71-detail-layout .w108-episodes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.wait117 .w72-poster-dialog{max-width:min(95vw,900px);max-height:95dvh}
.wait117 .w72-poster-dialog-shell{max-height:93dvh;overflow:auto}
.wait117 .w72-poster-close{position:sticky;top:8px;left:calc(100% - 46px);z-index:5;min-width:38px;min-height:38px}
@media(min-width:1500px){.wait117 .w71-shelf-grid .w71-media,.wait117 .w71-shelf-grid .w71-card.media-portrait .w71-media,.wait117 .w71-shelf-grid .w71-card.media-product .w71-media,.wait117 .w71-shelf-grid .w71-card.media-landscape .w71-media{height:210px;max-height:210px}}
@media(max-width:1250px){.wait117 .w71-shelf-grid,.wait117 .w71-shelf.shelf-game .w71-shelf-grid,.wait117 .w71-shelf.shelf-device .w71-shelf-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.wait117 .w71-detail-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:850px){.wait117 .w71-shelf-grid,.wait117 .w71-shelf.shelf-game .w71-shelf-grid,.wait117 .w71-shelf.shelf-device .w71-shelf-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.wait117 .w71-detail-card,.wait117 .w71-detail-card.media-landscape,.wait117 .w71-detail-card.media-product{grid-template-columns:minmax(0,190px) minmax(0,1fr)}}
@media(max-width:650px){.wait117 .w71-shelf-grid,.wait117 .w71-shelf.shelf-game .w71-shelf-grid,.wait117 .w71-shelf.shelf-device .w71-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.wait117 .w71-shelf-grid .w71-media,.wait117 .w71-shelf-grid .w71-card.media-portrait .w71-media,.wait117 .w71-shelf-grid .w71-card.media-landscape .w71-media,.wait117 .w71-shelf-grid .w71-card.media-product .w71-media{height:170px;max-height:170px}.wait117 .w71-detail-card,.wait117 .w71-detail-card.media-landscape,.wait117 .w71-detail-card.media-product{grid-template-columns:minmax(0,1fr)}.wait117 .w71-detail-media{width:min(100%,290px);margin:10px auto}.wait117 .w71-detail-copy{padding:14px}.wait117 .w71-detail-copy .w71-facts{grid-template-columns:minmax(0,1fr)}.wait117 .w71-detail-layout .w108-episodes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.wait117 .w71-shelf-grid .w71-card-facts>div{display:none}.wait117 .w71-shelf-grid .w71-card-body{padding:8px}.wait117 .w71-detail-layout .w108-episodes-grid{grid-template-columns:minmax(0,1fr)}}
