html[data-theme="dark"]{color-scheme:dark;--paper:#141922;--ink:#e7ecf5;--muted:#adb8ca;--blue:#91aaff;--line:#354052;--white:#1d2532}
html[data-theme="dark"] body{background:#141922;color:#e7ecf5}
html[data-theme="dark"] header,html[data-theme="dark"] .panel,html[data-theme="dark"] dialog{background:#1d2532;color:#e7ecf5;border-color:#354052}
html[data-theme="dark"] p,html[data-theme="dark"] .hint,html[data-theme="dark"] .lead,html[data-theme="dark"] small,html[data-theme="dark"] footer,html[data-theme="dark"] .stats,html[data-theme="dark"] .empty{color:#adb8ca}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] .brand,html[data-theme="dark"] .logo{color:#e7ecf5}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] button,html[data-theme="dark"] .button,html[data-theme="dark"] .btn{background:#263246;color:#e7ecf5;border-color:#4b5e7b}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#a7b5cb}
html[data-theme="dark"] .primary,html[data-theme="dark"] .button.primary{background:#3c59d7;color:white;border-color:#7590fa}
html[data-theme="dark"] .now,html[data-theme="dark"] .drop,html[data-theme="dark"] .stat,html[data-theme="dark"] .report pre,html[data-theme="dark"] th,html[data-theme="dark"] .badge,html[data-theme="dark"] .group{background:#222e40;color:#c3d2e9;border-color:#455877}
html[data-theme="dark"] .preview,html[data-theme="dark"] .work-cover{background:#26344e;color:#b8caff}
html[data-theme="dark"] .preview.dark,html[data-theme="dark"] .cover-02{background:#101722}
html[data-theme="dark"] .cover-03{background:#1c3934;color:#b0dfcf}
html[data-theme="dark"] .mock:not(.terminal){background:#222e40;border-color:#455877;color:#e7ecf5}
html[data-theme="dark"] .mock-bar,html[data-theme="dark"] .task,html[data-theme="dark"] .file,html[data-theme="dark"] td,html[data-theme="dark"] .stat{border-color:#354052}
html[data-theme="dark"] .archive-role span,html[data-theme="dark"] .check{background:#263b61;color:#c0cfff;border-color:#576d95}
html[data-theme="dark"] .page[aria-pressed="true"]{background:#582c35;color:#ffb8be;border-color:#b96977}
html[data-theme="dark"] .filters button[aria-pressed="true"]{background:#354b7b;color:#fff;border-color:#91aaff}
html[data-theme="dark"] .high{background:#50362b;color:#ffcbac}
html[data-theme="dark"] #status,html[data-theme="dark"] .path,html[data-theme="dark"] .stat b,html[data-theme="dark"] .category,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] summary{color:#a9beff}
html[data-theme="dark"] .error{color:#ffaaaa!important}
.back-to-top{bottom:84px!important}
.theme-toggle{position:fixed;right:24px;bottom:24px;z-index:100;width:48px;height:48px;border:1px solid #2849ed;border-radius:50%;background:#fff;color:#2849ed;box-shadow:0 4px 16px #18285830;font:24px/1 sans-serif;cursor:pointer;display:grid;place-items:center;padding:0}
html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .back-to-top{background:#304caa;color:#fff;border-color:#91aaff}
.theme-toggle:focus-visible{outline:3px solid #7590fa;outline-offset:4px}
@media(max-width:600px){.back-to-top{bottom:calc(70px + env(safe-area-inset-bottom,0px))!important}.theme-toggle{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));width:44px;height:44px}}

.theme-switch{position:fixed;right:24px;bottom:24px;z-index:100;display:flex;gap:4px;padding:5px;background:#fff;border:1px solid #bdc9df;border-radius:12px;box-shadow:0 4px 16px #18285830}
.theme-switch button{font:14px/1.5 'Malgun Gothic',sans-serif;padding:9px 12px;border:1px solid transparent;border-radius:7px;background:transparent;color:#4a5870;cursor:pointer;min-height:40px}
.theme-switch button[aria-pressed="true"]{background:#2849ed;color:#fff;border-color:#2849ed;font-weight:700;box-shadow:inset 0 0 0 1px #ffffff30}
.theme-switch button:focus-visible{outline:3px solid #7590fa;outline-offset:2px}
html[data-theme="dark"] .theme-switch{background:#1d2532;border-color:#536482}
html[data-theme="dark"] .theme-switch button{background:transparent;border-color:transparent;color:#bdc9df}
html[data-theme="dark"] .theme-switch button[aria-pressed="true"]{background:#91aaff;color:#101a32;border-color:#b9caff;font-weight:700}
.back-to-top{bottom:94px!important}
@media(max-width:600px){.theme-switch{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px))}.back-to-top{bottom:calc(86px + env(safe-area-inset-bottom,0px))!important}}
