/* Ported from the Maru Library ThemeToggle and theme.css. */
/* Celestial switch: one clipped coordinate system; no compounded thumb translations. */
.maru-theme-control.celestial-toggle{position:relative;display:block;flex:0 0 80px;width:80px;height:44px;min-height:44px;isolation:isolate}
.celestial-toggle .maru-theme-switch{position:absolute;inset:3px 0;width:80px!important;height:38px!important;min-height:38px!important;padding:0;border:0;background:transparent!important;box-shadow:none;z-index:2;cursor:grab;touch-action:pan-y;outline-offset:3px;border-radius:24px}
.celestial-toggle .maru-theme-switch:focus-visible{outline:2px solid #7c96bb;box-shadow:none}
.celestial-toggle .maru-theme-switch:active{cursor:grabbing}
.celestial-toggle .maru-theme-switch [data-slot=switch-thumb]{display:none!important;translate:none!important;transform:none!important}
.sky-scene{position:absolute;inset:3px 0;overflow:hidden;border-radius:24px;border:1px solid #bc9a63;background:#f2e4c6;pointer-events:none;box-shadow:inset 0 1px 5px #78502512;isolation:isolate}
.sky-night{position:absolute;inset:0;background:linear-gradient(120deg,#152038,#2a3558);opacity:var(--sky-progress);transition:opacity .55s ease}
.sky-orb{position:absolute;left:4px;top:3px;width:30px;height:30px;border-radius:50%;overflow:hidden;transform:translateX(calc(var(--sky-progress)*42px));background:color-mix(in srgb,#fff5da calc((1 - var(--sky-progress))*100%),#29364f);border:1px solid #bb985b;box-shadow:0 1px 4px #0002;transition:transform .6s cubic-bezier(.2,.8,.2,1),background .55s ease}
.sky-orb>svg{position:absolute;left:2px;top:2px;width:24px;height:24px;transition:transform .6s cubic-bezier(.2,.8,.2,1),opacity .45s ease}
.sky-sun{color:#977027;transform:translateY(calc(var(--sky-progress)*33px)) rotate(calc(var(--sky-progress)*60deg));opacity:calc(1 - var(--sky-progress))}
.sky-moon{color:#f4e3bb;transform:translateY(calc((1 - var(--sky-progress))*33px)) rotate(calc((1 - var(--sky-progress)) * -25deg));opacity:var(--sky-progress)}
.sky-stars{position:absolute;left:12px;top:7px;width:17px;height:17px;color:#e7cf9b;opacity:var(--sky-progress);transition:opacity .55s ease;stroke-width:1}
.celestial-toggle[data-dragging=true] :is(.sky-orb,.sky-orb>svg,.sky-night,.sky-stars,.sky-horizon){transition:none}
@media(prefers-reduced-motion:reduce){.celestial-toggle :is(.sky-orb,.sky-orb>svg,.sky-night,.sky-stars,.sky-horizon){transition:none}}
@media(max-width:760px){.bookshop-account .maru-theme-control.celestial-toggle{flex-basis:80px;width:80px;min-width:80px}.reader-header-actions .maru-theme-control{flex-shrink:0}}
/* Deliberately brief, non-interactive weather after a gradual palette transition. */
html.theme-changing,html.theme-changing body,html.theme-changing body *{transition-property:background-color,color,border-color,box-shadow;transition-duration:800ms;transition-timing-function:ease-in-out}
html.theme-changing :is(.sky-orb,.sky-orb>svg,.sky-night,.sky-stars){transition-property:transform,opacity,background-color;transition-duration:800ms}
.theme-weather{position:fixed;inset:0;z-index:80;overflow:hidden;pointer-events:none;contain:strict}
.theme-weather i{position:absolute;left:var(--x);top:var(--y);opacity:0;animation-delay:var(--delay);animation-fill-mode:both;pointer-events:none}
.weather-dark i{width:100px;height:2px;border-radius:100%;background:linear-gradient(90deg,transparent,#bdcfee);transform:rotate(35deg);animation-name:maru-meteor;animation-duration:1.65s;animation-timing-function:ease-out}
.weather-light i{width:7px;height:7px;border-radius:50%;background:#d6ae49;box-shadow:0 0 12px 5px #f1d99744;animation-name:maru-sun-dust;animation-duration:2.1s;animation-timing-function:ease-in-out}
@keyframes maru-meteor{0%{opacity:0;transform:translate(-100px,-70px) rotate(35deg)}20%{opacity:.55}100%{opacity:0;transform:translate(210px,150px) rotate(35deg)}}
@keyframes maru-sun-dust{0%{opacity:0;transform:translateY(30px) scale(.5)}35%{opacity:.55}100%{opacity:0;transform:translate(var(--drift),-80px) scale(.7)}}
@media(prefers-reduced-motion:reduce){html.theme-changing,html.theme-changing body,html.theme-changing body *{transition:none!important}.theme-weather{display:none}}
.weather-dark i{width:var(--length);height:var(--thickness);background:linear-gradient(90deg,transparent,#bfd4ef);transform-origin:right center;animation-duration:var(--duration);animation-timing-function:cubic-bezier(.2,.35,.7,1);filter:drop-shadow(0 0 2px #b5d3fb66)}
@keyframes maru-meteor{0%{opacity:0;transform:translate(0,0) rotate(var(--angle))}18%{opacity:var(--bright)}80%{opacity:calc(var(--bright)*.7)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--angle))}}


.header-actions .celestial-toggle{flex-shrink:0}.header-actions .my-sim{min-width:102px}.header-actions .my-sim svg{flex-shrink:0}
@media(max-width:590px){.header-actions .my-sim{min-width:82px}.header-actions .main-return{max-width:85px}}

/* Shared MARU ON MARU login, keeping the existing account destination. */
.header-actions .my-sim,.header-actions .my-sim[aria-current=page]{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 18px;min-height:44px;min-width:116px;background:#344a68;color:#fff;border:1px solid #344a68;border-radius:10px;font-size:15px;font-weight:700;line-height:1.6;white-space:nowrap;box-shadow:none}
.header-actions .my-sim svg{width:18px;height:18px;stroke-width:2;flex-shrink:0}
.header-actions .my-sim:hover{background:#263a56;color:#fff}
html[data-theme=dark] .header-actions .my-sim,html[data-theme=dark] .header-actions .my-sim[aria-current=page]{background:#bad1ed;color:#14283e;border-color:#bad1ed}
.menu-heading .brand-word{display:inline-block;font-size:36px}
@media(max-width:760px){.header-actions .my-sim,.header-actions .my-sim[aria-current=page]{min-width:100px;font-size:14px;padding:10px 13px}}

/* Match the parent signature used by the library and Maru Brother. */
.top .brand small,footer .brand small,.menu-footer .brand small,.brand small .maru-name,.main-return .maru-name,.menu-parent .maru-name{
 font-family:Georgia,'Times New Roman',serif;font-weight:400;font-style:normal;letter-spacing:.12em;
}
