/* Canada28 shared dark-mode layer: theme-only, no content or business behavior changes. */
.theme-switch{position:fixed;right:16px;bottom:16px;z-index:10000;min-width:94px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 13px;border:1px solid #c8d5e6;border-radius:999px;background:rgba(255,255,255,.96);color:#26384d;box-shadow:0 8px 28px rgba(20,38,64,.18);font:800 13px/1 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;cursor:pointer;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:background .18s,border-color .18s,color .18s,transform .18s}
.theme-switch:hover{border-color:#6c99ca;background:#f3f8ff}.theme-switch:active{transform:scale(.97)}.theme-switch:focus-visible{outline:3px solid #65aaf3;outline-offset:3px}.theme-switch__icon{font-size:18px;line-height:1}.theme-switch__label{white-space:nowrap}
html[data-theme="dark"]{color-scheme:dark;background:#07111f}
html[data-theme="dark"] body{--ink:#e8f1fb;--text:#b0c0d2;--muted:#8da1b8;--line:#263b54;--soft:#0b1728;--white:#101e31;--blue-soft:#102944;--orange-soft:#38291e;--panel:#101e31;--panel-soft:#0b1728;--bg:#07111f;background:#07111f!important;color:#dce8f5!important}
html[data-theme="dark"] .theme-switch{border-color:#345674;background:rgba(15,35,57,.96);color:#e6f3ff;box-shadow:0 8px 30px rgba(0,0,0,.38)}
html[data-theme="dark"] .theme-switch:hover{border-color:#62b7ed;background:#17314d}
html[data-theme="dark"] :where(#wrapper-outer-b,.compact-body,.s2-body,.s2-inner-body,.home-dashboard,.dashboard,.research-section,.content-section,.traffic-page,.not-found){background:#07111f!important;color:#dce8f5!important}
html[data-theme="dark"] :where(.main-wrapper,.site-header,.site-footer,.page-heading,.page-hero,.hero,.panel,.info-card,.quick-card,.hero-metric,.research-panel,.metric-card,.analysis-toolbar,.summary-cell,.chart-panel,.filter-panel,.article-nav,.research-article,.source-card,.ai-citation-summary,.lottery-panel,.content-area,.card,.seo-footer,.history-pager-wrap,.scroll-table-wrapper,.chat-side,.chat-form,.scratch-dialog,.more-nav>div){background:#101e31!important;color:#e8f1fb!important;border-color:#263b54!important;box-shadow:0 12px 32px rgba(0,0,0,.2)!important}
html[data-theme="dark"] :where(.site-ad-stack,.traffic-banner,.business-bar){border-color:#27435f!important;background-color:#0b1728!important}
html[data-theme="dark"] :where(.tab-nav,.nav-bar-stats,.card-header,.research-panel>header,.history-pager-summary,.history-pager-actions,.analysis-summary,.comparison-insights,.download-zone,.ad-row,.next-line,.integrity-notice,.notice){background:#0b192a!important;color:#c7d6e6!important;border-color:#263b54!important}
html[data-theme="dark"] :where(h1,h2,h3,h4,strong,.brand strong,.compact-site-brand,.dashboard-heading,.data-heading,.card-header,.seo-title){color:#edf6ff!important}
html[data-theme="dark"] :where(p,li,small,.brand small,.page-hero p,.prose p,.prose li,.seo-content,.seo-content p,.footer-inner,.footer-about p,.research-panel header p,.summary-cell span,.summary-cell small,.source-card p,.analysis-toolbar,.pager-stat,.history-pager-jump){color:#a9bbce!important}
html[data-theme="dark"] :where(a,.research-panel header a,.article-nav a,.footer-inner a,.seo-content a,.friend-link-box a){color:#72c7ff}
html[data-theme="dark"] :where(.primary-nav,.primary-nav a,.more-nav summary,.tab-item){color:#c6d6e7!important;border-color:#263b54!important}
html[data-theme="dark"] :where(.primary-nav a:hover,.primary-nav a:focus-visible,.primary-nav a[aria-current="page"],.more-nav summary:hover,.tab-item.active){background:#16304d!important;color:#7fd0ff!important}
html[data-theme="dark"] :where(.nav-toggle,.pager-btn,.pager-segment-btn,.pagination button,.period-switch button,.filter-actions button,.secondary-button,.icon-button,input,select,textarea){background:#0b192a!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.nav-toggle b){background:#e8f1fb!important}
html[data-theme="dark"] :where(table,thead,tbody,tr,th,td){border-color:#263b54!important}
html[data-theme="dark"] :where(th,.result-table th,.trend-table th,.pred-table th){background:#142943!important;color:#d9e8f7!important}
html[data-theme="dark"] :where(td,.result-table td,.trend-table td,.pred-table td){background:#0d1b2d!important;color:#c8d8e8!important}
html[data-theme="dark"] tbody tr:hover td{background:#142943!important}
html[data-theme="dark"] :where(.formula-row>div,.ratio-detail>div,.shape-scale>div,.omission-grid>div,.comparison-window,.study-grid>a,.draw-result-tags b,.pager-stat,.source-card.wide,.s3-current-status){background:#0c1b2d!important;color:#c8d8e8!important;border-color:#263b54!important}
html[data-theme="dark"] :where(.site-ad-card,.ad-rental-cta){background:#101e31!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] .ball:not(.ball-sum):not(.ball-skeleton),html[data-theme="dark"] .draw-numbers b{color:#e8f4ff!important;border-color:#385675!important;background:radial-gradient(circle at 32% 26%,#2b4664 0 7%,#18304c 43%,#0b1728 78%)!important;box-shadow:0 10px 24px rgba(0,0,0,.32),inset 0 0 0 1px rgba(150,205,255,.08)!important}
html[data-theme="dark"] :where(.load-more,.stats-bar,.page-kicker,.section-code,.sync-mini){color:#7fd0ff!important}
html[data-theme="dark"] :where(.footer-bottom,.site-footer,.friend-link-box){border-color:#263b54!important}
html[data-theme="dark"] :where(.compact-topbar,.compact-quiet-strip,.compact-draw,.compact-panel,.compact-toolbar,.compact-notice,.compact-footer,.compact-main-nav){background:#101e31!important;color:#e8f1fb!important;border-color:#263b54!important;box-shadow:0 12px 32px rgba(0,0,0,.2)!important}
html[data-theme="dark"] :where(.compact-brand-copy strong,.compact-draw strong,.compact-toolbar strong,.compact-subtitle){color:#edf6ff!important}
html[data-theme="dark"] :where(.compact-brand-copy small,.compact-draw span,.compact-draw small,.compact-toolbar span,.compact-notice){color:#a9bbce!important}
html[data-theme="dark"] :where(.compact-refresh,.compact-data-tabs button,.compact-forecast,.compact-summary-grid>span,.compact-omission>span){background:#0b192a!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.compact-data-tabs button.active,.compact-data-tabs button:hover){background:#173b62!important;color:#8bd7ff!important}
html[data-theme="dark"] :where(.fx-draw-card,.fx-data-center,.fx-tab-panel,.fx-reminder,.fx-trust-badge,.fx-sync-state,.fx-result-meta>span,.fx-predict-box,.fx-predict-result,.fx-rate-list,.fx-opened-groups>section,.fx-frequency-grid>article,.fx-omission-grid>article,.fx-footer){background:#101e31!important;color:#e8f1fb!important;border-color:#263b54!important;box-shadow:0 12px 32px rgba(0,0,0,.2)!important}
html[data-theme="dark"] :where(.fx-draw-heading,.fx-draw-main,.fx-reminder-title,.fx-tabs,.fx-panel-toolbar,.fx-table-wrap,.fx-pagination){background:#0b192a!important;color:#c7d6e6!important;border-color:#263b54!important}
html[data-theme="dark"] :where(.fx-title-block h1,.fx-panel-toolbar h3,.fx-reminder-title h2,.fx-footer strong,.fx-countdown-card span,.fx-countdown-card strong){color:#edf6ff!important}
html[data-theme="dark"] :where(.fx-title-block p,.fx-trust-strip small,.fx-reminder-title span,.fx-panel-toolbar p,.fx-footer span){color:#9fb3c8!important}
html[data-theme="dark"] :where(.fx-tabs button,.fx-pagination button,.fx-predict-box input){background:#0d1b2d!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.fx-tabs button.active,.fx-tabs button:hover,.fx-pagination button.active){background:#214d7e!important;color:#fff!important}
html[data-theme="dark"] :where(.draw-focus,.draw-number-stage,.ratio-values>div,.ratio-track,.comparison-window,.weekly-panel,.latest-panel,.expanded-latest,.study-grid>a,.download-banner){background:#101e31!important;color:#e8f1fb!important;border-color:#263b54!important;box-shadow:0 12px 32px rgba(0,0,0,.2)!important}
html[data-theme="dark"] :where(.ad-rental-banner,.ad-rental-copy){background:#101e31!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.draw-issue span,.draw-countdown span,.draw-countdown small,.ratio-card-head span,.ratio-values span,.ratio-values em,.metric-card small,.comparison-window span,.comparison-window dt){color:#9fb3c8!important}
html[data-theme="dark"] :where(.draw-issue strong,.draw-countdown strong,.ratio-values strong,.metric-card strong,.comparison-window h3,.comparison-window dd){color:#edf6ff!important}
html[data-theme="dark"] :where(.result-table td,.trend-table td,.pred-table td,.compact-table td,.fx-history-table td){opacity:1!important}
html[data-theme="dark"] :where(.chat-page,.chat-shell,.group-header,.announcement,.chat-list,.composer,.composer-toolbar,.emoji-panel){background:#101e31!important;color:#e8f1fb!important;border-color:#263b54!important;box-shadow:none!important}
html[data-theme="dark"] :where(.page-header,.chat-tabs,.connection-bar){background:#0b192a!important;color:#c7d6e6!important;border-color:#263b54!important}
html[data-theme="dark"] :where(.chat-tabs a,.back-home,.emoji-button,.latest-button,.connection-bar button,.nickname-label input,.compose-entry textarea){background:#0d1b2d!important;color:#dce8f5!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.chat-tabs a[aria-current="page"],.chat-tabs a:hover){background:#173b62!important;color:#8bd7ff!important}
html[data-theme="dark"] :where(.group-info h1,.message-meta strong,.bubble){color:#edf6ff!important}
html[data-theme="dark"] :where(.group-info,.connection-bar,.message-meta,.nickname-label,.nick-policy,.composer-bottom,.storage-note,.empty){color:#9fb3c8!important}
html[data-theme="dark"] :where(.bubble,.avatar){background:#142943!important;border-color:#34506d!important}
html[data-theme="dark"] :where(.own .bubble,.own .avatar){background:#30223a!important;border-color:#614464!important}
html[data-theme="dark"] img{filter:brightness(.92)}
@media(max-width:640px){.theme-switch{right:12px;bottom:12px;min-width:46px;width:46px;min-height:46px;padding:0}.theme-switch__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.theme-switch{transition:none}}
