/* Neutral interface surfaces. No filters or recoloring on artwork, canvas or scenes. */
html[data-theme]{--ui-bg:#f7f4ea;--ui-panel:#efe9d8;--ui-fg:#011015;--ui-muted:#53615f;--ui-line:#01101530;--ui-glass:#f7f4eaf5;--ui-accent:#b93600;color-scheme:light}
html[data-theme=dark]{--ui-bg:#011015;--ui-panel:#10232a;--ui-fg:#efe9d8;--ui-muted:#acb9b8;--ui-line:#efe9d838;--ui-glass:#011015f5;--ui-accent:#ff8652;color-scheme:dark}
html[data-theme] body{background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme] .site-nav{color:var(--ui-fg);--sn-bg:var(--ui-glass);--sn-bar:var(--ui-bg);--sn-line:var(--ui-line)}
html[data-theme=light] .site-nav .sn-logo-b{display:block}html[data-theme=light] .site-nav .sn-logo-w{display:none}
html[data-theme=dark] .site-nav .sn-logo-b{display:none}html[data-theme=dark] .site-nav .sn-logo-w{display:block}
.sn-theme{font:500 12px/1 var(--lr-sans);color:inherit;background:transparent;border:1px solid currentColor;border-radius:20px;min-width:54px;min-height:36px;cursor:pointer;padding:8px 10px;flex-shrink:0}
html[data-theme] :is(.rp-page,#rp-root,#mv-paper,.pp-panel,.mc,.lr-reader){--lr-paper:var(--ui-bg);--lr-cream:var(--ui-fg);--lr-ink:var(--ui-fg);--lr-dim:var(--ui-muted);--lr-hair:var(--ui-line);--rp-paper:var(--ui-bg);--rp-muted:var(--ui-muted);--rp-line:var(--ui-line);background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme] :is(.rp-context,.lr-reader-bar){background:var(--ui-panel);color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme] :is(.rp-position,#lt-reader-position){color:var(--ui-muted)}
html[data-theme] :is(.rp-image-button,.rp-related-item img,.rp-related-blank,.mv-static figure){background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] .rp-prose a:hover{color:var(--ui-accent)}
html[data-theme] :is(.rp-sources a,.rp-pod-links a){text-decoration-color:var(--ui-muted)}
html[data-theme] :is(.rp-lightbox,.rp-lightbox button){color:var(--ui-fg)}
html[data-theme] #lt{background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme] #lt :is(input,select,button,a){color:inherit}
html[data-theme] #lt :is(.lt-modes a[aria-current=page],.lt-modes a:hover){background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] #lt :is(.lt-eyebrow,.lt-intro,.lt-count,.lt-foot,.lt-year,.lt-card-title){color:var(--ui-muted)}
html[data-theme] #lt :is(.lt-heading,.lt-modes,.lt-search){border-color:var(--ui-line)}
html[data-theme] :is(.cz-deck,.cz-tools,.cz-toolbar,.iv-panel,.pn,.iv-strip,.th-panel,.th-bar){background:var(--ui-bg);color:var(--ui-fg);--cream:var(--ui-fg);--paper:var(--ui-bg);--ink:var(--ui-bg);--dim-c:var(--ui-muted);--hair-c:var(--ui-line);--cz-dimtx:var(--ui-muted)}
html[data-theme] .cz-deck :is(.cz-era,.cz-ch-links a,.cz-ch-links button,.cz-chip){color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme] .cz-ch-desc{color:var(--ui-muted)}
html[data-theme] .cz-chip[aria-pressed=true]{background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] .mc{--paper:var(--ui-bg);--ink:var(--ui-fg);--dim:var(--ui-muted);--hair:var(--ui-line);--dw-bg:var(--ui-bg);--dw-ink:var(--ui-fg)}
html[data-theme] .mc-plate{background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] .mc-plate[aria-pressed=true]{border-color:var(--lr-orange);background:var(--ui-bg);--dw-bg:var(--ui-bg);--dw-ink:var(--ui-fg)}
html[data-theme] :is(.hm-ways,.hm-ledger,.hm-reading,.hm-foot,.hm-mosaic,.hm-about){background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme] :is(.hm-ways,.hm-ledger,.hm-reading,.hm-foot,.hm-about) :is(p,a,h2,h3,dt,dd,small){color:inherit}
html[data-theme] :is(.hm-ways,.hm-ledger,.hm-reading,.hm-foot,.hm-about){--hm-ink:var(--ui-fg);--hm-cream:var(--ui-bg);--hm-paper:var(--ui-bg);--hm-card:var(--ui-panel)}
/* Ways-in labels are spans, so they must not retain the scene's cream text. */
html[data-theme] .hm-ways{border-color:var(--ui-line)}
html[data-theme] .hm-ways .hm-door{border-color:var(--ui-line)}
html[data-theme] .hm-ways :is(.hm-door-n,.hm-fcap .lab){color:var(--ui-fg)}
html[data-theme] .hm-ways :is(.hm-door-k,.hm-door-d,.hm-fcap-t){color:var(--ui-muted)}
html[data-theme] .hm-ways :is(.hm-door-go,.hm-fcap-go){color:var(--ui-accent)!important}
html[data-theme] .hm-ways .hm-ftab{color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme] .hm-ways .hm-ftab[aria-selected=true]{background:var(--ui-panel);color:var(--ui-fg);border-color:var(--ui-fg)}
/* Keep scene canvases and the overlaid stage text in their designed palette. */
html[data-theme] :is(.hm-hero,.iv-map,.cz-canvas,.th-stage){color:#efe9d8}
@media(max-width:860px){.sn-theme{min-height:40px}.site-nav{gap:12px}}
html[data-theme] #lt :is(select,#lt-titles){background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] #lt :is(.lt-footer){background:var(--ui-panel);color:var(--ui-fg)}
html[data-theme] #lt :is(.lt-chapter-era,.lt-chapter-total,.lt-chapter-total span,.lt-count,.lt-count b){color:var(--ui-muted)}
html[data-theme] #lt .lt-plate,html[data-theme] #lt .lt-plate .lt-caption{color:#efe9d8}
html[data-theme] #lt input::placeholder{color:var(--ui-muted)}
html[data-theme] .iv-panel{--ink:var(--ui-fg);--paper:var(--ui-bg)}
html[data-theme] .iv-panel :is(p,small,.pn-eye,.pn-meta,.pn-x){color:var(--ui-muted)!important}
html[data-theme] .iv-panel :is(h1,h2,h3,a,button,.pn-year){color:var(--ui-fg)}
html[data-theme] :is(#hm-count,#hm-lr,#hm-chance){background:var(--ui-bg);color:var(--ui-fg);--hm-ink:var(--ui-fg);--hm-paper:var(--ui-bg);--hm-cream:var(--ui-bg);--hm-card:var(--ui-panel)}
html[data-theme] :is(#hm-count,#hm-lr,#hm-chance) :is(p,dt,dd,small,h2,h3,a){color:inherit}
html[data-theme] .hm-foot img{filter:none}html[data-theme=light] .hm-foot img{filter:brightness(0)}
html[data-theme] #lt-reader{background:var(--ui-bg)}
html[data-theme] .rp-page{background:var(--ui-bg)!important;color:var(--ui-fg)!important}
html[data-theme] #lt .lt-footer :is(span,strong,time){color:var(--ui-fg)}
html[data-theme] :is(.iv-side,.iv-help-dialog,.tv-notes,.lm-head,.lm-tools,.lm-keys){background:var(--ui-bg);color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme] :is(.lm-head,.lm-tools,.lm-keys) :is(p,h1,button){color:inherit}
html[data-theme] .tv-notes{--ink:var(--ui-fg);--paper:var(--ui-bg);--cream:var(--ui-panel)}
html[data-theme] #lr-card{--lr-card-bg:var(--ui-bg);--lr-card-fg:var(--ui-fg);--lr-card-dim:var(--ui-muted);--lr-card-hair:var(--ui-line)}
html[data-theme] #lr-strip{--lr-chrome-bg:var(--ui-glass);--lr-chrome-fg:var(--ui-fg);--lr-chrome-dim:var(--ui-muted);--lr-chrome-hair:var(--ui-line)}
html[data-theme] .lrs-panel{background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme] .lrs-main :is(input,button,p,span,h2,h3){color:var(--ui-fg)}
html[data-theme] .lrs-input::placeholder{color:var(--ui-muted)}
html[data-theme] .lrs-chip{background:var(--ui-panel);color:var(--ui-fg)}
