/* Last-loaded shared palette: identical tokens in reading, galleries and admin. */
:root[data-theme-scope=blog][data-blog-theme=white]{color-scheme:light;--background:#fff;--surface:#fff;--surface-muted:#f2f4f6;--text:#202631;--muted:#606b79;--line:#dfe4eb;--line-strong:#8390a1;--accent:#315f8a;--soft-text:#414d5d;--code-background:#f2f4f6;--selection:#dbe8f5;--selection-text:#172536;--brand-background:#214f7c;--brand-ink:#fff;--gallery-veil:#ffffff66}
:root[data-theme-scope=blog][data-blog-theme=paper]{color-scheme:light;--background:#faf3e3;--surface:#f7efdc;--surface-muted:#f0e7d2;--text:#2e291f;--muted:#716753;--line:#d9ccb0;--line-strong:#99866a;--accent:#496743;--soft-text:#514a3b;--code-background:#f0e7d2;--selection:#ded0aa;--selection-text:#292318;--brand-background:#345773;--brand-ink:#fff9ed;--gallery-veil:#faf3e366}
:root[data-theme-scope=blog][data-blog-theme=black]{color-scheme:dark;--background:#080808;--surface:#141414;--surface-muted:#222;--text:#f2f2f2;--muted:#b3b3b3;--line:#383838;--line-strong:#777;--accent:#aaccee;--soft-text:#d0d0d0;--code-background:#191919;--selection:#35526f;--selection-text:#fff;--brand-background:#183b5b;--brand-ink:#e6f2ff;--gallery-veil:#000b}
:root[data-theme-scope=blog][data-blog-theme=midnight]{color-scheme:dark;--background:#080f20;--surface:#101b31;--surface-muted:#192740;--text:#edf2ff;--muted:#afbdd7;--line:#2b3c5b;--line-strong:#647a9d;--accent:#a7c8ff;--soft-text:#c7d4ec;--code-background:#0d172b;--selection:#304a75;--selection-text:#fff;--brand-background:#233f69;--brand-ink:#eff5ff;--gallery-veil:#080f20c9}
:root[data-theme-scope=blog][data-blog-theme=navy]{color-scheme:dark;--background:#102b46;--surface:#173952;--surface-muted:#20465f;--text:#eef7ff;--muted:#b3cbdf;--line:#3c5b74;--line-strong:#7596af;--accent:#a0d8ff;--soft-text:#cce0f0;--code-background:#112f49;--selection:#39698e;--selection-text:#fff;--brand-background:#2d5578;--brand-ink:#fff;--gallery-veil:#102b46c9}
:root[data-theme-scope=blog][data-blog-theme=eink]{color-scheme:light;--background:#fff;--surface:#fff;--surface-muted:#fff;--text:#000;--muted:#333;--line:#999;--line-strong:#000;--accent:#000;--soft-text:#222;--code-background:#fff;--selection:#000;--selection-text:#fff;--brand-background:#000;--brand-ink:#fff;--gallery-veil:#ffffffee}
:root[data-theme-scope=blog][data-blog-theme]{--bg:var(--background);--focus:var(--accent);--backdrop:#0008;--paper-shadow:#0002}
html[data-theme-scope=blog][data-blog-theme] body{background-color:var(--background);color:var(--text)}
html[data-theme-scope=blog][data-blog-theme]:has(.short-gallery) body{background-image:linear-gradient(var(--gallery-veil),var(--gallery-veil)),var(--note-art);background-size:cover;background-position:center}
html[data-theme-scope=blog] .short-gallery.showcase .showcase-short-sidebar .short-stream{background:var(--surface);color:var(--text)}
html[data-theme-scope=blog] .short-art-credit{background:var(--surface);color:var(--muted)}
html[data-blog-theme=eink]:has(.short-gallery) body{background-image:none!important}
html[data-blog-theme=eink] .short-art-window{display:none!important}
.admin-theme-toggle{min-width:44px;min-height:44px}
body:has(.short-gallery) .site-header .site-nav:not(.article-controls-only) [data-theme-cycle]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:50%;background:transparent;color:var(--text);font-size:0;gap:0}
body:has(.short-gallery) .site-header .site-nav:not(.article-controls-only) [data-theme-cycle]::before{content:'';display:block;width:19px;height:19px;order:0;margin:0;background:currentColor;mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M12 3a9 9 0 0 1 0 18Z' fill='black'/%3E%3C/svg%3E")}
body:has(.short-gallery) .site-header .site-nav:not(.article-controls-only) [data-theme-cycle]:hover{background:var(--surface-muted);color:var(--text)}
html[data-theme-scope=blog] .story-dialog{background:var(--background);color:var(--text);color-scheme:inherit}
html[data-theme-scope=blog] .story-dialog :is(input,textarea,select){background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme-scope=blog] .story-dialog button{background:var(--surface-muted);color:var(--text)}
html[data-theme-scope=blog] .story-dialog :is(small,.story-heading p,.story-preview p){color:var(--muted)}
html[data-theme-scope=blog] .story-swatches button{box-shadow:inset 0 0 0 3px var(--background)}
@media(max-width:600px){html[data-theme-scope=blog][data-blog-theme]:has(.short-gallery) body{background-image:none;background-color:var(--background)}}
