/* 华人生活资讯网自动夜间模式：仅跟随设备 prefers-color-scheme，不提供独立主题开关。 */
@media (prefers-color-scheme: dark){
  :root{
    color-scheme:dark;
    --brand:#4c9aff;
    --brand-dark:#76adff;
    --brand-soft:#17263c;
    --navy:#08111f;
    --navy-2:#12223a;
    --ink:#edf2f7;
    --text:#d5dde8;
    --muted:#97a6b8;
    --line:#2d3746;
    --soft:#18202b;
    --bg:#0d1117;
    --paper:#151b23;
    --blue:#76adff;
    --teal:#54c3ca;
    --gold:#e4a15a;
    --green:#55c58b;
    --shadow:0 16px 34px rgba(0,0,0,.28);
    --shadow-sm:0 4px 14px rgba(0,0,0,.22)
  }

  html,body{background:#0d1117;color:#d5dde8}
  body{color-scheme:dark}
  ::selection{background:#245b99;color:#fff}

  /* Shared surfaces */
  .portal-header,.site-header,.breaking-bar,.mobile-menu,
  .portal-header-search input,.header-search input,
  .button:not(.button-red):not(.button-dark):not(.publish),
  .empty,.auth-card,.info-card,.settings-card,
  .city-seo-list>a,.city-seo-guide,
  .portal-article,.portal-article-header,.portal-article-body,
  .portal-article-sidebar>section,
  .article-recommended,.article-hot-panel,
  .search-panel,.search-results,.report-card,
  .job-card,.job-detail-card,.job-submit-card,
  .service-card,.service-detail-card,.service-submit-card,
  .forum-sidebar,.forum-main,.forum-home-rail-card,.forum-thread,.forum-comments,
  .forum-dialog-card,.forum-topic-card,.forum-board,.forum-category-card,
  .news-card,.news-main-front-section,.news-main-front-category,
  .news-subhome-section,.news-subhome-card,
  [class*="home-"][class*="card"],
  [class*="news-"][class*="card"]{
    background-color:#151b23!important;
    border-color:#2d3746!important;
    box-shadow:none
  }

  /* Headers / navigation */
  .portal-header,.site-header{background:rgba(15,20,28,.97)!important;border-color:#2d3746!important}
  .portal-brand,.site-wordmark,.portal-account a,.portal-account button{color:#e7edf5!important}
  .portal-header-search input,.header-search input{background:#111821!important;color:#e7edf5!important;border-color:#394657!important}
  .portal-header-search input::placeholder,.header-search input::placeholder,input::placeholder,textarea::placeholder{color:#748397!important}
  .portal-header-search input:focus,.header-search input:focus{background:#151d27!important;border-color:#5a6a7f!important;box-shadow:0 0 0 4px rgba(76,154,255,.12)!important}
  .portal-account .account-register-link,.header-actions a,.menu-button,.mobile-auth-links a,.mobile-auth-links button{background:#151b23!important;border-color:#394657!important;color:#e0e7ef!important}
  .mobile-menu{background:#10151d!important}
  .mobile-menu a{border-color:#2d3746!important;color:#e7edf5!important}
  .main-nav,.utility-bar{background:#08111f!important;border-color:#223047!important}

  /* Typography */
  main h1,main h2,main h3,main h4,main h5,main h6,
  main strong,.auth-card h1,.settings-card h2,
  .portal-article-header h1,.portal-article-body h2,.portal-article-body h3,
  .forum-toolbar h2,.forum-comments h2,.forum-rail-head h2,
  .news-main-front-section h2,.news-subhome-section h2{color:#edf2f7!important}
  main p,main li,main dd,main dt,.info-lead,.portal-article-body,.portal-article-summary{color:#c8d2df}
  .text-link,.breaking-more,.forum-count,.forum-comments-sub,time,.meta,.muted,
  [class*="summary"],[class*="excerpt"],[class*="description"]{color:#97a6b8!important}
  a:hover{color:#7ab8ff}

  /* Forms */
  input,select,textarea{
    background:#101720!important;
    color:#e7edf5!important;
    border-color:#394657!important;
  }
  input:focus,select:focus,textarea:focus{border-color:#5e9ce6!important;box-shadow:0 0 0 3px rgba(76,154,255,.13)!important}
  option{background:#101720;color:#e7edf5}
  dialog{color:#d5dde8}

  /* Generic separators and light chips */
  hr,[class*="divider"],[class*="separator"]{border-color:#2d3746!important;background-color:#2d3746!important}
  .button-outline{background:#151b23!important;border-color:#445166!important;color:#e5ebf2!important}
  .button-outline:hover{background:#1a2330!important;border-color:#5a6a7f!important}
  .auth-gate-note,.breaking-label,.forum-topic-category,.forum-sort-tools button,
  [class*="tag"],[class*="chip"],[class*="badge"]{border-color:#334155!important}

  /* Loading states */
  .loading,.skeleton-card,.skeleton-lines{
    background:linear-gradient(100deg,#151b23 25%,#202936 40%,#151b23 55%)!important;
    background-size:300% 100%!important
  }

  /* Homepage */
  .home-main,.home-news-front,.home-community-section,.home-services-section,.home-jobs-section{background-color:transparent!important}
  .home-seo-city-intro,.city-seo-breadcrumb,.city-seo-guide p{color:#9eabba!important}
  .home-seo-city-links a{background:#151b23!important;border-color:#334155!important;color:#b8d7ff!important}
  .city-seo-hero{background:linear-gradient(135deg,#142033,#101720)!important;border-color:#334155!important}
  .city-seo-hero h1{color:#eef3f8!important}
  .city-seo-hero p{color:#aebaca!important}
  .city-seo-list>a{color:#e0e7ef!important}
  .city-seo-list>a p,.city-seo-guide p{color:#9eabba!important}
  .city-seo-empty{background:#151b23!important;color:#9eabba!important}

  /* News homepage and subcategories */
  .news-pro-page,.news-main-front,.news-subhome{background:transparent!important}
  .news-main-front-quick,.news-main-front-category-grid,.news-main-front-more,
  .news-subhome-quick,.news-subhome-modules{border-color:#2d3746!important}
  .news-main-front-quick a,.news-main-front-category a,.news-main-front-more a,
  .news-subhome a,.news-pro-list a,.news-pro-headlines a{border-color:#2a3442!important;color:#dbe4ee!important}
  .news-main-front-quick a:hover strong,.news-main-front-category a:hover strong,.news-subhome a:hover strong{color:#7ab8ff!important}
  .news-main-front-feature,.news-subhome-feature{background:#151b23!important;border-color:#334155!important}
  .news-main-front-feature p,.news-subhome-feature p{color:#9eabba!important}
  .news-main-front-section,.news-subhome-section{border-color:#303b4a!important}
  .news-main-front-section header,.news-subhome-section header{border-color:#334155!important}

  /* Article */
  .portal-article-header,.portal-article-body{background:#151b23!important}
  .portal-article-body{color:#d7dfe9!important}
  .portal-article-body blockquote{background:#111821!important;border-color:#4c79ad!important;color:#cdd7e3!important}
  .portal-article-body a{color:#78b6ff!important}
  .portal-article-sidebar .article-side-head{background:linear-gradient(180deg,#182234,#151b23)!important;border-color:#2d3746!important}
  .portal-article-sidebar .article-hot-panel .article-side-head{background:linear-gradient(180deg,#25191d,#151b23)!important}
  .portal-article-sidebar .article-side-head h2,.portal-article-sidebar .article-related-list strong{color:#e7edf5!important}
  .portal-article-sidebar .article-related-list a{border-color:#2a3442!important}
  .article-recommended-grid a{border-color:#2a3442!important;color:#dbe4ee!important}
  .article-recommended,.article-hot-panel{border-color:#303b4a!important}

  /* Community / comments */
  .forum-page{background:#0d1117!important}
  .forum-sidebar,.forum-main,.forum-home-rail-card,.forum-thread,.forum-comments,.forum-rail-card{border-color:#2d3746!important;background:#151b23!important}
  .forum-board,.forum-topic-card,.forum-home-rail-list a,.forum-related-list a,
  .forum-comment-item,.forum-comment,.forum-topic-list>a{border-color:#2a3442!important}
  .forum-board:hover,.forum-topic-card:hover,.forum-home-rail-list a:hover,.forum-related-list a:hover{background:#19222e!important}
  .forum-topic-category{background:#151b23!important;color:#cbd6e3!important}
  .forum-topic-category.active,.forum-topic-category:hover{background:#1b2d45!important;color:#8fc3ff!important;border-color:#416d9f!important}
  .forum-dialog::backdrop{background:rgba(0,0,0,.72)!important}
  .clh-comment-editor,.clh-comment-search,.clh-comment-sort select{background:#101720!important;border-color:#394657!important}
  .clh-comment-editor-footer,.clh-comment-controls{border-color:#2d3746!important}
  .comment-vote-button,.topic-action-button{background:#111821!important;border-color:#334155!important;color:#c8d2df!important}

  /* Jobs and services */
  .jobs-page,.services-page,.market-page{background:#0d1117!important}
  .job-card,.service-card,[class*="listing-card"]{background:#151b23!important;border-color:#2d3746!important}
  .job-card:hover,.service-card:hover,[class*="listing-card"]:hover{background:#19222e!important;border-color:#40506a!important}
  .job-card h2,.job-card h3,.service-card h2,.service-card h3{color:#e7edf5!important}
  .job-card p,.service-card p{color:#aab6c5!important}

  /* Auth */
  .auth-main{background:#0d1117!important}
  .auth-card{background:#151b23!important;border-color:#2d3746!important;box-shadow:0 20px 60px rgba(0,0,0,.35)!important}
  .auth-card p,.auth-help,.auth-note{color:#9eabba!important}
  .auth-password-wrap input{background:#101720!important}
  .auth-password-toggle{color:#aab6c5!important}

  /* Tables and code-like content */
  table{background:#151b23!important;color:#d8e1eb!important;border-color:#2d3746!important}
  th{background:#19222e!important;color:#edf2f7!important;border-color:#2d3746!important}
  td{border-color:#2d3746!important}
  pre,code{background:#101720!important;color:#d8e7f7!important;border-color:#2d3746!important}

  /* Preserve branded actions and media overlays */
  .button-red,.publish,[class*="primary"],button[type="submit"]{color:#fff}
  .hero-lead h1,.hero-lead h2,.hero-lead h3,.hero-lead p,
  .feature-news h1,.feature-news h2,.feature-news h3,.feature-news p{color:#fff!important}

  /* Footer is already dark; slightly harmonize it with night mode */
  .site-footer,.portal-footer,.footer-v22-minimal{background:#080e18!important;border-color:#1f2a39!important}
}
