/* Appearance changes colour only. Timers, bedtime, artwork and saved work keep
   their own meaning. This stylesheet loads last in every normal app shell. */
html[data-theme=day]{color-scheme:light;--night:#e5f4fb;--night-2:#d6e9f3;--night-3:#bed7e5;--moon:#224b5d;--moon-soft:#4c6576;--gold:#ac6500;--gold-ink:#fffaf1;--paper:#fffaf1;--paper-2:#f3f0e7}
html[data-theme=night]{color-scheme:dark}
html[data-theme=day] .app-sky{inset:0;background:url(/app/creator/day-earth-owner.5be52e785fcb.jpg) center/cover no-repeat,#199fea!important}
html[data-theme=day] .app-sky:before,html[data-theme=day] .app-sky:after{content:none}
@media(min-width:700px) and (min-height:600px){
 html[data-theme=day] .app-sky{background:none!important}
 html[data-theme=day] .app-sky:before,html[data-theme=day] .app-sky:after{content:'';position:absolute;inset:0;background:url(/app/creator/day-earth-owner.5be52e785fcb.jpg) center/contain no-repeat;pointer-events:none}
 html[data-theme=day] .app-sky:before{background-size:cover;filter:blur(22px);transform:scale(1.08)}
}
html[data-theme=day] body::before{background:var(--night)}
html[data-theme=day] .home-status-edge{background:#e5f4fb}
html[data-theme=day] .home.home-icons.home-nine .home-top button>span:last-child,html[data-theme=day] .home.home-icons.home-nine .htiles .htile .cl-label.htile-t{color:#244b5d;text-shadow:0 1px 1px #fff9}
html[data-theme=day] .home.home-icons.home-nine .home-pages,html[data-theme=day] .home-pages[data-single=true] output{color:#4b6272}
html[data-theme=day] .home-pages button{color:#2a5061;border-color:#8eacbd;background:#ffffff75}
html[data-theme=day] .home.home-icons.home-nine .home-footer{background:#ffffff85;border-color:#54799029}
html[data-theme=day] .home.home-icons.home-nine .home-footer .home-copyright,html[data-theme=day] .home.home-icons.home-nine .home-footer .home-version{color:#456477}
html[data-theme=day] .btn-ghost-night{background:#ffffff70;color:#285064;border-color:#6d95ac}
html[data-theme=day] :is(.st-tab,.st-search-wrap,.pk-tool,.pk-tool-tip){background:#ffffffad;border-color:#7193a23b;color:#294e60}
html[data-theme=day] :is(.st-tab[aria-selected=true],.st-tab[aria-pressed=true]){background:#e4f0cf;color:#304c36}
html[data-theme=day] :is(.brave-world-app,.brave-world-frame){background:#e6f7ed}
/* Frosted square slider and a recessed track, following the supplied reference. */
.home-brand-cluster{display:flex;align-items:center;gap:clamp(16px,3vw,38px);min-width:0}
.appearance-switch,.home.home-icons.home-nine .home-top .appearance-switch{position:relative;isolation:isolate;display:inline-flex;flex:none;align-items:center;justify-content:center;width:110px;height:60px;min-height:44px;padding:0;border:0;border-radius:20px;cursor:pointer;background:transparent;box-shadow:none;touch-action:manipulation;color:#f8f8ed;outline:none}
.appearance-track{position:relative;display:block;width:104px;height:54px;border-radius:19px;background:linear-gradient(130deg,#080a11,#10131b 65%,#0b0e15);box-shadow:inset 0 2px 5px #000b,inset 0 -1px 1px #d9e4ff13,0 2px 5px #03071444}
.appearance-thumb{position:absolute;display:grid;place-items:center;width:48px;height:48px;left:3px;top:3px;border-radius:16px;background:radial-gradient(ellipse at 30% 0%,#d8dfff77,transparent 65%),linear-gradient(145deg,#596079e6,#262c46ed);border:1px solid #d7e2ff4d;box-shadow:inset 0 1px 1px #ffffff50,inset 0 -1px 2px #171d2e66,0 3px 6px #0007;transform:translateX(0);backdrop-filter:blur(8px)}
.appearance-rim{position:absolute;inset:-3px;width:calc(100% + 6px);height:calc(100% + 6px);fill:none;overflow:visible;pointer-events:none;color:#f0f3ff;filter:drop-shadow(0 0 1px #e4ecff) drop-shadow(-2px 2px 4px #718cff) drop-shadow(-2px 2px 8px #657aff66)}
.appearance-rim rect{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-dasharray:35 65;stroke-dashoffset:-52}
.appearance-rim .appearance-rim-outer{stroke:#b9cdff;stroke-width:1.5}
.appearance-icon{position:absolute;width:27px;height:27px;fill:currentColor;color:#f7f3df;pointer-events:none}
.appearance-sun{opacity:0;transform:scale(.6) rotate(-35deg)}
.appearance-name{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.appearance-switch[data-mode=day] .appearance-track{background:linear-gradient(135deg,#c9ced1,#dfe2e0 80%);box-shadow:inset 0 3px 6px #59636d40,inset 0 -1px 1px #ffffff70,0 3px 7px #53616b33}
.appearance-switch[data-mode=day] .appearance-thumb{transform:translateX(50px);background:radial-gradient(ellipse at 30% 0%,#ffffffb3,transparent 70%),linear-gradient(145deg,#efefeddd,#d8dbdade);border-color:#ffffffbd;box-shadow:inset 0 1px 1px #fff,inset 0 -1px 2px #b9b9af44,0 3px 6px #53606a4d}
.appearance-switch[data-mode=day] .appearance-rim{color:#fff6cf;filter:drop-shadow(0 0 1px #fff6d2) drop-shadow(2px -2px 4px #ffc248) drop-shadow(2px -2px 8px #ffbe3c55)}
.appearance-switch[data-mode=day] .appearance-rim rect{stroke-dashoffset:2}
.appearance-switch[data-mode=day] .appearance-rim .appearance-rim-outer{stroke:#ffe28c}
.appearance-switch[data-mode=day] .appearance-moon{opacity:0;transform:scale(.6) rotate(35deg)}
.appearance-switch[data-mode=day] .appearance-sun{opacity:1;transform:none;color:#51483b}
.appearance-switch:active .appearance-thumb{scale:.96}
.home.home-icons.home-nine .home-top button.appearance-switch:focus-visible,.appearance-switch:focus-visible{outline:2px solid #b9d8f3!important;outline-offset:4px!important}
.appearance-pixel{transform-box:fill-box;transform-origin:center}
.appearance-stars,.appearance-cloud,.appearance-sparkle{display:none}
@media(prefers-reduced-motion:no-preference){
 html .appearance-thumb{transition:transform .64s cubic-bezier(.6,0,.25,1),background .4s,box-shadow .4s,scale .15s}
 html .appearance-icon{transition:opacity .28s,transform .64s cubic-bezier(.22,1,.36,1)}
 html .appearance-rim rect{transition:stroke-dashoffset .64s cubic-bezier(.6,0,.25,1)}
 html .appearance-rim{transition:color .4s,filter .4s}
 html .appearance-switch.is-switching[data-mode=day] .appearance-sun .appearance-pixel,html .appearance-switch.is-switching[data-mode=night] .appearance-moon .appearance-pixel{animation:appearance-coalesce .5s cubic-bezier(.25,.6,.35,1) both;animation-delay:calc(var(--pixel-delay) * 1ms)}
 html .appearance-switch.is-switching[data-mode=day] .appearance-moon .appearance-pixel,html .appearance-switch.is-switching[data-mode=night] .appearance-sun .appearance-pixel{animation:appearance-disperse .32s ease-in both}
}
@keyframes appearance-coalesce{0%{opacity:.3;transform:translate(var(--pixel-x),var(--pixel-y)) scale(.7)}45%{opacity:.8}100%{opacity:1;transform:translate(0,0) scale(1)}}
@keyframes appearance-disperse{0%{opacity:1;transform:translate(0,0)}100%{opacity:0;transform:translate(var(--pixel-x),var(--pixel-y)) scale(.6)}}
@media(max-width:599px){
 html.home-fixed .home.home-icons.home-nine{grid-template-rows:128px minmax(0,1fr) 48px 66px}
 .home.home-icons.home-nine .home-brand-cluster{width:100%;justify-content:space-between;gap:12px}
 .home.home-icons.home-nine .home-brand-cluster .brand{width:min(54%,180px);height:48px}
}
@media(orientation:landscape) and (max-height:599px) and (min-width:480px){
 html.home-fixed .home.home-icons.home-nine{grid-template-rows:54px minmax(0,1fr) 44px 44px}
 .home.home-icons.home-nine .home-brand-cluster{width:auto;gap:12px}
 .home.home-icons.home-nine .home-brand-cluster .brand{width:clamp(100px,20vw,180px)}
 .home.home-icons.home-nine .home-top .appearance-switch{width:104px;height:48px;scale:.88;transform-origin:right center;margin-left:-12px}
}
/* The book's parent return control follows the chosen appearance too. */
html[data-theme=night] :is(.brave-world-app,.brave-world-frame){background:#101b2d}
html[data-theme=night] .brave-world-app-bar{background:#152337;border-color:#c6d4ee26}
html[data-theme=night] .brave-world-home{background:#24354a;color:#e3ecf4;border-color:#7990a977}
@media(orientation:landscape){html[data-theme=night] .brave-world-app-bar{background:none}}

/* Canvas binder pages use their original navy paint and native card colours. */
html[data-theme=day] :is(.book,.lc-stage){--night:#1C2052;--night-2:#2B2F72;--night-3:#161A40;--moon:#F5F1FF;--moon-soft:#C6C2E6;--gold:#F2C14E;--gold-ink:#2A1A04}
html[data-theme=day] :is(.toast,.sheet-box,.chip,.st-set,.st-mystery,.scheck-card,.lc-task-toggle){--night:#1C2052;--night-2:#2B2F72;--night-3:#161A40;--moon:#F5F1FF;--moon-soft:#C6C2E6;--gold:#F2C14E;--gold-ink:#2A1A04}
html[data-theme=day] .st-set{background-color:#2b2f72}
.appearance-setting{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:64px}.appearance-setting p{margin:0;font-weight:800}

html[data-theme=day] :is(.pk-guide-page,.pk-select){background:#f4f8f7;color:#284c60;border-color:#87a4b366}
html[data-theme=day] :is(.find,.mine) :is(.fit-message h2,.fit-card-name,.fit-count,.fd-chip,.cl-label){color:#294d60;text-shadow:none}
html[data-theme=day] .find .fd-search{background:#ffffffc9;color:#294d60;border:1px solid #7396aa}
html[data-theme=day] .home :is(.home-offline-count,.home-offline-label){color:#476677}
html[data-theme=day] .home .offline-ready :is(.home-offline-label,.home-offline-tick){color:#256346}
html[data-theme=day] .home-offline-bar{background:#7196a529;accent-color:#326d70}
html[data-theme=day] .home-offline-bar::-webkit-progress-bar{background:#7196a529}
html[data-theme=day] .home-offline-bar::-webkit-progress-value{background:#326d70}
html[data-theme=day] .home-offline-bar::-moz-progress-bar{background:#326d70}
@media(orientation:landscape) and (max-height:599px) and (min-width:480px){
 .home.home-icons.home-nine .home-top .appearance-switch{scale:none;transform:none}
 .home.home-icons.home-nine .home-top .appearance-switch .appearance-track{scale:.88}
}

html[data-theme=day] .home.home-icons.home-nine :is(.htile .cl-label.htile-t,.home-top button:not(.appearance-switch)>span:last-child){background:#fffdf2e8;border-radius:12px;padding:3px 8px;box-decoration-break:clone;text-shadow:none}

html[data-theme=day] .home.home-icons.home-nine .htile .cl-label.htile-t{width:max-content;max-width:100%;min-height:0;align-self:center;justify-self:center;padding:4px 10px;line-height:1.15}
html[data-theme=day] .home.home-icons.home-nine .home-top button:not(.appearance-switch)>span:last-child{width:max-content;max-width:none;white-space:nowrap;padding:2px 5px}

html[data-theme=day] .home-pages>output{background:#fffdf2de;border-radius:14px;padding:4px 12px}
/* Reading and setup screens keep a pale surface over the illustrated daytime
   sky, so small instructions stay clear against both blue sky and white clouds. */
html[data-theme=day] .layer:has(> :is(.playkit,.sets,.find,.mine,.scheck)){background:#eff8f3ed}

html[data-theme=day] .lc-ctrl{--moon:#F5F1FF;--moon-soft:#C6C2E6;--gold:#F2C14E;--gold-ink:#2A1A04}

/* The optical and particle state follows the knob, including a held drag. */
.appearance-switch.has-particle-motion{touch-action:none}
.appearance-symbol-field{position:absolute;width:32px;height:32px;overflow:visible;pointer-events:none}
.appearance-switch.has-particle-motion .appearance-thumb{transform:translateX(calc(var(--appearance-progress,0) * 50px));transition:scale .15s;background:radial-gradient(ellipse at 30% 0%,#ffffff65,transparent 65%),linear-gradient(145deg,rgb(var(--appearance-glass-top)),rgb(var(--appearance-glass-bottom)))}
.appearance-switch.has-particle-motion .appearance-track{background:linear-gradient(135deg,rgb(var(--appearance-track-top)),rgb(var(--appearance-track-bottom)))}
.appearance-switch.has-particle-motion .appearance-rim{color:#f6f7ff;filter:drop-shadow(0 0 1px #fff9) drop-shadow(0 0 4px rgb(var(--appearance-led))) drop-shadow(0 0 8px rgba(var(--appearance-led),.35));transition:none}
.appearance-switch.has-particle-motion .appearance-rim rect{stroke-dashoffset:var(--appearance-orbit,-52);transition:none}
.appearance-switch.has-particle-motion .appearance-rim .appearance-rim-outer{stroke:rgb(var(--appearance-led))}
.appearance-frost{position:absolute;inset:0;width:100%;height:100%;opacity:.055;overflow:hidden;mix-blend-mode:soft-light;pointer-events:none}
/* A crisp illustrated edge and rounded enamel shine over the reference glass.
   Geometry and the position-driven optical/particle motion stay unchanged. */
.appearance-switch .appearance-track{box-shadow:inset 0 3px 5px #0007,inset 0 0 0 2px #1e315bba,inset 0 -2px 0 #89b7ed40,0 3px 0 #10234470,0 6px 9px #07132930}
.appearance-switch[data-mode=day] .appearance-track{box-shadow:inset 0 3px 5px #506a7b38,inset 0 0 0 2px #50728b80,inset 0 -2px 0 #ffffffa6,0 3px 0 #355a7670,0 6px 9px #173e5a26}
.appearance-switch .appearance-thumb{border:2px solid #e4e7ffe8;box-shadow:inset 0 2px 0 #ffffffb8,inset 0 -4px 0 #5475ad40,0 0 0 1.25px #304575b3,0 4px 0 #14294e9c,0 7px 9px #07132930}
.appearance-switch[data-mode=day] .appearance-thumb{border-color:#fff4c6;box-shadow:inset 0 2px 0 #fff,inset 0 -4px 0 #d4ad6540,0 0 0 1.25px #6d7c8c80,0 4px 0 #49678170,0 7px 9px #173e5a26}
.appearance-switch.has-particle-motion .appearance-thumb{background:radial-gradient(ellipse at 26% 0%,#ffffff8c,transparent 58%),linear-gradient(145deg,#b4c5ff16,#ffedb116),linear-gradient(145deg,rgb(var(--appearance-glass-top)),rgb(var(--appearance-glass-bottom)))}
.appearance-thumb:before{content:'';position:absolute;inset:3px;border-top:1px solid #ffffff70;border-radius:15px;pointer-events:none}
.appearance-thumb:after{content:'';position:absolute;left:6px;top:5px;width:15px;height:8px;border-top:3px solid #fffffff0;border-radius:65%;transform:rotate(-18deg);pointer-events:none}
/* Home is one uninterrupted scene, including the safe-area and utility rows. */
html.home-fixed .app-sky{inset:0;background:linear-gradient(#07123c26,#07143b33),url(/app/creator/space-horizon-owner.6c1be2433057.webp) center/cover no-repeat!important}
html.home-fixed[data-theme=day] .app-sky{background:url(/app/creator/day-earth-owner.5be52e785fcb.jpg) center/cover no-repeat!important}
html.home-fixed .app-sky:before,html.home-fixed .app-sky:after{content:none!important}
html.home-fixed .home-status-edge{background:transparent}
html.home-fixed .home.home-icons.home-nine .home-footer{background:transparent;border:0;border-radius:0}
html.home-fixed .home.home-icons.home-nine .home-footer :is(.home-copyright,.home-version,[data-offline-home]){background:#071841a8;border-radius:12px;padding:4px 8px;color:#eeeafa}
html.home-fixed[data-theme=day] .home.home-icons.home-nine .home-footer :is(.home-copyright,.home-version,[data-offline-home]){background:#fffdf2e8;color:#294e60}
@media(prefers-reduced-motion:reduce){.appearance-switch.has-particle-motion .appearance-thumb{transition:none}.appearance-switch.has-particle-motion:active .appearance-thumb{scale:1}}
/* Keep the complete landscape on tablets. Feather its edges into a matching
   extended sky, so a different screen ratio never creates a hard picture band. */
@media(min-width:700px) and (min-height:600px){
 html.home-fixed .app-sky{--home-scene:url(/app/creator/space-horizon-owner.6c1be2433057.webp);--home-wash:linear-gradient(#07123c26,#07143b33);background:none!important}
 html.home-fixed[data-theme=day] .app-sky{--home-scene:url(/app/creator/day-earth-owner.5be52e785fcb.jpg);--home-wash:linear-gradient(transparent,transparent);background:none!important}
 html.home-fixed .app-sky:before{content:''!important;position:absolute;inset:-24px;background-image:var(--home-wash),var(--home-scene);background-position:center;background-size:cover;background-repeat:no-repeat;filter:blur(18px);transform:none}
 html.home-fixed .app-sky:after{content:''!important;position:absolute;inset:auto;left:50%;top:50%;width:min(100vw,177.7778svh);height:auto;aspect-ratio:16/9;transform:translate(-50%,-50%);background-image:var(--home-wash),var(--home-scene);background-position:center;background-size:100% 100%;background-repeat:no-repeat;filter:none;mask-image:linear-gradient(transparent,#000 24px,#000 calc(100% - 24px),transparent),linear-gradient(90deg,transparent,#000 24px,#000 calc(100% - 24px),transparent);mask-composite:intersect;-webkit-mask-composite:source-in}
}
