/* Theme colours belong to the site shell; the scenes retain their own lighting. */
:root{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--night-bg:#121319;--night-surface:#1c1d27;--night-raised:#252635;--night-line:#383848;--night-text:#eeeaf6;--night-muted:#b5afc4;--night-accent:#c6b0ee}
.theme-toggle{grid-column:3;grid-row:1;justify-self:end;display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:10px 14px;border:1px solid #d6cfdf;border-radius:24px;background:transparent;color:#514665;font-size:12px}
.theme-toggle svg{width:17px;height:17px;flex:none}
.theme-toggle .theme-sun{display:none}
[data-theme=dark] .theme-toggle .theme-moon{display:none}
[data-theme=dark] .theme-toggle .theme-sun{display:block}
[data-theme=dark] body{background:var(--night-bg);color:var(--night-text)}
[data-theme=dark] body>header{border-color:var(--night-line)}
[data-theme=dark] :is(.brand img,.footer-brand img){filter:brightness(0) saturate(100%) invert(94%) sepia(10%) saturate(410%) hue-rotate(211deg)}
[data-theme=dark] body>header nav a{color:var(--night-muted)}
[data-theme=dark] body>header nav a:is(.active,:hover){color:var(--night-text)}
[data-theme=dark] body>header nav a.active:after{background:var(--night-accent)}
[data-theme=dark] .theme-toggle{border-color:var(--night-line);color:var(--night-text);background:var(--night-surface)}
[data-theme=dark] .theme-toggle:hover{background:var(--night-raised)}
[data-theme=dark] :is(.home-welcome h1,.directory-heading h2,.home-card h3,.room-heading,.room-toolbar>span,.site-footer .footer-thought,.guide-questions summary){color:var(--night-text)}
[data-theme=dark] :is(.home-welcome h1 em,.intro h1 em,.footer-thought em,.site-footer .footer-aside,.home-welcome .home-note){color:var(--night-accent)}
[data-theme=dark] :is(.home-welcome p,.intro-note,.eyebrow,.home-card p,.home-bottom-note,.continue-copy span,.environment-card p,.back-environments,.under,.quote,.landing-intro,.landing-guide p,.context-guide p,.home-about p,.rain-actions span,.duration-card>span,.duration-card strong span){color:var(--night-muted)}
[data-theme=dark] :is(.home-card,.environment-card,.duration-card){background:var(--night-surface);border-color:var(--night-line);box-shadow:0 8px 28px #0002}
[data-theme=dark] :is(.continue-session,.page-timer-notice){background:#252132;border-color:#433b55;color:var(--night-text)}
[data-theme=dark] .continue-icon{background:#393049}
[data-theme=dark] :is(.card-tags span,.green-card .card-tags span){background:var(--night-raised);border-color:var(--night-line);color:#c6bfd5}
[data-theme=dark] :is(.directory-heading a,.preview-sound,.preview-status,.environment-enter,.landing-guide .landing-kicker){color:var(--night-accent)}
[data-theme=dark] .preview-sound[aria-pressed=true]{color:#eadbff}
[data-theme=dark] .quiet-label{color:#aac9b3}
[data-theme=dark] .enter-space{background:#cbb7ec;color:#282035;border-color:#cbb7ec}
[data-theme=dark] .enter-space:hover{background:#dfccfa}
[data-theme=dark] .green-card .enter-space{background:#b4d5bf;border-color:#b4d5bf;color:#183124}
[data-theme=dark] .green-card .enter-space:hover{background:#cde8d6}
[data-theme=dark] .focus-cover{background:radial-gradient(ellipse at 55% 55%,#393044 0%,#241f31 65%,#1c1c29 100%)}
[data-theme=dark] .focus-dial{background:#292232;border-color:#a38abe66;box-shadow:0 0 0 14px #ffffff04,0 12px 36px #0002;color:#e0cdec}
[data-theme=dark] .focus-dial svg{color:#c6a7e7}
[data-theme=dark] :is(.focus-card .enter-space,.landing-secondary,.page-timer-notice button){background:transparent;border-color:#655473;color:#e1d1f0}
[data-theme=dark] :is(.focus-card .enter-space:hover,.duration-card:hover){background:#30283d;border-color:#8d76a5}
[data-theme=dark] body>.site-footer{background:linear-gradient(125deg,#1e1c29,#191b24 65%,#201e25);border-color:var(--night-line);color:var(--night-text)}
[data-theme=dark] .site-footer :is(.footer-description,.footer-bottom){color:var(--night-muted)}
[data-theme=dark] .footer-navigation h2{color:var(--night-accent)}
[data-theme=dark] .footer-navigation :is(a,button){color:#d3ccdf}
[data-theme=dark] .site-footer :is(a,button):hover{color:#f0e5ff}
[data-theme=dark] :is(.footer-navigation,.footer-bottom,.editorial-guide,.guide-questions details,.home-about){border-color:var(--night-line)}
[data-theme=dark] .key{border-color:#464052;color:#b7adc7}
[data-theme=dark] body:not(.minimal-room) :is(#minimal-toggle,#hide-controls-toggle){color:var(--night-muted)}
[data-theme=dark] .switch-track{background:#524960}
[data-theme=dark] :is(a,button,summary,input,select):focus-visible{outline-color:#ceb4fc}
[data-theme=dark] ::selection{background:#655178;color:#fff}
@media(max-width:960px){
 body>header{grid-template-columns:minmax(0,1fr) auto}
 body>header .brand{justify-self:start}
 body>header nav{grid-column:1/-1;grid-row:2}
 .theme-toggle{grid-column:2;grid-row:1}
}
@media(max-width:480px){
 .theme-toggle{width:44px;padding:0;justify-content:center}
 .theme-toggle span{display:none}
 body>header .brand img{width:205px;height:auto}
}
@media(forced-colors:active){.theme-toggle{border-color:ButtonText}}
