/* Layout, typography and colors come from the unchanged reference stylesheets. */
.hero-slide .hero-backdrop { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: blur(18px) brightness(.65); transform: scale(1.04); }
.hero-slide .hero-feature { position: absolute; right: 9%; top: 5%; width: auto; height: 78%; max-width: 38%; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 40px #0008; }

/* These rules are inline in the reference detail and channel HTML. */
.mobile-detail-controls { display: none; }
.channel-section .poster-card:nth-child(n+7) { display: block; }
.channel-tabs h1 { display: inline; margin: 0; font: inherit; }

/* A full library/search result must not inherit the homepage's preview limit. */
.channel-library .poster-card, .catalog-results .poster-card { display: block; }
.channel-library .poster-grid, .catalog-results .poster-grid { height: auto; grid-template-rows: none; }

/* Real sources have varying episode counts; preserve the reference controls. */
.detail-content .episodes { flex-wrap: wrap; }
.detail-content .detail-card + .section,
.detail-content .detail-card + .section + .section { height: auto; }
.detail-content .detail-card + .section { min-height: 286px; }
.detail-content .detail-card + .section + .section { min-height: 98px; }
.detail-content .tags { height: auto; min-height: 32px; flex-wrap: wrap; }
.detail-content .detail-card:has(.tag:nth-child(5)) { height: auto; }
.watch-error { background: #111 url('/dushe/assets/images/player-background.jpg') center / cover; }
.player .player-error-logo { width: 178px; height: auto; object-fit: contain; opacity: 1; }
.player:has(.watch-error) .watch-video { visibility: hidden; }
.play-view .watch ~ .section { height: auto; min-height: 0; }
.play-view .watch ~ .section .poster-grid { height: auto; grid-template-rows: none; }

@media (max-width: 560px) {
    .mobile-detail-controls { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
    .channel-home .channel-section .poster-card:nth-child(n+10) { display: none; }
    .channel-library .poster-card, .catalog-results .poster-card { display: block; }
    .detail-content .detail-poster img { height: auto; }
    .detail-content .detail-card { height: auto; min-height: 897px; }
    .detail-content .detail-card + .section { min-height: 766px; }
    .hero-slide .hero-feature { right: 5%; top: 5%; height: 76%; max-width: 46%; }
    .play-view .watch, .play-view .watch-side { height: auto; }
}
