/* 切换按钮（白天 / 黑夜都用） */
.theme-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin:0 6px 0 4px;padding:0;border:1px solid var(--line,#e5e8ee);border-radius:50%;background:transparent;color:var(--fg2,#6b7280);cursor:pointer;flex:none;transition:color .15s,border-color .15s,background .15s}
.theme-btn:hover{color:var(--accent,#2a62f5);border-color:var(--accent,#2a62f5)}
@media(max-width:760px){.theme-btn{width:32px;height:32px;margin:0 4px}}
/* v34：颜色已对齐 v27 黑夜色板（与 /stocks 一致）。原说明：黑夜模式：由 qa/gen-dark.mjs 从各样式表的浅色值机械生成，再叠加手写补丁。切换见 assets/js/theme.js */
html[data-theme="dark"]{color-scheme:dark;--bg:#0f141b;--bg2:#161d28;--fg:#e8ecf3;--fg2:#a2adc0;--fg3:#74829a;--line:#232c3a;--accent:#4d80ff;--accent2:#40a0ff;--accent-bg:#172540;--warn-bg:#33270f;--warn:#e9a640;--up:#f0565a;--down:#2fc088;--ai1:#4d80ff;--ai2:#40a0ff;--ai-line:#26406f;--ai-bg:#14233f;--v24-line:#232c3a;--v24-sh:0 4px 18px rgba(0,0,0,.35)}
html[data-theme="dark"] body{background:#0f141b;color:#e8ecf3}
/* site.css */
html[data-theme="dark"] .bar-top{background:#0f141bf0}
html[data-theme="dark"] .nav a,html[data-theme="dark"] .nav .navbtn{color:#e8ecf3}
html[data-theme="dark"] .ddm{background:#0f141b}
html[data-theme="dark"] .demo-bar{background:#33270f;color:#e9a640}
html[data-theme="dark"] .hero{background:linear-gradient(180deg,#172540,#0f141b)}
html[data-theme="dark"] .mkt.open{background:#17382a}
html[data-theme="dark"] .mkt.pre,html[data-theme="dark"] .mkt.post{background:#33270f}
html[data-theme="dark"] .mkt.demo{background:#3d1f24;color:#ff7078}
html[data-theme="dark"] .viewsw button.on{background:#0f141b}
html[data-theme="dark"] .ex.cn{background:#3d1f24;color:#ff7078}
html[data-theme="dark"] .pin{background:#3d1f24}
html[data-theme="dark"] .iss.plus{background:#161d28;color:#a2adc0}
html[data-theme="dark"] tr.sk i{background:linear-gradient(90deg,var(--bg2),#172540,var(--bg2))}
html[data-theme="dark"] .cta .btn{background:#0f141b}
html[data-theme="dark"] .drawer{background:#0f141b}
html[data-theme="dark"] .socbtn{background:#0f141b}
html[data-theme="dark"] #totop{background:#0f141b}
html[data-theme="dark"] .cmp-in{background:#0f141b}
html[data-theme="dark"] .cmpt th{background:#0f141b}
html[data-theme="dark"] .ai-strip{background:linear-gradient(90deg,var(--ai-bg),#0f141b 70%)}
html[data-theme="dark"] .ai-ht b{color:#9db8ff}
html[data-theme="dark"] .ai-chip{background:#0f141b}
html[data-theme="dark"] .aib-a:hover{background:#172540}
html[data-theme="dark"] .dr-ai{background:linear-gradient(135deg,var(--ai-bg),#0f141b)}
html[data-theme="dark"] .dr-ai-h b{color:#9db8ff}
html[data-theme="dark"] .ai-btn:hover{background:#172540}
html[data-theme="dark"] .card.aicard{background:linear-gradient(160deg,var(--ai-bg),#0f141b 60%)}
html[data-theme="dark"] .aicard h3{color:#9db8ff}
html[data-theme="dark"] .ai-mini:hover{background:#172540}
html[data-theme="dark"] .dr-x{background:#0f141b}
html[data-theme="dark"] .dr-act .star.on{background:#33270f}
html[data-theme="dark"] .dr-act .star.on{background:#33270f}
html[data-theme="dark"] .fx-intro{color:#a2adc0}
html[data-theme="dark"] .ava.logo{background:#0f141b!important;border:1px solid #232c3a}
/* ui.css */
@media (max-width:760px){
html[data-theme="dark"] .fx-cta{background:#0f141b}
}
html[data-theme="dark"] #hero-text:empty,html[data-theme="dark"] #stats:empty,html[data-theme="dark"] #tabs:empty,html[data-theme="dark"] #filters:empty,html[data-theme="dark"] #mc:empty{background:#161d28}
html[data-theme="dark"] #mc:empty{background:repeating-linear-gradient(180deg,#161d28 0 78px,transparent 78px 90px)}
html[data-theme="dark"] .tablewrap:has(#tb:empty){background:repeating-linear-gradient(180deg,#161d28 0 40px,transparent 40px 52px)}
/* mobile.css */
@media (max-width:760px){
html[data-theme="dark"] .m .sub3 i.fxb{background:#161d28}
html[data-theme="dark"] .fx-tw{background:linear-gradient(90deg,#0f141b 30%,#151c2a00),linear-gradient(270deg,#0f141b 30%,#151c2a00) 100% 0,radial-gradient(farthest-side at 0 50%,#0002,#0000),radial-gradient(farthest-side at 100% 50%,#0002,#0000) 100% 0}
}
/* list-side.css */
@media (max-width:760px){
html[data-theme="dark"] .stats{background:#0f141b}
}
/* market.css */
html[data-theme="dark"] .xd-kpi>div{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-chart,html[data-theme="dark"] .xd-side{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-side .lnk{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-stale{color:#e9a640}
html[data-theme="dark"] .exlogo img{background:#0f141b}
html[data-theme="dark"] .mklogo img{background:#0f141b}
html[data-theme="dark"] .ex.mkz{background:#172540}
html[data-theme="dark"] .ex.mkz.z-MEME{background:#3d1f24}
html[data-theme="dark"] .ex.mkz.z-AI{background:#172540}
html[data-theme="dark"] .ex.mkz.z-CHAIN{background:#17382a;color:#5fd69a}
html[data-theme="dark"] .ex.mkz.z-HOT{background:#33270f}
html[data-theme="dark"] .ex.mkz.z-BINANCE-ALPHA{background:#33270f}
html[data-theme="dark"] .ex.mkz.z-PRE-MARKET{background:#172540}
html[data-theme="dark"] .gbar{background:#0f141b}
html[data-theme="dark"] #cd-about .desc.clamp::after{background:linear-gradient(rgba(21,28,42,0),#0f141b)}
html[data-theme="dark"] .xd-side .rng i b{background:#0f141b}
html[data-theme="dark"] .xd-side .links a{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .newsgrid a{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-chains button.on{background:#0f141b}
html[data-theme="dark"] .mv-q{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table th{background:#0f141b;border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table td{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .site-foot .copy{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .home-entry .he{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hs-seg button.on{background:#0f141b}
html[data-theme="dark"] .hp{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hp-list .hr{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hi .pic{background:#172540 center/cover no-repeat}
html[data-theme="dark"] .ha{background:linear-gradient(90deg,#172540,#161d28)}
html[data-theme="dark"] .hab.clamp::after{background:linear-gradient(rgba(21,28,42,0),#0f141b)}
html[data-theme="dark"] .chgpill.up{background:#3d1f24}
html[data-theme="dark"] .chgpill.dn{background:#17382a}
html[data-theme="dark"] .hn-dots i{background:#161d28}
html[data-theme="dark"] .hl{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hl-r{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hl-ic.hot{background:#3d1f24}
html[data-theme="dark"] .hl-ic.up{background:#3d1f24}
html[data-theme="dark"] .hl-r:hover{background:var(--bg2,#161d28)}
/* memes.css */
html[data-theme="dark"] .c-bsc.on{color:#e8ecf3}
html[data-theme="dark"] .mchain.c-bsc{background:#33270f}
html[data-theme="dark"] .mchain.c-rh{background:#17382a;color:#5fd69a}
html[data-theme="dark"] .mchain.c-sol{background:#172540}
html[data-theme="dark"] .mtier.t-thin{color:#e9a640}
html[data-theme="dark"] .mv-chains button.on{background:#0f141b}
html[data-theme="dark"] .mv-q{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table th{background:#0f141b;border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table td{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-kpi>div{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-quote{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-exp button,html[data-theme="dark"] .md-exp a.btn{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .md-chart{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-card{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-card>.ct{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-link{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-link .a button,html[data-theme="dark"] .md-link .a a{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .md-srow{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-backbtn{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .md-kpi>div{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .md-kpi>div:nth-child(odd){border-right:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .site-foot .copy{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .sm-grid>div{background:var(--bg2,#161d28)}
html[data-theme="dark"] .sm-warn{color:#e9a640}
html[data-theme="dark"] .sm-foot{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .wt{background:var(--bg2,#161d28);color:var(--fg2,#a2adc0)}
html[data-theme="dark"] .wt.w-kol{background:#33270f}
html[data-theme="dark"] .wt.w-smart{background:#172540}
html[data-theme="dark"] .wt.w-blue{background:#17382a}
html[data-theme="dark"] .wt.w-whale{background:#172540}
html[data-theme="dark"] .wt.w-risk{background:#3d1f24}
html[data-theme="dark"] .kempty{background:var(--bg2,#161d28)}
html[data-theme="dark"] .kretry{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .ms-head{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .ms-head .md-btns .ghost{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hl{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .hl-r:hover{background:var(--bg2,#161d28)}
html[data-theme="dark"] .ms-tabs button{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .ms-q{border:1px solid var(--line,#232c3a);background:#0f141b}
html[data-theme="dark"] .ms-table tr.go:hover td{background:var(--bg2,#161d28)}
/* exchanges.css */
html[data-theme="dark"] .mv-chains button.on{background:#0f141b}
html[data-theme="dark"] .mv-q{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table th{background:#0f141b;border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .mv-table td{border-bottom:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .exlogo img{background:#0f141b}
html[data-theme="dark"] .ex.por{background:#17382a;color:#5fd69a}
html[data-theme="dark"] .ex.selfrep{color:#e9a640}
html[data-theme="dark"] .extrust.ta{background:#17382a;color:#5fd69a}
html[data-theme="dark"] .extrust.tb{background:#33270f;color:#e9a640}
html[data-theme="dark"] .extrust.tc{background:#3d1f24;color:#ff8a8a}
html[data-theme="dark"] .xd-kpi>div{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-chart,html[data-theme="dark"] .xd-side{background:#0f141b;border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-side .lnk{border:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-stale{color:#e9a640}
html[data-theme="dark"] .site-foot .copy{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"] .xd-subh{border-top:1px solid var(--line,#232c3a)}
html[data-theme="dark"].v24 .side .card.cta{background:#0f141b!important;border:1px solid var(--line,#232c3a)}
/* v24ui.css */
html[data-theme="dark"] .vm{background:#0f141b}
html[data-theme="dark"] .vm1{background:linear-gradient(135deg,#172540 0%,#0f141b 62%)}
html[data-theme="dark"] .vm-meter{background:#161d28}
html[data-theme="dark"] .aiflow{background:linear-gradient(100deg,#172540,#0f141b 65%)}
html[data-theme="dark"] .af-steps .st{background:#0f141b}
html[data-theme="dark"] .st-i{background:#161d28;color:#a2adc0}
html[data-theme="dark"] .af-steps .st.hot .st-i{background:rgba(21,28,42,.2)}
html[data-theme="dark"] .tk{background:#161d28;color:#a2adc0}
html[data-theme="dark"] .tk[data-x]::before{color:#74829a}
html[data-theme="dark"] .av-bar select{border:1px solid #232c3a;background:#0f141b}
html[data-theme="dark"] .av-q input{border:1px solid #232c3a;background:#0f141b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1ad' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50%}
html[data-theme="dark"] .avtab tbody tr:hover{background:#161d28}
html[data-theme="dark"] .vm-k{background:var(--accent-bg,#172540)}
html[data-theme="dark"] .af-list .ai-chip:hover{background:#0f141b}
html[data-theme="dark"] .af-steps .st.hot{background:#0f141b}
html[data-theme="dark"] .af-steps .st.hot .st-i{background:#161d28;color:#a2adc0}
/* ===== 手写补丁 ===== */
html[data-theme="dark"] .ava img,html[data-theme="dark"] .exlogo img,html[data-theme="dark"] .xd-peers .ava,html[data-theme="dark"] .xd-head .ava{background:#fff}
html[data-theme="dark"] [style*="#eef2f9"]{background:#232c3a!important;color:#a2adc0!important}
html[data-theme="dark"] [style*="background:#fff"]{background:#0f141b!important}
html[data-theme="dark"] [style*="#b26a00"]{color:#e9a640!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background-color:#161d28;color:#e8ecf3;border-color:#232c3a}
html[data-theme="dark"] ::placeholder{color:#74829a}
html[data-theme="dark"] .xd-pill.tok{background:#17382a;color:#5fd69a}
html[data-theme="dark"] .xd-pill.warn{background:#33270f;color:#e9a640}
html[data-theme="dark"] .xd-stale,html[data-theme="dark"] .xd-trade{color:#e9a640}
html[data-theme="dark"] .xd-trade{color:var(--accent)}
html[data-theme="dark"] img[src*="logo"],html[data-theme="dark"] .hero img{filter:none}
html[data-theme="dark"] .mv-more{background:var(--bg2);color:var(--fg);border-color:var(--line)}
html[data-theme="dark"] .aiflow .st .st-i{background:#161d28}
html[data-theme="dark"] .mburger{background:#161d28!important;border-color:#232c3a!important;color:#e8ecf3!important}
html[data-theme="dark"] .mburger *,html[data-theme="dark"] .mburger::before,html[data-theme="dark"] .mburger::after{background-color:#e8ecf3}
html[data-theme="dark"] .mburger svg *{fill:none;stroke:#e8ecf3;background:none}
