/* Night mode (html[data-theme=dark]): espresso background, cream text, same brand colours. */
.themebtn{flex:none;display:grid;place-items:center;width:44px;height:44px;margin-left:auto;margin-right:4px;border:0;border-radius:50%;background:none;color:var(--esp);cursor:pointer}
.themebtn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hdr nav + .themebtn,.hdr .nav + .themebtn{margin-left:clamp(10px,2vw,22px)}
.menu-open .themebtn{visibility:hidden}

html[data-theme=dark]{color-scheme:dark;--esp:#f1e4c9;--car:#d2b48f;--cream:#241409;--paper:#1c1009;--card:#2a1910;--line:rgba(241,228,201,.16)}
html[data-theme=dark] body{background:var(--paper);color:var(--esp)}
html[data-theme=dark] .hdr.solid,html[data-theme=dark] .hdr--home,html[data-theme=dark] .hdr--home.solid,html[data-theme=dark] header.hdr:not(.hdr--home){background:rgba(28,16,9,.9)}
html[data-theme=dark] .logo .logo--l{opacity:1}
html[data-theme=dark] .logo .logo--d{visibility:hidden}
html[data-theme=dark] .btn:hover{color:#fff}
/* footers and the brown menus stay espresso with cream text */
html[data-theme=dark] .hft{background:#120a05;color:#e5d0a5}
html[data-theme=dark] .menu,html[data-theme=dark] .smenu{background:#120a05}
html[data-theme=dark] .menu a,html[data-theme=dark] .smenu a{color:#e5d0a5}
html[data-theme=dark] .menu-open .burger{color:#e5d0a5}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#2a1910!important;color:var(--esp)!important}
/* phone bar: dark glass */
html[data-theme=dark] .tabbar{background:linear-gradient(180deg,rgba(52,32,20,.78),rgba(34,20,12,.66));border-color:rgba(241,228,201,.14);box-shadow:inset 0 1px 0 rgba(241,228,201,.12),0 12px 32px rgba(0,0,0,.45)}
html[data-theme=dark] .tabbar__pill{background:linear-gradient(180deg,rgba(241,228,201,.22),rgba(241,228,201,.08));box-shadow:inset 0 1px 0 rgba(241,228,201,.25),0 2px 10px rgba(0,0,0,.3)}
html[data-theme=dark] .tabbar a{color:var(--esp)}
html[data-theme=dark] .mb{background:var(--card)}
html[data-theme=dark] .foot img{filter:invert(1) sepia(.3) brightness(1.6)}
html[data-theme=dark] .mb__t--e span{border-color:rgba(241,228,201,.3);color:rgba(241,228,201,.45)}
/* light cards: dark in night mode so their text stays readable */
html[data-theme=dark] .hco__card{background:var(--card);border-color:var(--line)}
html[data-theme=dark] .preview{background:var(--card)}
/* the brown summary boxes stay dark brown with cream text in night mode */
html[data-theme=dark] .sum,html[data-theme=dark] .sumc{background:#2e1b10!important;color:#f1e4c9;border:1px solid var(--line)!important}
html[data-theme=dark] .sumc h3{color:#f1e4c9}
html[data-theme=dark] .sum .btn,html[data-theme=dark] .sumc .btn{background:#f1e4c9;color:#241409;border-color:#f1e4c9}
html[data-theme=dark] .sum a,html[data-theme=dark] .sumc a{color:#f1e4c9}
html[data-theme=dark] .sum .hint,html[data-theme=dark] .sumc .hint,html[data-theme=dark] .sum p,html[data-theme=dark] .sumc p{color:#f1e4c9}
/* soft fade between day and night when the switch is tapped */
/* page switch (owner pick D, 17 Nov): the old page softly steps back, the new page settles in (Safari and Chrome; others open normally) */
@media (prefers-reduced-motion:no-preference){
  ::view-transition-old(root){animation:vtZo .4s cubic-bezier(.4,0,1,1) both}
  ::view-transition-new(root){animation:vtZi .65s cubic-bezier(.22,1,.36,1) .05s both}
}
/* day/night switch: one snapshot crossfade on the graphics card instead of fading every element (smooth on phones) */
html.vt-theme::view-transition-old(root){animation:none}
html.vt-theme::view-transition-new(root){animation:vtTh .55s cubic-bezier(.4,0,.2,1) both}
@keyframes vtTh{from{opacity:0}}
@keyframes vtZo{to{opacity:0;transform:scale(.96)}}
@keyframes vtZi{from{opacity:0;transform:scale(1.03)}}
