/* Help belongs to Home, never beside an active stream. */
body:not(.home-idle) .build-feedback-card, body:not(.home-idle) .adblock-banner {display:none!important}
.home-menu #activeSelectedCardArea {display:none!important}
.mobile-bar {display:none}
.mobile-drawer {position:fixed;inset:0 auto 0 0;margin:0;width:min(85vw,340px);height:100dvh;max-height:100dvh;box-sizing:border-box;border:1px solid #454a61;border-radius:0 18px 18px 0;background:#101725;color:#f6ead0;padding:20px}
.mobile-drawer::backdrop{background:rgba(0,0,0,.6)}
.drawer-heading{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:1px solid #343d50}
.drawer-heading button{font-size:28px;width:44px;background:transparent;color:inherit;border:0}
.mobile-drawer nav{display:grid;gap:6px;padding-top:16px}
.mobile-drawer nav button{border:0;border-radius:10px;text-align:left;padding:16px;background:transparent;color:inherit;font:inherit;font-weight:650}
.mobile-drawer nav button:hover,.mobile-drawer nav button:focus-visible{background:#263148}
@media(max-width:760px){
 .pirate-navbar{position:sticky!important;top:0!important;height:58px!important;min-height:58px!important;margin:0 0 14px!important;padding:6px 8px!important;border-radius:0 0 12px 12px!important;display:block!important}
 .pirate-navbar>.brand-stage,.pirate-navbar>.main-menu,.pirate-navbar>#accountButton{display:none!important}
 .mobile-bar{display:grid;grid-template-columns:auto minmax(0,1fr) 42px;gap:10px;align-items:center;height:44px}
 .mobile-bar button{height:42px;border:0;background:transparent;color:#ffe6b3;padding:6px;font:inherit;white-space:nowrap}
 .mobile-bar #mobileMenuToggle{font-size:20px}.mobile-bar #mobileMenuToggle span{font-size:14px}
 .mobile-bar svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8}
 .mobile-bar #unifiedSearch{height:40px;padding:8px 12px;border-radius:22px;font-size:16px}
 .mobile-search-slot{min-width:0}
 .unified-search>label{display:none}
 body:not(.home-idle) .unified-search{display:none}
 .pirate-navbar #accountMenu{position:absolute;top:58px;right:0;left:auto;width:210px}
 .home-idle .control-sidebar-stack{padding-top:0}
}
@media(max-width:760px){
 .pirate-navbar #accountMenu{bottom:auto!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 90px);overflow-y:auto;box-sizing:border-box;background:#101725!important;padding:10px!important;display:grid;gap:4px;z-index:7001}
 .pirate-navbar #accountMenu[hidden]{display:none!important}
 #mobileSearchDropdown{position:absolute;top:calc(100% + 6px);left:0;right:0;padding:12px;border:1px solid #46506a;border-radius:12px;background:#101725;box-shadow:0 16px 32px #0008;max-height:min(65dvh,540px);overflow-y:auto;z-index:6000;box-sizing:border-box}
 #mobileSearchDropdown[hidden]{display:none!important}
 #mobileSearchDropdown #unifiedResults{max-height:none;overflow:visible}
 #mobileSearchDropdown .result-card{display:flex;align-items:center;gap:12px;margin:5px 0;padding:8px;border:0;border-radius:9px;background:#212a3c;font:inherit}
 #mobileSearchDropdown .result-card img{flex:0 0 44px;border-radius:5px}
 #mobileSearchDropdown .result-card span{white-space:normal}
}
.mobile-drawer{width:min(72vw,280px);padding:16px}
.mobile-drawer nav{gap:2px}
.mobile-drawer nav button{padding:13px 10px}
#prevBtn:disabled,#nextBtn:disabled{opacity:.45;filter:grayscale(1);cursor:not-allowed;box-shadow:none;transform:none}
@media(max-width:760px){#accountMenu #watchListButton{display:none!important}}
/* Keep recommendations with the stream, including when a request finishes on Home. */
body.home-idle #similarPanel, body.home-menu #similarPanel {display:none!important}
@media(max-width:760px){
 .mobile-bar #mobileMenuToggle{display:flex;align-items:center;gap:6px}
 .mobile-menu-logo{display:block;width:65px;height:30px;object-fit:contain}
}
/* Build 247: text-first details and open Home help. */
.explore-detail{display:block;width:min(680px,94vw);max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain}
.explore-detail-copy{padding:56px 24px 24px}
.explore-detail p{max-height:none;overflow:visible}
.explore-detail-actions{position:static;padding:12px 0 0;background:transparent;grid-template-columns:repeat(2,minmax(0,1fr))}
#exploreWatchNow,.explore-list-state{grid-column:1/-1}
.build-feedback-card .build-card-info{display:block;grid-column:1/-1}
.adfree-explanation{margin-top:16px;color:#d0d8e6;line-height:1.6;font-size:.95rem}
.adfree-explanation strong{color:#efbd77}
@media(max-width:760px){
 body.home-idle .control-sidebar{display:none!important}
 .explore-modal{padding:12px}
 .explore-detail{width:100%;max-height:calc(100dvh - 24px)}
 .explore-detail-actions{gap:8px}
}

/* Compact catalogue toolbar and collapsible filters. */
#exploreView .explore-panel{display:flex;flex-direction:column}
#exploreView .explore-heading,#exploreView .explore-toolbar,#exploreView .explore-filters{flex-shrink:0}
#exploreView .explore-scroll{height:auto;min-height:0;flex:1}
.explore-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.explore-toolbar .explore-search-row{flex:1;min-width:0;margin:0}
.explore-toolbar select{width:110px;min-width:0;height:42px;padding:0 8px;border:1px solid #39465e;border-radius:10px;background:#0b1527;color:#eef3ff;font-size:14px}
#exploreFilterToggle{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;padding:10px;margin:0;border:1px solid #39465e;border-radius:10px;background:#0b1527;color:#efbd77}
#exploreFilterToggle svg{width:20px;height:20px}
#exploreFilterToggle[aria-expanded="true"]{border-color:#e5a247;background:#303047}
#exploreFilterPanel[hidden]{display:none!important}
#exploreFilterPanel{grid-template-columns:repeat(5,minmax(0,1fr))}
.latest-mode-switch{grid-template-columns:repeat(2,minmax(0,150px));gap:8px;margin-bottom:12px}
.latest-mode-button{padding:8px 12px;min-height:40px;font-size:14px}
@media(max-width:680px){
.explore-toolbar{gap:6px}
.explore-toolbar select{width:88px;font-size:13px}
.explore-toolbar .explore-search-row svg{display:none}
.explore-toolbar .explore-search-row input{padding-left:10px;padding-right:28px}
#exploreFilterPanel{flex-wrap:wrap;overflow:visible;gap:8px}
#exploreFilterPanel select{flex:1 1 120px;min-width:0;height:38px}
}

/* Latest releases fill their panel below compact, content-sized tabs. */
#latestEpisodeView .explore-panel{display:flex;flex-direction:column}
#latestEpisodeView .explore-heading,#latestEpisodeView .latest-mode-switch{flex-shrink:0}
#latestEpisodeView .latest-mode-switch{display:flex;gap:8px}
#latestEpisodeView .latest-mode-button{flex:0 0 auto;width:auto;min-height:32px;padding:5px 12px;font-size:13px;border-radius:9px}
#latestEpisodeView .explore-scroll{flex:1;min-height:0;height:auto}

/* Keep detail actions in view while long text scrolls independently. */
.explore-detail{display:flex;overflow:hidden;padding:56px 24px 24px;box-sizing:border-box}
.explore-detail-copy{display:flex;flex-direction:column;align-self:stretch;min-height:0;width:100%;padding:0;overflow:hidden}
.explore-detail-heading{flex-shrink:0}
.explore-detail-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;margin-top:14px;padding:0;border:0;border-radius:0;background:transparent;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-top,0px),#000 calc(100% - var(--fade-bottom,0px)),transparent);mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-top,0px),#000 calc(100% - var(--fade-bottom,0px)),transparent)}
#exploreDetailDescription{margin:0}
.explore-detail-actions{flex-shrink:0;margin-top:8px;padding-top:4px}
#exploreDetailScrollCue{display:grid;place-items:center;align-self:center;flex:0 0 28px;width:32px;height:28px;margin:4px 0 0;padding:2px;border:1px solid #b78338;border-radius:16px;background:transparent;color:#efbd77}
#exploreDetailScrollCue[hidden]{display:none}
#exploreDetailScrollCue svg{width:20px;height:20px}
.explore-detail-copy{max-height:calc(100dvh - 120px)}@media(max-width:760px){.explore-detail-copy{max-height:calc(100dvh - 104px)}}

.explore-detail-scroll::-webkit-scrollbar{display:none}
body.home-idle .control-sidebar{display:none!important}
.unified-search>label{display:none}
.desktop-search-slot{min-width:140px;flex:1;max-width:320px}
.desktop-search-slot #unifiedSearch{width:100%;height:42px;box-sizing:border-box;border-radius:24px;padding:8px 16px;font:inherit}
#mobileSearchDropdown{position:absolute;top:calc(100% + 6px);right:0;left:auto;width:min(640px,100%);padding:12px;border:1px solid #46506a;border-radius:12px;background:#101725;box-shadow:0 16px 32px #0008;max-height:min(65dvh,540px);overflow-y:auto;z-index:6000;box-sizing:border-box}
#mobileSearchDropdown[hidden]{display:none!important}
#mobileSearchDropdown #unifiedResults{max-height:none;overflow:visible}
#mobileSearchDropdown .result-card{display:flex;align-items:center;gap:12px;margin:5px 0;padding:8px;border:0;border-radius:9px;background:#212a3c;font:inherit}
#mobileSearchDropdown .result-card img{flex:0 0 44px;border-radius:5px}
#mobileSearchDropdown .result-card span{white-space:normal}
.explore-toolbar #exploreMedia{appearance:none;text-align:center;text-align-last:center;font-weight:700;color:#ffe3ab;border-color:#86683d;background:linear-gradient(145deg,#273249,#131d2e);padding:0 8px;cursor:pointer}
@media(min-width:761px){.pirate-navbar{position:relative;gap:12px;flex-wrap:wrap}.pirate-navbar .brand-stage{flex:0 0 160px}.pirate-navbar .main-menu{flex:1 1 auto}}
@media(max-width:760px){.desktop-search-slot{display:none}#mobileSearchDropdown{width:100%}}
@media(min-width:761px){
 .pirate-navbar{height:auto;min-height:68px;padding:8px 16px}
 .pirate-navbar .brand-stage{position:static;transform:none;width:160px;height:50px}
 .pirate-navbar .nav-wordmark{width:150px;max-width:150px}
 .pirate-navbar .main-menu{width:auto;flex:1;min-width:0}
 .pirate-navbar #accountButton{position:static;transform:none;width:auto;flex:0 0 auto;margin:0}
 .desktop-search-slot{order:0}
}
@media(min-width:761px) and (max-width:1250px){
 .pirate-navbar .main-menu{order:4;flex:1 0 100%;justify-content:center}
 .desktop-search-slot{max-width:none}
}

#watchMenuButton[hidden]{display:none!important}
#relatedAnimeSection{display:grid;gap:12px}
#relatedAnimeSection[hidden]{display:none}

/* Mobile bottom navigation, with room for the iPhone home indicator. */
.mobile-bottom-nav{display:none}
@media(max-width:760px){
 body{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))!important}
 .mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:6500;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));background:rgba(9,14,23,.97);border-top:1px solid #30394a;box-shadow:0 -8px 24px #0004;backdrop-filter:blur(18px)}
 .mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:48px;margin:0;padding:4px 0;border:0;border-radius:10px;background:transparent;color:#929cad;font:inherit;font-size:11px;line-height:1.2;box-shadow:none}
 .mobile-bottom-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .mobile-bottom-nav button.active{color:#ffe4ad;background:#e7ae4510}
 .mobile-bottom-nav button:focus-visible{outline:2px solid #efbd77;outline-offset:-2px}
 .mobile-bottom-nav button.active[data-tab="home"] svg{fill:currentColor}
 .mobile-bar{display:flex;gap:8px}
 .mobile-search-slot{flex:1;min-width:0}
 .mobile-bar #mobileMenuToggle{padding:0;flex:0 0 76px}
 .mobile-menu-logo{width:76px;height:34px}
 .mobile-bar #mobileProfile,.mobile-bar #mobileStreamShortcut{flex:0 0 34px;width:34px;padding:4px}
 #mobileStreamShortcut svg{width:19px;height:19px}
 .mobile-drawer{inset:auto 0 0;width:100%;max-width:none;height:auto;max-height:65dvh;border-radius:22px 22px 0 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px))}
 .mobile-drawer nav button{min-height:48px}
 #exploreView .explore-panel,#latestEpisodeView .explore-panel{height:calc(100dvh - 170px - env(safe-area-inset-bottom,0px));min-height:300px}
 #mobileSearchDropdown{max-height:calc(100dvh - 180px - env(safe-area-inset-bottom,0px))}
}

/* Full-page navigation and profile sheet. */
.pirate-navbar{display:none!important}
body{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))!important}
body.search-page-open .app-grid,body.search-page-open #exploreView,body.search-page-open #latestEpisodeView{display:none!important}
.mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:6500;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:8px max(10px,calc((100vw - 650px)/2)) calc(8px + env(safe-area-inset-bottom,0px));background:rgba(9,14,23,.97);border-top:1px solid #30394a;box-shadow:0 -8px 24px #0004;backdrop-filter:blur(18px)}
.mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:48px;margin:0;padding:4px 0;border:0;border-radius:10px;background:transparent;color:#929cad;font:inherit;font-size:11px;line-height:1.2;box-shadow:none}
.mobile-bottom-nav svg,.profile-sheet svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mobile-bottom-nav button.active{color:#ffe4ad;background:#e7ae4510}
.mobile-bottom-nav button:focus-visible,.profile-sheet button:focus-visible{outline:2px solid #efbd77;outline-offset:-2px}
.mobile-bottom-nav .sheet-user-icon{width:32px;height:32px;object-fit:cover;border-radius:50%;display:grid;place-items:center;border:1px solid currentColor}
.profile-sheet{box-sizing:border-box;position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,600px);max-width:100%;height:auto;max-height:85dvh;overflow-y:auto;border:1px solid #394253;border-bottom:0;border-radius:26px 26px 0 0;background:#10151f;color:#eef3ff;padding:12px 16px calc(24px + env(safe-area-inset-bottom,0px));box-shadow:0 -12px 60px #0008}
.profile-sheet::backdrop{background:#0009;backdrop-filter:blur(3px)}
.sheet-handle{width:42px;height:5px;border-radius:5px;background:#647080;margin:0 auto 22px}
.profile-sheet .sheet-close{position:absolute;top:8px;right:12px;width:34px;height:34px;padding:0;background:transparent;border:0;color:#bac4d4;font-size:26px}
.profile-sheet .sheet-identity{display:flex;align-items:center;gap:14px;width:100%;margin:0 0 14px;padding:14px;border:1px solid #525465;border-radius:16px;background:linear-gradient(120deg,#302a38,#1d2532);color:inherit;text-align:left}
.sheet-identity>span:nth-child(2){flex:1;min-width:0}.sheet-name{display:block;font-size:18px;overflow-wrap:anywhere}.sheet-caption{display:block;margin-top:4px;color:#b9bdc8;font-size:13px}
.sheet-avatar .sheet-user-icon{display:grid;place-items:center;width:52px;height:52px;object-fit:cover;border-radius:50%;background:#3b344a;color:#ffe4ad}
.sheet-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
.profile-sheet .sheet-tiles button{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:16px;min-height:92px;margin:0;padding:16px;border:1px solid #343e50;border-radius:16px;background:#1b2330;color:#eef3ff;font:inherit;text-align:left}
.sheet-settings{display:grid;border-top:1px solid #30394a;padding-top:8px}
.profile-sheet .sheet-settings button{display:flex;align-items:center;gap:14px;min-height:52px;margin:0;padding:12px;border:0;border-radius:10px;background:transparent;color:#d1d7e2;font:inherit;text-align:left}
.profile-sheet [data-action="logout"]{color:#ee9b9b!important}
.search-page{width:100%;max-width:1100px;min-height:calc(100dvh - 140px);box-sizing:border-box;margin:0 auto;padding:24px}
.search-page h1{margin:0 0 20px;color:#fff0cf;font-size:2rem}
.search-page>label{display:block;margin-bottom:10px;color:#b8c3d5}
.search-page #unifiedSearch{width:100%;box-sizing:border-box;height:48px;padding:10px 16px;border:1px solid #46506a;border-radius:14px;background:#101725;color:#eef3ff;font:inherit;font-size:16px}
.search-page #unifiedStatus{margin:16px 0;color:#b8c3d5}
.search-page #unifiedResults{display:block;max-height:none;overflow:visible}
.search-page #unifiedResults>section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:24px}
.search-page #unifiedResults h2{grid-column:1/-1;margin:8px 0;color:#efbd77;font-size:1.1rem}
.search-page .result-card{display:flex;align-items:center;gap:12px;min-width:0;width:100%;margin:0;padding:10px;border:1px solid #343e50;border-radius:12px;background:#1b2330;color:#eef3ff;text-align:left;font:inherit}
.search-page .result-card img{width:52px;height:76px;object-fit:cover;flex-shrink:0;border-radius:6px}
.search-page .result-card span{white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){
 .search-page{padding:18px 14px}
 .search-page #unifiedResults>section{grid-template-columns:1fr}
 #exploreView .explore-panel,#latestEpisodeView .explore-panel{height:calc(100dvh - 110px - env(safe-area-inset-bottom,0px))}
}

.profile-sheet{padding-top:20px}
.profile-sheet .sheet-identity{box-sizing:border-box;cursor:default}
body.search-page-open .app-grid:not([hidden]){display:none!important}

/* Main sections belong to the document, without an outer card or inner scroll pane. */
body .build-feedback-card,body #exploreView .explore-panel,body #latestEpisodeView .explore-panel,body #searchPage{
 border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;resize:none!important;
 padding:12px 0!important;height:auto!important;max-height:none!important;overflow:visible!important;
}
body #exploreView .explore-panel,body #latestEpisodeView .explore-panel{min-height:0!important}
body #exploreView .explore-scroll,body #latestEpisodeView .explore-scroll{height:auto!important;max-height:none!important;overflow:visible!important;flex:none!important;resize:none!important}
#exploreScrollCue,#latestEpisodeScrollCue{display:none!important}
.profile-sheet .sheet-identity:focus{outline:none;box-shadow:none}

/* Section controls stay accessible above the scrolling results. */
.page-sticky-controls{position:sticky;top:0;z-index:20;flex-shrink:0;align-self:stretch;box-sizing:border-box;padding:calc(12px + env(safe-area-inset-top,0px)) 0 10px;margin-top:-12px;background:#0b101b;box-shadow:0 8px 14px -12px #000}
.page-sticky-controls .explore-toolbar,.page-sticky-controls .latest-mode-switch{margin-bottom:0}
.page-sticky-controls #exploreFilterPanel:not([hidden]){margin-top:12px}
.search-page .page-sticky-controls>label{display:block;margin-bottom:10px;color:#b8c3d5}

/* One canvas color, with opaque edge-to-edge navigation surfaces. */
html,body{background:var(--bg)}
.mobile-bottom-nav{background:var(--bg);backdrop-filter:none;box-shadow:none}
.page-sticky-controls{background:var(--bg);box-shadow:none;isolation:isolate}
.page-sticky-controls::before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:var(--bg);box-shadow:0 0 0 100vmax var(--bg);clip-path:inset(0 -100vmax);pointer-events:none}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);background:var(--bg);z-index:6400;pointer-events:none}

/* Quiet reminder that a selected stream is available elsewhere in the app. */
.mobile-bottom-nav .stream-waiting .sheet-user-icon{outline:2px solid #efbd77;outline-offset:3px;animation:stream-reminder 3.6s ease-in-out infinite}
@keyframes stream-reminder{0%,100%{outline-color:rgba(239,189,119,.25);box-shadow:0 0 0 4px transparent}50%{outline-color:#efbd77;box-shadow:0 0 12px 4px rgba(189,97,240,.25)}}
.profile-sheet .sheet-tiles button.stream-highlight{border-color:#efbd77;background:linear-gradient(120deg,#392f28,#30263f);color:#ffe4ad;box-shadow:inset 0 0 0 1px #efbd7740}
@media(prefers-reduced-motion:reduce){.mobile-bottom-nav .stream-waiting .sheet-user-icon{animation:none;outline-color:#efbd77}}

/* Playback is part of the page; recommendation rows expand on request. */
.player-card,#playbackControls{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
.control-sidebar{display:none!important}
#activeSelectedCardArea{margin:0 0 14px;width:100%}
#activeSelectedCardArea .selected-card{background:transparent;border:0;box-shadow:none;padding:0}
#playbackControls #loadBtn{width:100%;margin-top:12px}
body:not(.home-idle) .app-grid{grid-template-columns:minmax(0,1fr)!important}
.control-sidebar-stack,.side-column{height:auto!important;max-height:none!important}
#similarPanel{background:transparent;border:0;box-shadow:none;padding:0}
#relatedAnimeSection.recommendation-disclosure,.recommendation-disclosure{display:block;border:1px solid #343e50;border-radius:12px;background:#101725;margin:12px 0;overflow:hidden}
.recommendation-disclosure summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;cursor:pointer;list-style:none;color:#fff0cf}
.recommendation-disclosure summary::-webkit-details-marker{display:none}
.recommendation-disclosure summary::after{content:'⌄';font-size:24px}
.recommendation-disclosure[open] summary::after{transform:rotate(180deg)}
.recommendation-disclosure summary h2{margin:0;font-size:1.1rem}
.recommendation-disclosure .similar-scroll{padding:0 16px 16px}
.recommendation-disclosure:not([open])>.similar-scroll{display:none}
/* Desktop arrangement shares the mobile controls and account actions. */
.desktop-brand,.desktop-search{display:none}
.profile-sheet .guest-identity{cursor:pointer}
.profile-sheet .guest-identity:focus-visible{outline:2px solid #efbd77;outline-offset:3px}
@media(min-width:1024px){
 body{padding-top:90px!important;padding-bottom:24px!important}
 .mobile-bottom-nav{inset:0 0 auto;height:78px;box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:12px 32px;border-top:0;border-bottom:1px solid #30394a}
 .mobile-bottom-nav .desktop-brand{display:flex;margin-right:auto;align-items:center;flex-shrink:0}
 .desktop-brand img{width:150px;height:50px;object-fit:contain}
 .mobile-bottom-nav button{flex-direction:row;gap:8px;padding:10px 16px;min-height:44px;border-radius:12px;white-space:nowrap}
 .mobile-bottom-nav button svg{width:20px;height:20px}
 .mobile-bottom-nav button span{font-size:14px}
 .mobile-bottom-nav [data-tab="search"]{display:none}
 .mobile-bottom-nav [data-tab="profile"]{padding:8px;flex-shrink:0}
 .mobile-bottom-nav .desktop-search{display:block;flex:1;max-width:420px;min-width:180px;margin-left:auto}
 .desktop-search input{box-sizing:border-box;width:100%;height:44px;border-radius:24px;padding:10px 18px}
 .page-sticky-controls{top:78px}
 body.home-idle .app-grid:not([hidden]){max-width:1280px}
 .profile-sheet{inset:86px 24px auto auto;margin:0;width:380px;max-height:calc(100dvh - 110px);border-radius:20px;padding:20px}
 .profile-sheet::backdrop{background:rgba(0,0,0,.25);backdrop-filter:none}
 .profile-sheet .sheet-identity{padding:14px;gap:14px}
 .profile-sheet .sheet-avatar img,.profile-sheet .sheet-avatar .sheet-user-icon{width:48px;height:48px}
 .profile-sheet .sheet-tiles button{padding:14px;min-height:86px;font-size:15px}
 .profile-sheet .sheet-settings button{padding:12px;font-size:15px}
 .search-page .search-page-field,.search-page .page-sticky-controls>label{display:none}
}

/* Balanced desktop navigation; mobile keeps its five original destinations. */
.desktop-menus,.desktop-actions{display:contents}
.mobile-bottom-nav .desktop-stream{display:none}
@media(min-width:1024px){
 .mobile-bottom-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:24px;padding:12px 32px}
 .mobile-bottom-nav .desktop-menus{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;gap:10px}
 .mobile-bottom-nav .desktop-search{grid-column:1;grid-row:1;width:100%;max-width:360px;min-width:0;margin:0;justify-self:start}
 .mobile-bottom-nav .desktop-actions{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0}
 .mobile-bottom-nav .desktop-menus button,.mobile-bottom-nav .desktop-stream{display:flex;flex:none;width:auto;height:44px;padding:10px 18px;border:1px solid #354057;border-radius:12px;background:linear-gradient(180deg,#222c3d,#171e2b);color:#c8d1e1;font-size:14px;font-weight:600;line-height:1.2;gap:8px}
 .mobile-bottom-nav .desktop-menus button:hover,.mobile-bottom-nav .desktop-stream:hover{border-color:#b18b50;color:#ffe4ad;background:#283044}
 .mobile-bottom-nav .desktop-menus button.active,.mobile-bottom-nav .desktop-stream.active{border-color:#d5a65c;color:#ffe4ad;background:linear-gradient(115deg,#3b3028,#34253f);box-shadow:inset 0 0 0 1px #efbd771a}
 .mobile-bottom-nav .desktop-stream[hidden]{display:none}
 .mobile-bottom-nav [data-tab="profile"]{width:44px;height:44px;min-width:44px;margin:0;background:transparent}
 .mobile-bottom-nav button svg{display:block;flex-shrink:0}
 .mobile-bottom-nav .desktop-search input{max-width:none;font-size:15px}
}
@media(min-width:1024px) and (max-width:1200px){
 .mobile-bottom-nav{gap:14px;padding-inline:20px}
 .mobile-bottom-nav .desktop-menus button,.mobile-bottom-nav .desktop-stream{padding-inline:12px}
 .mobile-bottom-nav .desktop-actions{gap:10px}
}

@media(min-width:1024px){
 .mobile-bottom-nav .desktop-actions{width:100%;justify-self:end}
 .mobile-bottom-nav .desktop-actions .desktop-search{flex:1;width:auto;max-width:360px;min-width:0;margin-left:auto}
 .profile-sheet{transform-origin:top right;border-bottom:1px solid #394253;box-shadow:0 16px 48px #0008}
}

.profile-sheet .recommended-adblocker{display:flex;align-items:center;gap:14px;min-height:52px;box-sizing:border-box;padding:12px;border-radius:10px;background:#222c3d;color:#ffe4ad;text-decoration:none;font:inherit}
.profile-sheet .recommended-adblocker:hover{background:#222c3d;color:#ffe4ad}
.profile-sheet .recommended-adblocker:focus-visible{outline:2px solid #efbd77;outline-offset:-2px}
.profile-sheet .recommended-adblocker svg{flex-shrink:0}
.profile-sheet .instructions-box{margin:0 0 12px}

#castPanel{margin:24px 0;background:transparent;border:0;min-width:0}
#castPanel h2{font-size:1.25rem;color:#fff0cf;margin:0 0 16px}
.cast-scroll{display:flex;gap:18px;overflow-x:auto;padding-bottom:12px;max-width:100%;cursor:grab}
.cast-card{flex:0 0 130px;min-width:0;display:flex;flex-direction:column;gap:6px}
.cast-card img,.cast-placeholder{width:130px;height:170px;object-fit:cover;border-radius:12px;background:#202939}
.cast-placeholder{display:grid;place-items:center;text-align:center;color:#aab5c7;font-size:13px}
.cast-card strong{font-size:14px;color:#eef3ff}.cast-card span{font-size:13px;color:#aab5c7}
@media(min-width:1024px){
 #similarDisclosure.desktop-recommendations{border:0;border-radius:0;background:transparent;margin:24px 0}
 #similarDisclosure.desktop-recommendations summary{padding:0 0 16px;cursor:default;pointer-events:none}
 #similarDisclosure.desktop-recommendations summary::after{display:none}
 #similarDisclosure.desktop-recommendations>.similar-scroll{display:flex!important;padding:0 0 12px}
 #similarDisclosure.desktop-recommendations .similar-card{flex:0 0 150px;width:150px}
 #similarDisclosure.desktop-recommendations .similar-card img{width:150px;height:210px;object-fit:cover;border-radius:12px}
}

/* One compact playback surface, with the title inside its top edge. */
body .player-card{border:1px solid #354057!important;border-radius:18px!important;background:#141c29!important;padding:16px!important;box-shadow:0 8px 24px #0002!important;overflow:hidden}
body #activeSelectedCardArea{margin:0 0 12px}
body #activeSelectedCardArea .selected-card{background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important}
body #playbackControls{margin:12px 0 0!important;gap:10px}
body #playbackControls #loadBtn{margin-top:10px}
.similar-scroll,.cast-scroll{scrollbar-width:none;-ms-overflow-style:none}
.similar-scroll::-webkit-scrollbar,.cast-scroll::-webkit-scrollbar{display:none}
.server-selection{width:100%;margin-top:10px}
.server-selection>summary{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #b18b50;border-radius:10px;background:#232d40;color:#ffe4ad;cursor:pointer;list-style:none}
.server-selection>summary::-webkit-details-marker{display:none}
.server-selection>summary strong{margin-left:auto;padding:4px 10px;border-radius:8px;background:linear-gradient(110deg,#d99847,#b35fe1);color:white;font-size:13px}
.server-selection>summary::after{content:'⌄'}
.server-selection[open]>summary::after{transform:rotate(180deg)}
.server-selection .source-guidance-actions{margin-top:10px}
@media(min-width:1024px){
 .server-selection>summary{display:none}
 .server-selection .source-guidance-actions{margin-top:0}
 #similarPanel .recommendation-disclosure{border:0;border-radius:0;background:transparent;margin:24px 0;overflow:visible}
 #similarPanel .recommendation-disclosure summary{padding:0 0 16px;cursor:default}
 #similarPanel .recommendation-disclosure summary::after{display:none}
 #similarPanel .recommendation-disclosure .similar-scroll{padding:0 0 12px}
}
@media(max-width:1023px){body .player-card{padding:10px!important;border-radius:14px!important}}

/* Shared edges and compact spacing inside the playback panel. */
body #activeSelectedCardArea .selected-anime{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;margin:0!important}
body .player-card .player-shell{margin:0!important;width:100%;box-sizing:border-box}
body .player-card .iframe-wrap{width:100%;box-sizing:border-box}
body #playbackControls{margin-top:8px!important;padding:0!important}
body #playbackPrimaryControls,body #playbackControls .playback-fields,body #playbackControls .playback-nav,body #originalPlayerServers{gap:8px!important}
body #playbackControls .source-guidance-actions{margin-top:8px;gap:8px}
body #playbackControls #loadBtn{margin-top:8px}
.mobile-server-field{display:none}
@media(max-width:1023px){
 .mobile-server-field:not([hidden]){display:block;margin-top:8px;color:#ffe4ad;font-size:13px}
 .mobile-server-field>span{display:block;margin-bottom:5px}
 .mobile-server-field select{width:100%;box-sizing:border-box;min-height:44px;border:1px solid #d5a65c;border-radius:10px;background:#293247;color:#ffe4ad;padding:10px 12px;font:inherit;font-size:15px;font-weight:600}
 #originalPlayerServers{display:none!important}
}

/* Open recommendation rows at every width, matching the cast row. */
body #similarPanel .recommendation-disclosure{border:0!important;border-radius:0!important;background:transparent!important;margin:20px 0!important;overflow:visible}
body #similarPanel .recommendation-disclosure summary{padding:0 0 12px;cursor:default}
body #similarPanel .recommendation-disclosure summary::after{display:none}
body #similarPanel .recommendation-disclosure .similar-scroll{padding:0 0 8px}
/* Use a single gap between controls rather than stacking margins and gaps. */
body .player-card #playbackControls{gap:6px!important;margin-top:6px!important}
body .player-card #playbackControls .source-guidance-actions,body .player-card #playbackControls #loadBtn,body .player-card #playbackControls .mobile-server-field{margin:0!important}
body .player-card #playbackPrimaryControls,body .player-card #playbackControls .episode-grid,body .player-card #playbackControls .playback-nav{gap:6px!important}
body .player-card #playbackPrimaryControls:has(#movieForm.active){display:none}
body .player-card #playbackControls button,body .player-card #playbackControls select{min-height:40px;padding-top:8px;padding-bottom:8px}
@media(max-width:1023px){
 body .player-card #playbackControls .source-guidance-actions{display:none!important}
 body .player-card #originalPlayerServers:not([hidden]){display:none!important}
 body .player-card .mobile-server-field>span{margin-bottom:3px}
}

/* Align recommendation content and let poster height determine the title position. */
body #similarPanel{padding:0!important;gap:0}
body #similarPanel .similar-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;height:auto;min-width:0}
body #similarPanel .similar-card img{flex-shrink:0;box-sizing:border-box}
body #similarPanel .similar-card strong{position:static;margin:0;text-align:left}
body #similarPanel .similar-scroll{scroll-snap-type:none;scroll-behavior:auto;user-select:none;-webkit-user-select:none}
body.home-idle #castPanel,body.home-menu #castPanel{display:none!important}
.profile-sheet .sheet-settings{grid-template-columns:minmax(0,1fr);grid-auto-flow:row;gap:8px;align-items:start}
.profile-sheet .sheet-settings>*{grid-column:1/-1;grid-row:auto;min-width:0}
.profile-sheet .recommended-adblocker{background:transparent;color:#ffe4ad}
.profile-sheet .recommended-adblocker:hover,.profile-sheet .recommended-adblocker:focus-visible{background:#222c3d;color:#ffe4ad}
.profile-sheet .instructions-box{box-sizing:border-box;margin:0 0 8px}
.profile-sheet .instructions-panel{box-sizing:border-box;max-width:100%}

/* Keep disclosure rows within the grid so the row itself can scroll. */
body #similarPanel{grid-template-columns:minmax(0,1fr);width:100%;box-sizing:border-box}
body #similarPanel .recommendation-disclosure{min-width:0;width:100%;box-sizing:border-box}
body #similarPanel .similar-scroll{min-width:0;max-width:100%;width:100%;box-sizing:border-box;overflow-x:auto}
.profile-sheet .sheet-settings button:hover,.profile-sheet .sheet-settings button:focus-visible,.profile-sheet .sheet-tiles button:hover,.profile-sheet .sheet-tiles button:focus-visible,.profile-sheet .guest-identity:hover,.profile-sheet .instructions-box summary:hover{background:#303c50}

/* Muted playback controls against the site's dark canvas. */
body .player-card{background:#151b25!important;border-color:#2d3746!important;box-shadow:0 8px 24px #0003!important}
body .player-card #originalPlayerServers .original-server-button.active{background:linear-gradient(115deg,#3b3228,#342c40)!important;border-color:#b18b50!important;color:#ffe2a7!important;box-shadow:inset 0 0 0 1px #d5a65c18!important}
body .player-card #playbackControls #loadBtn{background:#263043!important;border:1px solid #73634c!important;color:#ead4ad!important;box-shadow:none!important}
body .player-card #playbackControls #loadBtn:hover{background:#303a4d!important;border-color:#c39b60!important;color:#ffe4ad!important}
body .player-card #originalPlayerServers .original-server-button.active:hover{background:#44394a!important;border-color:#d5a65c!important}
body .player-card .mobile-server-field select{background:#222a38;border-color:#8d754f;color:#ead4ad}
body .player-card #playbackControls #loadBtn:focus-visible{outline:2px solid #d5a65c;outline-offset:2px}

.cast-tabs{display:flex;align-items:center;gap:12px;margin-bottom:16px;color:#738095}
.cast-tabs button{background:transparent;border:0;color:#aab5c7;font:inherit;font-size:1.2rem;font-weight:700;padding:6px 0;cursor:pointer}
.cast-tabs button[aria-pressed="true"]{color:#ffe4ad}
.cast-scroll[hidden],.title-statistics[hidden]{display:none!important}
button.cast-card{padding:0;border:0;background:transparent;text-align:left;font:inherit;cursor:pointer}
button.cast-card:hover img{outline:2px solid #b18b50;outline-offset:-2px}
.title-statistics{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:20px;padding:8px 0}
.title-statistics strong,.title-statistics span{display:block}.title-statistics strong{color:#aab5c7;margin-bottom:6px}.title-statistics span{color:#eef3ff}
.person-popup{box-sizing:border-box;width:min(860px,94vw);max-height:85dvh;overflow:auto;border:1px solid #465167;border-radius:18px;padding:24px;background:#151c28;color:#eef3ff}
.person-popup::backdrop{background:#000a}.person-popup h2{margin:0 44px 20px 0;color:#ffe4ad}
.person-close{float:right;background:#273145;border:0;border-radius:8px;color:white;font-size:26px;cursor:pointer}
.person-photo{width:100px;height:145px;object-fit:cover;border-radius:10px;float:left;margin:0 18px 12px 0}
.person-biography{clear:both;white-space:pre-line;line-height:1.6;color:#c5cedd}
.person-credits{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:16px}
.person-credit{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:0;background:transparent;color:#eef3ff;text-align:left;cursor:pointer}
.person-credit img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:10px}.person-credit span{color:#aab5c7}

.person-popup .person-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.person-popup .person-header h2{margin:0}
.person-popup button.person-close{float:none;flex:0 0 36px;width:36px!important;height:36px;padding:0;margin:0;line-height:1}
.person-popup .person-photo{margin-bottom:16px}
.person-popup .person-role{clear:both;margin-top:24px;min-width:0}
.person-popup .person-credits{display:flex;overflow-x:auto;gap:14px;scrollbar-width:none;padding:2px 0 8px;cursor:grab}
.person-popup .person-credits::-webkit-scrollbar{display:none}
.person-popup button.person-credit{flex:0 0 130px;width:130px!important;justify-content:flex-start;font:inherit;text-align:left}
.person-credit strong{font-size:14px;line-height:1.3}.person-credit span{font-size:12px;line-height:1.4}
.credit-placeholder{display:grid;place-items:center;width:100%;aspect-ratio:2/3;background:#273145;border-radius:10px;font-size:12px}
body #castPanel .cast-tabs{justify-content:flex-start;gap:8px}
body #castPanel .cast-tabs button{width:auto!important;flex:0 0 auto;background:transparent;padding:0;margin:0;text-align:left;font-size:1.2rem}
body #castPanel .title-statistics{display:flex;flex-wrap:wrap;align-items:flex-start;gap:20px;justify-content:flex-start}
.director-portraits{display:flex;gap:14px;max-width:100%;overflow-x:auto}
.director-card{display:flex;flex-direction:column;gap:6px;flex:0 0 120px;width:120px!important;border:0;background:transparent;padding:0;text-align:left;cursor:pointer;color:#eef3ff}
.director-card img{width:120px;height:160px;object-fit:cover;border-radius:12px}
.production-box{display:grid;gap:14px;padding:18px;background:#192231;border:1px solid #354057;border-radius:12px;width:min(340px,100%);box-sizing:border-box}
.production-box strong{font-size:13px}.production-box span{font-size:15px}

/* Hide scroll chrome without clipping overflowing content. */
.director-portraits,.person-popup{scrollbar-width:none;-ms-overflow-style:none}
.director-portraits::-webkit-scrollbar,.person-popup::-webkit-scrollbar{display:none}
.director-portraits{cursor:grab;min-width:0}
