/* 夜晚桌面 (Claude 2026-11-13): turned on from the account menu (深色模式), remembered per device; no longer follows the system (2026-11-13).
   Only the desk itself turns dark — background, top bar, filters, capture bar, corner buttons, calendar and folio pages.
   Notes keep their paper (the stored colour keys are user data), and dialogs / menus stay light paper in this first version. */
html[data-theme="dark"]{color-scheme:dark;
    --night-bg:#1C1B19;--night-raised:#262522;--night-raised-2:#302E2A;--night-hover:#3A3834;
    --night-ink:#ECE9E1;--night-ink-2:#BDB9AF;--night-ink-3:#8E8A80;--night-ink-4:#5E5B54;
    --night-line:#34322E;--night-line-2:#45423D}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--night-bg)}
html[data-theme="dark"] body{
    --bg:var(--night-bg);--desk:var(--night-bg);
    --ink:var(--night-ink);--ink-2:var(--night-ink-2);--ink-3:var(--night-ink-3);--ink-4:var(--night-ink-4);
    --line:var(--night-line);--line-2:var(--night-line-2);--chip:var(--night-raised);
    --surface:var(--night-hover);--surface-soft:var(--night-raised-2);
    --shadow-pop:0 2px 4px rgba(0,0,0,.3),0 24px 50px -20px rgba(0,0,0,.6),0 0 0 .5px rgba(255,255,255,.07);
    color:var(--night-ink)}
html[data-theme="dark"] body::after{opacity:.05;mix-blend-mode:screen}
/* Paper islands keep the light paper palette exactly as before.*/
html[data-theme="dark"] :is(.note,.archive-note,.mini-note,.search-result,.stack-row,.all-note,.pile-sheet,dialog,.category-menu,.category-snack,.ns-card,.wa-pop,.ac-help-bubble){
    --bg:#ECEAE4;--desk:#ECEAE4;--ink:#2A2925;--ink-2:#5B5952;--ink-3:#8C897F;--ink-4:#B4B0A6;
    --line:#D9D5CC;--line-2:#C9C4B9;--chip:#E2DFD8;--surface:#FFFFFF;--surface-soft:#FAF9F6;
    --shadow-pop:0 2px 4px rgba(42,41,37,.05),0 24px 50px -20px rgba(42,41,37,.3),0 0 0 .5px rgba(42,41,37,.08);color-scheme:light}
html[data-theme="dark"] :is(.note,.archive-note,.mini-note,.search-result,.stack-row,.all-note,.pile-sheet){
    box-shadow:0 1px 1px rgba(0,0,0,.25),0 14px 26px -12px rgba(0,0,0,.55),inset 0 0 0 .5px rgba(255,255,255,.06)}
/* Black paper on a dark desk: a faint light edge so its outline still reads.*/
html[data-theme="dark"] :is(.note,.archive-note,.mini-note,.search-result,.stack-row,.all-note,.pile-sheet)[style*="#e5dff0"]{
    box-shadow:0 1px 1px rgba(0,0,0,.3),0 14px 26px -12px rgba(0,0,0,.6),inset 0 0 0 1px rgba(255,255,255,.11)}
/* Calendar writing rhythm: light bars on the dark desk.*/
html[data-theme="dark"] .calendar-rhythm i{background:rgba(236,233,225,.10)}
html[data-theme="dark"] .calendar-rhythm i.has-words{background:rgba(236,233,225,.30)}
html[data-theme="dark"] .calendar-rhythm i.is-today:not(.is-selected){background:rgba(236,233,225,.5)}
html[data-theme="dark"] .calendar-rhythm i.is-selected{background:var(--night-ink)}
/* Capture bar: a raised dark strip; the 贴一张 button flips to light paper with dark ink.*/
html[data-theme="dark"] #captureForm{background:rgba(38,37,34,.92);box-shadow:var(--shadow-pop)}
html[data-theme="dark"] #captureForm :is(input,textarea){color:var(--night-ink)}
html[data-theme="dark"] #captureForm :is(input,textarea)::placeholder{color:var(--night-ink-3)}
html[data-theme="dark"] body .primary:not(dialog *){background:var(--night-ink);color:#1C1B19}
html[data-theme="dark"] body .primary:not(dialog *):hover{background:#FFFFFF}
/* Calendar: today keeps its solid mark, inverted.*/
html[data-theme="dark"] .calendar-grid .day.today .day-number{background:var(--night-ink);color:#1C1B19}
html[data-theme="dark"] dialog::backdrop{background:rgba(10,10,9,.55)}
