/* ==========================================================================
   Dark Mode — component overrides (color variables from theme_customizer_css)
   Active when <html> has .dark-mode-active (set by theme-toggle JS)
   -------------------------------------------------------------------------- */

html.dark-mode-active body.site-body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* 图文叠加卡片内的说明文字保持高亮，避免被全局 .text-muted 盖成灰色 */
html.dark-mode-active .article-list-card__inner--overlay .text-muted,
html.dark-mode-active .article-list-card__inner--overlay .article-list-card__excerpt,
html.dark-mode-active .article-list-card__inner--overlay .article-list-meta,
html.dark-mode-active .article-list-card__inner--overlay .article-list-meta__item,
html.dark-mode-active .product-card--card-overlay .product-card__desc,
html.dark-mode-active .product-card--card-overlay .product-card__title {
    color: #fff !important;
}

html.dark-mode-active .text-muted,
html.dark-mode-active .text-body-secondary,
html.dark-mode-active .form-text {
    color: var(--text-muted, var(--gray-500)) !important;
}

html.dark-mode-active h1,
html.dark-mode-active h2,
html.dark-mode-active h3,
html.dark-mode-active h4,
html.dark-mode-active h5,
html.dark-mode-active h6 {
    color: var(--gray-900);
}

html.dark-mode-active a {
    color: var(--primary-color);
}

html.dark-mode-active a:hover {
    color: var(--secondary-color);
}

html.dark-mode-active .card,
html.dark-mode-active .post-card,
html.dark-mode-active .cover-card,
html.dark-mode-active .icon-card,
html.dark-mode-active .home-card,
html.dark-mode-active .article-list-card {
    background-color: transparent;
    border-color: var(--bs-border-color);
}

/* 产品 / 专题卡片：有实色底时走 --card-bg（由 --oriel-user-card-bg 映射）；透明则保持透明 */
html.dark-mode-active .product-card {
    background: var(--product-card-bg, transparent);
    background-color: var(--product-card-bg, transparent);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .product-card.product-card--has-bg {
    background: var(--product-card-bg, var(--card-bg));
    background-color: var(--product-card-bg, var(--card-bg));
}

html.dark-mode-active .collection-card,
html.dark-mode-active .collection-center-archive .collection-card,
html.dark-mode-active .page-collections .collection-card {
    background-color: var(--collection-card-bg, transparent);
    border: none;
    box-shadow: none;
}

html.dark-mode-active .card-body,
html.dark-mode-active .post-card .card-body,
html.dark-mode-active .product-card .card-body {
    background-color: var(--card-bg);
    color: var(--text-color);
}

html.dark-mode-active .article-list-card__inner--card-pad-media-flush-body-inset,
html.dark-mode-active .article-list-card__inner--card-pad-inset,
html.dark-mode-active .article-list-card__inner--list.article-list-card__inner--card-pad-media-flush-body-inset,
html.dark-mode-active .article-list-card__inner--list.article-list-card__inner--card-pad-inset {
    /* 与 taxonomy-group-card 同色；transparent 由变量本身保留 */
    background: var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)));
    border-color: var(--bs-border-color);
}

html.dark-mode-active .article-list-card__inner--card.article-list-card__inner--card-pad-media-flush-body-inset .article-list-card__body {
    background: var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active [class*="__inner--card-pad-inset"],
html.dark-mode-active [class*="__inner--card-pad-media-flush-body-inset"] {
    background: var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)));
    border-color: var(--bs-border-color);
}

html.dark-mode-active .widget-article-list--list.article-list-cards--card-pad-inset,
html.dark-mode-active .category-archive__article-list-wrap.article-list-cards--card-pad-inset {
    background: transparent;
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

html.dark-mode-active [class*="__inner--card-pad-media-flush-body-inset"] [class*="__body"] {
    background: var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active .sidebar-widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .content-widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .sidebar .widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .widget-area .widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .home-widget-area .widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .qa-sidebar-widgets .widget:not([style*="--oriel-user-bg"]),
html.dark-mode-active .widget.card:not([style*="--oriel-user-bg"]) {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

html.dark-mode-active .sidebar-widget.widget-area--pad-inset,
html.dark-mode-active .content-widget.widget-area--pad-inset,
html.dark-mode-active .widget.widget-area--pad-inset {
    background: var(--card-bg) !important;
    border-color: var(--bs-border-color);
}

html.dark-mode-active .article-mini-item,
html.dark-mode-active .icon-card,
html.dark-mode-active .icon-card-item,
html.dark-mode-active .tag-center-card,
html.dark-mode-active .cover-card__body,
html.dark-mode-active .home-card,
html.dark-mode-active .home-cards--icon-nav .home-card,
html.dark-mode-active .category-showcase-card,
html.dark-mode-active .skeleton-card {
    background: var(--oriel-dark-card-bg, var(--card-bg));
}

/* 热榜条目 / 专题条目：透明，不叠卡片底 */
html.dark-mode-active .hot-ranking-item,
html.dark-mode-active .taxonomy-article-item {
    background: transparent;
    background-color: transparent;
}

html.dark-mode-active .category-archive__item .post-card .card-body {
    background: var(--card-bg);
}

html.dark-mode-active .site-header,
html.dark-mode-active .site-bottom-header-navbar {
    background-color: #1e1e38;
    background-color: var(--dark-background-color, #1e1e38);
    border-color: var(--bs-border-color);
}

/* 顶栏图标 / 头像：深色下用浅色叠层，不用冷灰 --gray-100 */
html.dark-mode-active .site-header__icon-btn:hover,
html.dark-mode-active .site-header__icon-btn:focus-visible,
html.dark-mode-active .site-header .site-header__user-area .nova-user-center__header-avatar-btn:hover,
html.dark-mode-active .site-header .site-header__user-area .nova-user-center__header-avatar-btn:focus-visible,
html.dark-mode-active .site-header .site-header__user-menu .nova-user-center__header-avatar-btn:hover,
html.dark-mode-active .site-header .site-header__user-menu .nova-user-center__header-avatar-btn:focus-visible {
    background-color: color-mix(in srgb, #fff 10%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .site-header__nav-toggle:hover,
html.dark-mode-active .site-header__nav-toggle:focus-visible {
    background-color: transparent;
    color: var(--primary-color);
}

/* 顶栏订阅等实心主色按钮：深色主色偏浅时白字不搭，改为浅底 + 主色字 */
html.dark-mode-active .site-header__subscribe-btn,
html.dark-mode-active .mobile-nav-drawer__subscribe .site-header__subscribe-btn {
    background-color: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--dark-background-color, #1e1e38)));
    color: var(--primary-color) !important;
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    box-shadow: none;
}

html.dark-mode-active .site-header__subscribe-btn:hover,
html.dark-mode-active .site-header__subscribe-btn:focus-visible,
html.dark-mode-active .mobile-nav-drawer__subscribe .site-header__subscribe-btn:hover,
html.dark-mode-active .mobile-nav-drawer__subscribe .site-header__subscribe-btn:focus-visible {
    background-color: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--dark-background-color, #1e1e38)));
    color: var(--primary-color) !important;
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
}

html.dark-mode-active .top-bar {
    background-color: var(--top-bar-bg, color-mix(in srgb, var(--dark-background-color) 88%, #000));
    color: var(--top-bar-text, var(--dark-text-color));
}

html.dark-mode-active .top-bar .top-bar__submenu {
    color: var(--top-bar-text, var(--dark-text-color));
}

html.dark-mode-active .top-bar .top-bar__slogan,
html.dark-mode-active .top-bar .top-bar__slogan-link,
html.dark-mode-active .top-bar .top-bar__menu-link,
html.dark-mode-active .top-bar .top-bar__submenu-link {
    color: var(--top-bar-text, color-mix(in srgb, var(--dark-text-color) 88%, #fff));
}

html.dark-mode-active .nav-link {
    color: var(--gray-700);
}

html.dark-mode-active .nav-link:hover {
    color: var(--primary-color);
}

html.dark-mode-active .dropdown-menu {
    background-color: var(--gray-100);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .dropdown-item {
    color: var(--gray-700);
}

html.dark-mode-active .dropdown-item:hover,
html.dark-mode-active .dropdown-item:focus {
    background-color: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

html.dark-mode-active .navbar-nav .nav-submenu {
    background-color: var(--card-bg, var(--oriel-dark-card-bg, #1f1a1a));
    background: var(--card-bg, var(--oriel-dark-card-bg, #1f1a1a));
    border-color: var(--bs-border-color, rgba(255, 255, 255, 0.12));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html.dark-mode-active .navbar-nav .nav-submenu-link {
    color: var(--text-color, #e5e7eb);
    background: transparent;
    background-color: transparent;
}

html.dark-mode-active .navbar-nav .nav-submenu-link:hover,
html.dark-mode-active .navbar-nav .nav-submenu-link.active {
    color: var(--primary-color);
    background: transparent;
    background-color: transparent;
}

html.dark-mode-active .header-search-form .form-control {
    background-color: var(--gray-50);
    color: var(--text-color);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .header-search-form .form-control::placeholder {
    color: var(--gray-500);
}

html.dark-mode-active .site-footer {
    --footer-bg: var(--footer-bg-dark);
    --footer-text: var(--footer-text-dark);
    background-color: var(--footer-bg, var(--gray-100));
    border-top-color: var(--bs-border-color);
    color: var(--footer-text, var(--gray-600));
}

html.dark-mode-active .site-footer a {
    color: var(--footer-text, var(--gray-600));
}

html.dark-mode-active .site-footer a:hover {
    color: var(--primary-color);
}

/* 页脚社交图标：与浅色同一套「底/字/悬停」逻辑，不被 footer a 规则拆散 */
html.dark-mode-active .site-footer .footer-social__item,
html.dark-mode-active .site-footer a.footer-social__item {
    color: var(--footer-text, var(--gray-600));
    background: color-mix(in srgb, var(--footer-text, #9ca3af) 14%, var(--footer-bg, var(--dark-background-color, #1a1a2e)));
    border-color: color-mix(in srgb, var(--footer-text, #9ca3af) 20%, transparent);
}

html.dark-mode-active .site-footer .footer-social__item:hover,
html.dark-mode-active .site-footer .footer-social__item:focus-visible,
html.dark-mode-active .site-footer .footer-social__item--qrcode:focus-within,
html.dark-mode-active .site-footer a.footer-social__item:hover,
html.dark-mode-active .site-footer a.footer-social__item:focus-visible {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 16%, var(--footer-bg, var(--dark-background-color, #1a1a2e)));
    border-color: color-mix(in srgb, var(--primary-color) 32%, transparent);
}

html.dark-mode-active .footer-contact-qrcode img {
    background: color-mix(in srgb, #fff 10%, var(--footer-bg, var(--gray-100)));
    border: none;
    box-shadow: 0 1px 4px color-mix(in srgb, #000 28%, transparent);
}

html.dark-mode-active .page-hero:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]),
html.dark-mode-active .page-hero--community:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]),
html.dark-mode-active .page-hero--qa:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]),
html.dark-mode-active .page-hero--category:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]),
html.dark-mode-active .page-hero--friend-links:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]),
html.dark-mode-active .page-hero--friend-link-apply:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]) {
    background: linear-gradient(135deg, var(--dark-background-color, var(--background-color)) 0%, color-mix(in srgb, var(--dark-background-color, var(--background-color)) 82%, #ffffff 18%) 100%);
    box-shadow: none;
}

html.dark-mode-active .community-page-chip {
    background: var(--card-bg, var(--gray-100));
    border-color: var(--bs-border-color);
    color: var(--text-color);
}

html.dark-mode-active .community-page-chip.is-active {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .community-feed__item {
    background: var(--card-bg, var(--gray-100));
    border-color: var(--bs-border-color);
}

html.dark-mode-active .community-feed__author,
html.dark-mode-active .community-feed__text {
    color: var(--text-color);
}

html.dark-mode-active .content {
    color: var(--text-color);
}

html.dark-mode-active .modal-content {
    background-color: var(--gray-100);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .modal-header {
    border-bottom-color: var(--bs-border-color);
}

html.dark-mode-active .modal-footer {
    border-top-color: var(--bs-border-color);
}

/* 搜索弹窗：关闭按钮、热门/最近搜索标签深色可读 */
/* 头部订阅弹窗：跟随卡片表面，避免页脚那套白字深底 */
html.dark-mode-active .pet-subscribe-modal {
    background: var(--card-bg, var(--oriel-dark-card-bg, #1f1a1a));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

html.dark-mode-active .pet-subscribe-modal__title {
    color: var(--text-color, #e5e7eb);
}

html.dark-mode-active .pet-subscribe-modal__form .widget-search__box {
    background: color-mix(in srgb, var(--card-bg, #1f1a1a) 82%, #fff 18%);
    border-color: color-mix(in srgb, var(--text-color, #e5e7eb) 18%, transparent);
}

html.dark-mode-active .pet-subscribe-modal__form .widget-search__box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

html.dark-mode-active .pet-subscribe-modal__form .widget-search__input,
html.dark-mode-active .pet-subscribe-modal__form .widget-search__input.form-control {
    color: var(--text-color, #e5e7eb);
    background: transparent !important;
}

html.dark-mode-active .pet-subscribe-modal__form .widget-search__input::placeholder,
html.dark-mode-active .pet-subscribe-modal__form .widget-search__input.form-control::placeholder {
    color: var(--text-muted, #9ca3af);
}

html.dark-mode-active .oriel-search-modal__close.btn-close,
html.dark-mode-active .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

html.dark-mode-active .oriel-search-modal__close.btn-close:hover,
html.dark-mode-active .oriel-search-modal__close.btn-close:focus,
html.dark-mode-active .modal .btn-close:hover,
html.dark-mode-active .modal .btn-close:focus {
    opacity: 1;
}

html.dark-mode-active .oriel-hot-search__tag,
html.dark-mode-active .oriel-search-history__tag {
    background: var(--oriel-dark-card-bg, var(--card-bg));
    border-color: color-mix(in srgb, var(--text-color) 18%, transparent);
    color: var(--text-color);
}

html.dark-mode-active .oriel-hot-search__tag:hover,
html.dark-mode-active .oriel-search-history__tag:hover {
    background: color-mix(in srgb, var(--primary-color) 18%, var(--oriel-dark-card-bg, var(--card-bg)) 82%);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

html.dark-mode-active .oriel-hot-search__label,
html.dark-mode-active .oriel-search-history__label,
html.dark-mode-active .oriel-search-modal__articles-label {
    color: var(--text-muted);
}

/* 搜索页 hero 内标签保持浅色玻璃态，不被通用深色卡片规则盖掉 */
html.dark-mode-active .page-hero .oriel-hot-search__label,
html.dark-mode-active .page-hero .oriel-search-history__label {
    color: rgba(255, 255, 255, 0.9);
}

html.dark-mode-active .page-hero .oriel-hot-search__tag,
html.dark-mode-active .page-hero .oriel-search-history__tag {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

html.dark-mode-active .page-hero .oriel-hot-search__tag:hover,
html.dark-mode-active .page-hero .oriel-hot-search__tag:focus-visible,
html.dark-mode-active .page-hero .oriel-search-history__tag:hover,
html.dark-mode-active .page-hero .oriel-search-history__tag:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--primary-color);
}

html.dark-mode-active .oriel-search-modal__title {
    color: var(--text-color);
}

html.dark-mode-active .oriel-search-modal__icon {
    color: var(--text-muted);
}

html.dark-mode-active .form-control,
html.dark-mode-active .form-select {
    background-color: var(--gray-50);
    color: var(--text-color);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .form-control:focus,
html.dark-mode-active .form-select:focus {
    background-color: var(--gray-50);
    border-color: var(--primary-color);
}

html.dark-mode-active .form-control::placeholder {
    color: var(--gray-500);
}

html.dark-mode-active table,
html.dark-mode-active .table {
    color: var(--text-color);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--gray-50);
    color: var(--text-color);
}

html.dark-mode-active pre,
html.dark-mode-active code {
    background-color: var(--gray-50);
    color: var(--gray-800);
}

html.dark-mode-active blockquote {
    background-color: var(--gray-50);
    border-left-color: var(--primary-color);
    color: var(--gray-700);
}

html.dark-mode-active .breadcrumb {
    background-color: transparent;
}

html.dark-mode-active .breadcrumb-item {
    color: var(--gray-500);
}

html.dark-mode-active .breadcrumb-item.active {
    color: var(--gray-600);
}

html.dark-mode-active .pagination .page-link {
    background-color: var(--gray-100);
    border-color: var(--bs-border-color);
    color: var(--gray-700);
}

html.dark-mode-active .pagination .page-link:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
}

html.dark-mode-active .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

html.dark-mode-active .toast {
    background-color: var(--gray-100);
    border-color: var(--bs-border-color);
}

html.dark-mode-active hr {
    border-color: var(--bs-border-color);
}

html.dark-mode-active .tag,
html.dark-mode-active .badge {
    background-color: var(--gray-200);
    color: var(--gray-600);
}

html.dark-mode-active .post-card__cover-frame,
html.dark-mode-active .product-card__image,
html.dark-mode-active .collection-card__image,
html.dark-mode-active .cover-card__media {
    background-color: var(--gray-200);
}

html.dark-mode-active .collection-card--has-bg.collection-card--stacked .collection-card__body,
html.dark-mode-active .collection-card--pad-inset.collection-card--stacked .collection-card__body,
html.dark-mode-active .collection-card--pad-media-flush-body-inset.collection-card--stacked .collection-card__body {
    background: var(--collection-card-bg, var(--card-bg));
    border: none;
}

html.dark-mode-active .collection-card--pad-flush,
html.dark-mode-active .collection-card--pad-media-flush-body-flush,
html.dark-mode-active .collection-card--pad-flush .collection-card__body,
html.dark-mode-active .collection-card--pad-media-flush-body-flush .collection-card__body {
    background: var(--collection-card-bg, transparent);
    border: none;
}

html.dark-mode-active .collection-card--stacked.collection-card--has-cover .collection-card__count--badge {
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

html.dark-mode-active .skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 37%, var(--gray-200) 63%);
    background-size: 400% 100%;
}

html.dark-mode-active .article-toc {
    background-color: var(--gray-100);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .article-toc a {
    color: var(--gray-600);
}

html.dark-mode-active .article-toc__item--active a {
    color: var(--primary-color) !important;
}

html.dark-mode-active .article-toc-floating {
    background: var(--card-bg);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .article-toc-floating__title {
    color: var(--text-color);
}

html.dark-mode-active .article-toc-floating__toggle:hover {
    background: var(--gray-200, #374151);
    color: var(--text-color);
}

html.dark-mode-active .article-toc-inline {
    background: var(--card-bg-secondary);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .article-toc-inline__title {
    color: var(--text-color);
}

html.dark-mode-active .article-toc--floating .article-toc__item--active a {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

/* 未设区域背景时保持透明；已设 --oriel-user-card-bg 时走内容面映射 */
html.dark-mode-active .author-card__inner:not([style*="--oriel-user-card-bg"]) {
    background: transparent;
    background-color: transparent;
}

html.dark-mode-active .author-card__inner {
    border: none;
    box-shadow: none;
}

html.dark-mode-active .author-card__avatar-img {
    border-color: var(--bs-border-color, #374151);
}

html.dark-mode-active .author-card__name {
    color: var(--text-color);
}

html.dark-mode-active .author-card__count,
html.dark-mode-active .author-card__stats {
    color: var(--gray-500, #6b7280);
}

html.dark-mode-active .author-card__bio {
    color: var(--gray-400, #9ca3af);
}

html.dark-mode-active .article-nav__item:not([style*="--oriel-user-card-bg"]) {
    background: transparent;
    background-color: transparent;
}

html.dark-mode-active .article-nav__item {
    border: none;
    color: var(--text-color);
    box-shadow: none;
}

html.dark-mode-active .article-nav__item:hover {
    color: var(--text-color);
    box-shadow: none;
}

html.dark-mode-active .article-nav__title {
    color: var(--text-color);
}

html.dark-mode-active .author-profile {
    background: var(--card-bg);
    border-color: var(--bs-border-color);
    box-shadow: none;
}

html.dark-mode-active .author-profile__name {
    color: var(--text-color);
}

html.dark-mode-active .author-profile__count {
    color: var(--gray-500, #9ca3af);
}

html.dark-mode-active .author-profile__bio {
    color: var(--gray-400, #9ca3af);
}

html.dark-mode-active .author-archive__posts-title {
    color: var(--text-color);
}

html.dark-mode-active .mobile-bottom-bar {
    /* 未自定义底栏背景时跟随深色卡片/页面背景，避免仍用浅色 --mobile-bar-bg */
    background-color: var(--mobile-bar-bg, var(--card-bg, var(--background-color, var(--dark-background-color, #1a1a2e))));
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
}

html.dark-mode-active .mobile-bottom-bar__link {
    /* 未自定义图标色时跟随深色主题文字色；自定义则仍用 --mobile-bar-icon */
    color: var(--mobile-bar-icon, var(--text-color, var(--dark-text-color, #e2e8f0)));
}

html.dark-mode-active .mobile-bottom-bar__link.is-active {
    color: var(--mobile-bar-icon-active, var(--primary-color));
}

html.dark-mode-active .mobile-bottom-bar__visual--svg .mobile-bottom-bar__svg,
html.dark-mode-active .mobile-bottom-bar__visual--svg .mobile-bottom-bar__svg svg {
    color: inherit;
}

html.dark-mode-active .reading-progress {
    background-color: var(--gray-200);
}

html.dark-mode-active .page-loader {
    background-color: var(--background-color);
}

html.dark-mode-active .comment,
html.dark-mode-active .comment-item {
    border-color: var(--bs-border-color);
}

html.dark-mode-active .comment-body {
    background-color: var(--gray-50);
}

/* 主色实心按钮族：深色主色偏浅时白字不搭 → 浅底 + 主色字 */
html.dark-mode-active .btn-primary,
html.dark-mode-active a.btn-primary,
html.dark-mode-active button.btn-primary,
html.dark-mode-active .widget-search__submit,
html.dark-mode-active .newsletter-form__submit,
html.dark-mode-active .header-search-form .search-submit,
html.dark-mode-active .site-footer .newsletter-form .btn,
html.dark-mode-active .site-footer .newsletter-form .widget-search__submit,
html.dark-mode-active .widget-qa-quick-ask .qa-quick-ask-card__btn,
html.dark-mode-active .category-subnav__item.is-active,
html.dark-mode-active .site-popup__btn.btn-primary,
html.dark-mode-active .site-popup__btn.btn-primary:link,
html.dark-mode-active .site-popup__btn.btn-primary:visited {
    --bs-btn-bg: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    --bs-btn-border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    --bs-btn-hover-bg: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color)));
    --bs-btn-hover-border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
    --bs-btn-active-bg: color-mix(in srgb, var(--primary-color) 32%, var(--card-bg, var(--background-color)));
    --bs-btn-active-border-color: color-mix(in srgb, var(--primary-color) 48%, transparent);
    --bs-btn-color: var(--primary-color);
    --bs-btn-hover-color: var(--primary-color);
    --bs-btn-active-color: var(--primary-color);
    --bs-btn-active-shadow: none;
    color: var(--primary-color) !important;
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color))) !important;
    background-color: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color))) !important;
    background-image: none !important;
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent) !important;
    box-shadow: none !important;
}

html.dark-mode-active .btn-primary:hover,
html.dark-mode-active a.btn-primary:hover,
html.dark-mode-active button.btn-primary:hover,
html.dark-mode-active .btn-primary:focus,
html.dark-mode-active a.btn-primary:focus,
html.dark-mode-active button.btn-primary:focus,
html.dark-mode-active .btn-primary:focus-visible,
html.dark-mode-active a.btn-primary:focus-visible,
html.dark-mode-active button.btn-primary:focus-visible,
html.dark-mode-active .widget-search__submit:hover,
html.dark-mode-active .widget-search__submit:focus-visible,
html.dark-mode-active .newsletter-form__submit:hover,
html.dark-mode-active .newsletter-form__submit:focus-visible,
html.dark-mode-active .header-search-form .search-submit:hover,
html.dark-mode-active .header-search-form .search-submit:focus-visible,
html.dark-mode-active .site-footer .newsletter-form .btn:hover,
html.dark-mode-active .site-footer .newsletter-form .btn:focus,
html.dark-mode-active .site-footer .newsletter-form .widget-search__submit:hover,
html.dark-mode-active .site-footer .newsletter-form .widget-search__submit:focus-visible,
html.dark-mode-active .widget-qa-quick-ask .qa-quick-ask-card__btn:hover,
html.dark-mode-active .category-subnav__item.is-active:hover,
html.dark-mode-active .site-popup__btn.btn-primary:hover,
html.dark-mode-active .site-popup__btn.btn-primary:focus,
html.dark-mode-active .site-popup__btn.btn-primary:focus-visible {
    color: var(--primary-color) !important;
    background: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color))) !important;
    background-color: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color))) !important;
    background-image: none !important;
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent) !important;
    box-shadow: none !important;
}

html.dark-mode-active .btn-primary:active,
html.dark-mode-active a.btn-primary:active,
html.dark-mode-active button.btn-primary:active,
html.dark-mode-active .btn-primary.active,
html.dark-mode-active a.btn-primary.active,
html.dark-mode-active button.btn-primary.active,
html.dark-mode-active .site-popup__btn.btn-primary:active,
html.dark-mode-active .site-popup__btn.btn-primary.active {
    color: var(--primary-color) !important;
    background: color-mix(in srgb, var(--primary-color) 32%, var(--card-bg, var(--background-color))) !important;
    background-color: color-mix(in srgb, var(--primary-color) 32%, var(--card-bg, var(--background-color))) !important;
    border-color: color-mix(in srgb, var(--primary-color) 48%, transparent) !important;
    box-shadow: none !important;
}

html.dark-mode-active .btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    --bs-btn-hover-color: var(--primary-color);
    --bs-btn-hover-bg: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    --bs-btn-hover-border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
    --bs-btn-active-color: var(--primary-color);
    --bs-btn-active-bg: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color)));
    --bs-btn-active-border-color: color-mix(in srgb, var(--primary-color) 48%, transparent);
    --bs-btn-active-shadow: none;
    --bs-btn-disabled-color: var(--primary-color);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    --bs-btn-focus-shadow-rgb: 0, 0, 0;
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .btn-outline-primary:hover,
html.dark-mode-active .btn-outline-primary:focus,
html.dark-mode-active .btn-outline-primary:focus-visible,
html.dark-mode-active .btn-outline-primary:active,
html.dark-mode-active .btn-outline-primary.active {
    background-color: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
    color: var(--primary-color);
    box-shadow: none;
}

html.dark-mode-active .btn-outline-primary:disabled,
html.dark-mode-active .btn-outline-primary.disabled,
html.dark-mode-active .pagination-load-more__btn:disabled,
html.dark-mode-active .pagination-load-more__btn.is-loading {
    color: color-mix(in srgb, var(--primary-color) 78%, #fff);
    background-color: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border-color: color-mix(in srgb, var(--primary-color) 55%, var(--background-color));
    box-shadow: none;
}

html.dark-mode-active .pagination-load-more__btn.is-loading::after {
    border-color: color-mix(in srgb, var(--primary-color) 78%, #fff);
    border-right-color: transparent;
}

html.dark-mode-active .btn-outline-secondary {
    border-color: var(--gray-400);
    color: var(--gray-400);
}

html.dark-mode-active .btn-outline-secondary:hover {
    background-color: var(--gray-400);
    color: var(--background-color);
}

html.dark-mode-active ::-webkit-scrollbar {
    width: 10px;
}

html.dark-mode-active ::-webkit-scrollbar-track {
    background: var(--gray-50);
}

html.dark-mode-active ::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 5px;
}

html.dark-mode-active ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

html.dark-mode-active .page-hero:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]) .page-hero__title,
html.dark-mode-active .page-hero:not(.page-hero--custom-bg):not([style*="--oriel-user-bg"]) .page-hero__desc {
    color: var(--page-hero-text, var(--dark-text-color, #f8fafc));
}

html.dark-mode-active .error-page {
    color: var(--text-color);
}

html.dark-mode-active .oriel-tool-card,
html.dark-mode-active .oriel-tool-result {
    background-color: var(--card-bg);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .product-detail {
    color: var(--text-color);
}

html.dark-mode-active .product-detail__price {
    color: var(--primary-color);
}

html.dark-mode-active .daily-tip-card {
    background-color: #1e1e38;
    background-color: var(--card-bg, var(--dark-background-color, #1e1e38));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
    html.dark-mode-active .daily-tip-card {
        background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--surface-color)) 84%);
        border-color: color-mix(in srgb, var(--primary-color) 24%, transparent);
    }
}

html.dark-mode-active .daily-tip-card__category {
    color: var(--primary-color);
}

html.dark-mode-active .daily-tip-card__content {
    color: var(--text-color);
}

html.dark-mode-active .daily-tip-card__source {
    color: var(--text-muted);
}

/* 图标卡 / 标签卡：深色模式统一卡片底与文字色 */
html.dark-mode-active .icon-card-item,
html.dark-mode-active .tag-center-card {
    background: var(--oriel-dark-card-bg, var(--card-bg)) !important;
    background-color: var(--oriel-dark-card-bg, var(--card-bg)) !important;
    border: none !important;
    color: var(--text-color);
}

html.dark-mode-active .icon-card-item__icon {
    background: color-mix(in srgb, var(--primary-color) 20%, var(--card-bg) 80%) !important;
}

html.dark-mode-active .icon-card-item__placeholder {
    background: color-mix(in srgb, var(--primary-color) 22%, transparent) !important;
}

html.dark-mode-active .icon-card-item__title,
html.dark-mode-active .tag-center-card__title {
    color: var(--text-color);
}

html.dark-mode-active .icon-card-item__desc,
html.dark-mode-active .tag-center-card__desc,
html.dark-mode-active .tag-center-card__count {
    color: var(--text-muted);
}

html.dark-mode-active a.icon-card-item:hover .icon-card-item__title,
html.dark-mode-active .tag-center-card:hover .tag-center-card__title {
    color: var(--primary-color);
}

html.dark-mode-active .tag-center-card--has-cover .tag-center-card__title,
html.dark-mode-active .tag-center-card--has-cover .tag-center-card__count {
    color: #fff;
}

/* 健康小工具：跟随深色主色/次色 */
html.dark-mode-active .oriel-health-tool,
html.dark-mode-active a.oriel-health-tool {
    background-color: #1e1e38;
    background-color: var(--card-bg, var(--dark-background-color, #1e1e38));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
}

html.dark-mode-active .oriel-health-tool:hover,
html.dark-mode-active a.oriel-health-tool:hover {
    background-color: #1e1e38;
    background-color: var(--card-bg, var(--dark-background-color, #1e1e38));
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

html.dark-mode-active .oriel-health-tool__title {
    color: var(--text-color);
}

html.dark-mode-active .oriel-health-tool--hub,
html.dark-mode-active a.oriel-health-tool--hub,
html.dark-mode-active .oriel-health-tool--compare,
html.dark-mode-active a.oriel-health-tool--compare {
    background-color: #1e1e38;
    background-color: var(--card-bg, var(--dark-background-color, #1e1e38));
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
    html.dark-mode-active .oriel-health-tool,
    html.dark-mode-active a.oriel-health-tool {
        background: color-mix(in srgb, var(--primary-color) 14%, var(--card-bg) 86%);
        border-color: color-mix(in srgb, var(--primary-color) 22%, transparent);
    }

    html.dark-mode-active .oriel-health-tool:hover,
    html.dark-mode-active a.oriel-health-tool:hover {
        background: color-mix(in srgb, var(--primary-color) 22%, var(--card-bg) 78%);
        border-color: color-mix(in srgb, var(--primary-color) 34%, transparent);
    }

    html.dark-mode-active .oriel-health-tool--hub,
    html.dark-mode-active a.oriel-health-tool--hub {
        background: color-mix(in srgb, var(--primary-color) 18%, var(--card-bg) 82%);
    }

    html.dark-mode-active .oriel-health-tool--compare,
    html.dark-mode-active a.oriel-health-tool--compare {
        background: color-mix(in srgb, var(--secondary-color) 16%, var(--card-bg) 84%);
        border-color: color-mix(in srgb, var(--secondary-color) 28%, transparent);
    }
}

html.dark-mode-active .oriel-seasonal-tip {
    background: color-mix(in srgb, var(--accent-color) 16%, var(--card-bg) 84%);
    border-color: color-mix(in srgb, var(--primary-color) 22%, transparent);
}

html.dark-mode-active .oriel-seasonal-tip__label {
    color: var(--text-color);
}

html.dark-mode-active .oriel-seasonal-tip__text {
    color: var(--text-muted);
}

html.dark-mode-active .floating-actions .floating-actions__btn,
html.dark-mode-active .floating-actions a.floating-actions__btn,
html.dark-mode-active .floating-actions button.floating-actions__btn {
    color: var(--primary-color) !important;
    background: #1e1e38 none !important;
    background-color: #1e1e38 !important;
    background-color: var(--dark-background-color, #1e1e38) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html.dark-mode-active .floating-actions .floating-actions__btn::before,
html.dark-mode-active .floating-actions a.floating-actions__btn::before,
html.dark-mode-active .floating-actions button.floating-actions__btn::before {
    background-color: #1e1e38;
    background-color: var(--dark-background-color, #1e1e38);
}

html.dark-mode-active .floating-actions .floating-actions__btn:hover,
html.dark-mode-active .floating-actions .floating-actions__btn:focus,
html.dark-mode-active .floating-actions a.floating-actions__btn:hover,
html.dark-mode-active .floating-actions a.floating-actions__btn:focus,
html.dark-mode-active .floating-actions button.floating-actions__btn:hover,
html.dark-mode-active .floating-actions button.floating-actions__btn:focus {
    color: var(--primary-color) !important;
    background: #1e1e38 none !important;
    background-color: #1e1e38 !important;
    background-color: var(--dark-background-color, #1e1e38) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

html.dark-mode-active .floating-actions .floating-actions__btn--theme .theme-toggle-icon__layer i {
    color: var(--primary-color) !important;
}

html.dark-mode-active .floating-actions__qrcode {
    color: var(--text-color, #e2e8f0);
    background-color: #1e1e38;
    background-color: var(--dark-background-color, #1e1e38);
    background-color: color-mix(in srgb, var(--dark-background-color, #1e1e38) 88%, #ffffff 12%);
    border-color: color-mix(in srgb, var(--primary-color) 28%, rgba(255, 255, 255, 0.14));
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.25);
}

html.dark-mode-active .theme-toggle-icon__sun i {
    color: var(--accent-color);
}

html.dark-mode-active .site-popup {
    --site-popup-bg: var(--dark-background-color, #1e1e38);
}

html.dark-mode-active .site-popup__sheet {
    background-color: #1e1e38;
    background-color: var(--dark-background-color, #1e1e38);
    background-color: var(--card-bg, var(--dark-background-color, #1e1e38));
    color: var(--text-color);
}

html.dark-mode-active .site-popup__dialog {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html.dark-mode-active .site-popup__close {
    color: var(--text-color);
    background-color: #2a2a48;
    background-color: color-mix(in srgb, var(--dark-background-color, #1e1e38) 70%, #ffffff 16%);
}

html.dark-mode-active .site-popup__close:hover,
html.dark-mode-active .site-popup__close:focus-visible {
    color: #fff;
    background-color: color-mix(in srgb, var(--dark-background-color, #1e1e38) 50%, #ffffff 22%);
}

html.dark-mode-active .site-popup__handle {
    background-color: color-mix(in srgb, #ffffff 28%, transparent);
}

html.dark-mode-active .site-popup__media {
    background-color: color-mix(in srgb, var(--dark-background-color, #1e1e38) 85%, #000 15%);
}

html.dark-mode-active .site-popup__title,
html.dark-mode-active .site-popup__content {
    color: var(--text-color);
}

/* 覆盖编辑器内联颜色，跟随深色配色预设 */
html.dark-mode-active .site-popup__content :where(p, span, div, li, ul, ol, strong, em, b, i, u, h1, h2, h3, h4, h5, h6, blockquote, td, th, label) {
    color: inherit !important;
}

html.dark-mode-active .site-popup__content a {
    color: var(--primary-color) !important;
}

html.dark-mode-active .site-popup__content a:hover {
    color: var(--secondary-color) !important;
}


html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition:
        background-color 0.35s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.35s ease,
        fill 0.25s ease,
        stroke 0.25s ease !important;
}

html.theme-transitioning .theme-toggle-icon__layer {
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
}

/* 用户/小工具自定义实色背景分层：
   - 外壳（--oriel-user-bg）→ 偏深的 panel
   - 卡片内容（--oriel-user-card-bg）→ 更亮的 card，与外壳拉开层次
   内联常改写 --card-bg，必须用不被覆盖的 --oriel-dark-* 变量。
   透明不写上述标记，因此不会误伤透明。 */
html.dark-mode-active [style*="--oriel-user-bg"]:not([style*="--oriel-user-bg:transparent"]):not([style*="--oriel-user-bg: transparent"]),
html.dark-mode-active .widget-has-bg[style*="--oriel-user-bg"],
html.dark-mode-active .widget.widget-has-bg[style*="--oriel-user-bg"],
html.dark-mode-active .widget-home-section[style*="--oriel-user-bg"] {
    --oriel-user-bg: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    --widget-bg: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    background: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    background-color: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    background-image: none !important;
}

html.dark-mode-active [style*="--oriel-user-gradient"] {
    --oriel-user-bg: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    background-image: none !important;
    background: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
    background-color: var(--oriel-dark-panel-bg, color-mix(in srgb, var(--dark-background-color) 96%, #ffffff 4%)) !important;
}

html.dark-mode-active [style*="--oriel-user-card-bg"] {
    --oriel-region-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --card-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --article-list-card-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --taxonomy-group-card-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --collection-card-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --product-card-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --notices-item-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --friend-links-item-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --qa-item-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
    --qa-search-bg: var(--oriel-dark-card-bg, color-mix(in srgb, var(--dark-background-color) 92%, #ffffff 8%)) !important;
}

/* 问答广场：搜索无边框、提高识别；提问按钮用主色实底 + 深色字保证对比 */
html.dark-mode-active .qa-plaza-page .qa-plaza-toolbar {
    border: 0;
    box-shadow: none;
}

html.dark-mode-active .qa-plaza-page .qa-plaza-search,
html.dark-mode-active .qa-plaza-page .qa-plaza-search:hover,
html.dark-mode-active .qa-plaza-page .qa-plaza-search:focus-within,
html.dark-mode-active .qa-plaza-page .qa-plaza-toolbar.is-qa-search-transparent .qa-plaza-search,
html.dark-mode-active .qa-plaza-page .qa-plaza-toolbar.is-qa-search-transparent .qa-plaza-search:hover,
html.dark-mode-active .qa-plaza-page .qa-plaza-toolbar.is-qa-search-transparent .qa-plaza-search:focus-within {
    background: color-mix(in srgb, var(--dark-background-color, var(--background-color)) 68%, #ffffff 32%);
    background-color: color-mix(in srgb, var(--dark-background-color, var(--background-color)) 68%, #ffffff 32%);
    border: 0;
    box-shadow: none;
}

html.dark-mode-active .qa-plaza-page .qa-plaza-search:focus-within,
html.dark-mode-active .qa-plaza-page .qa-plaza-toolbar.is-qa-search-transparent .qa-plaza-search:focus-within {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 22%, transparent);
}

html.dark-mode-active .qa-plaza-page .qa-plaza-search i {
    color: color-mix(in srgb, var(--text-color, #f2ece6) 78%, transparent);
}

html.dark-mode-active .qa-plaza-page .qa-plaza-search input,
html.dark-mode-active .qa-plaza-page .qa-plaza-search input[type='search'] {
    color: var(--text-color, #f2ece6);
}

html.dark-mode-active .qa-plaza-page .qa-plaza-search input::placeholder {
    color: color-mix(in srgb, var(--text-color, #f2ece6) 58%, transparent);
    opacity: 1;
}

/* 深色主色偏浅：实心主色 + 白字对比不足 → 主色底 + 深色字 */
html.dark-mode-active .qa-plaza-ask-btn,
html.dark-mode-active .qa-plaza-ask-btn:hover,
html.dark-mode-active .qa-btn-submit,
html.dark-mode-active .qa-btn-submit:hover {
    background: var(--primary-color) !important;
    background-image: none !important;
    color: var(--dark-background-color, #1c1917) !important;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 32%, transparent);
}

html.dark-mode-active .qa-plaza-ask-btn i,
html.dark-mode-active .qa-btn-submit i {
    color: inherit !important;
}

html.dark-mode-active .qa-plaza-ask-btn:hover,
html.dark-mode-active .qa-btn-submit:hover {
    filter: brightness(1.06);
}

html.dark-mode-active .qa-btn-cancel {
    background: transparent !important;
    border-color: var(--bs-border-color, var(--gray-300)) !important;
    color: var(--text-color, var(--gray-700)) !important;
}

html.dark-mode-active .qa-btn-cancel:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* 问答回答/提问输入框：与全局 form-control 深色一致 */
html.dark-mode-active .qa-reply-textarea,
html.dark-mode-active .qa-answer-form .form-control,
html.dark-mode-active .qa-form-group input[type='text'],
html.dark-mode-active .qa-form-group textarea,
html.dark-mode-active .qa-form-group select {
    background: var(--gray-50) !important;
    background-color: var(--gray-50) !important;
    color: var(--text-color) !important;
    border-color: var(--bs-border-color, var(--border-color)) !important;
    caret-color: var(--text-color);
}

html.dark-mode-active .qa-reply-textarea::placeholder,
html.dark-mode-active .qa-answer-form .form-control::placeholder,
html.dark-mode-active .qa-form-group textarea::placeholder,
html.dark-mode-active .qa-form-group input::placeholder {
    color: var(--gray-500, var(--text-muted));
    opacity: 1;
}

html.dark-mode-active .qa-reply-textarea:focus,
html.dark-mode-active .qa-reply-textarea:focus-visible,
html.dark-mode-active .qa-answer-form .form-control:focus,
html.dark-mode-active .qa-answer-form .form-control:focus-visible,
html.dark-mode-active .qa-form-group input:focus,
html.dark-mode-active .qa-form-group input:focus-visible,
html.dark-mode-active .qa-form-group textarea:focus,
html.dark-mode-active .qa-form-group textarea:focus-visible {
    background: var(--gray-50) !important;
    background-color: var(--gray-50) !important;
    color: var(--text-color) !important;
    border-color: var(--primary-color) !important;
}

/* 文章详情区域：正文 / 上下篇 / 作者卡 / 评论盒 — 与文章列表内容面同色 */
html.dark-mode-active .article-body[style*="--oriel-user-card-bg"],
html.dark-mode-active .article-body.content[style*="--oriel-user-card-bg"],
html.dark-mode-active .author-card__inner[style*="--oriel-user-card-bg"],
html.dark-mode-active .article-nav__item[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-compose--boxed[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-compose__panel[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-list-panel--boxed[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-list-panel[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-section[style*="--oriel-user-card-bg"],
html.dark-mode-active .comments-section__inner[style*="--oriel-user-card-bg"] {
    background: var(--oriel-region-bg, var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)))) !important;
    background-color: var(--oriel-region-bg, var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg)))) !important;
}

/* 专题组卡与文章列表卡 body 同色面（含已设分组背景色 / --oriel-user-card-bg） */
html.dark-mode-active .taxonomy-group-card,
html.dark-mode-active .taxonomy-group-card__body,
html.dark-mode-active .taxonomy-group-card__articles {
    background: var(--taxonomy-group-card-bg, var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg))));
    background-color: var(--taxonomy-group-card-bg, var(--article-list-card-bg, var(--oriel-dark-card-bg, var(--card-bg))));
}

/* 分类子导航：激活态与主色实心按钮同系，避免白字压浅主色 */
html.dark-mode-active .category-subnav__item,
html.dark-mode-active .product-categories-nav__item {
    background: var(--card-bg);
    border-color: var(--bs-border-color);
    color: var(--text-color);
}

html.dark-mode-active .category-subnav__item:hover,
html.dark-mode-active .product-categories-nav__item:hover {
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--card-bg));
}

html.dark-mode-active .category-subnav__item.is-active,
html.dark-mode-active .category-subnav__item.is-active:hover,
html.dark-mode-active .product-categories-nav__item.is-active,
html.dark-mode-active .product-categories-nav__item.is-active:hover {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .product-card__category {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
}

html.dark-mode-active .product-card__ops-tags.nova-product-ops-tags,
html.dark-mode-active .product-card__ops-tags .nova-product-ops-tag {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .product-card__ops-tags .nova-product-ops-sep {
    color: var(--gray-400, var(--bs-border-color));
}

html.dark-mode-active .category-subnav__item--parent {
    background: color-mix(in srgb, var(--primary-color) 10%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 22%, transparent);
    color: var(--text-color);
}

html.dark-mode-active .category-subnav__item.is-active .category-subnav__count {
    color: inherit;
    opacity: 0.85;
}

/* 友情链接 / 通用面板：与 card-body 同级舒适底色，避免残留亮底或刺眼白块 */
html.dark-mode-active .friend-links-page-panel.card,
html.dark-mode-active .friend-links-page-panel {
    background-color: transparent;
    border-color: var(--bs-border-color);
}

html.dark-mode-active .friend-links-page-panel > .card-body {
    background-color: var(--card-bg);
    color: var(--text-color);
}

html.dark-mode-active .friend-links-card {
    background: var(--friend-links-item-bg, transparent);
    background-color: var(--friend-links-item-bg, transparent);
    color: var(--text-color);
}

html.dark-mode-active .friend-links-grid:not([style*="--friend-links-item-bg: transparent"]) .friend-links-card:hover,
html.dark-mode-active .friend-links-grid:not([style*="--friend-links-item-bg:transparent"]) .friend-links-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html.dark-mode-active .friend-links-card__name {
    color: var(--gray-900, var(--text-color));
}

html.dark-mode-active .friend-links-card__desc {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .friend-links-card__icon {
    background: transparent;
}

/* 产品详情：与友情链接 card-body 同系表面色，去掉死白 / 浅灰块 */
html.dark-mode-active .nova-product-thumb,
html.dark-mode-active .nova-product-main,
html.dark-mode-active .nova-product-main-img,
html.dark-mode-active .nova-product-main-placeholder,
html.dark-mode-active .nova-product-card-image {
    background: var(--gray-100, var(--card-bg-secondary, var(--card-bg)));
}

html.dark-mode-active .nova-product-spec__option {
    background: var(--card-bg);
    border-color: var(--bs-border-color);
    color: var(--text-color);
}

html.dark-mode-active .nova-product-attributes {
    background: var(--card-bg);
}

html.dark-mode-active .nova-product-price__original,
html.dark-mode-active .nova-product-price__original .product-price,
html.dark-mode-active .nova-product-meta-item,
html.dark-mode-active .nova-product-meta-label,
html.dark-mode-active .nova-product-meta-value:not(.is-in-stock):not(.is-out-of-stock),
html.dark-mode-active .nova-product-ops-tags,
html.dark-mode-active .nova-product-ops-tag,
html.dark-mode-active .nova-product-attr-row dt {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .nova-product-summary,
html.dark-mode-active .nova-product-attr-row dd,
html.dark-mode-active .nova-product-content,
html.dark-mode-active .nova-product-content p,
html.dark-mode-active .nova-product-content li {
    color: var(--text-color);
}

html.dark-mode-active .nova-product-ops-sep {
    color: var(--gray-400, var(--bs-border-color));
}

html.dark-mode-active .nova-product-buy-modal__dialog {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

html.dark-mode-active .nova-product-buy-modal__title {
    color: var(--text-color);
}

html.dark-mode-active .nova-product-buy-modal__hint {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .nova-product-buy-modal__close {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .nova-product-buy-modal__close:hover {
    color: var(--text-color);
    background: var(--gray-100, var(--card-bg-secondary));
}

html.dark-mode-active .nova-product-buy-modal__qr img {
    background: var(--gray-50, var(--gray-100));
}

html.dark-mode-active .nova-product-card {
    background: var(--card-bg);
    border-color: var(--bs-border-color);
}

/* 内容区面板：默认用卡片色；用户设了区域背景（含透明）时走 --oriel-region-bg */
html.dark-mode-active .site-main .card > .card-body,
html.dark-mode-active .article-single > .card > .card-body,
html.dark-mode-active .friend-links-page .card > .card-body {
    background-color: var(--oriel-region-bg, var(--card-bg));
    color: var(--text-color);
}

html.dark-mode-active .page-content.card > .card-body.content,
html.dark-mode-active .page-content .content {
    background-color: var(--oriel-region-bg, transparent);
    color: var(--text-color);
}

html.dark-mode-active .page-landing-hero:not(.page-landing-hero--has-cover) {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary-color) 28%, var(--background-color)) 0%,
        color-mix(in srgb, var(--primary-color) 12%, var(--card-bg)) 100%
    );
}

html.dark-mode-active .page-landing-hero__title,
html.dark-mode-active .page-landing-hero__desc {
    color: var(--text-color);
}

/* 公告项：透明保持透明；实色由上方 --oriel-user-card-bg 映射到深色卡片色 */
html.dark-mode-active .notices-page-item {
    background: var(--notices-item-bg, transparent);
    background-color: var(--notices-item-bg, transparent);
}

html.dark-mode-active .widget-user-info__name,
html.dark-mode-active .widget-user-info__notice-title,
html.dark-mode-active .notices-page-item__title a {
    color: var(--text-color);
}

html.dark-mode-active .widget-user-info__greeting,
html.dark-mode-active .widget-user-info__social-label,
html.dark-mode-active .widget-user-info__notice-summary,
html.dark-mode-active .widget-user-info__notice-empty,
html.dark-mode-active .notices-page-item__meta,
html.dark-mode-active .notices-page-item__summary {
    color: var(--text-muted);
}

html.dark-mode-active .widget-user-info__divider,
html.dark-mode-active .widget-user-info__social + .widget-user-info__notices {
    border-color: var(--bs-border-color);
}

html.dark-mode-active .notices-page-divider,
html.dark-mode-active .article-list-cards--list-divider .article-list-card:not(:last-child)::after,
html.dark-mode-active .article-mini-list--divided .article-mini-item:not(:last-child)::after {
    background-color: var(--notices-divider-color, var(--article-list-divider-color, var(--bs-border-color)));
}

html.dark-mode-active .widget-user-info__divider {
    background: color-mix(in srgb, var(--text-color, #e5e7eb) 8%, transparent);
}

html.dark-mode-active .widget-user-info__social + .widget-user-info__notices {
    border-top-color: color-mix(in srgb, var(--text-color, #e5e7eb) 8%, transparent);
}

html.dark-mode-active .widget-user-info__social-text {
    color: var(--text-muted);
}

html.dark-mode-active .widget-user-info__notice-prefix {
    color: var(--text-muted);
}

/* 问答分类/标签胶囊：弱化灰底，深色模式同步压低对比 */
html.dark-mode-active .q-taxonomies .category-tag,
html.dark-mode-active .q-taxonomies .qa-category-badge,
html.dark-mode-active .q-taxonomies .qa-tag-badge,
html.dark-mode-active .q-taxonomies .qa-species-badge {
    border: 0;
    background: color-mix(in srgb, var(--text-color, #e5e7eb) 9%, var(--card-bg, #1f1a1a));
    color: var(--text-muted, #a8a29e);
}

html.dark-mode-active .q-taxonomies a.category-tag:hover,
html.dark-mode-active .q-taxonomies a.qa-category-badge:hover,
html.dark-mode-active .q-taxonomies a.qa-tag-badge:hover,
html.dark-mode-active .q-taxonomies a.qa-species-badge:hover {
    background: color-mix(in srgb, var(--primary-color, #b7413c) 14%, var(--card-bg, #1f1a1a));
    color: color-mix(in srgb, var(--primary-color, #b7413c) 65%, var(--text-muted, #a8a29e));
}

/* --------------------------------------------------------------------------
   深色主色偏浅时：实心主色 + 白字不搭 → 浅底主色字；标签/角标同步可读
   -------------------------------------------------------------------------- */

html.dark-mode-active .scroll-notice__badge {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
}

html.dark-mode-active .article-list-tabs__tab {
    background: color-mix(in srgb, var(--text-muted, #94a3b8) 14%, transparent);
    color: var(--text-muted, #94a3b8);
}

html.dark-mode-active .article-list-tabs__tab:hover {
    background: color-mix(in srgb, var(--primary-color) 14%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
}

html.dark-mode-active .article-list-tabs__tab.is-active,
html.dark-mode-active .article-list-tabs__tab.is-active:hover {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

html.dark-mode-active .category-showcase-card__count-badge {
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

html.dark-mode-active .category-showcase-card__btn--primary,
html.dark-mode-active .category-showcase-card__btn--primary.category-showcase-card__btn-hint {
    background-color: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .category-showcase-card__btn--primary:hover,
html.dark-mode-active .category-showcase-card--link:hover .category-showcase-card__btn--primary {
    background-color: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
    color: var(--primary-color);
}

html.dark-mode-active .category-showcase-card__btn--secondary {
    background-color: color-mix(in srgb, #fff 10%, var(--card-bg, var(--background-color)));
    border-color: color-mix(in srgb, #fff 18%, transparent);
    color: var(--text-color);
}

html.dark-mode-active .category-showcase-card--stacked .category-showcase-card__btn--secondary {
    background-color: var(--surface-color, var(--card-bg));
    border-color: var(--bs-border-color);
    color: var(--text-color);
}

html.dark-mode-active .category-showcase-card--stacked .category-showcase-card__btn--outline {
    color: var(--primary-color);
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
}

html.dark-mode-active .article-mosaic__cornered-btn {
    --article-mosaic-corner-bg: var(--background-color);
    background: var(--article-mosaic-corner-bg);
}

html.dark-mode-active .widget-has-bg .article-mosaic__cornered-btn,
html.dark-mode-active [style*="--oriel-user-bg"] .article-mosaic__cornered-btn {
    --article-mosaic-corner-bg: var(--oriel-dark-panel-bg, var(--background-color));
}

html.dark-mode-active .article-mosaic__post-arrow {
    background: color-mix(in srgb, var(--primary-color) 16%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
}

html.dark-mode-active .article-mosaic__card:hover .article-mosaic__post-arrow {
    background: color-mix(in srgb, var(--primary-color) 26%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
}

html.dark-mode-active .tag-cloud__item,
html.dark-mode-active .tag-cloud__item.oriel-tag {
    background: color-mix(in srgb, var(--primary-color) 14%, var(--card-bg, var(--background-color)));
    color: var(--text-color);
}

html.dark-mode-active .tag-cloud__item:hover,
html.dark-mode-active .tag-cloud__item.oriel-tag:hover {
    background: color-mix(in srgb, var(--primary-color) 22%, var(--card-bg, var(--background-color)));
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 付费下载动作钮等同色面（插件 CSS 有兜底；此处再对齐主题变量） */
html.dark-mode-active .nova-paid-download__action-btn,
html.dark-mode-active a.nova-paid-download__action-btn,
html.dark-mode-active button.nova-paid-download__action-btn {
    background: var(--oriel-dark-card-bg, var(--card-bg)) !important;
    background-color: var(--oriel-dark-card-bg, var(--card-bg)) !important;
    color: var(--text-color);
    border-color: var(--bs-border-color);
}

html.dark-mode-active .nova-paid-download__action-btn:hover,
html.dark-mode-active a.nova-paid-download__action-btn:hover,
html.dark-mode-active button.nova-paid-download__action-btn:hover {
    background: color-mix(in srgb, var(--primary-color) 14%, var(--oriel-dark-card-bg, var(--card-bg))) !important;
    border-color: color-mix(in srgb, var(--primary-color) 35%, transparent);
    color: var(--text-color);
    box-shadow: none;
}

/* 宠物工具：深色下对齐主题卡片 / 边框变量 */
html.dark-mode-active .pet-tools-card {
    --pet-tools-card-bg: var(--oriel-dark-card-bg, var(--card-bg, var(--background-color)));
    color: var(--text-color);
}

html.dark-mode-active .pet-tools-card:hover {
    filter: none;
    background: color-mix(in srgb, var(--primary-color) 10%, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active .pet-tools-card__icon {
    --pet-tools-icon-bg: color-mix(in srgb, var(--primary-color) 16%, var(--oriel-dark-card-bg, var(--card-bg)));
    color: var(--primary-color);
}

html.dark-mode-active .pet-tools-card__desc,
html.dark-mode-active .pet-tools-modal__disclaimer,
html.dark-mode-active .pet-tools-page__disclaimer {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .pet-tools-modal,
html.dark-mode-active .pet-tools-modal__dialog,
html.dark-mode-active .pet-tools-modal__panel {
    background: var(--oriel-dark-card-bg, var(--card-bg, var(--background-color)));
    color: var(--text-color);
    border-color: var(--bs-border-color, rgba(255, 255, 255, 0.12));
}

html.dark-mode-active .floating-actions__btn--mp {
    color: var(--primary-color);
}

/* 安全百科：搜索 / 下拉 / 卡片跟随深色主题 */
html.dark-mode-active .pet-safety .pet-tool__control,
html.dark-mode-active .pet-safety .pet-tool-select__trigger {
    background: var(--input-bg, var(--oriel-dark-card-bg, var(--card-bg, var(--background-color))));
    color: var(--text-color);
    border-color: var(--border-color, var(--bs-border-color, rgba(255, 255, 255, 0.14)));
    box-shadow: none;
}

html.dark-mode-active .pet-safety .pet-tool__control::placeholder {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .pet-safety .pet-tool__control:hover,
html.dark-mode-active .pet-safety .pet-tool-select__trigger:hover,
html.dark-mode-active .pet-safety .pet-tool-select.is-open .pet-tool-select__trigger,
html.dark-mode-active .pet-safety .pet-tool__control:focus,
html.dark-mode-active .pet-safety .pet-tool-select:focus-within .pet-tool-select__trigger {
    background: var(--input-bg, var(--oriel-dark-card-bg, var(--card-bg, var(--background-color))));
    color: var(--text-color);
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color, rgba(255, 255, 255, 0.18)));
}

html.dark-mode-active .pet-safety .pet-tool__control:focus,
html.dark-mode-active .pet-safety .pet-tool-select:focus-within .pet-tool-select__trigger,
html.dark-mode-active .pet-safety .pet-tool-select.is-open .pet-tool-select__trigger {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 28%, transparent);
}

html.dark-mode-active .pet-tool-select__menu {
    background: var(--oriel-dark-card-bg, var(--card-bg, var(--background-color)));
    color: var(--text-color);
    border-color: var(--border-color, var(--bs-border-color, rgba(255, 255, 255, 0.14)));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

html.dark-mode-active .pet-tool-select__option {
    color: var(--text-color);
}

html.dark-mode-active .pet-tool-select__option:hover,
html.dark-mode-active .pet-tool-select__option.is-active {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

html.dark-mode-active .pet-safety-card {
    background: var(--oriel-dark-card-bg, var(--card-bg, var(--background-color)));
    color: var(--text-color);
}

html.dark-mode-active .pet-safety-card--safe {
    background: color-mix(in srgb, #16a34a 14%, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active .pet-safety-card--caution {
    background: color-mix(in srgb, #d97706 14%, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active .pet-safety-card--danger {
    background: color-mix(in srgb, #dc2626 14%, var(--oriel-dark-card-bg, var(--card-bg)));
}

html.dark-mode-active .pet-safety-card__cat,
html.dark-mode-active .pet-safety-card__tip,
html.dark-mode-active .pet-safety__hint,
html.dark-mode-active .pet-safety__disclaimer,
html.dark-mode-active .pet-safety__empty {
    color: var(--text-muted, var(--gray-500));
}

html.dark-mode-active .pet-safety-card--safe .pet-safety-card__level {
    color: #4ade80;
}

html.dark-mode-active .pet-safety-card--caution .pet-safety-card__level {
    color: #fbbf24;
}

html.dark-mode-active .pet-safety-card--danger .pet-safety-card__level {
    color: #f87171;
}

