.theme-toggle{display:inline-flex;align-items:center;gap:6px;border:0;background:none;color:inherit;padding:2px 0;font:inherit;white-space:nowrap;cursor:pointer}
.theme-toggle svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6}
.theme-toggle:hover{color:var(--red)}
html[data-theme="dark"]{--ink:#eeeae4;--muted:#b0aaa1;--line:#414245;--red:#ff6859;background:#171819;color-scheme:dark}
html[data-theme="dark"] body{background:#171819;color:var(--ink)}
html[data-theme="dark"] button,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{color:inherit}
html[data-theme="dark"] .preview-bar{background:#242527}
html[data-theme="dark"] .header nav{background:#171819}
html[data-theme="dark"] .orbit svg{stroke:var(--ink)}
html[data-theme="dark"] .orbit-traveler,html[data-theme="dark"] .inner-orbit-dot{stroke:#171819}
html[data-theme="dark"] .post-row:hover{background:#242527}
html[data-theme="dark"] .prose a,html[data-theme="dark"] .painting-sale a,html[data-theme="dark"] .photo-sale a{color:#ff9a87}
html[data-theme="dark"] .painting-article .maslov-art-gallery>figure{background:#222326;border-color:var(--line)}
html[data-theme="dark"] .painting-article .maslov-art-gallery>figure img{background:#2c2b29}
html[data-theme="dark"] .painting-article .art-meta,html[data-theme="dark"] .painting-private,html[data-theme="dark"] .collection-count,html[data-theme="dark"] .course-source,html[data-theme="dark"] .publication-count,html[data-theme="dark"] .publication-search label{color:var(--muted)}
html[data-theme="dark"] .photo-carousel,html[data-theme="dark"] .photo-carousel::backdrop{background:#171819;color:var(--ink)}
html[data-theme="dark"] .photo-carousel button,html[data-theme="dark"] .photo-carousel button:hover,html[data-theme="dark"] .photo-carousel button:focus{color:var(--ink)!important}
html[data-theme="dark"] .photo-caption p,html[data-theme="dark"] .photo-original{color:var(--muted)}
html[data-theme="dark"] .photo-sale{color:var(--ink)}
html[data-theme="dark"] .prose .tour-invite{background:#242527;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .tour-invite-tag{color:#ff9a87}
html[data-theme="dark"] .prose .tour-invite h2{color:var(--ink)}
html[data-theme="dark"] .prose .tour-invite p{color:var(--muted)}
html[data-theme="dark"] .tour-invite-button{background:#da392b;color:#fff}
html[data-theme="dark"] .tour-invite:hover .tour-invite-button{background:#b92c21}
html[data-theme="dark"] .strip-arrow{background:rgba(28,29,31,.86);color:#fff}
html[data-theme="dark"] .strip-arrow:hover{background:#303133;color:#ff9a87}
html[data-theme="dark"] .course-tabs button,html[data-theme="dark"] .collection-controls button{color:var(--muted)}
html[data-theme="dark"] .course-tabs button[aria-selected="true"],html[data-theme="dark"] .collection-controls button[aria-pressed="true"],html[data-theme="dark"] .course-prose .lesson-link,html[data-theme="dark"] .section-directory a,html[data-theme="dark"] .publication-group nav a,html[data-theme="dark"] .publication-search input{color:var(--ink)}
html[data-theme="dark"] .course-prose .lesson-link:hover,html[data-theme="dark"] .section-directory a:hover,html[data-theme="dark"] .publication-group nav a:hover{color:var(--red)}
html[data-theme="dark"] .prose .book-toc>.book-toc-sub{color:var(--muted)}
html[data-theme="dark"] .prose .book-file-actions a{color:var(--ink)}
html[data-theme="dark"] .prose .book-file-actions .book-read{background:var(--ink);color:#171819}
html[data-theme="dark"] .photo-toolbar,html[data-theme="dark"] .collection-controls,html[data-theme="dark"] .painting-purchase,html[data-theme="dark"] .course-tabs,html[data-theme="dark"] .course-prose .lesson-link,html[data-theme="dark"] .section-directory a,html[data-theme="dark"] .publication-search>div,html[data-theme="dark"] .publication-group nav a,html[data-theme="dark"] .prose .book-toc>li{border-color:var(--line)}
@media(max-width:600px){.preview-bar{flex-wrap:wrap;gap:5px}.preview-bar>span{flex-basis:100%}.preview-bar .preview-actions{width:100%;justify-content:space-between;gap:10px}.theme-toggle{min-height:26px}}
/* The existing orbit becomes a day/night illustration without touching artwork images. */
html[data-theme="light"] .orbit .sun{background:#ff3025}
html[data-theme="dark"] .orbit .sun{background:radial-gradient(circle at 30% 32%,#c1bdaf 0 8%,transparent 8.8%),radial-gradient(circle at 63% 58%,#c9c5b7 0 12%,transparent 12.8%),radial-gradient(circle at 34% 71%,#d0ccbd 0 6%,transparent 6.8%),radial-gradient(circle at 71% 27%,#d0ccbd 0 5%,transparent 5.8%),#e9e4d4;box-shadow:inset -8px -4px 0 rgba(85,83,75,.16),0 0 24px rgba(233,228,212,.06)}
.home .theme-toggle{display:none}
.home .theme-orbit{display:block;border:0;background:transparent;padding:0;color:inherit;cursor:pointer;font:inherit;-webkit-tap-highlight-color:transparent}
.home .theme-orbit .orbit-status{display:none}
.home .theme-orbit .orbit-theme-hint{position:absolute;left:50%;bottom:-18px;transform:translateX(-50%);white-space:nowrap;color:var(--muted);font:11px/1.4 var(--sans);letter-spacing:.02em;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.home .theme-orbit:hover .sun,.home .theme-orbit:focus-visible .sun{outline:1px solid var(--ink);outline-offset:6px}
.home .theme-orbit:focus-visible{outline:none}
.home .theme-orbit:hover .orbit-theme-hint,.home .theme-orbit:focus-visible .orbit-theme-hint{color:var(--ink)}

/* Keep the orbit behind both the daytime sun and the nighttime moon. */
.home .theme-orbit{isolation:isolate}
.home .theme-orbit svg{z-index:0}
.home .theme-orbit .sun{z-index:1}
.home .theme-orbit .orbit-theme-hint{z-index:2}

/* The near arc and moving point pass in front; the far arc passes behind. */
.home .theme-orbit svg.orbit-front{z-index:2;pointer-events:none}
.home .theme-orbit svg.orbit-back{z-index:0;pointer-events:none}

.home .theme-orbit .sun{left:50%;top:50%;transform:translate(-50%,-50%)}

/* All header, archive and reading marks share the same day/night identity. */
.brand-mark .theme-moon-craters{display:none}
html[data-theme="light"] .brand-mark .theme-body{fill:#ff3025}
html[data-theme="dark"] .brand-mark .theme-body{fill:#e9e4d4}
html[data-theme="dark"] .brand-mark .theme-moon-craters{display:inline}
html[data-theme="dark"] .brand-mark .theme-moon-craters circle{fill:#c5c1b3;stroke:none}
/* Start the small header/reading dots on the lower half of the same ellipse. */
.brand-mark .inner-orbit-dot{transform:rotate(180deg);transform-origin:75px 32px}
