/* WebStudio 的工作区材质。只匹配页面控件和外层容器。 */
:root {
    --brand-ink: #263549;
    --brand-muted: #5d6f85;
    --brand-line: #cbd3df;
    --brand-canvas: radial-gradient(ellipse at 95% 0%, #dae6fb99, transparent 55%),
        radial-gradient(ellipse at 0% 80%, #e2e9f580, transparent 55%), #edf0f5;
    --brand-nav: linear-gradient(180deg, #293b52, #1d2c40);
    --brand-nav-line: #152235;
    --brand-nav-ink: #d9e7f4;
    --brand-selected: linear-gradient(180deg, #466481, #304c6b);
    --brand-selected-shadow: inset 0 1px 0 #ffffff26, inset 0 0 0 1px #ffffff15, 0 2px 5px #0c192b38;
    --brand-focus: #6ca6e5;
    --brand-paper: linear-gradient(145deg, #fff, #f8faff);
    --brand-header: linear-gradient(180deg, #fff, #edf1f7);
    --brand-inset: linear-gradient(180deg, #edf1f7, #f8fafd);
    --brand-control: linear-gradient(180deg, #fff, #edf2f9);
    --brand-control-line: #cdd7e5;
    --brand-control-ink: #426387;
    --brand-raised: inset 0 1px 0 #fff, 0 1px 2px #263b5b12, 0 4px 8px -4px #263b5b30;
    --brand-pressed: inset 0 1px 3px #24395126;
    --brand-primary: linear-gradient(180deg, #3379c1, #1b6fc4 52%, #125ba9);
    --brand-primary-line: #2168bc;
    --brand-primary-shadow: inset 0 1px 0 #ffffff60, inset 0 -1px 0 #124a8560, 0 2px 5px #1e528a33;
}

body.webbrand-material,
body.webbrand-material:is(.sweep-advanced, .single-advanced, .smart-advanced) {
    background: var(--brand-canvas);
}

.webbrand-material :is(.model-header, .export-tabbar, .site-header, .download-header),
.webbrand-material:is(.sweep-page, .single-pick-page, .smart-picks-page) :is(.model-header, .export-tabbar) {
    background: var(--brand-nav);
    border-color: var(--brand-nav-line);
    color: var(--brand-nav-ink);
    box-shadow: inset 0 1px 0 #ffffff0d, 0 2px 8px #10213b1c;
}

.webbrand-material :is(.model-brand-main, .site-logo, .download-brand strong) { color: #f5f8ff; }
.webbrand-material :is(.model-brand-sub, .download-brand small, .download-nav, .download-nav a) { color: var(--brand-nav-ink); }
.webbrand-material .model-header .model-help-link,
.webbrand-material .model-header .model-help-link:hover {
    background: var(--brand-selected);
    border-color: #526a84;
    color: var(--brand-nav-ink);
    box-shadow: inset 0 1px 0 #ffffff20;
}
.webbrand-material .model-header .model-help-link:hover { border-color: var(--brand-focus); color: #fff; }

.webbrand-material .model-header :is(.sweep-category-tabs, .single-edition-tabs, .smart-edition-tabs, .league-play-control) {
    background: #17273a;
    box-shadow: inset 0 1px 3px #0b192c66, 0 1px 0 #ffffff0f;
}
.webbrand-material .model-header :is(.sweep-category-tab, .smart-edition-tab, .single-edition-tab, .league-play-control .league-choice),
.webbrand-material .export-tabbar .model-tab { color: var(--brand-nav-ink); }
.webbrand-material .model-header :is(.sweep-category-tab, .smart-edition-tab, .single-edition-tab, .league-play-control .league-choice):hover,
.webbrand-material .export-tabbar .model-tab:hover { background: #294158; color: #fff; }
.webbrand-material .model-header :is(.sweep-category-tab, .smart-edition-tab, .single-edition-tab, .league-play-control .league-choice).active,
.webbrand-material .export-tabbar .model-tab.active {
    background: var(--brand-selected);
    color: #fff;
    box-shadow: var(--brand-selected-shadow);
}
.webbrand-material .export-tabbar .model-tab.active::after { background: var(--brand-focus); }
body.webbrand-material.sweep-nav-page.sweep-nav-editions {
    --sweep-secondary-bg: var(--brand-header);
    --sweep-secondary-border: var(--brand-line);
    --sweep-secondary-text: var(--brand-muted);
    --sweep-secondary-active: #254e78;
    --sweep-secondary-hover: #e1eafa;
    --sweep-secondary-line: #3475ae;
}

/* 面板、工具栏和按钮保持原有排版。 */
.webbrand-material :is(.site-main, .single-main, .guide-main, .tools-main, .league-intro, .bd-filters, .site-footer) { color: var(--brand-ink); }
.webbrand-material :is(.section, .coming-hero-card, .coming-card, .guide-section, .guide-feature,
    .about-section, .about-info-block, .about-version-card, .about-faq-item, .about-contact-card,
    .download-feature, .download-ios, .download-detail-card, .trend-panel, .bd-filters,
    .smart-panel, .single-status, .poster-save-card, .teamrank-save-card, .brand-contact-card) {
    background: var(--brand-paper);
    border-color: var(--brand-line);
    box-shadow: none;
}
.webbrand-material :is(.section, .coming-hero-card) { border: 1px solid var(--brand-line); }
.webbrand-material :is(.site-footer, .smart-panel-head, .trend-panel-head, .header-tools, .guide-directory),
.webbrand-material:is(.sweep-page, .single-pick-page, .smart-picks-page) .header-tools,
.webbrand-material:is(.sweep-advanced, .single-advanced, .smart-advanced) .site-footer {
    background: var(--brand-header);
    border-color: var(--brand-line);
    box-shadow: inset 0 1px 0 #fff;
}
.webbrand-material .smart-panel-title { color: var(--brand-ink); }
.webbrand-material.smart-picks-page .smart-statistics { color: var(--brand-ink); }
.webbrand-material.basket-plan-page .smart-statistics-heading > span { color: var(--brand-muted); }
.webbrand-material .site-footer-inner { color: var(--brand-muted); }
.webbrand-material .site-footer .technical-support-link { color: var(--brand-control-ink); }
.webbrand-material :is(.smart-statistic, .trend-summary-card, .teamrank-theme-control) {
    background: var(--brand-inset);
    border-color: #dce3ed;
    box-shadow: none;
}
.webbrand-material :is(.about-hero, .trend-hero, .download-hero) {
    background: radial-gradient(ellipse at 90% 0%, #46648175, transparent 65%), var(--brand-nav);
    color: #fff;
    box-shadow: none;
}

.webbrand-material :is(.header-tools, .bd-filters, .teamrank-context, .site-footer-actions, .coming-actions, .download-actions, .download-ios-heading, .about-contact-card)
    :is(.qr-upload-btn, .qr-clear-btn, .poster-zoom-btn, .theme-btn, .tabbar-btn, .league-choice, .teamrank-theme-btn,
        .teamrank-pager button, .bd-date-tab, .bd-retry, .bd-issue-field select, .site-footer-contact,
        .site-footer-about, .app-download-entry, .btn.secondary, .download-secondary, .about-copy-button),
.webbrand-material.sweep-advanced .header-tools :is(.qr-upload-btn, .qr-clear-btn, .poster-zoom-btn):hover,
.webbrand-material.single-advanced .header-tools :is(.qr-upload-btn, .qr-clear-btn):hover {
    background: var(--brand-control);
    border: 1px solid var(--brand-control-line);
    color: var(--brand-control-ink);
    box-shadow: var(--brand-raised);
}
.webbrand-material .header-tools :is(.poster-zoom-btn, .league-choice, .theme-btn, .teamrank-theme-btn).active,
.webbrand-material.sweep-advanced .header-tools .poster-zoom-btn.active,
.webbrand-material .bd-filters .bd-date-tab.active {
    background: var(--brand-inset);
    border-color: #9db5d1;
    color: #254e78;
    box-shadow: var(--brand-pressed);
}
.webbrand-material .bd-issue-field { color: var(--brand-ink); }
.webbrand-material :is(.header-tools .tabbar-btn.primary, .coming-actions .btn:not(.secondary), .download-primary,
    .download-ios-open, .smart-refresh, .poster-save-primary, .teamrank-save-primary, .trend-export-dialog .action-btn.primary),
.webbrand-material:is(.sweep-advanced, .single-advanced) .header-tools .tabbar-btn.primary:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary-line);
    color: #fff;
    box-shadow: var(--brand-primary-shadow);
}
.webbrand-material :is(.header-tools .tabbar-btn.primary, .download-primary, .smart-refresh, .poster-save-primary):hover { filter: brightness(1.06); }
.webbrand-material :is(.header-tools, .export-tabbar, .model-header, .bd-filters, .tools-metro, .smart-rank-list)
    :is(a, button, label, select):focus-visible { outline-color: var(--brand-focus); }

/* 单场分类、竞篮推荐榜单和工具入口。 */
.webbrand-material .single-types button,
.webbrand-material .single-types button:enabled:hover,
.webbrand-material.basket-plan-page .smart-rank-item {
    background: var(--brand-control);
    border-color: var(--brand-control-line);
    color: var(--brand-muted);
    box-shadow: var(--brand-raised);
}
.webbrand-material .single-types strong,
.webbrand-material.basket-plan-page .smart-rank-name { color: var(--brand-ink); }
.webbrand-material .single-types button:is([aria-selected="true"], [aria-selected="true"]:enabled:hover),
.webbrand-material.basket-plan-page .smart-rank-item.active {
    background: linear-gradient(145deg, #fff, #eaf2fc);
    border-color: #87a9cf;
    color: var(--brand-ink);
    box-shadow: inset 0 1px 0 #fff;
}
.webbrand-material .single-types button[aria-selected="true"]::after { background: #e1edfc; border-color: #7da1c7; color: #295887; }
.webbrand-material .single-types button[aria-selected="true"] .single-type-rate:is(.is-high, .is-low) { background: #fff; }
.webbrand-material .single-types button:not([aria-selected="true"]) { --single-rate-high: #a4413b; --single-rate-low: #087f5b; }
.webbrand-material .single-types button:not([aria-selected="true"])::after { background: #fff; border-color: #91a5bd; }
.webbrand-material .single-main :is(.single-period, .single-origin-note, .single-status:not(.is-error)) { color: var(--brand-muted); }
.webbrand-material .single-status.is-error { color: #a4413b; }
.webbrand-material .tools-metro .metro-tile {
    background: var(--brand-paper);
    border: 1px solid var(--brand-line);
    color: var(--brand-ink);
}
.webbrand-material .tools-metro .metro-tile:hover { border-color: #9db5d1; box-shadow: none; transform: none; }
.webbrand-material .metro-tile-copy p { color: var(--brand-muted); }
.webbrand-material .metro-tile-copy .metro-development { border-color: var(--brand-control-line); color: var(--brand-control-ink); }
.webbrand-material .tools-metro .metro-icon {
    padding: 8px;
    border: 1px solid #d2dce9;
    border-radius: 6px;
    background: var(--brand-header);
    box-shadow: var(--brand-raised);
    color: #426387;
}
.webbrand-material .tools-metro .metro-arrow { color: #426387; }
