html[data-preview-theme="blue"] { --bg:#f3f7ff; --ink:#14213a; --muted:#536581; --line:#ccd9ed; --green:#173d82; --accent:#d9e8ff; --preview-card:#fff; --preview-soft:#eaf2ff; --preview-selected:#e0ecff; --preview-outgoing:#d8e8ff; --preview-text:#405676; --preview-cta:#173d82; }
html[data-preview-theme="dark"] { color-scheme:dark; --bg:#0d1117; --ink:#e6edf3; --muted:#9aa6b4; --line:#2a3442; --green:#58a6ff; --accent:#1f2b3d; --preview-card:#151b23; --preview-soft:#1a212b; --preview-selected:#1f2c40; --preview-outgoing:#1d3557; --preview-text:#b7c2cf; --preview-cta:#2f81f7; --ok:#3fb950; --warn:#d29922; --bad:#f85149; }
html[data-preview-theme="slate"] { color-scheme:light; --bg:#f1f3f5; --ink:#202d38; --muted:#4e626f; --line:#cbd5db; --green:#245776; --accent:#e2edf3; --preview-card:#fff; --preview-soft:#e9eef2; --preview-selected:#dcebf3; --preview-outgoing:#deedf5; --preview-text:#465e6c; --preview-cta:#285d7c; }
.preview-theme-bar { height:auto; padding:9px max(16px,calc((100% - 1160px)/2)); justify-content:flex-start; flex-wrap:wrap; gap:8px 12px; background:var(--preview-card); border-bottom:1px solid var(--line); font-size:.875rem; }
.preview-theme-bar a { border:1px solid var(--line); border-radius:6px; padding:5px 8px; }
.preview-theme-bar a[aria-current] { background:var(--preview-selected); border-color:var(--green); font-weight:650; }

[data-preview-theme] :is(.store-config,.market-card,.market-panel,.inbox,.inbox-contact,.inbox-reply,.inbox-listing,dialog,.host-steps li) { background:var(--preview-card); border-color:var(--line); }
[data-preview-theme] :is(.store-option:has(input:checked),.inbox-thread[aria-pressed="true"],.inbox-thread:hover,.inbox-avatar) { background:var(--preview-selected); }
[data-preview-theme] :is(.inbox-sidebar,.inbox-conversation,.pricing-enterprise,.service-strip,.reservation-summary,.note,.market-message,.device-lookup) { background:var(--preview-soft); border-color:var(--line); }
[data-preview-theme] .inbox-message p { background:var(--preview-card); }
[data-preview-theme] .inbox-message.outgoing p { background:var(--preview-outgoing); border-color:var(--line); }
[data-preview-theme] :is(.market-muted,.store-intro p,.store-note,.store-option small,.market-heading p,.market-tag,.market #result-count,.market-disclosure,.inbox-thread-copy small,.inbox-thread-copy > span,.inbox-listing p,.inbox-message > span,.inbox-empty,.host-steps p,.note,.fine,.brand-tagline) { color:var(--preview-text); }
[data-preview-theme] :is(input,select,textarea) { background-color:var(--preview-card); color:var(--ink); }
[data-preview-theme] :is(.button.dark,.plan-option.active,.term-option.active) { background:var(--preview-cta); border-color:var(--preview-cta); color:white; }
[data-preview-theme="dark"] :is(.document-body p,.document-body li,.host-login-notice,.market-rule-link,.rental-notice-header p,.market-nav a,.market-nav small,.market-own p) { color:var(--preview-text); }
[data-preview-theme="dark"] :is(.terms-checklist,.contact-tabs,#request-dialog .term-options,.host-login-notice,.host-login-card input:disabled) { background:var(--preview-soft); }
[data-preview-theme="dark"] :is(#request-dialog .plan-option,#request-dialog .term-option,.contact-tabs button) { color:var(--ink); background:var(--preview-card); border-color:var(--line); }
[data-preview-theme="dark"] :is(#request-dialog .plan-option.active,#request-dialog .term-option.active,.contact-tabs button.active) { color:white; background:var(--preview-cta); }
[data-preview-theme="dark"] #request-dialog .term-option small { background:var(--preview-selected); color:var(--ink); }

[data-preview-theme="slate"] :is(.document-body p,.document-body li,.host-login-notice,.market-rule-link,.rental-notice-header p,.market-nav a,.market-nav small,.market-own p) { color:var(--preview-text); }
[data-preview-theme="slate"] :is(.terms-checklist,.contact-tabs,#request-dialog .term-options,.host-login-notice,.host-login-card input:disabled) { background:var(--preview-soft); }
[data-preview-theme="slate"] :is(#request-dialog .plan-option,#request-dialog .term-option,.contact-tabs button) { color:var(--ink); background:var(--preview-card); border-color:var(--line); }
[data-preview-theme="slate"] :is(#request-dialog .plan-option.active,#request-dialog .term-option.active,.contact-tabs button.active) { color:white; background:var(--preview-cta); }
[data-preview-theme="slate"] #request-dialog .term-option small { background:var(--preview-selected); color:var(--ink); }
[data-preview-theme="slate"] :is(button,a):focus-visible { outline-color:var(--green); }
[data-preview-theme="slate"] :is(input[type="radio"],input[type="checkbox"]) { accent-color:var(--preview-cta); }

/* ───────── 深色主题（全站默认） ───────── */
html[data-preview-theme="dark"] body { background:var(--bg); color:var(--ink); }
html[data-preview-theme="dark"] :is(p,li,dd,td,small,label,summary,.market-muted,.muted,.fine) { color:inherit; }
html[data-preview-theme="dark"] :is(.market-muted,.muted,.fine,.home-hosts-note,.mini-meta,.forum-row-meta,.forum-row-excerpt,.chat-time,.host-main,.host-main span,.res-chip,.machine-chip,.home-card,.listing-terms,.host-trust,.document-body p,.document-body li,.market-heading p,.store-note,.page-header p,footer p,dt) { color:var(--preview-text); }
html[data-preview-theme="dark"] :is(h1,h2,h3,h4,strong,.mini-title,.home-card-title strong,.host-main strong,.forum-row-title) { color:var(--ink); }
html[data-preview-theme="dark"] a.text-link, html[data-preview-theme="dark"] .text-link { color:var(--green); }
/* 卡片和面板 */
html[data-preview-theme="dark"] :is(.home-mini,.chatbox,.host-card,.listing-card,.market-card,.market-panel,.forum-list,.forum-row,.forum-reply-item,.forum-report,.forum-tab,.resource-card,.provider-card,.access-box,.report-head,.report-side,.check-list li,.inbox,.inbox-reply,.inbox-contact,.inbox-listing,.host-steps li,.store-config,.store-option,.order-summary,.pricing-card,.plan-card,.join-form,.device-option,dialog,.saved-item,.deposit-box,.setup-box,.verify-box,.res-chip,.machine-chip) { background:var(--preview-card); border-color:var(--line); }
html[data-preview-theme="dark"] :is(.inbox-sidebar,.inbox-conversation,.chat-form,.chat-note,.terms-checklist,.reservation-summary,.note,.pricing-notes,.pricing-help,.pricing-enterprise,.service-strip,.host-login-notice,.forum-row.pinned,.home-chat .chat-list) { background:var(--preview-soft); border-color:var(--line); }
html[data-preview-theme="dark"] .chat-msg { border-color:var(--line); }
html[data-preview-theme="dark"] :is(.chat-msg:hover,.forum-row:hover,.inbox-thread:hover) { background:var(--preview-selected); }
html[data-preview-theme="dark"] :is(input,select,textarea) { background:#0f141b; color:var(--ink); border-color:var(--line); }
html[data-preview-theme="dark"] :is(input,select,textarea)::placeholder { color:#6e7a88; }
html[data-preview-theme="dark"] :is(input:disabled,.host-login-card input:disabled) { background:#11161d; }
/* 按钮 */
html[data-preview-theme="dark"] .button { color:var(--ink); border-color:var(--line); }
html[data-preview-theme="dark"] :is(.button.dark,.button-dark,.plan-option.active,.term-option.active) { background:var(--preview-cta); border-color:var(--preview-cta); color:#fff; }
html[data-preview-theme="dark"] .button:hover { border-color:#4a5a70; }
html[data-preview-theme="dark"] .button.dark:hover { background:#3b8bff; }
html[data-preview-theme="dark"] .store-nav-links a.nav-host { color:#fff; background:var(--preview-cta); border-color:var(--preview-cta); }
html[data-preview-theme="dark"] .store-nav-links a.nav-host:hover { background:#3b8bff; }
html[data-preview-theme="dark"] .store-nav-links a[aria-current] { color:var(--green); }
html[data-preview-theme="dark"] .language-toggle { color:var(--ink); border-color:var(--line); }
html[data-preview-theme="dark"] :is(.forum-tab.active,.chat-tab.active) { background:var(--preview-cta); border-color:var(--preview-cta); color:#fff; }
html[data-preview-theme="dark"] .forum-tab { color:var(--preview-text); }
/* 首页 */
html[data-preview-theme="dark"] .chatbox-head { background:#1c2533; color:var(--ink); border-bottom:1px solid var(--line); }
html[data-preview-theme="dark"] :is(.chat-tab,.chat-rules) { color:var(--preview-text); }
html[data-preview-theme="dark"] .chat-note { color:#ff9b8a; }
html[data-preview-theme="dark"] .host-band { background:linear-gradient(135deg,#132a4d 0%,#0f1d33 55%,#151b23 100%); border:1px solid #24406b; color:var(--ink); }
html[data-preview-theme="dark"] .host-band h1, html[data-preview-theme="dark"] .host-band h1 a { color:#fff; }
html[data-preview-theme="dark"] .host-band-kicker { color:#79b8ff; }
html[data-preview-theme="dark"] .host-band-text > p:not(.host-band-kicker) { color:#c3cfdd; }
html[data-preview-theme="dark"] .band-primary { background:var(--preview-cta); border-color:var(--preview-cta); color:#fff; }
html[data-preview-theme="dark"] .band-ghost { color:#e6edf3; border-color:#3a4a60; }
html[data-preview-theme="dark"] .host-band .home-stats > div { background:#ffffff0d; border-color:#ffffff1f; }
html[data-preview-theme="dark"] .host-band .home-stats dt { color:#9fb3cc; }
html[data-preview-theme="dark"] .host-band .home-stats dd { color:#fff; }
html[data-preview-theme="dark"] .host-empty { background:var(--preview-soft); border-color:#2f81f766; }
html[data-preview-theme="dark"] .host-date { color:var(--ok); }
html[data-preview-theme="dark"] .listing-card.is-self, html[data-preview-theme="dark"] .machine-chip.is-self { background:#13233a; border-color:#2f81f7; box-shadow:inset 0 0 0 1px #2f81f7; }
html[data-preview-theme="dark"] .listing-card.is-star { border-color:#9e7a1f; }
html[data-preview-theme="dark"] .market-price { color:#79b8ff; }
html[data-preview-theme="dark"] .home-card-go { color:var(--green); }
html[data-preview-theme="dark"] .become-host { background:linear-gradient(135deg,#132a4d,#151b23); border:1px solid #24406b; }
html[data-preview-theme="dark"] .become-host-text span { color:#b7c2cf; }
html[data-preview-theme="dark"] .become-host .button.dark { background:var(--preview-cta); border-color:var(--preview-cta); color:#fff; }
/* 标签和徽章 */
html[data-preview-theme="dark"] :is(.tag,.market-tag,.badge) { background:#212a36; color:#c2ccd8; border-color:var(--line); }
html[data-preview-theme="dark"] :is(.tag.good,.badge.verified,.report-badge.pass) { background:#12301d; color:#56d364; border-color:#1f6f35; }
html[data-preview-theme="dark"] :is(.tag.star,.badge.star) { background:#3a2c08; color:#f2cc60; border-color:#7a5d12; }
html[data-preview-theme="dark"] :is(.tag.self,.badge.official) { background:#14315a; color:#79b8ff; border-color:#1f4f8f; }
html[data-preview-theme="dark"] :is(.tag.bad,.report-badge.fail,.cat-announce) { background:#3d1416; color:#ff8e86; }
html[data-preview-theme="dark"] :is(.report-badge.warn,.cat-help,.badge.early) { background:#3a2c08; color:#f2cc60; }
html[data-preview-theme="dark"] .forum-cat { background:#212a36; color:#c2ccd8; }
html[data-preview-theme="dark"] .cat-share { background:#12301d; color:#56d364; }
html[data-preview-theme="dark"] .cat-tutorial { background:#271a45; color:#c4a5ff; }
html[data-preview-theme="dark"] .cat-deals { background:#14315a; color:#79b8ff; }
html[data-preview-theme="dark"] .cat-chat { background:#2b2620; color:#d6c3a5; }
html[data-preview-theme="dark"] .listing-card > .serial-badge { background:#3a2c08; color:#f2cc60; border-color:#7a5d12; }
html[data-preview-theme="dark"] .badge-legend { color:var(--preview-text); }
html[data-preview-theme="dark"] .forum-status { background:#2b2108; border-color:#6b5312; color:#f2cc60; }
/* 验机报告 */
html[data-preview-theme="dark"] .report-pass { background:#0f2418; border-color:#1f6f35; }
html[data-preview-theme="dark"] .report-warn { background:#261d07; border-color:#6b5312; }
html[data-preview-theme="dark"] .report-fail { background:#2a1112; border-color:#7d2a2d; }
html[data-preview-theme="dark"] .report-expired { background:#1a1f27; }
html[data-preview-theme="dark"] .verify-box { background:#0f1d33; border-color:#2f81f7; }
html[data-preview-theme="dark"] :is(code,pre,.verify-cmd,.setup-cmd) { background:#0a0e14; color:#d2dbe5; border-color:var(--line); }
/* 私信 */
html[data-preview-theme="dark"] .inbox-message p { background:var(--preview-card); color:var(--ink); border-color:var(--line); }
html[data-preview-theme="dark"] .inbox-message.outgoing p { background:var(--preview-outgoing); }
html[data-preview-theme="dark"] .inbox-thread[aria-pressed="true"] { background:var(--preview-selected); }
/* 其他 */
html[data-preview-theme="dark"] dialog::backdrop { background:#000a; }
html[data-preview-theme="dark"] .preview-theme-bar { background:var(--preview-card); }
html[data-preview-theme="dark"] hr, html[data-preview-theme="dark"] footer { border-color:var(--line); }
html[data-preview-theme="dark"] .unread-badge { background:var(--bad); color:#fff; }
html[data-preview-theme="dark"] :is(.hero,.host-privacy,.card-badge,.plan-badge) { background:#14315a; color:#e6edf3; border-color:#1f4f8f; }
html[data-preview-theme="dark"] :is(.host-privacy,.hero) :is(p,h2,h3,span) { color:#d4deea; }
html[data-preview-theme="dark"] .store-nav-links a.nav-host[aria-current] { color:#fff; text-decoration:none; }
html[data-preview-theme="dark"] .chat-name { filter:brightness(1.9) saturate(1.2); }
html[data-preview-theme="dark"] .chat-event .chat-text a { color:#79b8ff; }
html[data-preview-theme="dark"] :is(.market-heading,.host-hero,.market-own) { border-color:#2f81f7; }
