
#appearance-settings .appearance-glyph{background:#e8ecdf;color:#42523b}
.appearance-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:10px 0 0;padding:3px;background:#ede7d9;border:1px solid #d9ceb7;border-radius:10px;min-width:0}
.appearance-choices label{display:block;position:relative;margin:0}
.appearance-choices input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0;min-height:0}
.appearance-choices span{display:grid;place-items:center;min-height:44px;border-radius:7px;padding:4px 2px;pointer-events:none;font:700 .88rem system-ui;color:#3d4937}
.appearance-choices input:checked+span{background:#405538;color:white}
.appearance-choices input:focus-visible+span{outline:2px solid #bd8836;outline-offset:1px}
#appearance-status{margin:8px 0 0}#appearance-status:empty{display:none}

@media screen {
html[data-theme=dark]{color-scheme:dark;--paper:#1c221f;--ink:#f2e7cf;--muted:#beb8a6;--gold:#cda972}
html[data-theme=dark] body{background:#151916;color:#f2e7cf}#offline-status{background:#273c36;color:#e4e5d3}
html[data-theme=dark] #app,html[data-theme=dark] #app.horarium-home{background:#1c221f;color:#f2e7cf;box-shadow:none}
html[data-theme=dark] .pocket-notebook{--leaf-ink:#f2e7cf;--leaf-muted:#bdb8a4;--leaf-rule:#4d5246;--leaf-green:#b7c6a4}
html[data-theme=dark] #app.horarium-home header h1{color:#f2e7cf}
html[data-theme=dark] #app.horarium-home header .brand-tagline{color:#d6b782}
html[data-theme=dark] #app.horarium-home .toplinks button,html[data-theme=dark] #app.horarium-home .date-tools button,html[data-theme=dark] #app.horarium-home .date-arrow,html[data-theme=dark] .daily-intention,html[data-theme=dark] #app.horarium-home .today-band h2{color:#f2e7cf}
html[data-theme=dark] #app.horarium-home .today-band,html[data-theme=dark] .today-layout .notebook-stations,html[data-theme=dark] .today-layout .notebook-journal,html[data-theme=dark] .today-layout .notebook-evening{border-color:#4d5246}
html[data-theme=dark] #notebook-dial :is(.clock-panel,.notebook-clock,.notebook-clock-card){background:#29322b;border-color:#505c4b}
html[data-theme=dark] #notebook-dial :is(h2,h3,button,strong,p){color:#eee4d0}
html[data-theme=dark] #notebook-dial :is(.clock-caption,.clock-phase,.clock-time){color:#eee4d0}
html[data-theme=dark] #app.horarium-home .today-layout #reading-nudge .reading-nudge>summary{background:#332d23;color:#eacf9d;border-color:#a1814f}
html[data-theme=dark] .today-layout #reading-nudge .reading-nudge>summary:after,html[data-theme=dark] .today-layout #show-all-stations:after{border-color:#d6b782}
html[data-theme=dark] .daily-intention .intention-row,html[data-theme=dark] .daily-intention textarea{background:#282e28;color:#eee4ce;border-color:#565c4b}
html[data-theme=dark] .daily-intention textarea::placeholder,html[data-theme=dark] #daily-intention-optional{color:#bfb7a4}
html[data-theme=dark] .today-layout #stations.notebook-compact .station.next:not([hidden]){background:#30392c;color:#f2e7cf;border-color:#59634f}
html[data-theme=dark] .today-layout #stations.notebook-compact .station.next .today-next-kicker,html[data-theme=dark] .today-layout #stations.notebook-compact .station.next .station-definition strong,html[data-theme=dark] .today-layout #show-all-stations,html[data-theme=dark] .today-layout .today-recent>summary{color:#ccd5b5}
html[data-theme=dark] .today-layout #stations.notebook-compact .station.next .completion{background:#adbc94;color:#1b2419;border-color:#adbc94}
html[data-theme=dark] .notebook-station-more summary{color:#e8dfca}
html[data-theme=dark] .mobile-report{color:#f2e7cf}
html[data-theme=dark] .mobile-report :is(h2,h3,h4,p,button,input,time,label,summary,strong,.report-date-display,.report-ledger-detail,.small){color:#eee4ce}
html[data-theme=dark] .mobile-report :is(.report-section,.report-station,.report-ledger,.report-acedia-outcome,.report-intention,.report-last-word,.report-date-field,.report-switch){background:#292f29;border-color:#50594a}
html[data-theme=dark] .mobile-report .report-acedia-outcome[data-outcome="lost"]{background:#29342d}html[data-theme=dark] .mobile-report .report-acedia-outcome[data-outcome="won"]{background:#3b2c26}
html[data-theme=dark] .mobile-report :is(.report-period button,.report-switch button,[aria-pressed=true]){background:#323b31;border-color:#5a6854}
html[data-theme=dark] .mobile-report .report-switch [aria-pressed=true]{background:#b5c49d;color:#20291f}
html[data-theme=dark] .mobile-report #report-journal,html[data-theme=dark] .mobile-report #report-last-word{color:#eee4ce}
html[data-theme=dark] #app.horarium-home .today-band .notebook-date-copy,html[data-theme=dark] #app .intention-done,html[data-theme=dark] #app .intention-undo{color:#d3c9b0}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"]{background:#29322b;border-color:#505c4b;color:#eee4d0}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"] .dial-time{color:#f2e7cf}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"] .dial-phase{background:#3a4536;color:#e2e5d0}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"] .dial-key{border-color:#505c4b}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"] .dial-key .dial-midday{background:#574328;color:#f1d8ab;box-shadow:none}
html[data-theme=dark] #notebook-dial[data-dial-tone="day"] [data-noon-label]{fill:#e6c793}
html[data-theme=dark] #app .toplinks button,html[data-theme=dark] #app .toplinks #report-return{color:#d9debf}
html[data-theme=dark] .mobile-report .report-switch button{background:transparent;color:#e7dec8}
html[data-theme=dark] .mobile-report .report-switch button[aria-pressed=true]{background:#b5c49d;color:#20291f}
html[data-theme=dark] .mobile-report .report-fold{background:#292f29;border-color:#50594a}
html[data-theme=dark] .mobile-report .report-fold summary:after{color:#cda972}
html[data-theme=dark] .mobile-report .day-record-writing :is(h3,p,strong){color:#31261d}
html[data-theme=dark] .mobile-report .report-section{background:transparent}
html[data-theme=dark] #app :is(.guide,#backups,.glossary-banner,.history-chapter,.backup-choice,.editor,.notice,.person-card){background:#282f28;border-color:#50594a;color:#f2e7cf}
html[data-theme=dark] #app #nightly-settings{background:#303331;border-color:#606760}
html[data-theme=dark] #app :is(.settings-card-head h3,.settings-lead,.settings-private, .guide p,.guide summary,.guide li,#backups p,.settings-return){color:#e2dac4}
html[data-theme=dark] #app :is(.guide a,.help-manual a,.quiet,.secondary){color:#cdd7b8}
html[data-theme=dark] #app :is(.secondary,.button){border-color:#697561}
html[data-theme=dark] #app :is(input:not([type=range]),select,textarea){background:#252c25;color:#f2e7cf;border-color:#6c7565}
html[data-theme=dark] #app :is(input,select,textarea)::placeholder{color:#b8b09b}
html[data-theme=dark] #app :is(#weekly-schedule,.weekdays) button[aria-pressed=true],html[data-theme=dark] #app :is(.wide:not(.secondary),#save-reflection,#new-journal-save){background:#b5c49d;color:#20291f;border-color:#b5c49d}
html[data-theme=dark] #app :is(.settings-glyph,.appearance-glyph){background:#3b4437;color:#dce2c7}
html[data-theme=dark] #app .appearance-choices{background:#1e251f;border-color:#586450}
html[data-theme=dark] #app .appearance-choices label span{color:#dccfb7}
html[data-theme=dark] #app .appearance-choices label input:checked+span{background:#b5c49d;color:#20291f}
html[data-theme=dark] #app .daily-intention.is-complete .intention-row{background:#343936;border-color:#666f65}
html[data-theme=dark] #app .daily-intention.is-complete textarea{background:transparent;color:#dedbd1}
html[data-theme=dark] #app .daily-intention .intention-complete{color:#e0dccc}
html[data-theme=dark] #app .today-layout .notebook-journal #new-journal-entry{background:#282f27;border-color:#515b4a}
html[data-theme=dark] #app .today-layout #new-journal-entry :is(header h3,header p,.home-acedia-label,.acedia-instruction){color:#e1d8bc}
html[data-theme=dark] #app :is(#new-journal-entry .journal-editor,.last-word-paper){background:#222a23;border-color:#626d59}
html[data-theme=dark] #app :is(#new-journal-entry .journal-toolbar,.last-word-paper .journal-toolbar){background:#30372d;border-color:#586450}
html[data-theme=dark] #app :is(#new-journal-entry .journal-toolbar button,.last-word-paper .journal-toolbar button){color:#e9dec3;border-color:#586450}
html[data-theme=dark] #app :is(#new-journal-entry .journal-toolbar button,.last-word-paper .journal-toolbar button)[aria-pressed=true]{background:#4c5842}
html[data-theme=dark] #app :is(#new-journal-text,#last-word-input),html[data-theme=dark] #app :is(#new-journal-text,#last-word-input):empty:before{color:#ded4bb}
html[data-theme=dark] #app .notebook-outcomes button.lost{background:#323f32;border-color:#5d6e55;color:#dce3cb}
html[data-theme=dark] #app .notebook-outcomes button.won{background:#44322b;border-color:#806352;color:#f0d8c2}
html[data-theme=dark] #app .notebook-outcomes button[aria-pressed=true]{outline:2px solid #cda972;outline-offset:1px}
html[data-theme=dark] #app .notebook-outcomes button :is(strong,small){color:inherit}
html[data-theme=dark] #app .notebook-journal .journal-list-toggle,html[data-theme=dark] #app .today-layout .today-recent small,html[data-theme=dark] #app .today-layout .person-card.sunrise-card :is(h2,#person-statement,#person-edit){color:#d6dbc0}
html[data-theme=dark] #app .today-layout .notebook-evening #day-reflection,html[data-theme=dark] #app #day-reflection{background:#302e26;border-color:#615640}
html[data-theme=dark] #app #day-reflection>summary{background:#302e26;color:#eee4ce;border-color:#615640}
html[data-theme=dark] #app #day-reflection .journal-score-copy :is(strong,span){color:#eee0c3}
html[data-theme=dark] #app #day-reflection .journal-score-button{background:#b5c49d;color:#20291f;border-color:#b5c49d}
html[data-theme=dark] #app #day-reflection .journal-score-button:after{border-color:#20291f}
html[data-theme=dark] #app #day-reflection :is(.reflection-body,.reflection-metric,.last-word-editor){border-color:#615640}
html[data-theme=dark] #app #day-reflection .reflection-metric{background:#282b24;color:#efe4cd}
html[data-theme=dark] #app #day-reflection :is(.reflection-value,.reflection-clear,.score-marks,.last-word-editor h3,.last-word-editor h3 small){color:#e5d9be}
html[data-theme=dark] #app .pocket-notebook #stations:not(.notebook-compact) .station{background:#30382e;border-color:#586450;color:#eee4ce}
html[data-theme=dark] #app .pocket-notebook #stations:not(.notebook-compact) .station.done{background:#29352e;border-color:#657264}
html[data-theme=dark] #app .pocket-notebook #stations:not(.notebook-compact) .station.skipped{background:#39332a;border-color:#786850}
html[data-theme=dark] #app .pocket-notebook #stations:not(.notebook-compact) .station :is(.station-definition,.choice-preview,.station-note,.station-icon,.translation,.station-outcome){color:#eee4ce}
html[data-theme=dark] #app .pocket-notebook #stations:not(.notebook-compact) .station .station-outcome{background:#38463a;border-color:#73806f}
html[data-theme=dark] #app .notebook-station-more{border-color:#626a57}
html[data-theme=dark] dialog,html[data-theme=dark] .reading-dialog,html[data-theme=dark] .reading-footer{background:#292e27;color:#eee4ce;border-color:#665d49}
html[data-theme=dark] dialog :is(h2,h3,.small),html[data-theme=dark] .reading-dialog :is(h2,.reading-kicker,.reading-body .reading-musing,.reading-credit,.reading-source,.reading-transcript){color:#eee0c3}
html[data-theme=dark] dialog :is(.secondary,.quiet),html[data-theme=dark] #app .nudge-tile :is(strong,small){color:#e5d4af}
html[data-theme=dark] #app .nudge-tile{background:#332d23;border-color:#756345;color:#e9ce99}
html[data-theme=dark] #app .nudge-intro{color:#cdbf9e}
html[data-theme=dark] .mobile-report .report-intention-complete strong{background:#3a4136;color:#e6dfca}
html[data-theme=dark] .mobile-report .report-station-state,html[data-theme=dark] .mobile-report .report-station-activity,html[data-theme=dark] .mobile-report .report-more summary{color:#d9d0bb}
html[data-theme=dark] .mobile-report .report-state-mark{background:#394a3b;color:#dfe6cf}
html[data-theme=dark] .mobile-report .report-station:not([data-status=completed]) .report-state-mark{background:#4b3b2d;color:#edcca2}
}

#appearance-settings{background:#fffaf0;border:1px solid #e4d7be;border-radius:15px;padding:.85rem .9rem;margin:0 0 .7rem}
#appearance-settings p{margin:.35rem 0 .55rem}
@media screen{
html[data-theme=dark] #app #appearance-settings{background:#282f28;border-color:#50594a}
html[data-theme=dark] #app #backups .backup-options{border-top-color:#586450}
html[data-theme=dark] #app #backups :is(summary,summary strong,summary small,.backup-journal-row,.backup-safe){color:#e2dac4}
html[data-theme=dark] #app #backups summary::after{border-color:#cda972;color:#cda972}
html[data-theme=dark] #app #backups :is(.backup-save,.backup-option-body){background:transparent;border-color:#586450}
html[data-theme=dark] #app :is(.glossary-content h4,.glossary-banner p,.glossary-entry p,.history-chapter p){color:#e2dac4}
html[data-theme=dark] #app .settings-glyph:not(.appearance-glyph) svg{color:#b8c4a4}
html[data-theme=dark] #app .settings-glyph:not(.appearance-glyph) svg [fill]:not([fill=none]){fill:#29392e}
html[data-theme=dark] #app #nightly-settings{border-color:#656963}
html[data-theme=dark] #app #day-reflection .reflection-lock{background:#573e2c;color:#f0dcc7}
}


/* Reading Room: scalable prose, with controls separate from the artwork. */
.reading-dialog{--reader-ink:#172747;--reader-accent:#31565b;--reader-line:#a5afa3;--reader-soft:#f2eddf;color:var(--reader-ink)}
.reading-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem;align-items:start;border-bottom:1px solid var(--reader-line);margin:0 0 1rem;padding-bottom:.72rem}
.reading-header h2{color:var(--reader-ink);margin:0;font-size:1.62rem;overflow-wrap:anywhere}
.reading-text-control{text-align:right;color:var(--reader-ink)}
.reading-text-control>span{display:block;font:.72rem/1.25 system-ui;margin:0 .12rem .24rem 0}
.reading-size-options,.reading-view-options{display:flex;background:var(--reader-soft);border:1px solid var(--reader-line);border-radius:.65rem;overflow:hidden}
.reading-size-options button,.reading-view-options button{min-height:44px;border:0;border-radius:0;margin:0;padding:.2rem .5rem;background:transparent;color:var(--reader-ink);font:700 .92rem/1.25 system-ui}
.reading-size-options button{min-width:44px}
.reading-size-options button+button,.reading-view-options button+button{border-left:1px solid var(--reader-line)}
.reading-size-options button[data-reading-size=large]{font-size:1.17rem}
.reading-view-options{margin:0 0 .9rem}
.reading-view-options button{flex:1}
.reading-size-options button[aria-pressed=true],.reading-view-options button[aria-pressed=true]{background:var(--reader-accent);color:#fff}
.reading-size-options button:focus-visible,.reading-view-options button:focus-visible{outline:2px solid currentColor;outline-offset:-5px}
.reading-view-options button:disabled{opacity:.55}
.reading-dialog .reading-body :is(.reading-musing,.reading-quote-text){color:var(--reader-ink);font-size:1.24rem;line-height:1.45;font-style:normal;overflow-wrap:anywhere;white-space:pre-wrap;margin:.2rem 0 1rem}
.reading-dialog[data-text-size=large] .reading-body :is(.reading-musing,.reading-quote-text){font-size:1.65rem;line-height:1.4}
.reading-dialog .reading-transcript{margin:1rem 0 .6rem}
.reading-dialog .reading-body .reading-source{font-size:.92rem;line-height:1.4}
.reading-dialog .reading-body [hidden]{display:none!important}
html[data-theme=dark] .reading-dialog{--reader-ink:#f4e9d0;--reader-accent:#41646b;--reader-line:#8f9986;--reader-soft:#303a32}
@media(max-width:345px){.reading-header{grid-template-columns:1fr}.reading-text-control{justify-self:start;text-align:left}}

.reading-text-control[hidden]{display:none!important}

/* Keep Help and introduction examples readable in dark mode. */
@media screen {
html[data-theme=dark] #app .personal-day-example{background:#282f28;border-color:#50594a}
html[data-theme=dark] #app :is(.example-day-card,.devil-guide){
 background:#383b34;
 background:color-mix(in srgb,#1c221f 86%,var(--card,#f2e7cf));
 color:#f2e7cf
}
html[data-theme=dark] #app :is(.example-day-card,.devil-guide) :is(strong,h3,.translation,.devil-latin,p,svg){color:#f2e7cf}
html[data-theme=dark] #app .glossary-entry{border-color:#50594a}
html[data-theme=dark] #app .glossary-entry .glossary-english{color:#d9cbe4}
html[data-theme=dark] #app .glossary-list .glossary-trigger{color:#f2e7cf;background:transparent}
html[data-theme=dark] #app .glossary-list .glossary-trigger:focus-visible{outline-color:#dfc6e9}
html[data-theme=dark] #app .glossary-list .glossary-entry+.glossary-entry,
html[data-theme=dark] #app .glossary-content h4:not(:first-child){border-color:#50594a}
html[data-theme=dark] #app .glossary-more{color:#dfc6e9}
html[data-theme=dark] #app .glossary-content .glossary-definition{color:#e2dac4}
@media(hover:hover){html[data-theme=dark] #app .glossary-list .glossary-trigger:hover{background:#353c33}}
html[data-theme=dark] #app .glossary-icon :is(svg,.station-icon,.devil-icon){color:#28394d}
}

@media screen {
html[data-theme=dark] .reading-dialog .reading-footer .reading-another{color:#f2e7cf;border-color:#c7a77a}
html[data-theme=dark] .reading-dialog .reading-footer .reading-another:focus-visible{outline:2px solid #f2e7cf;outline-offset:3px}
html[data-theme=dark] .reading-dialog .reading-footer .reading-more-status{color:#d9cfb8}
}

/* Dark appearance for actions and feedback on all station cards. */
@media screen {
html[data-theme=dark] #app #stations .station-entry-controls :is(.station-choice,.station-note-button){background:#354448;color:#f2e7cf;border-color:#81979b}
html[data-theme=dark] #app #stations .station-entry-controls .station-skip{background:#48372f;color:#f4dccc;border-color:#aa7e70}
html[data-theme=dark] #app #stations .station-entry-controls button:focus-visible{outline:2px solid #f2e7cf;outline-offset:2px}
html[data-theme=dark] #app #stations .station .station-outcome{background:#38463a;color:#eee4ce;border-color:#73806f}
html[data-theme=dark] #app #stations .station.skipped .station-outcome{background:#454239;color:#eee4ce;border-color:#8d7c62}
html[data-theme=dark] #app #stations .station :is(.station-undo,.station-completion-time){color:#eee4ce}
html[data-theme=dark] #app #stations .station .station-note:not([hidden]){background:#443b2a;color:#f2e7cf;border-left-color:#c29b58}
}

/* Notes from My Muse: keep the passage first, without changing quote cards. */
.reading-dialog[data-kind=musing]{--muse-paper:#fffaf0;--muse-ink:#242e2b;--muse-muted:#66594e;--muse-accent:#294b44;--muse-trim:#a9824a;--muse-border:#deceb2;--muse-footer:#f7efe0;--muse-selected:#e1e9de;background:var(--muse-paper);color:var(--muse-ink);border-color:var(--muse-border);border-radius:22px}
html[data-theme=dark] .reading-dialog[data-kind=musing]{--muse-paper:#252e28;--muse-ink:#f4ead6;--muse-muted:#d2c3aa;--muse-accent:#c9dfcc;--muse-trim:#cea775;--muse-border:#6e6757;--muse-footer:#2c372e;--muse-selected:#405346;--reader-ink:var(--muse-ink)}
.reading-dialog[data-kind=musing] .reading-content{padding:22px 22px 26px}
.reading-dialog[data-kind=musing] .reading-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0}
.reading-dialog[data-kind=musing] .reading-header h2{font:700 .675rem/1.4 system-ui;letter-spacing:.135em;text-transform:uppercase;color:var(--muse-muted);margin:0}
.reading-dialog[data-kind=musing] .reading-header:after{content:none}
.reading-dialog[data-kind=musing] .reading-text-control{display:flex;align-items:center;gap:5px;color:var(--muse-muted)}
.reading-dialog[data-kind=musing] .reading-text-control>span{margin:0}
.reading-dialog[data-kind=musing] .reading-size-options{background:transparent}
.reading-dialog[data-kind=musing] .reading-size-options button[aria-pressed=true]{background:var(--muse-selected);color:var(--muse-ink)}
.reading-dialog[data-kind=musing] .reading-body{color:var(--muse-ink);margin-top:22px}
.reading-dialog[data-kind=musing] .reading-body:before{content:"";display:block;width:38px;height:2px;background:var(--muse-trim);margin-bottom:21px}
.reading-dialog[data-kind=musing] .reading-body .reading-musing{font-size:1.6875rem;line-height:1.34;letter-spacing:-.012em;margin:0 0 17px;color:var(--muse-ink)}
.reading-dialog[data-kind=musing][data-text-size=large] .reading-body .reading-musing{font-size:2.0625rem;line-height:1.37}
.reading-dialog[data-kind=musing] .reading-credit{font: .8125rem/1.5 system-ui;color:var(--muse-muted);margin:0;overflow-wrap:anywhere}
.reading-dialog[data-kind=musing] .reading-citation-detail{display:block;font-size:.75rem;margin-top:2px}
.reading-dialog[data-kind=musing] .reading-footer{background:var(--muse-footer);border-color:var(--muse-border);padding:13px 14px}
.reading-dialog[data-kind=musing] .reading-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.reading-dialog[data-kind=musing] .reading-actions button{font:650 .875rem/1.2 system-ui;padding:5px 7px;min-height:46px;border-radius:10px}
.reading-dialog[data-kind=musing] .reading-actions .reading-close{background:transparent;color:var(--muse-accent);border-color:var(--reader-line)}
.reading-dialog[data-kind=musing] .reading-actions .reading-another{background:var(--muse-accent);color:var(--muse-paper);border-color:var(--muse-accent)}
@media(max-width:350px){.reading-dialog[data-kind=musing] .reading-content{padding-inline:16px}.reading-dialog[data-kind=musing]:not([data-text-size=large]) .reading-body .reading-musing{font-size:1.5rem}}

html[data-theme=dark] .reading-dialog[data-kind=musing] .reading-footer .reading-actions .reading-another{color:var(--muse-paper);border-color:var(--muse-accent)}

/* The static dialog title receives focus for screen readers, not as a control. */
.reading-dialog #reading-title[tabindex='-1']:focus{outline:none}

/* Dark Today headings and weekday label. Keep light and printed views unchanged. */
@media screen {
html[data-theme=dark] #app.pocket-mode > header h1,
html[data-theme=dark] #app.pocket-mode .datebar .day-heading{color:#cdd7b8}
html[data-theme=dark] #app.pocket-mode #main .notebook-date-copy{color:#beb8a6}
}
