/* Single shell geometry: admin controls -> announcement -> site header.
   studio-mobile-core measures these heights; CSS fallbacks cover first paint. */
body.studio-theme{--studio-admin-height:0px;--studio-offer-height:44px;--a2-shell-scroll:0px;--a2-shell-stack:calc(var(--studio-admin-height) + var(--studio-offer-height))}
body.studio-theme.a2-control-visible{--studio-admin-height:44px;padding-top:var(--studio-admin-height)!important}
body.studio-theme.a2-control-visible:has(.a2-smart-control.mode-compact){--studio-admin-height:40px}
body.studio-theme:not(:has(.studio-offer)),
body.studio-theme:has(.studio-offer.is-hidden),
body.studio-theme:has(.studio-site-header.is-ad-hidden){--studio-offer-height:0px}
body.studio-theme .studio-offer{top:var(--studio-admin-height)!important;transform:translate3d(0,calc(-1 * var(--a2-shell-scroll)),0);will-change:transform;transition-property:opacity,visibility}
body.studio-theme .studio-site-header{top:max(0px,calc(var(--a2-shell-stack) - var(--a2-shell-scroll)))!important;transition-property:background,box-shadow,border-color}
body.studio-theme .studio-account-popover.is-member{max-height:calc(100dvh - 132px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(var(--studio-rgb),.55) transparent}
@media(max-width:900px){body.studio-theme.a2-control-visible{--studio-admin-height:42px}}
/* One clearance contract for every Studio internal page. */
body.studio-theme{--studio-header-height:92px;--studio-shell-clearance:calc(var(--studio-header-height) + var(--studio-offer-height) + 12px)}
@media(max-width:820px){body.studio-theme{--studio-header-height:68px}}
/* Restore a dismissed announcement before scripts initialize its controls. */
html[data-studio-offer-hidden="1"] body.studio-theme{--studio-offer-height:0px}
html[data-studio-offer-hidden="1"] .studio-offer{display:none!important}

body.studio-theme .new-episodes-page{padding-top:var(--studio-shell-clearance)!important}
body.studio-theme .a2-member-workspace{padding-top:var(--studio-shell-clearance)!important}
/* Safety contract for any new internal page that is not preceded by the member workspace. */
body.studio-theme:not(:has(.a2-member-workspace)) .studio-safe-page{padding-top:var(--studio-shell-clearance)!important}
body.studio-theme .studio-catalog-hero{padding-top:var(--studio-shell-clearance)!important}
body.studio-theme .detail-hero{padding-top:calc(var(--studio-shell-clearance) + 28px)!important}
body.studio-theme .watch-wrap{padding-top:calc(var(--studio-shell-clearance) + 18px)!important}
body.studio-theme .download-hero{padding-top:calc(var(--studio-shell-clearance) + 18px)!important}
body.studio-theme.has-admin-frontend-bar:has(.a2-control-surface.mode-floating) .studio-catalog-hero{padding-top:var(--studio-shell-clearance)!important}

/* The member command bar has seven destinations; reserve real space for all. */
body.studio-theme .a2-workspace-shell{
    width:min(1540px,calc(100% - 40px))!important;
    max-width:none!important;
    grid-template-columns:220px minmax(0,1fr) 230px;
    padding:14px!important;
}
/* Member workspace typography must remain readable at desktop density. */
body.studio-theme .a2-workspace-identity small{font-size:8px;line-height:1.35}
body.studio-theme .a2-workspace-identity strong{font-size:16px;line-height:1.35}
body.studio-theme .a2-workspace-identity em{font-size:10px;line-height:1.45}
body.studio-theme .a2-workspace-nav a{
    min-height:62px;
    gap:8px;
}
body.studio-theme .a2-workspace-nav a>i{font-size:18px;line-height:1}
body.studio-theme .a2-workspace-nav span{gap:3px}
body.studio-theme .a2-workspace-nav b{font-size:12px;line-height:1.4}
body.studio-theme .a2-workspace-nav small{font-size:9px;line-height:1.4}
body.studio-theme .a2-workspace-upgrade b{font-size:12px;line-height:1.4}
body.studio-theme .a2-workspace-upgrade small{font-size:9px;line-height:1.4}
body.studio-theme .a2-workspace-upgrade>i{font-size:22px}
body.studio-theme .a2-workspace-upgrade em{font-size:15px}
@media(min-width:1251px){
    body.studio-theme .a2-workspace-nav{
        display:grid;
        grid-template-columns:repeat(7,minmax(88px,1fr));
        gap:4px;
        overflow:visible;
    }
    body.studio-theme .a2-workspace-nav a{
        width:auto;
        min-width:0;
        padding-inline:7px;
    }
}
@media(max-width:1250px){
    body.studio-theme .a2-workspace-shell{grid-template-columns:210px minmax(0,1fr)}
}
@media(max-width:950px){
    body.studio-theme .a2-workspace-shell{width:calc(100% - 24px)!important;grid-template-columns:1fr}
}

/* Match the animated footer's transparent wave bed to member-page canvas. */
body.studio-theme:has(.a2-member-workspace) .studio-exact-footer.studio-footer-compact,
body.studio-theme:has(.a2-member-workspace) .studio-compact-waves{
    background:var(--studio-color-canvas,#020713)!important;
}
body.studio-theme:has(.studio-catalog-page) .studio-exact-footer.studio-footer-compact,
body.studio-theme:has(.studio-catalog-page) .studio-compact-waves{background:var(--studio-color-canvas,#020713)!important}
body.studio-theme.studio-plans-route .studio-exact-footer.studio-footer-compact,
body.studio-theme.studio-plans-route .studio-compact-waves{background:var(--studio-color-canvas,#020713)!important}
