body:is(.site-shell, .glass-landing) {
    --control-radius: 999px;
    --control-surface: #211e28c9;
    --control-border: #f4dff329;
    --control-accent: linear-gradient(125deg, #ed1650, #c70e38);
}

/* Keep the control shape consistent over page-specific button styles. */
body.site-shell :is(
    .site-header-layout > nav, .site-header-layout .nav-tab,
    .mobile-bottom-nav, .mobile-bottom-nav .nav-tab,
    .home-hero-watch, .home-hero-details, .banner-cta,
    .account-action, .profile-settings-tabs button, .settings-mobile-nav select,
    .bookmark-tabs button, .admin-section-tabs button,
    .account-menu button, .account-menu a:not(.menu-name),
    .search-filters-submit, .search-filters-reset, .search-filters select,
    .page-button, .member-search input, [id="admin-user-search"],
    .favorite-detail, .bookmark-detail, .watch-source-options,
    .watch-source-option, .watch-voice-field select,
    .review-button, .review-vote, .reviews-tools select,
    .profile-appearance-edit, .account-connection-notice button
),
body.glass-landing :is(.button, .glass-feature-tools button) {
    border-radius: var(--control-radius) !important;
}

body.site-shell > header .search-field #searchInput {
    min-height: 44px;
    border-color: var(--control-border);
    border-radius: var(--control-radius);
    background: var(--control-surface);
    color: #fff;
}

body.site-shell > header .search-field #searchInput:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 3px #fb718522;
}

body.site-shell > header :is(
    .frame-search-link, [data-random-anime], .search-filter-toggle,
    .notification-toggle, [data-theme-toggle]
),
body.site-shell :is(
    .carousel-arrow, .back-to-top, .home-hero-arrows button,
    button.favorite-toggle, button.bookmark-toggle, .review-close,
    .review-delete, .badge-edit-trigger, .notification-dismiss, .continue-card > button
) {
    border-radius: 50%;
}

body.site-shell :is(
    .home-hero .home-hero-watch, .daily-discovery .home-hero-watch,
    .banner-copy .banner-cta, .site-header-layout .nav-tab[aria-current="page"],
    .mobile-bottom-nav .nav-tab[aria-current="page"]
) {
    background: var(--control-accent);
    color: #fff;
    border: 1px solid #fb718566;
}

body.site-shell :is(.home-hero .home-hero-watch, .daily-discovery .home-hero-watch) {
    box-shadow: 0 8px 26px #e8174957;
}

body.site-shell .home-hero .home-hero-details,
body.site-shell .home-hero-saved :is(.favorite-toggle, .bookmark-toggle) {
    background: #17141ec9;
    border-color: #ffffff4d;
}

body.site-shell :is(
    .home-hero .home-hero-watch:hover, .daily-discovery .home-hero-watch:hover,
    .telegram-banner:hover .banner-cta
) {
    background: linear-gradient(125deg, #ff3b70, #d01142);
}

body.site-shell .home-hero .home-hero-details:hover {
    background: #3a293c;
    border-color: #f8b8c5;
}

body.site-shell :is(.site-header-layout, .mobile-bottom-nav) .nav-tab:not([aria-current]):hover {
    background: #f87d991c;
    color: #ffd2e0;
}

body.site-shell :is(button, a):focus-visible {
    outline: 2px solid #fb9cb5;
    outline-offset: 3px;
}

html.light body.site-shell {
    --control-surface: #fff;
    --control-border: #3317282b;
}

html.light body.site-shell > header .search-field #searchInput { color: #211622; }
html.light body.site-shell :is(.site-header-layout, .mobile-bottom-nav) .nav-tab:not([aria-current]):hover { color: #9c0c36; }

@media (min-width: 900px) {
    body.site-shell > header:has(> .site-header-layout) {
        width: min(1240px, calc(100% - 48px));
        margin: 12px auto 0;
        top: 10px;
        border: 1px solid var(--control-border) !important;
        border-radius: var(--control-radius);
    }

    body.site-shell > header:has(> .site-header-layout)::before {
        border-radius: inherit;
        background: #17131ed9;
        opacity: 1;
        visibility: visible;
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    body.site-shell.home-cinema:not(.home-header-scrolled) > header:has(> .site-header-layout) {
        border-color: transparent !important;
    }

    body.site-shell.home-cinema:not(.home-header-scrolled) > header:has(> .site-header-layout)::before {
        opacity: 0;
        visibility: hidden;
    }

    body.site-shell.home-header-scrolled > header:has(> .site-header-layout)::before {
        background: #15121c;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    html.light body.site-shell > header:has(> .site-header-layout)::before { background: #fff5fae8; }
    html.light body.site-shell.home-header-scrolled > header:has(> .site-header-layout)::before { background: #fffbfd; }

    body.site-shell > header .site-header-layout {
        gap: clamp(10px, 1.35vw, 18px);
        grid-template-columns: auto auto minmax(185px, 1fr) auto;
        padding: 8px 12px 8px 20px;
    }

    body.site-shell .site-header-layout .brand-wordmark { width: clamp(115px, 14vw, 180px); }
    body.site-shell .site-header-layout > nav {
        grid-area: 1 / 2;
        justify-self: start;
        padding: 4px;
        background: #282031;
    }
    body.site-shell .site-header-layout > .site-search-row { grid-area: 1 / 3; max-width: none; justify-self: stretch; min-width: 0; }
    body.site-shell .site-header-layout > .account-desktop { grid-area: 1 / 4; }
    html.light body.site-shell .site-header-layout > nav { background: #f4eaf3; }
    body.site-shell .site-header-layout .nav-tab { padding: 8px clamp(8px, 1.1vw, 15px); }
}

@media (max-width: 767px) {
    body.site-shell > nav.mobile-bottom-nav {
        left: 10px;
        right: 10px;
        padding: 5px;
        background: #18131eea;
        border-color: #fbd9ff31;
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    body.site-shell > nav.mobile-bottom-nav .nav-tab { min-height: 48px; }
    html.light body.site-shell > nav.mobile-bottom-nav { background: #fff8fbed; border-color: #381b3424; }
}
