/* Desktop Home only. Existing navigation structure and theme tokens remain authoritative. */
@media(min-width:768px){
 html.klino-desktop-final body:has(#hero-banner:not(.hidden)) #navbar{background:transparent!important;border:0!important;box-shadow:none!important}
 html.klino-desktop-final body:has(#hero-banner:not(.hidden)) #navbar nav{background:rgba(25,27,32,.28)!important;backdrop-filter:blur(4px)!important;color:#fff!important}
 html.klino-desktop-final body:has(#hero-banner:not(.hidden)) #navbar nav .nav-tab:not([aria-current=page]){color:#fff!important}
 html.klino-desktop-final body:has(#hero-banner:not(.hidden)) #main-content{padding-top:0!important}
 html.klino-desktop-final body #hero-banner:not(.hidden){display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:var(--bg-primary)!important}
 html.klino-desktop-final body #hero-artwork{position:relative!important;inset:auto!important;width:100%;height:clamp(280px,42.85vw,660px)!important;background:var(--bg-primary)!important;pointer-events:none}
 html.klino-desktop-final body #hero-artwork .hero-bg{width:100%;height:100%;object-fit:contain!important;object-position:center!important}
 html.klino-desktop-final body #hero-banner .hero-gradient{background:none!important;z-index:2;pointer-events:none}
 html.klino-desktop-final body #hero-banner #hero-content{position:relative!important;inset:auto!important;padding:20px var(--desktop-gutter,4vw) 26px!important;margin:0!important;max-width:none!important;gap:12px!important;background:var(--bg-primary)!important}
 html.klino-desktop-final body #hero-banner #hero-title{max-width:100%!important;font-size:clamp(2rem,3.6vw,3.7rem)!important;color:var(--text-main)!important;text-shadow:none!important}
 html.klino-desktop-final body #hero-banner .hero-metadata{max-width:100%!important;color:var(--text-sub)!important;text-shadow:none!important}
 html.klino-desktop-final body #hero-banner #hero-synopsis{max-width:85ch!important;color:var(--text-sub)!important;text-shadow:none!important;line-height:1.5!important;font-size:1rem!important;display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 html.klino-desktop-final body #hero-banner .hero-actions{display:flex!important;justify-content:flex-start!important;gap:10px!important;width:auto!important}
 html.klino-desktop-final body #hero-banner .hero-actions>button{width:auto!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;height:44px!important;min-height:44px!important;padding:0 24px!important;border-radius:999px!important;box-shadow:none!important}
 html.klino-desktop-final body #hero-banner #hero-watchlist-btn{color:var(--text-main)!important;background:var(--bg-hover)!important;border-color:var(--border-color)!important}
 html.klino-desktop-final body #hero-watchlist-text{display:inline!important}html.klino-desktop-final body .hero-mobile-list-label{display:none!important}
 html.klino-desktop-final body #hero-banner :is(#hero-mobile-play-btn,#hero-mobile-info-btn,#hero-carousel-controls,#hero-featured-label){display:none!important}
 html.klino-desktop-final body #row-featured{margin-top:0!important;padding-top:0!important}
 html.klino-desktop-final body #featured-list{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x proximity}
 html.klino-desktop-final body .featured-tile{flex:0 0 clamp(210px,24vw,360px)!important;width:clamp(210px,24vw,360px)!important;aspect-ratio:auto!important;height:auto!important;border-radius:10px!important;overflow:hidden}
 html.klino-desktop-final body .featured-tile img{width:100%!important;aspect-ratio:16/9!important;object-fit:cover!important;height:auto!important}
 html.klino-desktop-final body .featured-tile span{position:static!important;display:block!important;padding:8px 10px!important;background:var(--bg-card)!important;color:var(--text-main)!important;white-space:normal;overflow-wrap:anywhere}
 html.klino-desktop-final body #catalog-container{padding-top:22px!important;max-width:none!important}
 html.klino-desktop-final body #navbar [data-category=Watchlist],html.klino-desktop-final body #navbar [data-category=Downloads]{display:flex!important}
 html.klino-desktop-final body #navbar #klino-notification-button{display:inline-flex!important}
 /* The notification overlay is independent of Home and preserves the underlying page. */
 html.klino-desktop-final body #klino-notification-panel{top:var(--notification-top,80px)!important;right:var(--notification-right,16px)!important;left:auto!important;width:min(440px,calc(100vw - 24px))!important;max-height:min(70vh,600px)!important;z-index:100!important;transform:none!important;border-radius:16px!important;box-shadow:0 12px 40px #0003!important}
 html.klino-desktop-final body #klino-notification-panel .klino-notification-panel-header{position:sticky;top:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--modal-bg,var(--bg-card));padding:12px!important;z-index:2}
 html.klino-desktop-final body .klino-notification-panel-header h2{font-size:1rem;white-space:nowrap}
 html.klino-desktop-final body #klino-notification-panel :is(#klino-notification-close,#klino-notification-open-settings){display:none!important}
 html.klino-desktop-final body #klino-notification-panel .klino-notification-panel-tools{display:contents!important}
 html.klino-desktop-final body #klino-notification-panel .klino-notification-panel-tools button{border:0;font-size:.74rem;padding:6px;min-height:36px;white-space:nowrap}
 html.klino-desktop-final body .klino-notification-panel-header>div:first-child{flex:1;min-width:0}
 html.klino-desktop-final body #klino-notification-list{padding:0 12px 12px!important;overflow-y:auto}
 html.klino-desktop-final body #klino-notification-list .klino-notification-card{position:relative;display:flex;align-items:center;gap:12px;margin:0;padding:12px 16px 12px 0;border:0;border-bottom:1px solid var(--border-color);border-radius:0;background:transparent;cursor:pointer}
 html.klino-desktop-final body .klino-notification-card.is-unread::after{content:'';position:absolute;right:0;top:50%;width:7px;height:7px;border-radius:50%;background:#ff9500}
 html.klino-desktop-final body .klino-notification-card .klino-notification-actions{display:none}
 html.klino-desktop-final body .klino-notification-icon{width:60px;height:50px;flex:0 0 60px;border-radius:7px;overflow:hidden;display:grid;place-items:center;background:var(--bg-hover)}
 html.klino-desktop-final body .klino-notification-icon img{width:100%;height:100%;object-fit:cover}
 html.klino-desktop-final body .klino-notification-meta{display:block!important}.klino-notification-copy{flex:1;min-width:0}
 html.klino-desktop-final body .klino-notification-copy time{font-size:.7rem}
}
.notification-empty{text-align:center;padding:40px 16px;color:var(--text-sub)}.notification-empty i{font-size:28px;margin-bottom:12px}.notification-empty strong{display:block;color:var(--text-main);margin-bottom:6px}
/* Defeat the older signed-in Settings card rules at their actual scope. */
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container #settings-home .settings-home-link,
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container .ux-row{display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:12px!important;text-align:left!important}
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container #settings-home .settings-home-link>i,
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container .ux-row>i{display:inline-grid!important;place-items:center;width:24px!important;min-width:24px!important;flex:0 0 24px!important;margin:0!important}
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container #settings-home .settings-home-link>span,
html.klino-ui-upgrade.klino-desktop-final body #settings-view-container .ux-row>span:not(.ux-price){flex:0 1 auto!important;width:auto!important;max-width:none!important;margin:0!important;text-align:left!important}
@media(max-width:767px){html.klino-desktop-final body #settings-home .ux-group{width:100%!important}html.klino-desktop-final body #settings-home{padding:0!important}}


@media(min-width:768px){
 html.klino-desktop-final body #catalog-container:not(.hidden){display:flex;flex-direction:column}
 #catalog-container #row-continue-watching{order:1}#catalog-container #row-trending{order:2}#catalog-container #row-recommendations{order:3}#catalog-container #row-action{order:4}#catalog-container #row-scifi{order:5}
}

@media(min-width:768px){
 html.klino-desktop-final body #hero-banner #hero-content{width:100%!important;min-height:0!important;justify-content:flex-start!important}
 html.klino-desktop-final body #featured-list .featured-tile img{position:relative!important;inset:auto!important;display:block}
 html.klino-desktop-final body #featured-list .featured-tile::before{display:none}
 html.klino-desktop-final body #klino-notification-panel .klino-notification-icon{background:var(--bg-hover)!important;border:0;box-shadow:none}
 html.klino-desktop-final body #klino-notification-panel .klino-notification-card{box-shadow:none;transform:none}
}

@media(min-width:768px) and (max-width:1100px){
 html.klino-desktop-final body #navbar>div{height:auto!important;min-height:80px;grid-template-columns:auto 1fr auto;row-gap:6px;padding-block:10px}
 html.klino-desktop-final body #navbar nav{grid-column:1/-1;grid-row:2;justify-self:center}
 html.klino-desktop-final body #navbar>div>div:last-child{grid-column:3;grid-row:1}
}

@media(min-width:768px){
 html.klino-desktop-final body #hero-banner #hero-play-btn,
 html.klino-desktop-final body #hero-banner #hero-watchlist-btn{display:inline-flex!important}
 html.klino-desktop-final body #klino-notification-panel:not([hidden]){display:flex!important}
 html.klino-desktop-final body #klino-notification-panel[hidden]{display:none!important}
}

/* Route visibility takes precedence over presentation and responsive display rules. */
html.klino-desktop-final body :is(#hero-banner,#row-featured,#catalog-container,#grid-view-container,#filter-header,#movie-detail-container,#series-detail-container,#downloads-view-container,#settings-view-container,#discover-view-container,#settings-home,.klino-settings-layout,.settings-panel).hidden {
  display:none!important;
}
html.klino-desktop-final body:has(#hero-banner.hidden) #row-featured { display:none!important; }
@media(min-width:768px){
  /* Desktop uses its persistent header field. Mobile retains the full-width field. */
  html.klino-desktop-final body #search-view-header>.relative { display:none!important; }
  html.klino-desktop-final body #search-view-header { margin-bottom:0!important; }
}

