/* 深色主题变量和组件差异，以及主题切换控件。 */
:root { color-scheme: light; --theme-panel: #fff; --theme-raised: #eef1fb; --theme-line: #d6deef; --theme-text: #4d5b7c; }
.theme-switch { --theme-motion-duration: .22s; --theme-motion-ease: cubic-bezier(.2, .7, .3, 1); position: relative; flex: 0 0 auto; }
.theme-switch[hidden], .theme-switch [data-theme-icon][hidden] { display: none; }
.theme-toggle { position: relative; display: flex; align-items: center; gap: 7px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--theme-text); font: inherit; cursor: pointer; transition: transform var(--theme-motion-duration) var(--theme-motion-ease); }
.theme-label { position: absolute; right: 0; top: calc(100% + 8px); display: grid; place-items: center; min-width: 76px; height: 34px; padding: 0 10px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-raised); color: var(--theme-text); box-shadow: 0 4px 14px #10152910; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .16s ease, transform .16s ease, visibility .16s ease; z-index: 2; }
.theme-toggle:focus-visible .theme-label { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-cycle-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid transparent; border-radius: 9px; background: #e3eff6; color: #638eaa; transition: background var(--theme-motion-duration) var(--theme-motion-ease), color var(--theme-motion-duration) var(--theme-motion-ease), border-color var(--theme-motion-duration) var(--theme-motion-ease), box-shadow var(--theme-motion-duration) var(--theme-motion-ease); }
.theme-toggle[data-theme-mode="light"] .theme-cycle-icon { background: #fff1cc; color: #b38735; }
.theme-toggle[data-theme-mode="dark"] .theme-cycle-icon { background: #e9e5f5; color: #8076ac; }
html[data-color-theme="dark"] .theme-cycle-icon { background: #253e50; color: #a2c9df; }
html[data-color-theme="dark"] .theme-toggle[data-theme-mode="light"] .theme-cycle-icon { background: #473e29; color: #e2c786; }
html[data-color-theme="dark"] .theme-toggle[data-theme-mode="dark"] .theme-cycle-icon { background: #38334e; color: #c1b4e4; }
.theme-toggle svg { display: block; width: 19px; height: 19px; transition: transform var(--theme-motion-duration) var(--theme-motion-ease); }
.theme-switch :focus-visible { outline: 2px solid #aab9df; outline-offset: 2px; }
@media (max-width: 700px) {
.nav-wrap { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; }
.github-link { grid-column: 2; }
.theme-switch { grid-column: 3; grid-row: 1; }
}
@media (pointer: coarse) {
.theme-toggle { min-width: 44px; min-height: 44px; justify-content: center; }
.theme-label { height: 38px; }
.theme-cycle-icon { width: 38px; height: 38px; flex-basis: 38px; }
}
@media (max-width: 400px) {
.theme-label { min-width: 64px; padding: 0 6px; font-size: 11px; }
.nav-wrap { column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
.theme-toggle { transition: none; }
}
html[data-color-theme="dark"] { color-scheme: dark; --theme-panel: #1d2435; --theme-raised: #293249; --theme-line: #37435d; --theme-text: #d6ddf0; }
html[data-color-theme="dark"] body { --ink: #dce2f0; --muted: #a4aec4; --line: #354058; --paper: #151b29; --white: #1d2435; --dark: #dce2f0; --blue: #2b3650; --blue-strong: #8daddb; --lilac: #342e48; --orange: #eda6bd; --ui-accent: #a4b7e7; --ui-accent-strong: #bcccf1; --ui-line: #39465f; --ui-soft: #273148; --ui-online: #8bc8d0; --shadow: 0 12px 32px #070a152b; background: var(--paper); color: var(--ink); }
html[data-color-theme="dark"] .home-intro { --home-accent: #a4b7e7; --home-line: #354058; }
html[data-color-theme="dark"] body .home-widget { --maimai-accent: #a4b7e7; --maimai-accent-strong: #bcccf1; --maimai-soft: #273148; --maimai-line: #39465f; --maimai-muted: #a4aec4; --arcade-accent: #a4b7e7; --arcade-soft: #273148; --arcade-line: #39465f; }
html[data-color-theme="dark"] body .site-header { background: #151b29f0; border-color: var(--line); }
html[data-color-theme="dark"] body .brand-mark { color: #b8c9ed; background: linear-gradient(135deg, #2f3d58, #3a304e); border-color: #43506b; }
html[data-color-theme="dark"] body .site-footer { background: #151b29; color: #a4aec4; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-personal-board, .home-widget, .feature-card, .detail-panel, .doc-card, .docs-guide-card, .mai-dialog, .arcade-dialog, .qq-login-dialog, .mai-platform, .mai-token-guide, .home-widget-source-menu) { background: var(--theme-panel); color: var(--ink); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-intro h1, .home-profile-copy strong, .home-about-heading h2, .status-bot-meta strong, .home-widget-data strong, .home-widget-action, .home-score-song strong, .card-title, .home-arcade-shop-name) { color: var(--ink); }
html[data-color-theme="dark"] body :is(.home-lead, .home-profile-heading, .home-profile-copy p, .home-widget-message, .home-widget-label, .home-theme-picker-head, .home-arcade-shop-label, .home-arcade-address, .home-arcade-attendance-heading, .home-arcade-people, .home-arcade-wait, .home-arcade-report-time, .home-arcade-edit-hint, .home-about-copy p, .home-about-heading p, .home-personal-board .status-stats .status-bot-qq, .card-category) { color: var(--muted); }
html[data-color-theme="dark"] body :is(.home-about, .section-light) { background: linear-gradient(115deg, #1b2437, #262139); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-profile, .status-board-head, .home-widget-tabs, .home-theme-picker, .home-widget-footer, .home-arcade-attendance-footer, .home-arcade-report-feedback, .home-arcade-overview, .home-score-column + .home-score-column, .home-personal-board .status-stats > div + div) { border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-theme-option, .home-import-segment, .mai-segment, .qq-login-options, .docs-guide-note, .help-trigger, .detail-command-panel, .doc-card-dark, .arcade-attendance-footer) { background: var(--ui-soft); color: var(--ink); border-color: var(--line); }
html[data-color-theme="dark"] body .home-widget-maimai .home-theme-option.is-selected { background: #303d58; border-color: #657aa3; }
html[data-color-theme="dark"] body :is(.home-arcade-attendance, .arcade-attendance) { background: linear-gradient(125deg, #222d43, #2b273e); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-profile-avatar, .settings-avatar, .status-bot-avatar) { background: linear-gradient(135deg, #2f3d58, #3a304e); color: #afbee5; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.qq-login-button, .home-intro .button-primary, .home-arcade-report-button:not(:disabled)) { background: linear-gradient(110deg, #334666, #46395e); color: #e0e7fa; border-color: #53658c; }
html[data-color-theme="dark"] body :is(.qq-login-button:hover:not(:disabled), .qq-login-button:focus-visible, .home-intro .button-primary:hover, .home-arcade-report-button:hover:not(:disabled)) { background: linear-gradient(110deg, #405579, #544570); color: #eef2ff; border-color: #7185b0; }
html[data-color-theme="dark"] body :is(.home-profile-actions button, .home-intro .text-link, .home-about-links a, .home-all-plugins, .home-widget-source-option) { color: #b0bee0; }
html[data-color-theme="dark"] body :is(.home-profile-actions button:hover, .home-widget-source-option:hover, .home-widget-source-option:focus-visible) { background: #2c3750; color: #e0e7fa; }
html[data-color-theme="dark"] body :is(.arcade-count-step, .home-arcade-step) { background: #242e43; color: #b6c5e9; border-color: var(--ui-line); }
html[data-color-theme="dark"] body :is(.arcade-count-step:hover, .home-arcade-step:hover:not(:disabled)) { background: #303c55; color: #e0e7fa; border-color: #637699; }
html[data-color-theme="dark"] body :is(.home-arcade-report-button:disabled) { background: #222a3d; color: #7e8ba8; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-import-segment button[aria-pressed="true"], .mai-segment button.selected) { background: #35425d; color: #e0e7fa; }
html[data-color-theme="dark"] body .qq-login-dialog input:not([type="checkbox"]) { background-color: #182032; color: #dce2f0; border-color: var(--ui-line); }
html[data-color-theme="dark"] body input::placeholder, html[data-color-theme="dark"] body textarea::placeholder { color: #8b98b3; opacity: 1; }
html[data-color-theme="dark"] body .home-arcade-count-input { caret-color: #bbc9ed; }
html[data-color-theme="dark"] body .home-arcade-count-input::placeholder { color: transparent; -webkit-text-fill-color: transparent; }
html[data-color-theme="dark"] body .arcade-shop { background: var(--theme-panel); color: var(--ink); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.arcade-shop:hover, .arcade-shop.selected, .category-filter.active) { background: var(--ui-soft); color: var(--ui-accent-strong); border-color: #657a9f; }
html[data-color-theme="dark"] body :is(.source-filter select, .kind-filter select) { background-color: var(--theme-panel); color: var(--ink); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.category-filter, .category-filter.active span, .docs-guide-card code, .docs-tutorial code, .detail-command, .command-chips code, .docs-trigger code, .guide-steps code, .help-detail code) { color: #b6c5e9; }
html[data-color-theme="dark"] body :is(.plugin-status, .detail-tags span, .usage-source, .detail-command, .command-chips code, .docs-trigger code, .guide-steps code, .help-detail code, .doc-card code) { background: #2a354d; color: #b6c5e9; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.featured-tag, .detail-tags .detail-featured-tag, .arcade-default-tag) { color: #cbb9e5; background: #382f4c; }
html[data-color-theme="dark"] body :is(.plugin-row:hover, .copy-button:hover, .docs-sidebar-plugins a:hover, .docs-sidebar-plugins a:focus-visible, .category-filter:hover) { background: #273148; color: var(--ink); }
html[data-color-theme="dark"] body .docs-sidebar-link:hover { background: #273148; color: var(--ink); }
html[data-color-theme="dark"] body :is(.help-collapse .help-detail, .docs-function .help-detail, .help-detail) { color: #c4cde0; background: transparent; }
html[data-color-theme="dark"] body :is(.help-detail pre, .docs-function .help-detail pre) { background: #111725; color: #e1e8f7; }
html[data-color-theme="dark"] body :is(.help-detail pre code, .docs-function .help-detail pre code) { background: transparent; color: inherit; }
html[data-color-theme="dark"] body :is(.picmenu-help-item > p, .trigger-description, .help-trigger > span, .docs-function > p, .docs-trigger > div, .docs-function h5, .docs-sidebar-label, .docs-sidebar-category-link, .docs-sidebar-plugins a, .docs-detail-link, .help-collapse summary) { color: #b1bed8; }
html[data-color-theme="dark"] body :is(.home-widget-state[data-state="connected"], .plugin-status.is-synced, .copy-button.is-copied) { color: #a0d3db; background: #233b46; border-color: #345361; }
html[data-color-theme="dark"] body :is(.home-widget-state[data-state="loading"], .home-widget-state[data-state="unavailable"]) { color: #a4aec4; background: #293249; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.mai-feedback, .arcade-feedback) { background: #243342; color: #bed4e6; }
html[data-color-theme="dark"] body :is(.mai-notice, .home-widget-state[data-state="unbound"], .plugin-status.is-pending, .mai-import-guide, .docs-function .docs-permission-note) { color: #dfc58d; background: #393323; border-color: #746343; }
html[data-color-theme="dark"] body :is(.mai-import-guide strong, .mai-import-guide span) { color: #dfc58d; }
html[data-color-theme="dark"] body :is(.mai-feedback.error, .arcade-feedback.error, .home-widget-state[data-state="error"], .plugin-status.is-missing) { background: #3c2934; color: #efb0bd; border-color: #765061; }
html[data-color-theme="dark"] body :is(.mai-error, .mai-button.danger, .mai-link.danger, .home-import-status[data-state="error"], .home-arcade-report-feedback[data-state="error"]) { color: #efb0bd; }
html[data-color-theme="dark"] body :is(.mai-account-status[data-state="connected"], .mai-identity-state[data-state="connected"], .arcade-identity-state[data-state="connected"], .nav-status.status-在线, .status-state.status-在线) { color: #95cbd3; }
html[data-color-theme="dark"] body :is(.nav-status.status-在线 .status-dot, .home-personal-board .status-state.status-在线 .status-dot) { box-shadow: 0 0 0 4px #233b46; }
html[data-color-theme="dark"] body :is(.home-widget-maimai .home-score-heading span, .mai-score-group h3) { color: #b4ace4; }
html[data-color-theme="dark"] body input[type="checkbox"] { background-color: #1b2335; border-color: #65718b; }
html[data-color-theme="dark"] body input[type="checkbox"]:checked { background-color: #9195bd; border-color: #9195bd; }
html[data-color-theme="dark"] body .home-arcade-empty { background-color: #222b3e; border-color: var(--line); background-image: linear-gradient(30deg, transparent 47%, #3545626b 48%, #3545626b 51%, transparent 52%), linear-gradient(110deg, transparent 47%, #4338566b 48%, #4338566b 51%, transparent 52%); }
html[data-color-theme="dark"] body .home-arcade-empty > span { color: var(--muted); }
html[data-color-theme="dark"] body .arcade-map { background: #202b3f; border-color: var(--line); }
html[data-color-theme="dark"] body :is(.home-widget .arcade-map-control, .arcade-map-control, .arcade-map-message, .arcade-map-pin, .leaflet-control-zoom a, .leaflet-tooltip.arcade-map-tooltip, .leaflet-control-attribution) { background: #242e43; color: #b6c5e9; border-color: #53658c; }
html[data-color-theme="dark"] body .arcade-map .leaflet-control-attribution a { color: #b6c5e9; }
html[data-color-theme="dark"] body .arcade-map-control:hover, html[data-color-theme="dark"] body .arcade-map .leaflet-control-zoom a:hover { background: #35435f; color: #e0e7fa; }
html[data-color-theme="dark"] body .leaflet-tooltip-top::before { border-top-color: #242e43; }
html[data-color-theme="dark"] body .leaflet-control-zoom { border-color: #53658c; }
html[data-color-theme="dark"] body :is(.qq-login-dialog, .mai-dialog, .arcade-dialog)::backdrop { background: #080d1db3; }
html[data-color-theme="dark"] body ::selection { background: #50608a; color: #f0f3ff; }
@media (forced-colors: active) {
.theme-label, .theme-cycle-icon { border: 1px solid ButtonText; }
}
html[data-color-theme="dark"] body #home-maimai-import-text, html[data-color-theme="dark"] body #arcade-game { background-color: #182032; color: #dce2f0; border-color: var(--ui-line); }
html[data-color-theme="dark"] body .qq-login-start { background: linear-gradient(110deg, #334666, #46395e); color: #e0e7fa; border-color: #53658c; }
html[data-color-theme="dark"] body .qq-login-start:hover:not(:disabled) { background: linear-gradient(110deg, #405579, #544570); }
html[data-color-theme="dark"] body #arcade-favorite[aria-pressed="true"] { color: #cbb9e5; background: #382f4c; }
html[data-color-theme="dark"] body :is(.home-widget-source-option:hover, .home-widget-source-option:focus-visible, .home-widget-source-option[aria-selected="true"], .home-import-segment button.is-selected, .home-import-segment button:hover, .home-import-segment button:focus-visible) { background: #35425d; color: #e0e7fa; }
html[data-color-theme="dark"] body :is(.home-import-preview, .qq-login-command) { background: #222d43; color: var(--ink); border-color: var(--line); }
html[data-color-theme="dark"] body :is(.qq-login-dialog p, .qq-login-options > span, .home-import-mini-options, .home-score-heading small, .home-score-meta small) { color: var(--muted); }
html[data-color-theme="dark"] body :is(.home-arcade-reset, .copy-button, .arcade-icon-button) { color: #b6c5e9; }
html[data-color-theme="dark"] body :is(.arcade-icon-button:hover) { background: var(--ui-soft); }
html[data-color-theme="dark"] body .button-dark { background: #35425d; color: #e0e7fa; }
html[data-color-theme="dark"] body :is(.nav-status.status-可能离线, .arcade-open-state.closed, .mai-identity-state[data-state="anonymous"], .arcade-identity-state[data-state="anonymous"]) { color: #dfb985; }
html[data-color-theme="dark"] body :is(.mai-platform-domain, .home-widget-toplink, .home-arcade-empty > span, .doc-card p, .doc-card-dark p, .home-personal-board .status-stats .status-bot-qq, .home-import-input-wrap small) { color: var(--muted); }
html[data-color-theme="dark"] body :is(.docs-function .help-detail h2, .docs-function .help-detail h3, .docs-function .help-detail h4, .docs-function .help-detail h5) { color: #c4cde0; }
html[data-color-theme="dark"] body .mai-platform { --platform-accent: #91bfdf; --platform-tint: #253849; --platform-border: #46617a; }
html[data-color-theme="dark"] body .mai-platform.lxns { --platform-accent: #baa5dd; --platform-tint: #342c49; --platform-border: #61537a; }
.theme-switch [data-theme-icon] { display: none; }
html:not([data-theme-preference]) .theme-switch [data-theme-icon="system"], html[data-theme-preference="system"] .theme-switch [data-theme-icon="system"], html[data-theme-preference="light"] .theme-switch [data-theme-icon="light"], html[data-theme-preference="dark"] .theme-switch [data-theme-icon="dark"] { display: block; }
.theme-switch [data-theme-icon][hidden] { display: none; }
html[data-color-theme="dark"] body .home-personal-board .status-stats .status-bot-meta b { color: #dce2f0; }
html[data-color-theme="dark"] body .home-personal-board .status-stats .status-bot-meta span.is-connected { color: #a4c5da; }
html[data-color-theme="dark"] body .home-personal-board .status-stats .status-bot-meta span.is-connected::before, html[data-color-theme="dark"] body .mai-identity-state[data-state="connected"]::before, html[data-color-theme="dark"] body .arcade-identity-state[data-state="connected"]::before { background: #8bc8d0; box-shadow: 0 0 0 3px #233b46; }
html[data-color-theme="dark"] body .mai-identity-state[data-state="connected"]:hover::before, html[data-color-theme="dark"] body .arcade-identity-state[data-state="connected"]:hover::before { box-shadow: 0 0 0 3px #233b46, 0 0 12px #7fb8c280; }
html[data-color-theme="dark"] body .mai-identity-state:not([data-state="connected"])::before, html[data-color-theme="dark"] body .arcade-identity-state:not([data-state="connected"])::before { box-shadow: 0 0 0 3px #453527; }
html[data-color-theme="dark"] body .docs-sidebar { background: var(--paper); border-color: var(--line); }
html[data-color-theme="dark"] body .docs-sidebar-link { color: #b1bed8; }
html[data-color-theme="dark"] body .docs-sidebar-category + .docs-sidebar-category { border-top-color: var(--line); }
html[data-color-theme="dark"] body .docs-sidebar-link:hover, html[data-color-theme="dark"] body .docs-sidebar-link:focus-visible { color: #e0e7fa; background: #273148; }
.theme-system-sun, .theme-system-moon { transition: transform var(--theme-motion-duration) var(--theme-motion-ease); }
@media (hover: hover) and (pointer: fine) {
.theme-toggle:hover .theme-label { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-toggle:hover .theme-cycle-icon { border-color: var(--theme-line); box-shadow: 0 3px 10px #8395c322; }
.theme-toggle:hover [data-theme-icon="dark"] svg { transform: rotate(-20deg) scale(1.08); }
.theme-toggle:hover [data-theme-icon="light"] svg { transform: scale(1.08); }
.theme-toggle:hover [data-theme-icon="light"] path { transform: scale(1.1); }
.theme-toggle:hover [data-theme-icon="system"] svg { transform: scale(1.08); }
.theme-toggle:hover .theme-system-sun { transform: translate(-1px, -1px); }
.theme-toggle:hover .theme-system-moon { transform: translate(1px, 1px); }
}
::view-transition-group(root) { animation-duration: .28s; }
::view-transition-old(root) { animation: theme-fade-out .28s ease-in-out both; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-fade-in .28s ease-in-out both; mix-blend-mode: normal; }
@keyframes theme-fade-out { to { opacity: 0; } }
@keyframes theme-fade-in { from { opacity: 0; } to { opacity: 1; } }
html[data-theme-transition] body, html[data-theme-transition] body :is(header, footer, main, section, article, aside, nav, input, textarea, select, .home-widget, .home-personal-board, .docs-sidebar, .theme-cycle-icon) { transition: background-color .28s ease-in-out, color .28s ease-in-out, border-color .28s ease-in-out; }
[data-theme-icon="light"] { position: relative; }
[data-theme-icon="light"] path { transform-box: fill-box; transform-origin: center; transition: transform var(--theme-motion-duration) var(--theme-motion-ease); }
.theme-toggle:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
.theme-toggle, .theme-toggle svg, .theme-cycle-icon, .theme-label, .theme-system-sun, .theme-system-moon { transition: none; }
.theme-toggle:hover, .theme-toggle:active, .theme-toggle:hover [data-theme-icon] svg, .theme-toggle:hover [data-theme-icon] path, .theme-toggle:hover .theme-system-sun, .theme-toggle:hover .theme-system-moon { transform: none; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
[data-theme-icon="light"] path { transition: none; }
}

html[data-color-theme="dark"] body .home-arcade-refresh .ui-icon { color: #a4b7e7; }

html[data-color-theme="dark"] body .qq-login-dialog .qq-login-options input { background-color: #1b2335; border-color: #65718b; }
html[data-color-theme="dark"] body .qq-login-dialog .qq-login-options input:checked { background-color: #9195bd; border-color: #9195bd; }
html[data-color-theme="dark"] body .qq-login-dialog .qq-login-error { color: #efb0bd; }
