:root{color-scheme:light;--surface:#f0ede6;--hover:#e8e3d8;--selection:#e6caba;--code:#efede6}
:root[data-theme="dark"]{color-scheme:dark;--paper:#20211e;--surface:#2a2c27;--ink:#e7e4da;--muted:#b1aea2;--accent:#df9b7b;--line:#41443b;--hover:#34372f;--selection:#654b3e;--code:#292c26}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted);cursor:pointer}
.theme-toggle:hover{background:var(--surface);color:var(--ink)}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}
[data-theme="dark"] .theme-toggle .sun{display:block}
[data-theme="dark"] .theme-toggle .moon{display:none}
.reading-controls{display:flex;align-items:center;gap:8px}
.reading-controls .tools{position:relative}
::selection{background:var(--selection);color:var(--ink)}
.prose pre{background:var(--code)}
.font-menu button:hover,.font-menu-toggle:hover,.font-menu-toggle[aria-expanded="true"],.more-results:hover{background:var(--hover)}
[data-theme="dark"] mark{background:#654b3e;color:var(--ink)}
[data-theme="dark"] .cover-link img{filter:brightness(.85)}
[data-theme="dark"] .font-menu{box-shadow:0 8px 28px #0004}
input,textarea{color:var(--ink)}
@media(max-width:560px){.site-header nav{gap:10px}.theme-toggle{width:40px;height:40px}}
