:root{color-scheme:light}
.theme-settings{padding:23px 0 0}
.theme-settings h3{font-size:12px;font-weight:500;margin:0 0 12px}
.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.theme-options label{display:flex;align-items:center;gap:8px;min-width:0;margin:0;padding:14px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:12px}
.theme-options label:has(input:checked){border-color:var(--sage);background:#3f494108}
.theme-options input{margin:0;accent-color:#3f4941;flex-shrink:0}
.theme-options small{display:block;font-size:10px;color:var(--muted);line-height:1.6;margin-top:3px}
.theme-swatch{display:block;flex:0 0 17px;width:17px;height:27px;border:1px solid #b0b5a5;border-radius:5px}
.theme-swatch-light{background:#F6F2EA}.theme-swatch-dark{background:#3F4941}
#theme-save-status:empty{display:none}#theme-save-status{margin-top:9px}
html[data-theme=dark]{color-scheme:dark;--cream:#3F4941;--paper:#49554A;--dark:#F6F2EA;--ink:#F6F2EA;--muted:#C0C8BB;--line:#637064;--sage:#BDCCAF;--accent:#AF8066}
html[data-theme=dark] body,html[data-theme=dark] body::before{background:#303A33}
html[data-theme=dark] .app-shell{background:#3F4941;border-color:#637064}
html[data-theme=dark] .wordmark img{filter:brightness(0) invert(1)}
html[data-theme=dark] :is(.primary,.section-heading>button.primary){background:#F6F2EA;color:#3F4941;border-color:#F6F2EA}
html[data-theme=dark] :is(.primary,.section-heading>button.primary):hover{background:#DDE5D4;color:#26382D}
html[data-theme=dark] .app-shell button:not(.primary):not(.art-flip-trigger):not(.now):hover,html[data-theme=dark] dialog:not(.ritual-dialog) button:not(.primary):hover{background:#566355}
html[data-theme=dark] :is(.about-card,.download-card,.library-stat,.info-note,.news,.platform-tabs,.sleep-dialog-status,.resume-listening){background:var(--paper);border-color:var(--line)}
html[data-theme=dark] .bottom-nav{background:#354137f5;border-color:var(--line)}
html[data-theme=dark] .bottom-nav button{color:#C0C8BB;background:transparent}
html[data-theme=dark] .bottom-nav .selected{color:#F6F2EA}
html[data-theme=dark] .mini-player{background:#354137f7;border-color:var(--line)}
html[data-theme=dark] .mini-player .now{background:transparent}
html[data-theme=dark] :is(.track,.art-track-list button){border-color:var(--line)}
html[data-theme=dark] :is(.subtle,.album-summary p,.album-subtitle,.background-note,.home-links svg,.track .number,.track .time,.drag-handle,summary,.download-size b,#download-state,.info-note,.footer-actions i:last-child,.settings-brand-footer>p,.library-stat small,.library-device-note,.mini-time,.playback-badge,.statistics-notice,.resume-listening small,.install-copy>.eyebrow,.install-card-featured p,.install-card-featured .eyebrow){color:var(--muted)}
html[data-theme=dark] :is(.intro h2,.theme-settings h3,.install-card-featured strong){color:var(--ink)}
html[data-theme=dark] .install-card-featured{background:linear-gradient(135deg,#4B5A49,#354237);border-color:var(--line)}
html[data-theme=dark] .install-device-tags span{background:#354137;color:var(--muted);border-color:var(--line)}
html[data-theme=dark] :is(.install-card-featured>.icon,.news .news-dismiss,#quick-install){color:var(--muted)}
html[data-theme=dark] .news .badge{background:#DDE5D4;color:#26382D}
html[data-theme=dark] .footer-actions :is(a,button):hover,html[data-theme=dark] .footer-actions :is(a,button):focus-visible{background:#566355;color:#F6F2EA}
html[data-theme=dark] dialog:not(.ritual-dialog){background:var(--cream);border-color:var(--line)}
html[data-theme=dark] .release-dialog{background-image:none}
html[data-theme=dark] :is(.custom-sleep input,#share-url){background:#354137;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .platform-tabs button.selected{background:#63735C;color:#F6F2EA}
html[data-theme=dark] .install-dialog li>span{background:#63735C;color:#F6F2EA}
html[data-theme=dark] :is(.sleep-indicator,#save-album.is-saved,.offline-item button.is-saved){background:#52644C;color:#F6F2EA;border-color:#819077}
html[data-theme=dark] .art-back{background:#3F4941;color:#F6F2EA;border-color:var(--line)}
html[data-theme=dark] :is(.art-back-title,.art-track-list button){color:#F6F2EA}
html[data-theme=dark] :is(.art-back-kicker,.art-return,.art-track-number,.art-track-time,.art-back-total){color:var(--muted)}
html[data-theme=dark] :is(.art-track-list button.is-current,.art-track-list button:hover){background:#566355;color:#F6F2EA}
html[data-theme=dark] .art-return:hover{background:#566355;color:#F6F2EA}
html[data-theme=dark] .badge{background:#805640;color:#F6F2EA}
html[data-theme=dark] #history-view .release-list article{border-left-color:#92A183}
html[data-theme=dark] #history-view .release-list article:last-child{border-left-color:transparent}
html[data-theme=dark] #history-view .release-list article::before{border-color:#BDCCAF;background:#3F4941}
html[data-theme=dark] #history-view .release-list article:first-child::before{background:#BDCCAF}
html[data-theme=dark] #history-view .release-list article :is(b,h2){color:#F6F2EA}
html[data-theme=dark] #history-view .release-list article :is(time,p){color:var(--muted)}
html[data-theme=dark] .theme-options label:has(input:checked){background:#52614F;border-color:#BDCCAF}
html[data-theme=dark] .theme-options label:has(input:checked) small{color:#F6F2EA}
html[data-theme=dark] .theme-options input{accent-color:#DDE5D4}
html[data-theme=dark] .ritual-chooser h2{color:#F6F2EA}
html[data-theme=dark] .ritual-options>button{background:#49554A;color:#F6F2EA;border-color:var(--line)}
html[data-theme=dark] .ritual-options small{color:var(--muted)}
html[data-theme=dark] .ritual-options>button[aria-current=true]{background:#52614F;border-color:#BDCCAF}
html[data-theme=dark] .theme-options label:hover{border-color:#BDCCAF}
/* Player and immersive scenes keep their own readable colors in both themes. */
html[data-theme=dark] .full-player{background:#3F4941}
html[data-theme=dark] .full-player::before{background:linear-gradient(#3f494199,#26382de6),var(--player-art,url('assets/savasana-vol01-approved.png')) center/cover}
html[data-theme=dark] .full-player .playback-badge{color:#F1EFDE}
html[data-theme=dark] .full-player .art-flip-trigger:hover{background:transparent}
html[data-theme=dark] .ritual-dialog .ritual-top-actions button:hover{background:#ffffff18}
html[data-theme=dark] .ritual-controls #ritual-play{background:#F6F2EA;color:#3F4941}
html[data-theme=dark] .playback-feedback{background:#49554A;color:#F6F2EA;border-color:var(--line)}
@media(max-width:360px){.theme-options label{gap:6px;padding:13px 8px}.theme-swatch{flex-basis:13px;width:13px}.theme-options small{font-size:9px}}

/* Resume card has a fixed light-theme ink color in the base stylesheet. */
html[data-theme=dark] .resume-listening,html[data-theme=dark] .resume-listening strong{color:#F6F2EA}
html[data-theme=dark] #resume-listening small{color:#DDE5D4}
