.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);padding:8px 11px;min-height:36px;font:12px/1.4 Inter,"Microsoft YaHei",sans-serif;white-space:nowrap}.theme-toggle:hover{border-color:var(--purple);color:var(--purple)}.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.theme-admin-bar{max-width:1400px;margin:auto;padding:18px 26px 0;display:flex;justify-content:flex-end}.theme-toggle[aria-pressed=true]{background:var(--surface)}
:root[data-theme=light]{color-scheme:light;--bg:#f6f7fb;--surface:#fff;--ink:#242633;--muted:#626777;--line:#dedfe8;--purple:#7046a6;--blue:#285caa}
html[data-theme=light] body,html[data-theme=light] body.admin-body{background:var(--bg);color:var(--ink)}
html[data-theme=light] .intro{color:#596073}html[data-theme=light] .intro em{background-image:linear-gradient(110deg,#285caa,#8b48a6)}html[data-theme=light] h1 span{color:#747887}
html[data-theme=light] :is(.navlinks,.auth-nav,.stats,.resource-id,.row-meta,.row-count,.footer,.notice,.reply-details,.compose-form legend,.admin-top p,.admin-stat span,.admin-table th,.admin-status,.admin-empty,.admin-auth-shell p,.admin-table code){color:var(--muted)}
html[data-theme=light] :is(.text-button,.owner-actions,.admin-sidebar a,.admin-brand span,.admin-top a){color:var(--purple)}html[data-theme=light] .text-button:hover{color:#4e2e7c}html[data-theme=light] .stats b{color:var(--ink)}
html[data-theme=light] .button{background:#fff;color:var(--ink);border-color:#cdd0de}html[data-theme=light] .button:hover{border-color:var(--purple)}html[data-theme=light] .button.primary{background:#302a43;color:#fff;border-color:#302a43}html[data-theme=light] .button.primary:hover{background:#49355e;border-color:#49355e}html[data-theme=light] .button[aria-pressed=true]{background:#eee6f9;border-color:#a68abb;color:#573183}
html[data-theme=light] :is(.resource:hover,.topic:hover){background:#f7f3fc;border-color:#b6a1cf}html[data-theme=light] .pill{color:#69448f;border-color:#d9cde7;background:#f3edf9}html[data-theme=light] :is(.filters input,.filters select,.admin-toolbar input){background:#fff;color:var(--ink);border-color:#cdd0de}
html[data-theme=light] .prose{color:#3f4556}html[data-theme=light] .prose pre{background:#edf0f7;border-color:#d8dce8}html[data-theme=light] .prose code{color:#654288}html[data-theme=light] .prose blockquote{background:#f0eaf8;border-color:#9a78ba}html[data-theme=light] :is(.prose td,.prose th){border-color:var(--line)}html[data-theme=light] .discussion .nested{border-color:#dbd0e8}
html[data-theme=light] .read-note{background:#eee8f7;border-color:#8c68b4;color:#60447e}html[data-theme=light] .community{background:linear-gradient(120deg,#fff,#f0eafa);border-color:#d9cce6}
html[data-theme=light] .compose-form label{color:#4e4860}html[data-theme=light] .compose-form :is(input:not([type=checkbox]):not([type=file]),textarea,select){background:#fff;color:var(--ink);border-color:#cdd0de}html[data-theme=light] .compose-form fieldset{border-color:#d4ccdf}html[data-theme=light] :is(input,textarea)::placeholder{color:#7b7e8c}html[data-theme=light] .form-status{color:#66408c}html[data-theme=light] .form-status.error{color:#ad2948}html[data-theme=light] .account-settings{border-color:#d4ccdf;background:#fff}
html[data-theme=light] dialog{background:#fff;border-color:#b8adca;color:var(--ink)}html[data-theme=light] dialog::backdrop{background:#20203966}
html[data-theme=light] .qq-card{background:linear-gradient(145deg,#fff,#f3f0f9)}html[data-theme=light] .qq-card:hover{border-color:#ab8ec6}html[data-theme=light] .qq-symbol{background:#eee6f8}
html[data-theme=light] :is(.admin-sidebar,.admin-table td,.admin-table th){border-color:var(--line)}html[data-theme=light] .admin-tabs button{color:#5f596c}html[data-theme=light] .admin-tabs button.active{background:#eae1f5;color:#5b357e}html[data-theme=light] .admin-stat{background:#fff;border-color:#ded5e8}html[data-theme=light] .admin-stat strong{color:#362a49}html[data-theme=light] .admin-status.disabled{color:#a62d4d}html[data-theme=light] .admin-message{background:#eee7f8;color:#654482;border-color:#9674b7}
@media(max-width:650px){.theme-admin-bar{padding:14px 20px 0}.theme-toggle{min-height:38px}}

.theme-controls{display:inline-flex;align-items:center;gap:5px}