/* ============================================================
   default 主题 · 深浅色切换（front-theme.css v1）
   开关位于导航栏最右侧；状态由 <html data-theme="dark|light"> 控制
   （localStorage: sr-cms-theme，默认跟随系统 prefers-color-scheme）
   本文件在 front.css / content-models.css / cms-blocks.css / cms-pay.css
   之后加载：浅色主题完全沿用原样式；深色主题仅在此追加覆盖。
   ============================================================ */

/* ---------- 主题色板（浅色即原样式，此处统一声明供深色覆盖引用） ---------- */
:root{
  --tt-bg:#0a111f;        /* 深色页底 */
  --tt-headbar:#0d1626;   /* 深色头部白条 */
  --tt-card:#121d31;      /* 深色卡片 */
  --tt-card-2:#16233c;    /* 深色卡片内嵌/浮层 */
  --tt-card-3:#0e1730;    /* 深色操作条 */
  --tt-input:#0f1a2f;     /* 深色输入框 */
  --tt-ink:#dde6f3;       /* 深色主文本 */
  --tt-ink-2:#b9c7de;     /* 深色次级文本 */
  --tt-muted:#8fa3c2;     /* 深色弱文本 */
  --tt-faint:#5f7296;     /* 深色更弱文本 */
  --tt-line:#26324c;      /* 深色分隔线/描边 */
  --tt-line-2:#33415f;    /* 深色强描边 */
  --tt-blue:#7caeff;      /* 深色链接/强调字 */
  --tt-blue-strong:#4c86f6;/* 深色强调填充 */
  --tt-blue-soft:rgba(59,130,246,.16);   /* 深色浅蓝底(悬停) */
  --tt-blue-softer:rgba(59,130,246,.10); /* 深色更浅蓝底 */
}

/* ---------- 深色变量映射（复用原 var() 引用，自动翻转正文/卡片/边框等） ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:var(--tt-bg);
  --card:var(--tt-card);
  --ink:var(--tt-ink);
  --muted:var(--tt-muted);
  --blue-900:#dfe9fb;              /* 各类深蓝标题 → 亮色 */
  --blue-700:var(--tt-blue);       /* 正文链接 */
  --blue-600:#5b93f7;              /* 强调(文字/按钮底色兼顾) */
  --cyan:#38bdf8;
  --line:var(--tt-line);
  --shadow-card:0 4px 18px rgba(0,0,0,.35);
  --shadow-hover:0 16px 38px rgba(0,0,0,.5);
}

/* ---------- 深色滚动条（窗口 / 全局） ---------- */
html[data-theme="dark"] *{scrollbar-color:#3c4f78 transparent;}
html[data-theme="dark"] *::-webkit-scrollbar-thumb{background:rgba(124,174,255,.32);}
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover{background:rgba(124,174,255,.52);}
html[data-theme="dark"] *::-webkit-scrollbar-thumb:active{background:rgba(124,174,255,.68);}

/* ============================================================
   iOS 风格深浅色开关（常显，位于 .header-navbar 导航最右端）
   关闭态=浅色（滑块带月亮，点击进入深色）
   开启态=深色（青蓝轨道与导航强调色一致，滑块带太阳，点击返回浅色）
   ============================================================ */
.theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:24px;padding:0;margin-left:14px;flex:none;
  background:none;border:none;cursor:pointer;font:inherit;
}
.theme-toggle .tt-track{
  position:relative;display:block;width:100%;height:100%;border-radius:999px;
  background:rgba(255,255,255,.4);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22),inset 0 1px 2px rgba(3,10,28,.16);
  transition:background .22s ease,box-shadow .22s ease;
}
.theme-toggle:hover .tt-track{background:rgba(255,255,255,.6);}
.theme-toggle .tt-thumb{
  position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;
  background:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 5px rgba(3,10,28,.35);
  transition:transform .26s cubic-bezier(.34,1.45,.46,1);
}
.theme-toggle .tt-thumb svg{width:12px;height:12px;display:block;flex:none;}
/* 月亮 = 浅色态（可切深）；太阳 = 深色态（可切浅） */
.theme-toggle .tt-thumb .tt-sun{display:none;}
.theme-toggle .tt-thumb .tt-moon{color:#4a6bb0;}
html[data-theme="dark"] .theme-toggle .tt-track{background:linear-gradient(90deg,#38bdf8,#22d3ee);box-shadow:inset 0 0 0 1px rgba(255,255,255,.28),inset 0 1px 2px rgba(3,10,28,.14);}
html[data-theme="dark"] .theme-toggle:hover .tt-track{filter:brightness(1.08);}
html[data-theme="dark"] .theme-toggle .tt-thumb{transform:translateX(18px);}
html[data-theme="dark"] .theme-toggle .tt-thumb .tt-moon{display:none;}
html[data-theme="dark"] .theme-toggle .tt-thumb .tt-sun{display:block;color:#0e7490;}
.theme-toggle:focus-visible{outline:2px solid #7dd3fc;outline-offset:3px;border-radius:999px;}
/* 导航项紧凑（顶级栏目较多时保证最右侧主题开关不被挤出容器） */
.main-nav>li>a{padding:0 18px;font-size:14px;}
@media (max-width:900px){
  .theme-toggle{margin-left:10px;}
}

/* ============================================================
   深色覆盖 · front.css（外壳 / 列表 / 正文 / 目录 / 互动条）
   ============================================================ */

/* ---- 头部白条与搜索 ---- */
html[data-theme="dark"] .site-header{background:var(--tt-headbar);}
html[data-theme="dark"] .header-search-icon{color:#5d6f90;}
html[data-theme="dark"] .header-search-input{background:var(--tt-input);border-color:#2a3a5a;color:var(--tt-ink);}
html[data-theme="dark"] .header-search-input::placeholder{color:#64779b;}
html[data-theme="dark"] .header-search-form:focus-within .header-search-input{border-color:#5d8efb;background:#101d36;box-shadow:0 0 0 4px rgba(59,130,246,.16);}

/* ---- 用户区 / 登录按钮 / 下拉 ---- */
html[data-theme="dark"] .cu-trigger{color:#c9d5ea;}
html[data-theme="dark"] .cu-trigger:hover{border-color:#33415f;background:rgba(255,255,255,.06);}
html[data-theme="dark"] .cu-menu{background:var(--tt-card-2);border-color:var(--tt-line-2);box-shadow:0 24px 50px rgba(0,0,0,.55);}
html[data-theme="dark"] .cu-head{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .cu-bal{background:#0f1a30;border-color:var(--tt-line-2);}
html[data-theme="dark"] .cu-bal span{color:var(--tt-muted);}
html[data-theme="dark"] .cu-link{color:var(--tt-ink-2);}
html[data-theme="dark"] .cu-link:hover{background:var(--tt-blue-soft);color:var(--tt-blue);}
html[data-theme="dark"] .cu-logout{color:#e0a59c;}
html[data-theme="dark"] .cu-logout:hover{background:rgba(185,68,61,.18);color:#f0a89d;}
html[data-theme="dark"] .cu-caret{border-top-color:rgba(200,214,240,.8);}
html[data-theme="dark"] .site-header .cms-user-btn{background:var(--tt-card);border-color:#33507f;color:var(--tt-blue);box-shadow:none;}
html[data-theme="dark"] .site-header .cms-user-btn:hover{background:linear-gradient(90deg,#2563eb,#06b6d4);border-color:transparent;color:#fff;}

/* ---- 导航下拉 ---- */
html[data-theme="dark"] .dropdown{background:var(--tt-card-2);border-color:var(--tt-line-2);box-shadow:0 22px 48px rgba(0,0,0,.55);}
html[data-theme="dark"] .dropdown a{color:var(--tt-ink-2);}
html[data-theme="dark"] .dropdown a:hover{background:var(--tt-blue-soft);color:var(--tt-blue);}

/* ---- 面包屑 ---- */
html[data-theme="dark"] .crumbs .sep{color:#45536f;}

/* ---- 列表 / 侧栏 ---- */
html[data-theme="dark"] .list-head .en{color:#6b7d9d;}
html[data-theme="dark"] .article-item,
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .ad-banner,
html[data-theme="dark"] .article-body,
html[data-theme="dark"] .article-toc-inner,
html[data-theme="dark"] .comment-form,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .error-page,
html[data-theme="dark"] .cover-desc{border-color:var(--tt-line);}
html[data-theme="dark"] .article-item:hover{border-color:#3a4a6e;}
html[data-theme="dark"] .article-cover img{background:var(--tt-card-3);}
html[data-theme="dark"] .article-meta{color:var(--tt-muted);}
html[data-theme="dark"] .ad-side a{border-bottom-color:var(--tt-line);color:var(--tt-ink);}
html[data-theme="dark"] .ad-side a:hover{background:#0f1c34;color:var(--tt-blue);}
html[data-theme="dark"] .pager a,.pager .current{border-color:var(--tt-line-2);}
html[data-theme="dark"] .pager a:hover{border-color:#4c86f6;color:var(--tt-blue);background:var(--tt-blue-softer);}
html[data-theme="dark"] .side-card-title{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .side-link{color:var(--tt-ink-2);border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .side-link:hover{background:#0f1c34;color:var(--tt-blue);}
html[data-theme="dark"] .side-link .time{color:var(--tt-muted);}
html[data-theme="dark"] .sub-cat{border-color:#33415f;background:var(--tt-card);color:var(--tt-muted);}
html[data-theme="dark"] .sub-cat:hover{border-color:#4c86f6;color:var(--tt-blue);background:var(--tt-blue-soft);}

/* ---- 正文（文章/单页） ---- */
html[data-theme="dark"] .article-body{color:var(--tt-ink-2);}
html[data-theme="dark"] .article-body blockquote,
html[data-theme="dark"] .comment-sub{background:#131f39;color:var(--tt-muted);}
html[data-theme="dark"] .article-body code{background:#1a2a4a;color:#8fb7ff;}
html[data-theme="dark"] .article-body table{border-color:var(--tt-line-2);}
html[data-theme="dark"] .article-body th,
html[data-theme="dark"] .article-body td{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .article-body th{background:linear-gradient(180deg,#1a2742,#101d36);color:#b6d2ff;}
html[data-theme="dark"] .article-body td{border-right-color:var(--tt-line);}
html[data-theme="dark"] .article-body tr:hover td{background:#0f1c34;}
html[data-theme="dark"] .article-body img{box-shadow:0 10px 30px rgba(0,0,0,.35);}
html[data-theme="dark"] .tag-chip{background:#1b2947;color:#b9c9e6;border-color:var(--tt-line);}
html[data-theme="dark"] .tag-chip:hover{background:#4c86f6;border-color:#4c86f6;color:#fff;}

/* ---- 评论 ---- */
html[data-theme="dark"] .comment-item{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .comment-time{color:var(--tt-muted);}
html[data-theme="dark"] .comment-body{color:var(--tt-ink-2);}
html[data-theme="dark"] .comment-form input[type=text],
html[data-theme="dark"] .comment-form textarea,
html[data-theme="dark"] .form-item input[type=text],
html[data-theme="dark"] .form-item input[type=number],
html[data-theme="dark"] .form-item textarea,
html[data-theme="dark"] .form-item select{background:var(--tt-input);border-color:var(--tt-line-2);color:var(--tt-ink);}
html[data-theme="dark"] .captcha-box img{background:#1b2947;border-color:var(--tt-line-2);}
/* EP 风格评论区：悬停/焦点在深色下的适配 */
html[data-theme="dark"] .comment-form input[type=text]:hover,
html[data-theme="dark"] .comment-form textarea:hover{border-color:#4c587a;}
html[data-theme="dark"] .comment-form .captcha-box img{background:#1b2947;border-color:var(--tt-line-2);}
html[data-theme="dark"] .comment-form .captcha-box img:hover{border-color:#5b93f7;}
html[data-theme="dark"] .comment-form .btn-submit{background:#4c86f6;}
html[data-theme="dark"] .comment-form .btn-submit:hover{background:#6b9cf8;}
html[data-theme="dark"] .comment-form .btn-submit:active{background:#3a6fd9;}
/* EP 风格校验/提示在深色下的适配 */
html[data-theme="dark"] .comment-form .cf-item-err{color:#f89292;}
html[data-theme="dark"] .comment-form .cf-item.has-error input[type=text],
html[data-theme="dark"] .comment-form .cf-item.has-error textarea{border-color:#f56c6c;}
html[data-theme="dark"] .cf-toast{background:var(--tt-card-2);border-color:var(--tt-line-2);color:var(--tt-ink);box-shadow:0 8px 26px rgba(0,0,0,.45);}
html[data-theme="dark"] .cf-toast.success .cf-toast-ico{color:#67c23a;}
html[data-theme="dark"] .cf-toast.error .cf-toast-ico{color:#f56c6c;}
html[data-theme="dark"] .cf-toast.info .cf-toast-ico{color:#7caeff;}

/* ---- 表单提示 / 专题 / 错误页 ---- */
html[data-theme="dark"] .topic-list li,
html[data-theme="dark"] .topic-list{border-color:var(--tt-line);}
html[data-theme="dark"] .topic-list a{color:var(--tt-ink);}
html[data-theme="dark"] .topic-list .time{color:var(--tt-muted);}

/* ---- 扩展字段 ---- */
html[data-theme="dark"] .detail-fields{border-color:var(--tt-line-2);background:var(--tt-card-3);}
html[data-theme="dark"] .detail-fields .detail-field{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .detail-fields .detail-field-label{color:var(--tt-muted);}
html[data-theme="dark"] .detail-fields .detail-field-value{color:var(--tt-ink);}

/* ---- 点赞 / 收藏互动条 ---- */
html[data-theme="dark"] .ca-btn{background:var(--tt-card);border-color:var(--tt-line-2);color:#b6c2d6;}
html[data-theme="dark"] .ca-btn:hover{color:#f09a7e;border-color:#7a4a42;background:rgba(232,88,58,.10);}
html[data-theme="dark"] .ca-btn.on{color:#fff;border-color:transparent;background:linear-gradient(135deg,#ff6a5e,#feb47b);}

/* ---- 正文目录 ---- */
html[data-theme="dark"] .article-toc{scrollbar-color:#46577a transparent;}
html[data-theme="dark"] .article-toc::-webkit-scrollbar-thumb{background:#46577a;}
html[data-theme="dark"] .article-toc-link{color:var(--tt-ink-2);}
html[data-theme="dark"] .article-toc-link:hover{background:#0f1c34;color:var(--tt-blue);}
html[data-theme="dark"] .article-toc-link.active,
html[data-theme="dark"] .article-toc-link.active:hover{background:#16243e;color:var(--tt-blue);}
html[data-theme="dark"] .article-toc-list>li>a::before{color:#8fb7ff;background:#1a2a4a;border-color:#2c4272;}
html[data-theme="dark"] .article-toc-list ul a{color:var(--tt-muted);}
html[data-theme="dark"] .article-toc-list ul a::before{background:#46577a;}
html[data-theme="dark"] .article-toc-list ul{border-left-color:var(--tt-line-2);}

/* ============================================================
   深色覆盖 · content-models.css（模型卡片 / 详情 / 操作条）
   ============================================================ */
html[data-theme="dark"] .dm-section-title{color:var(--tt-ink);}
html[data-theme="dark"] .faq-box,
html[data-theme="dark"] .faq-summary,
html[data-theme="dark"] .product-info,
html[data-theme="dark"] .video-info,
html[data-theme="dark"] .job-info,
html[data-theme="dark"] .job-welfare,
html[data-theme="dark"] .album-meta,
html[data-theme="dark"] .link-card,
html[data-theme="dark"] .prod-card,
html[data-theme="dark"] .video-card,
html[data-theme="dark"] .album-card,
html[data-theme="dark"] .ca-card,
html[data-theme="dark"] .job-row,
html[data-theme="dark"] .site-card{background:var(--tt-card);border-color:var(--tt-line);box-shadow:0 2px 12px rgba(0,0,0,.22);}
html[data-theme="dark"] .faq-summary[open],html[data-theme="dark"] .job-row:hover{border-color:#3a4a6e;}
html[data-theme="dark"] .faq-item + .faq-item{border-top-color:var(--tt-line-2);}
html[data-theme="dark"] .faq-question,
html[data-theme="dark"] .faq-q-title,
html[data-theme="dark"] .download-fname,
html[data-theme="dark"] .dl-title,
html[data-theme="dark"] .prod-title,
html[data-theme="dark"] .video-title,
html[data-theme="dark"] .album-title,
html[data-theme="dark"] .link-name,
html[data-theme="dark"] .site-name,
html[data-theme="dark"] .job-row-title{color:var(--tt-ink);}
html[data-theme="dark"] .faq-answer,
html[data-theme="dark"] .faq-a-body,
html[data-theme="dark"] .product-spec,
html[data-theme="dark"] .job-welfare-text,
html[data-theme="dark"] .link-desc,
html[data-theme="dark"] .site-desc{color:var(--tt-ink-2);}
html[data-theme="dark"] .faq-type,
html[data-theme="dark"] .faq-q-type,
html[data-theme="dark"] .link-type,
html[data-theme="dark"] .site-type,
html[data-theme="dark"] .dl-chip{background:var(--tt-blue-softer);border-color:rgba(99,147,247,.4);color:var(--tt-blue);}
html[data-theme="dark"] .job-tag,
html[data-theme="dark"] .album-meta-item{background:#1b2947;color:#9db2d4;}
html[data-theme="dark"] .album-meta-item b{color:var(--tt-ink);}
html[data-theme="dark"] .video-free{background:#16a34a;color:#fff;}
html[data-theme="dark"] .video-paid,html[data-theme="dark"] .job-deadline{background:#b45309;color:#ffe2b0;}
html[data-theme="dark"] .video-card .video-meta{color:var(--tt-muted);}
html[data-theme="dark"] .video-info .video-meta{background:#1b2947;color:#9db2d4;}
html[data-theme="dark"] .job-salary-num::after,
html[data-theme="dark"] .job-salary-extra,
html[data-theme="dark"] .product-origin,
html[data-theme="dark"] .prod-origin,
html[data-theme="dark"] .dl-count,
html[data-theme="dark"] .site-contact{color:var(--tt-muted);}
html[data-theme="dark"] .job-salary-extra{color:#9db2d4;}
html[data-theme="dark"] .product-info th,
html[data-theme="dark"] .job-info th{color:#a8c2ec;background:#17243e;}
html[data-theme="dark"] .product-info th,.product-info td,
html[data-theme="dark"] .job-info th,.job-info td{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .product-info table,
html[data-theme="dark"] .job-info table{border-color:var(--tt-line-2);}
html[data-theme="dark"] .link-logo,
html[data-theme="dark"] .site-logo{background:var(--tt-card-3);border-color:var(--tt-line);}
html[data-theme="dark"] .btn-consult{background:var(--tt-card);color:var(--tt-blue);border-color:#33507f;}
html[data-theme="dark"] .btn-consult:hover{background:var(--tt-blue-soft);}
html[data-theme="dark"] .job-row-apply{background:var(--tt-blue-softer);border-color:rgba(99,147,247,.4);color:var(--tt-blue);}
html[data-theme="dark"] .link-type-partner{background:rgba(22,163,74,.16);color:#5bd08a;border-color:rgba(34,197,94,.35);}
html[data-theme="dark"] .link-type-sponsor{background:rgba(217,119,6,.16);color:#f0b44c;border-color:rgba(245,158,11,.35);}
html[data-theme="dark"] .product-bar{background:linear-gradient(135deg,#2b1d20,#29241c);border-color:rgba(254,202,202,.22);}
html[data-theme="dark"] .job-salary{background:linear-gradient(135deg,#2b1d20,#2a1f26);border-color:rgba(254,202,202,.22);}
html[data-theme="dark"] .download-card{background:linear-gradient(135deg,#131f3b,#101a2d);border-color:#2c4272;}
html[data-theme="dark"] .download-version{background:#1a2a4a;color:#8fb7ff;}
html[data-theme="dark"] .download-os-chip{background:var(--tt-card);border-color:var(--tt-line-2);color:var(--tt-ink-2);}
html[data-theme="dark"] .dl-media{background:var(--tt-card-3);}
html[data-theme="dark"] .dl-media-ph{color:rgba(147,197,253,.5);background:linear-gradient(135deg,#152237,#1b3a72);}
html[data-theme="dark"] .dl-foot{background:var(--tt-card-3);border-top-color:var(--tt-line);}
html[data-theme="dark"] .ca-acts{background:var(--tt-card-3);border-top-color:var(--tt-line);}
html[data-theme="dark"] .ca-mini{color:#9aa8c2;}
html[data-theme="dark"] .faq-summary .ca-acts{background:transparent;}
html[data-theme="dark"] .prod-cover,
html[data-theme="dark"] .album-cover{background:var(--tt-card-3);}
html[data-theme="dark"] .prod-cover img,
html[data-theme="dark"] .album-cover img{background:var(--tt-card-3);}
html[data-theme="dark"] .prod-noimg,
html[data-theme="dark"] .album-noimg{color:var(--tt-faint);}
html[data-theme="dark"] .prod-stock.ok{background:rgba(22,163,74,.15);color:#4ade80;}
html[data-theme="dark"] .prod-stock.empty{background:rgba(239,68,68,.15);color:#f87171;}

/* ============================================================
   深色覆盖 · cms-blocks.css / cms-pay.css（内容块 / 支付弹层）
   ============================================================ */
html[data-theme="dark"] .cms-block{background:var(--tt-card);box-shadow:0 2px 12px rgba(0,0,0,.2);}
html[data-theme="dark"] .cms-block-list li{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .cms-block-link{color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-block-link:hover{color:#7caeff;}
html[data-theme="dark"] .cms-block-time,
html[data-theme="dark"] .cms-notice-scroll ul li .notice-date{color:var(--tt-muted);}
html[data-theme="dark"] .cms-block-links .cms-block-link{background:#1a2742;border-color:var(--tt-line-2);color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-block-links .cms-block-link:hover{color:#fff;border-color:#4c86f6;background:var(--tt-blue-soft);}
html[data-theme="dark"] .cms-video-title{color:var(--tt-ink);}
html[data-theme="dark"] .cms-block-rank .rank-no{color:#b0bdd4;background:#26344f;}
html[data-theme="dark"] .cms-block-rank .rank-no-top{color:#fff;background:#f56c6c;}
html[data-theme="dark"] .cms-notice-scroll ul li,
html[data-theme="dark"] .cms-notice-scroll ul li a{color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-notice-scroll ul li a:hover{color:#7caeff;}
html[data-theme="dark"] .cms-block-tabs .tabs-head{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .cms-block-tabs .tabs-btn{color:var(--tt-muted);}
html[data-theme="dark"] .cms-block-tabs .tabs-btn:hover,
html[data-theme="dark"] .cms-block-tabs .tabs-btn.active{color:#7caeff;}
html[data-theme="dark"] .cms-block-qrcode img{border-color:var(--tt-line-2);background:#fff;}
html[data-theme="dark"] .cms-block-qrcode .qrcode-text{color:var(--tt-ink);}

/* cms-pay：登录弹窗 / 付费墙 / 下载授权 */
html[data-theme="dark"] .cms-modal{background:var(--tt-card);box-shadow:0 12px 32px rgba(0,0,0,.5);}
html[data-theme="dark"] .cms-modal-mask{background:rgba(8,12,24,.55);}
html[data-theme="dark"] .cms-modal-title{color:var(--tt-ink);}
html[data-theme="dark"] .cms-modal-close{color:var(--tt-muted);}
html[data-theme="dark"] .cms-modal-close:hover{color:var(--tt-ink);}
html[data-theme="dark"] .cms-field input{background:var(--tt-input);border-color:var(--tt-line-2);color:var(--tt-ink);}
html[data-theme="dark"] .cms-captcha-img{border-color:var(--tt-line-2);}
html[data-theme="dark"] .cms-field input::placeholder{color:var(--tt-faint);}
html[data-theme="dark"] .cms-field input:hover{border-color:#54648a;}
html[data-theme="dark"] .cms-field input:focus{box-shadow:0 0 0 2px rgba(64,158,255,.18);}
html[data-theme="dark"] .cms-modal-tip{color:var(--tt-muted);}
html[data-theme="dark"] .cms-paywall{background:linear-gradient(180deg,#131f39,#0e1730);border-color:var(--tt-line-2);}
html[data-theme="dark"] .cms-paywall-title{color:var(--tt-ink);}
html[data-theme="dark"] .cms-paywall-desc{color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-paywall-tip{color:var(--tt-muted);}
html[data-theme="dark"] .cms-paywall .cms-pay-preview{color:#a8b6cc;}

/* ============================================================
   深色细调：选区 / 滚动条
   ============================================================ */
html[data-theme="dark"] ::selection{background:rgba(59,130,246,.45);color:#fff;}
@media (prefers-reduced-motion:reduce){
  .theme-toggle .tt-track,
  .theme-toggle .tt-thumb{transition:none;}
}

/* ============================================================
   深色覆盖 · cms-member.css（会员中心）
   会员中心用独立的 --mm-* 变量 + 部分硬编码浅色，
   这里翻转变量并对硬编码白底/浅灰 hover 逐组覆盖。
   ============================================================ */
html[data-theme="dark"]{
  --mm-primary:#6ba1fb;
  --mm-primary-2:#5b93f7;
  --mm-primary-3:#7fb2ff;
  --mm-primary-bg:rgba(59,130,246,.16);
  --mm-success:#4ade80;
  --mm-success-bg:rgba(22,163,74,.14);
  --mm-warning:#f0b44c;
  --mm-warning-bg:rgba(245,158,11,.14);
  --mm-danger:#f87171;
  --mm-danger-bg:rgba(239,68,68,.14);
  --mm-gold:#f0b44c;
  --mm-gold-2:#e8ac42;
  --mm-ink:#dde6f3;
  --mm-body:#b9c7de;
  --mm-muted:#8fa3c2;
  --mm-line:#26324c;
  --mm-line-light:#33415f;
  --mm-bg:var(--tt-bg);
  --mm-card:var(--tt-card);
  --mm-shadow:0 1px 2px rgba(0,0,0,.25),0 8px 24px rgba(0,0,0,.4);
  --mm-shadow-hover:0 4px 12px rgba(0,0,0,.42),0 16px 40px rgba(0,0,0,.55);
}
html[data-theme="dark"] .cms-member-page{background:linear-gradient(180deg,#0d1626 0%,#0a111f 100%);}
html[data-theme="dark"] .member-topbar{box-shadow:0 8px 26px rgba(0,0,0,.4);}

/* ---- 侧栏导航 ---- */
html[data-theme="dark"] .member-nav a{color:var(--tt-ink-2);}
html[data-theme="dark"] .member-nav a:hover{background:#16243e;color:var(--tt-blue);}
html[data-theme="dark"] .member-nav a.on{background:linear-gradient(90deg,rgba(59,130,246,.20),rgba(6,182,212,.14));color:#7fb2ff;}
html[data-theme="dark"] .member-nav .member-nav-group{color:#6b7d9d;}

/* ---- 概览资产卡 / 主资产卡 ---- */
html[data-theme="dark"] .asset-box,
html[data-theme="dark"] .asset-main{background:var(--tt-card);border-color:var(--tt-line);}
html[data-theme="dark"] .asset-box:hover{border-color:#3a4a6e;box-shadow:0 10px 24px rgba(0,0,0,.35);}
html[data-theme="dark"] .asset-box .asset-ico,
html[data-theme="dark"] .asset-box.cms-pay-order .asset-ico,
html[data-theme="dark"] .vip-plan .plan-ico{background:linear-gradient(135deg,#1c2c4f,#22345e);color:#8cb4ff;box-shadow:inset 0 0 0 1px rgba(99,147,247,.22);}
html[data-theme="dark"] .asset-box.asset-gold .asset-ico{background:rgba(245,158,11,.13);color:#fbbf24;}
html[data-theme="dark"] .asset-box.asset-comm .asset-ico{background:rgba(16,185,129,.13);color:#34d399;}
html[data-theme="dark"] .asset-box.asset-cards .asset-ico,
html[data-theme="dark"] .asset-box.asset-star .asset-ico{background:rgba(99,102,241,.13);color:#a5b4fc;}
html[data-theme="dark"] .asset-box.asset-vip .asset-ico{background:rgba(234,88,12,.14);color:#fb923c;}
html[data-theme="dark"] .asset-box .asset-vip-sub{color:#f0b44c;}
html[data-theme="dark"] .asset-box.asset-cards .asset-vip-sub{color:#a5b4fc;}
html[data-theme="dark"] .asset-box.asset-vip.on{background:linear-gradient(180deg,#261f10,#201a0e);border-color:#8a6a10;}
html[data-theme="dark"] .asset-box.asset-vip.on .asset-ico{background:rgba(217,119,6,.2);color:#fbbf24;}
html[data-theme="dark"] .asset-box.asset-vip .asset-vip-on{color:#f0b44c;}
html[data-theme="dark"] .asset-box.asset-go .asset-go-sub{color:#a5b4fc;}
html[data-theme="dark"] .asset-box.asset-go:hover{border-color:#4f46a5;}
html[data-theme="dark"] .am-ico{background:linear-gradient(135deg,#2a2413,#362a12);box-shadow:inset 0 0 0 1px rgba(217,119,6,.25);color:#fbbf24;}
html[data-theme="dark"] .am-worth{background:rgba(245,158,11,.16);color:#f0b44c;}
html[data-theme="dark"] .am-ident.ident-lv{background:#0f1a2f;border-color:var(--tt-line-2);color:var(--tt-ink-2);}
html[data-theme="dark"] .am-btn-sub{background:var(--tt-card);border-color:var(--tt-line-2);color:var(--tt-blue);}
html[data-theme="dark"] .am-btn-sub:hover{background:var(--tt-blue-soft);border-color:#4c86f6;}
html[data-theme="dark"] .am-chip{background:#0f1a2f;border-color:var(--tt-line);color:var(--tt-muted);}
html[data-theme="dark"] .am-chip:hover{background:#16243e;border-color:#4c86f6;box-shadow:0 2px 8px rgba(0,0,0,.3);}
html[data-theme="dark"] .member-overview-note{background:var(--tt-card-3);border-color:var(--tt-line);color:var(--tt-muted);}
html[data-theme="dark"] .member-overview-note b{color:var(--tt-ink-2);}

/* ---- VIP 购卡 ---- */
html[data-theme="dark"] .vip-plan{background:var(--tt-card);border-color:var(--tt-line);}
html[data-theme="dark"] .vip-plan:hover{border-color:#3a4a6e;box-shadow:0 16px 38px rgba(0,0,0,.45);}
html[data-theme="dark"] .vip-plan .plan-crown{background:rgba(245,158,11,.13);color:#fbbf24;}
html[data-theme="dark"] .vip-plan .plan-price{color:#fb7185;}
html[data-theme="dark"] .vip-plan .plan-price em.plan-coin{color:#f0b44c;}
html[data-theme="dark"] .vip-plan.owned{background:linear-gradient(180deg,#0e2117,#111b2c);border-color:#14532d;}
html[data-theme="dark"] .vip-plan.owned .plan-crown{background:rgba(16,185,129,.13);color:#34d399;}
html[data-theme="dark"] .vip-plan .plan-owned{color:#4ade80;}
html[data-theme="dark"] .plan-type-tag{background:rgba(59,130,246,.14);color:var(--tt-blue);}

/* ---- 表格 ---- */
html[data-theme="dark"] .cms-table th,
html[data-theme="dark"] .cms-table td{border-bottom-color:var(--tt-line);}
html[data-theme="dark"] .cms-table thead th{background:#16233c;color:var(--tt-muted);border-bottom-color:var(--tt-line-2);}
html[data-theme="dark"] .cms-table tbody tr:hover{background:#16233c;}
html[data-theme="dark"] .flow-remark{color:var(--tt-ink);}
html[data-theme="dark"] .cms-pager .cms-pager-btn{background:var(--tt-card);border-color:var(--tt-line-2);color:var(--tt-blue);}
html[data-theme="dark"] .cms-pager .cms-pager-btn:hover{border-color:#4c86f6;box-shadow:0 2px 8px rgba(37,99,235,.25);}

/* ---- 充值 / 兑换 / 服务表单 ---- */
html[data-theme="dark"] .cms-recharge-preset button,
html[data-theme="dark"] .cms-pay-alt,
html[data-theme="dark"] .cms-mini-btn{background:var(--tt-card);border-color:var(--tt-line-2);color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-recharge-preset button:hover{border-color:#4c86f6;background:#16233c;color:var(--tt-blue);}
html[data-theme="dark"] .cms-pay-alt:hover{border-color:#4c86f6;background:var(--tt-blue-softer);color:var(--tt-blue);}
html[data-theme="dark"] .cms-mini-btn{border-color:#33415f;}
html[data-theme="dark"] .cms-mini-btn:hover{border-color:#4c86f6;background:#16233c;}
html[data-theme="dark"] .cms-exchange-rule{background:linear-gradient(135deg,#241d0e,#241f10);border-color:rgba(245,158,11,.3);color:#e8c07c;}
html[data-theme="dark"] .cms-exchange-rule b{color:#fbbf24;}
html[data-theme="dark"] .cms-svc-box{background:var(--tt-card);border-color:var(--tt-line);}
html[data-theme="dark"] .cms-svc-box:hover{box-shadow:0 8px 24px rgba(0,0,0,.3);}
html[data-theme="dark"] .cms-svc-rule{background:var(--tt-card-3);border-color:var(--tt-line);color:var(--tt-ink-2);}
html[data-theme="dark"] .cms-svc-rule b{color:var(--tt-ink);}
html[data-theme="dark"] .cms-area,
html[data-theme="dark"] .cms-member-page .cms-inp,
html[data-theme="dark"] .cms-member-page .cms-field input{background:var(--tt-input);border-color:var(--tt-line-2);color:var(--tt-ink);}
html[data-theme="dark"] .cms-area:hover,
html[data-theme="dark"] .cms-member-page .cms-inp:hover,
html[data-theme="dark"] .cms-member-page .cms-field input:hover{border-color:#54648a;}
html[data-theme="dark"] .cms-member-page .cms-inp:disabled{background:#0e182b;color:var(--tt-faint);}
html[data-theme="dark"] .cms-member-page .cms-field input::placeholder{color:var(--tt-faint);}

/* ---- 分段筛选 / 签到 / 汇总 ---- */
html[data-theme="dark"] .cms-seg{background:#1a2742;}
html[data-theme="dark"] .cms-seg button.on{background:var(--tt-card-2);color:var(--tt-blue);box-shadow:0 1px 4px rgba(0,0,0,.4);}
html[data-theme="dark"] .sign-hero{background:linear-gradient(135deg,#101c33,#131f39);}
html[data-theme="dark"] .sign-metric{background:var(--tt-card);border-color:var(--tt-line);}
html[data-theme="dark"] .sign-done{background:rgba(22,163,74,.15);border-color:rgba(74,222,128,.3);color:#4ade80;}
html[data-theme="dark"] .comm-summary{background:var(--tt-card-3);border-color:var(--tt-line);}

/* ---- 支付面板 ---- */
html[data-theme="dark"] .cms-pay-channel{background:rgba(59,130,246,.18);color:#8fb7ff;}
html[data-theme="dark"] .cms-pay-timer{background:rgba(59,130,246,.13);border-color:rgba(99,147,247,.35);color:#8fb7ff;}
html[data-theme="dark"] .cms-pay-timer-warn{background:rgba(245,158,11,.13);border-color:rgba(245,158,11,.35);color:#f0b44c;}
html[data-theme="dark"] .cms-pay-timeout-note{background:rgba(245,158,11,.1);color:var(--tt-muted);}
html[data-theme="dark"] .cms-pay-timeout-note b{color:#f0b44c;}
html[data-theme="dark"] .cms-pay-qr-box{background:#fff;border-color:#e8ecf2;}

/* ---- 徽章 / 状态标签 / 标签 ---- */
html[data-theme="dark"] .cms-status.s0,
html[data-theme="dark"] .cms-status.w1{background:rgba(217,119,6,.16);color:#f5b758;}
html[data-theme="dark"] .cms-status.s1{background:rgba(22,163,74,.16);color:#4ade80;}
html[data-theme="dark"] .cms-status.s2,
html[data-theme="dark"] .cms-status.w3{background:rgba(239,68,68,.16);color:#f87171;}
html[data-theme="dark"] .cms-status.w2{background:rgba(22,119,255,.16);color:#8fb7ff;}
html[data-theme="dark"] .cms-tag{background:#26344f;color:#b9c9e6;}
html[data-theme="dark"] .cms-tag.tg-green{background:rgba(22,163,74,.15);color:#4ade80;}
html[data-theme="dark"] .cms-tag.tg-amber{background:rgba(245,158,11,.16);color:#f0b44c;}
html[data-theme="dark"] .cms-tag.tg-red{background:rgba(239,68,68,.16);color:#f87171;}
html[data-theme="dark"] .cms-tag.tg-blue{background:rgba(59,130,246,.16);color:#8fb7ff;}
html[data-theme="dark"] .cms-tag.tg-gray{background:rgba(148,163,184,.16);color:#b0bdd4;}
html[data-theme="dark"] .asset-cd.cd-urgent{background:rgba(239,68,68,.15);color:#fca5a5;}
html[data-theme="dark"] .asset-cd.cd-warn{background:rgba(245,158,11,.15);color:#fde68a;}
html[data-theme="dark"] .asset-cd.cd-safe{background:rgba(22,163,74,.15);color:#86efac;}
html[data-theme="dark"] .asset-cd.cd-long{background:rgba(99,102,241,.15);color:#c7d2fe;}
html[data-theme="dark"] .flow-cur{background:#26344f;color:#9db2d4;}
html[data-theme="dark"] .money-plus{color:#4ade80;}
html[data-theme="dark"] .money-minus{color:#f87171;}

/* ---- 头像删除 / 次级辅助 ---- */
html[data-theme="dark"] .pf-avatar-actions .pf-avatar-remove{border-color:#7a3a3a;color:#f0938b;}
html[data-theme="dark"] .pf-avatar-actions .pf-avatar-remove:hover{background:rgba(239,68,68,.14);border-color:#f87171;}

/* ============================================================
   深色覆盖 · 右侧悬浮条（cms-blocks.css 的 .cms-fixbar）
   白色磨砂面板 + 白渐变条目在深色下整体翻转；
   条目悬停仍用品牌蓝渐变高亮，气泡/说明图保持原样。
   ============================================================ */
html[data-theme="dark"] .cms-fixbar{
  background:rgba(16,27,48,.74);
  border-color:rgba(99,147,247,.20);
  box-shadow:0 14px 36px rgba(0,0,0,.5);
}
html[data-theme="dark"] .cms-fixbar-item{
  background:linear-gradient(180deg,#263a66 0%,#16233f 100%);
  border-color:rgba(99,147,247,.30);
  color:#9ec2ff;
  box-shadow:0 8px 18px rgba(0,0,0,.34), inset 0 1px 0 rgba(158,194,255,.10);
}
html[data-theme="dark"] .cms-fixbar-item:visited{color:#9ec2ff;}
html[data-theme="dark"] .cms-fixbar-item:hover,
html[data-theme="dark"] .cms-fixbar-item:focus-visible{
  color:#fff;
  background:linear-gradient(165deg,#6aa2ff 0%,#3d7bf5 55%,#2a5fea 100%);
  box-shadow:0 16px 30px rgba(45,110,240,.45);
}
html[data-theme="dark"] .cms-fixbar-item:focus-visible{box-shadow:0 16px 30px rgba(45,110,240,.45),0 0 0 3px rgba(47,111,237,.35);}
html[data-theme="dark"] .cms-fixbar-item[data-tip]:hover::after{background:rgba(6,12,28,.96);}
