/* A shared cover overlay, including libraries whose older metadata is hidden. */
.md-video-cover { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 8px; }
.md-search-video > .md-video-cover,
#md-feature-layer .md-public-author .md-author-work > .md-video-cover { display: block; margin: 0; aspect-ratio: 3 / 4; line-height: 0; }
.md-search-video > .md-video-cover > img,
#md-feature-layer .md-public-author .md-author-work > .md-video-cover > img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
#md-feature-layer .md-public-author .md-author-work .md-video-cover { border-radius: 8px; }
.md-card-image > .md-video-views,
.md-video-cover > .md-video-views,
.md-lead-player > .md-video-views,
#md-feature-layer .md-public-author .md-author-work .md-video-views {
 position: absolute; z-index: 2; left: auto; right: 8px; bottom: 8px;
 display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0;
 max-width: calc(100% - 16px); box-sizing: border-box; border: 0; border-radius: 0;
 color: #fff; background: transparent; box-shadow: none; font: 600 16px/22px system-ui, sans-serif;
 text-shadow: 0 1px 4px #000, 0 0 2px #0008; font-variant-numeric: tabular-nums;
 white-space: nowrap; pointer-events: none;
}
.md-video-views > svg { flex: none; width: 17px; height: 17px; filter: drop-shadow(0 1px 2px #0007); }
.md-video-views > .md-view-value,
#md-feature-layer .md-public-author .md-author-work .md-video-views > .md-view-value { display: inline; margin: 0; font: inherit; line-height: inherit; color: inherit; }
.md-lead-player > .md-video-views { right: 16px; bottom: 68px; }
/* All list covers share white, unboxed play counts. */
#md-shell[data-view="series"] .md-card-image > .md-video-views {
 background: transparent; border: 0; border-radius: 0; box-shadow: none;
 padding: 0; gap: 5px; font-size: 16px; line-height: 22px;
}
#md-shell[data-view="series"] .md-card-image > .md-video-views > svg { width: 17px; height: 17px; }
@media(min-width:768px){
 .md-lead-player > .md-series-preview { object-fit: cover; object-position: center; }
}
@media(max-width:767px){
 .md-card-image > .md-video-views,
 .md-video-cover > .md-video-views,
 #md-feature-layer .md-public-author .md-author-work .md-video-views { right: 5px; bottom: 5px; gap: 3px; padding: 0; max-width: calc(100% - 10px); font-size: 14px; line-height: 20px; }
 .md-video-views > svg { width: 15px; height: 15px; }
 #md-feature-layer .md-public-author .md-author-work .md-video-cover { height: 100%; border-radius: 5px; }
}

/* Equal 2:3 composite covers. The sharp foreground preserves the complete
   artwork; a soft copy fills differing aspect ratios behind it. */
#md-shell[data-view="series"] .md-grid .md-card-image {
 display: grid;
 grid-template-columns: minmax(0, 1fr) auto;
 grid-template-rows: auto 25px;
 align-items: center;
 width: 100% !important;
 height: auto !important;
 aspect-ratio: auto !important;
 background: transparent;
 border-radius: 0;
}
#md-shell[data-view="series"] .md-grid .md-card-image::after { content: none; }
#md-shell[data-view="series"] .md-grid .md-card-image::before,
.md-profile-library .md-profile-card > .md-card[data-play] .md-card-image::before {
 content: "";
 position: relative;
 inset: auto;
 grid-area: 1 / 1 / 2 / -1;
 align-self: stretch;
 width: 100%;
 height: 100%;
 background: var(--md-poster) center / cover no-repeat;
 border-radius: 8px;
 filter: blur(10px);
 clip-path: inset(0 round 8px);
 pointer-events: none;
}
#md-shell[data-view="series"] .md-grid .md-card-image > img {
 grid-area: 1 / 1 / 2 / -1;
 position: relative;
 display: block;
 width: 100%;
 height: auto;
 aspect-ratio: 2 / 3;
 object-fit: contain;
 object-position: center top;
 border-radius: 8px;
 transform: none !important;
}
#md-shell[data-view="series"] .md-grid .md-card-image > .md-video-views {
 position: relative;
 grid-area: 1 / 1 / 2 / -1;
 right: auto;
 bottom: auto;
 align-self: end;
 justify-self: end;
 max-width: calc(100% - 16px);
 margin: 0 8px 8px;
 color: #fff;
 text-shadow: 0 1px 4px #000, 0 0 2px #0008;
}
#md-shell[data-view="series"] .md-grid .md-card-image > .md-video-views > svg { filter: drop-shadow(0 1px 2px #0007); }
#md-shell[data-view="series"] .md-grid .md-card-image > .md-badge {
 position: static;
 grid-area: 2 / 1;
 justify-self: start;
 max-width: 100%;
 margin-top: 5px;
 padding: 1px 4px;
 border-radius: 3px;
}
/* Keep the six popular recommendations beside the existing preview. */
@media(min-width:1200px){
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) {
  --md-hot-poster-width: calc((var(--md-home-lead-height) - 158px) / 3);
  --md-hot-group-width: calc(var(--md-hot-poster-width) * 3 + 32px);
  grid-template-rows: 28px repeat(2, minmax(0, calc((var(--md-home-lead-height) - 60px) / 2)));
 }
 /* Share the top rows independently of the equal-width discovery grid below.
    Six fixed-width posters form a compact group; the preview uses the rest. */
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > article.md-card.md-card--lead {
  grid-area: 1 / 1 / 4 / -1;
  width: auto;
  margin-right: calc(var(--md-hot-group-width) + 16px);
 }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > .md-home-hot {
  grid-area: 1 / 1 / 2 / -1;
  justify-self: end;
  width: var(--md-hot-group-width);
  box-sizing: border-box;
  padding-left: 0;
 }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+2):nth-child(-n+7) {
  grid-column: 1 / -1;
  justify-self: end;
  width: var(--md-hot-poster-width);
 }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+2):nth-child(-n+4) { grid-row: 2; }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+5):nth-child(-n+7) { grid-row: 3; }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(2),
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(5) { margin-right: calc((var(--md-hot-poster-width) + 16px) * 2); }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(3),
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(6) { margin-right: calc(var(--md-hot-poster-width) + 16px); }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(4),
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(7) { margin-right: 0; }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+2):nth-child(-n+7) .md-card-title {
  width: var(--md-hot-poster-width);
  max-width: 100%;
  align-self: center;
  margin: 6px 0 0;
  text-align: left;
 }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+2):nth-child(-n+7) .md-card-image {
  width: var(--md-hot-poster-width) !important;
  max-width: 100%;
  align-self: center;
 }
 #md-shell[data-view="series"] .md-mixed-grid:has(.md-home-hot) > button.md-card:nth-child(n+2):nth-child(-n+7) .md-card-image > img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  justify-self: center;
 }
}
