body {isolation:isolate;position:relative;}
#themeBackground {position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;}
#themeBackground>div {position:absolute;inset:0;background-position:center;}
#rainCanvas {position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;opacity:0;transition:opacity 1.6s ease;}
html[data-paragraph-indent="true"] .prose p+p,
html[data-paragraph-indent="true"] .prose .post-byline+p {text-indent:1.5em;}
.inspector .event-content,.inspector #selectedBody {font-size:var(--theme-text-size,20px);line-height:var(--theme-text-leading,1.85);max-width:var(--theme-text-measure,100%);}
html:has(#libraryView) .prose {font-size:var(--theme-text-size,20px);line-height:var(--theme-text-leading,1.85);}
html:has(#libraryView) .reading-column,html:has(#libraryView) .library-shell {max-width:var(--theme-text-measure,100%);}
html[data-uploaded-font="true"]:not(:has(body[data-workshop])) {--serif:UserDisplay,Georgia,serif!important;--reader-display:UserDisplay,Georgia,serif!important;}
html[data-uploaded-font="true"] :is(.masthead h1,.inspector h2,.work-header h1,.library-masthead h1) {font-family:UserDisplay,Georgia,serif!important;font-weight:400;line-height:1.5;}
html[data-uploaded-font="true"] :is(.era-label,.era-title) {font-family:UserDisplay,Georgia,serif!important;}
#themeEditor .background-advanced>p {padding:0 12px;font:12px/1.5 system-ui,sans-serif;}
#themeEditor .background-advanced>input[type=file] {max-width:100%;padding:12px;box-sizing:border-box;}
.novel-view-options>summary {display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:12px 0;}
.novel-view-options>summary span::before {content:'+';margin-right:8px;}
.novel-view-options[open]>summary span::before {content:'\2212';}
.background-controls {min-width:0;border:0;border-top:1px solid var(--reader-line,var(--line));padding:18px 0;margin:20px 0 0;}
.background-controls legend {font:13px/1.6 system-ui,sans-serif;padding:0 8px 0 0;}
.theme-background-section {margin:20px 0;padding:12px 0;border-top:1px solid var(--reader-line,var(--line));}
.theme-background-section>h3 {margin:0 0 16px;}
.theme-hex-value {box-sizing:border-box;width:100%!important;min-width:0;min-height:32px;padding:6px 8px;font:12px/1.5 monospace!important;color:inherit;background:transparent;border:1px solid var(--reader-line,var(--line));border-radius:4px;}
.theme-background-section .background-controls {margin:0;border:0;}
.theme-background-section legend {display:none;}
.background-controls>label {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;font:12px/1.5 system-ui,sans-serif;}
.background-controls select {max-width:60%;padding:7px;min-height:34px;color:inherit;background:var(--reader-surface,var(--surface));}
.background-controls input[type=range] {width:55%;}
.background-controls input[type=color] {width:42px;height:30px;padding:2px;}
.background-controls>label[hidden] {display:none;}
#themeEditor .theme-background-section {padding-top:20px;}
#themeEditor .theme-background-section .background-controls {padding:0;min-inline-size:0;}
#themeEditor .background-controls>label,
#themeEditor .background-advanced>label {display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);align-items:center;gap:8px;margin:12px 0;font:inherit;font-size:.72rem;font-weight:600;color:var(--mist);}
#themeEditor .background-controls>label[hidden] {display:none;}
#themeEditor .background-controls select {box-sizing:border-box;width:100%;max-width:none;min-height:40px;padding:8px 28px 8px 10px;border:1px solid var(--line);border-radius:4px;background:var(--ink-soft);color:var(--bone);font:inherit;}
#themeEditor .background-controls input[type=range] {width:100%;min-width:0;accent-color:var(--verdigris);}
#themeEditor .background-controls>label.has-color-control,
#themeEditor .background-advanced>label.has-color-control {grid-template-columns:minmax(0,1fr) 48px minmax(88px,100px);}
#themeEditor .has-color-control input[type=color] {box-sizing:border-box;width:100%;height:36px;padding:3px;border:1px solid var(--line);border-radius:4px;background:var(--ink-soft);}
#themeEditor .theme-color-grid .has-color-control {grid-template-columns:minmax(0,1fr);}
#themeEditor .theme-color-grid input[type=color] {height:42px;}
#themeEditor .theme-notion-color-grid .has-color-control {grid-template-columns:minmax(0,1fr) 42px;}
#themeEditor .theme-notion-color-grid .theme-hex-value {grid-column:1 / -1;}
#themeEditor .background-advanced>label {margin:12px;}
#themeEditor .background-advanced>button {margin:0 12px 12px;padding:8px 10px;}
#themeEditor .background-advanced>summary {font:inherit;font-size:.78rem;font-weight:700;}
#themeEditor .background-actions button {font:inherit;font-size:.72rem;}
#themeEditor .background-status:empty {display:none;}
.background-actions {display:flex;gap:8px;}
.background-actions button {font:12px/1.5 system-ui,sans-serif;padding:8px 12px;border:1px solid var(--reader-line,var(--line));background:var(--reader-surface,var(--surface));color:inherit;cursor:pointer;}
.background-actions button:hover {border-color:var(--reader-secondary,var(--verdigris));}
.background-status {font:11px/1.5 system-ui,sans-serif;min-height:1.5em;color:var(--reader-muted,var(--bone-soft));}
@media(prefers-reduced-motion:no-preference){#themeBackground>div {transition:opacity .3s ease;}}

/* Fade surfaces rather than their text, focus rings or event marks. */
:root[data-theme] .search-field input,
:root[data-theme] .command-actions > select,
:root[data-theme] .filter-menu > summary,
:root[data-theme] .view-menu > summary,
:root[data-theme] .command-actions button {
  background:color-mix(in srgb,var(--surface) var(--control-opacity,100%),transparent);
}
:root[data-theme] .timeline-workspace {background:transparent;}
:root[data-theme] .zoom-controls {background:color-mix(in srgb,var(--surface) var(--control-opacity,100%),transparent);gap:0;}
:root[data-theme] .zoom-controls {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-width:120px;}
:root[data-theme] .zoom-controls .icon-button {width:100%;min-width:0;max-width:none;margin:0;padding-inline:0;background:transparent;box-sizing:border-box;}
:root[data-theme] .context-tabbar {background:color-mix(in srgb,var(--surface) var(--control-opacity,100%),transparent);}
:root[data-theme] .context-tabs,:root[data-theme] .context-tabbar .character-browser,:root[data-theme] .context-tabbar summary {background:transparent;}
:root[data-theme] .context-tabs button {background:transparent;}
.archive-bar,.reading-status {background:color-mix(in srgb,var(--reader-bg) var(--library-chrome-opacity,100%),transparent);}
:root[data-theme-editing="true"] #themeBackground>div {transition:none;}
:root[data-workshop-preview="true"] .theme-controls,
:root[data-workshop-preview="true"] .workshop-link,
:root[data-workshop-preview="true"] #settingsButton,
:root[data-workshop-preview="true"] [data-theme-editor-open] {display:none!important;}
:root[data-theme] .timeline-host,
:root[data-theme] .timeline-meta,
:root[data-theme] .comparison-studio-lane {
  background:color-mix(in srgb,var(--ink-soft) var(--timeline-opacity,100%),transparent);
}
:root[data-theme] .overview-band {background:color-mix(in srgb,var(--overview-surface) var(--timeline-opacity,100%),transparent);}
:root[data-theme] .comparison-studio-timeline {background:transparent;}
:root[data-theme] .archive-home {color:var(--mist);text-decoration:none;text-transform:none;font:13px/1.6 var(--sans);letter-spacing:0;}
:root[data-theme] .archive-home:hover {color:var(--bone);}
:root[data-theme] #eraSelect {width:200px;max-width:100%;text-overflow:ellipsis;font-family:var(--sans);}
:root[data-tone="light"] .event-group.is-range .event-label,
:root[data-tone="light"] .life-phase-label,
:root[data-tone="light"] .comparison-event-label.is-range,
:root[data-tone="light"] .comparison-life-phase text {fill:#111;stroke:#fff;}

.workshop-link {display:block;margin:12px 0 20px;color:var(--reader-secondary,var(--verdigris));font:14px/1.5 system-ui,sans-serif;text-decoration:none;}
.workshop-link:hover {text-decoration:underline;}
.background-advanced {margin-top:20px;}
.background-advanced summary {font:14px/1.5 system-ui,sans-serif;cursor:pointer;}
.background-advanced label {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;font:12px/1.5 system-ui,sans-serif;}
.background-advanced button {font:12px/1.5 system-ui,sans-serif;cursor:pointer;}
#themeEditor .background-advanced>button,
#themeEditor .background-advanced input[type=file]::file-selector-button {
  border:1px solid var(--line);border-radius:4px;background:var(--ink-soft);color:var(--bone);padding:8px 12px;cursor:pointer;
}
#themeEditor .background-advanced>button:hover,
#themeEditor .background-advanced input[type=file]::file-selector-button:hover {border-color:var(--verdigris);}
#themeEditor .background-advanced input[type=range] {width:100%;min-width:0;accent-color:var(--verdigris);}
#themeEditor .background-advanced select {width:100%;min-width:0;min-height:36px;background:var(--ink-soft);color:var(--bone);border:1px solid var(--line);border-radius:4px;padding:6px;font:inherit;}
body:not([data-workshop]):has(#libraryView) [data-scope="timeline"],body:not([data-workshop]):has(#timelineHost) #themeEditor [data-scope="library"] {display:none!important;}
:root[data-theme] .inspector {background:color-mix(in srgb,var(--ink-soft) var(--inspector-opacity,0%),transparent);}
.reading-column {background:color-mix(in srgb,var(--reader-bg) var(--reading-surface-opacity,0%),transparent);box-shadow:0 0 0 16px color-mix(in srgb,var(--reader-bg) var(--reading-surface-opacity,0%),transparent);}
:root:has(#libraryView) .work-row-body {padding:14px 16px;background:color-mix(in srgb,var(--reader-bg) var(--reading-surface-opacity,0%),transparent);border-radius:var(--reader-radius,4px);}
:root:has(#libraryView) .work-row h3 {font-size:calc(24px * var(--theme-text-scale,1));}
:root:has(#libraryView) .work-excerpt {font-size:calc(14px * var(--theme-text-scale,1));line-height:var(--theme-text-leading,1.85);}
:root:has(#libraryView) :is(.work-overline,.work-row-meta,.tag-category-name,.archive-tag,.cast-menu summary) {font-size:calc(11px * var(--theme-text-scale,1));}
:root[data-hide-usernames="true"] .post-byline strong,:root[data-hide-timestamps="true"] .post-byline span {display:none;}
:root[data-hide-post-divisions="true"] .post-byline {border-top:0;}
:root[data-hide-usernames="true"][data-hide-timestamps="true"][data-hide-post-divisions="true"] .post-byline {display:none;}
#readingCoverBackground {position:fixed;inset:0;z-index:-1;pointer-events:none;}
#readingCoverBackground>div {position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity 1.2s ease;}
#workCoverLink {display:block;cursor:zoom-in;}
#workCoverLink[hidden] {display:none;}
@media(prefers-reduced-motion:reduce){#readingCoverBackground>div {transition:none;}}
