:root{color-scheme:dark;--squad-bg:#090c17;--squad-text:#f8f2df;--squad-muted:#aab4c4;--squad-panel:#12192ae8;--squad-nav:#090d1fe8}
html[data-squad-theme="light"]{color-scheme:light;--squad-bg:#edf7fb;--squad-text:#142039;--squad-muted:#53647a;--squad-panel:#ffffffd9;--squad-nav:#f7fbfde8}

/* The four-dot dock is now a useful, tactile theme control. */
.squad-theme-toggle{position:relative;z-index:3;min-width:154px;min-height:48px;margin:28px auto 16px;padding:0 19px;border:1px solid #9fefff55;border-radius:999px;background:#111727dd;color:#b9efff;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:inset 0 1px #fff2,0 10px 30px #0004;font:600 10px 'DM Mono';letter-spacing:.12em;cursor:pointer;transition:transform .25s,border-color .25s,box-shadow .25s,background .25s}
.squad-theme-toggle span{font-size:19px;line-height:1}.squad-theme-toggle:hover{transform:translateY(-2px);border-color:#b9efffcc;box-shadow:inset 0 1px #fff4,0 14px 36px #0005,0 0 24px #82dfff35}.squad-theme-toggle:active{transform:scale(.96)}
html[data-squad-theme="light"] .squad-theme-toggle{background:#fff;color:#24344a;border-color:#54708c55;box-shadow:inset 0 1px #fff,0 10px 30px #47647b22}

/* Launcher: stronger individual icon identities with a shared holographic finish. */
.phone-home .home-icon{--icon-accent:#9fefff;--icon-accent-2:#d8b2ff;position:relative;touch-action:pan-x pan-y;transition:transform .3s cubic-bezier(.2,.9,.2,1),filter .3s,opacity .25s}
.phone-home .home-icon[data-app-key="hq"]{--icon-accent:#91f0df;--icon-accent-2:#c5a9ff}.phone-home .home-icon[data-app-key="ice"]{--icon-accent:#a9f7ff;--icon-accent-2:#e8a9ff}.phone-home .home-icon[data-app-key="levelup"]{--icon-accent:#9cf4df;--icon-accent-2:#fff19d}.phone-home .home-icon[data-app-key="signal"]{--icon-accent:#82e9ff;--icon-accent-2:#a9a3ff}.phone-home .home-icon[data-app-key="crowned"]{--icon-accent:#ffe98d;--icon-accent-2:#ff9fd2}.phone-home .home-icon[data-app-key="focus"]{--icon-accent:#95f5e5;--icon-accent-2:#a5b6ff}.phone-home .home-icon[data-app-key="starfall"]{--icon-accent:#8cf9f0;--icon-accent-2:#ff87d7}.phone-home .home-icon[data-app-key="breakthrough"]{--icon-accent:#8ef8ee;--icon-accent-2:#ff9ed8}.phone-home .home-icon[data-app-key="quick-math"]{--icon-accent:#8ef3df;--icon-accent-2:#ff93d8}.phone-home .home-icon[data-app-key="metronome"]{--icon-accent:#8ef3df;--icon-accent-2:#ff93d8}.phone-home .home-icon[data-app-key="settings"]{--icon-accent:#c4d2ff;--icon-accent-2:#abf0ff}.phone-home .home-icon[data-app-key="revenue"]{--icon-accent:#86f4d9;--icon-accent-2:#9dc4ff}.phone-home .home-icon[data-app-key="success"]{--icon-accent:#ffb5d6;--icon-accent-2:#ffe39b}
.phone-home .home-icon i{outline:1px solid color-mix(in srgb,var(--icon-accent) 75%,transparent);outline-offset:4px;border-color:color-mix(in srgb,var(--icon-accent) 72%,white 18%)!important;box-shadow:inset 0 1px #fff5,0 0 14px color-mix(in srgb,var(--icon-accent) 52%,transparent),0 0 34px color-mix(in srgb,var(--icon-accent-2) 24%,transparent),0 8px 18px #0007!important;animation:squadIconHover 4.6s ease-in-out var(--icon-delay,0s) infinite;transform-style:preserve-3d;transition:transform .35s cubic-bezier(.2,.9,.2,1),filter .35s,box-shadow .35s}
.phone-home .home-icon i svg{filter:drop-shadow(0 0 7px color-mix(in srgb,var(--icon-accent) 70%,transparent)) saturate(1.12)}
.phone-home .home-icon:hover i{animation-play-state:paused;transform:translateY(-4px) rotateX(6deg) rotateY(-7deg) scale(1.05);filter:brightness(1.13) saturate(1.14);box-shadow:inset 0 1px #fff8,0 0 22px var(--icon-accent),0 0 48px color-mix(in srgb,var(--icon-accent-2) 42%,transparent),0 13px 24px #0008!important}
@keyframes squadIconHover{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-3px) rotate(.7deg)}}

/* Drag feedback and magnetic snap. */
.reorder-mode .home-icon{cursor:grab;touch-action:none}.reorder-mode .home-icon:after{content:'⠿  DRAG';position:absolute;top:3px;right:7px;padding:4px 7px;border:1px solid var(--icon-accent);border-radius:999px;background:#0d1323e8;color:var(--icon-accent);font:700 7px 'DM Mono';letter-spacing:.08em;box-shadow:0 0 12px color-mix(in srgb,var(--icon-accent) 45%,transparent)}
.home-icon.drag-source{opacity:.2!important}.app-drag-ghost{position:fixed!important;z-index:999!important;margin:0!important;pointer-events:none!important;opacity:.96!important;cursor:grabbing;transition:none!important;filter:drop-shadow(0 20px 28px #0009)}
.app-drag-ghost.landing{transition:left .23s cubic-bezier(.2,.9,.25,1.15),top .23s cubic-bezier(.2,.9,.25,1.15),width .23s,height .23s!important;transform:none!important;filter:drop-shadow(0 0 25px #a9efff88)}
.home-icon.snap-settle i{animation:squadSnap .38s cubic-bezier(.2,1.35,.35,1)!important}@keyframes squadSnap{0%{transform:scale(.86)}55%{transform:scale(1.09)}100%{transform:scale(1)}}

/* Shared application navigation. */
.squad-app-nav{min-height:66px!important;display:grid!important;grid-template-columns:minmax(92px,1fr) auto minmax(92px,1fr)!important;align-items:center!important;gap:12px!important;padding-inline:max(16px,calc((100vw - 1180px)/2))!important;background:var(--squad-nav)!important;border-bottom:1px solid #9fefff2f!important;backdrop-filter:blur(20px) saturate(1.35)!important;color:var(--squad-text)!important}
.squad-app-nav>.squad-home-shortcut{justify-self:start!important;display:flex;align-items:center;gap:7px;min-width:88px!important;min-height:42px!important;padding:0 14px!important;border:1px solid #9fefff55!important;border-radius:999px!important;background:color-mix(in srgb,var(--squad-panel) 90%,transparent)!important;color:var(--squad-text)!important;font:700 9px 'DM Mono'!important;letter-spacing:.1em!important;box-shadow:inset 0 1px #fff2!important}.squad-app-nav>.squad-home-shortcut span{color:#a9efff;font-size:14px}.squad-app-nav>span,.squad-app-nav>.brand{justify-self:center;text-align:center}.squad-app-nav>:last-child{justify-self:end}

/* True light mode for the suite shell and common card surfaces. The games keep
   their dark playfields so contrast and effects remain intact. */
html[data-squad-theme="light"] body{background:#eaf4f8;color:#142039}
html[data-squad-theme="light"] .phone-home{background:radial-gradient(circle at 82% 8%,#d9c8ff99,transparent 33%),radial-gradient(circle at 8% 84%,#b7f3e4aa,transparent 36%),linear-gradient(145deg,#f9fcff,#eaf5fa 58%,#e7eefb)!important;color:#142039!important}
html[data-squad-theme="light"] .phone-home:before{background:radial-gradient(circle at 20% 16%,#40678344 0 2px,transparent 3px),radial-gradient(circle at 80% 45%,#8c63ad44 0 1px,transparent 2px),repeating-linear-gradient(0deg,transparent 0 6px,#20394a05 7px)!important}
html[data-squad-theme="light"] .squad-header h1,html[data-squad-theme="light"] .home-icon,html[data-squad-theme="light"] .phone-footer{color:#142039!important;text-shadow:none}
html[data-squad-theme="light"] .squad-header p{color:#38566d!important}html[data-squad-theme="light"] .app-page .home-icon small{color:#38566d!important;opacity:1!important}
html[data-squad-theme="light"] .install-icon,html[data-squad-theme="light"] .reorder-toggle,html[data-squad-theme="light"] .launcher-dots{background:#fff;color:#1c374c;border-color:#496a8266;box-shadow:0 10px 30px #38576f26}
.install-icon:after{font-size:12px!important;line-height:1!important;color:inherit!important}
html[data-squad-theme="light"] .phone-home .home-icon{background:linear-gradient(145deg,#fff,#eef5fa);border-color:#58778d55;box-shadow:inset 0 1px #fff,0 14px 34px #36546c1f}html[data-squad-theme="light"] .phone-home .home-icon .app-name b{color:#13283d!important}html[data-squad-theme="light"] .phone-home .tooltip-trigger{color:#17677c;border-color:#3da2b280}html[data-squad-theme="light"] .phone-home .tooltip-trigger:is(:hover,:focus-visible,.open){background:#17677c;color:#fff}html[data-squad-theme="light"] .phone-home .app-tooltip{background:#fff;color:#173047;border-color:#5b7b925c;box-shadow:0 12px 30px #233e5552}
html[data-squad-theme="light"] :is(main.app,.levelup-module,.crowned-module,.signal-module,.settings-module,.focus-module){background:radial-gradient(circle at 86% 6%,#d9cbff77,transparent 30%),radial-gradient(circle at 6% 76%,#bcefe855,transparent 34%),#eef6fa!important;color:#142039!important}
html[data-squad-theme="light"] :is(.levelup-panel,.squad-summary,.weekly-move,.crowned-form,.room-stage,.room-top,.room-roster,.settings-card,.focus-panel,.signal-card,.signal-results>section,.controls,.advanced-settings){background:#ffffffd9!important;color:#142039!important;border-color:#53778e3d!important;box-shadow:inset 0 1px #fff,0 18px 44px #46657c17!important}
html[data-squad-theme="light"] :is(.levelup-module,.crowned-module,.signal-module,.settings-module,.focus-module) :is(p,small,label){color:#57677a}
html[data-squad-theme="light"] :is(.levelup-module,.crowned-module,.signal-module,.settings-module,.focus-module) :is(h1,h2,h3,h4,b,strong){color:#142039}
html[data-squad-theme="light"] .starfall-module{background:#dfeef6!important}.starfall-module .starfall-stage{background:#080b1b}
html[data-squad-theme="light"] .starfall-title>p{color:#435b72!important}html[data-squad-theme="light"] .starfall-title>div>p{color:#177f88!important}html[data-squad-theme="light"] .starfall-title h1{color:#17304a;text-shadow:none}

/* Starfall: keep the entire level-clear composition inside the stage's true
   center and prevent the third metric from establishing an oversized grid. */
.level-complete-overlay{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;overflow:hidden!important}
.level-complete-overlay .starfall-menu.clear{flex:0 1 560px;min-width:0!important;width:min(560px,100%)!important;max-width:100%!important;margin:0 auto!important;padding:110px 4px 0!important;box-sizing:border-box!important;text-align:center!important}
.level-complete-overlay .clear-stats{width:min(430px,100%)!important;max-width:100%!important;min-width:0!important;margin-inline:auto!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
.level-complete-overlay .clear-stats b{min-width:0!important;width:auto!important}.level-complete-overlay .starfall-clear-burst{top:34%!important}
@media(max-width:899px){.level-complete-overlay{padding:12px!important}.level-complete-overlay .starfall-menu.clear{flex-basis:100%;padding:94px 0 0!important;transform:none!important}.level-complete-overlay .starfall-clear-burst{top:34%!important}.level-complete-overlay .clear-stats{gap:5px!important}.level-complete-overlay .clear-stats b{font-size:12px!important;padding-inline:2px!important}.squad-app-nav{grid-template-columns:82px 1fr 82px!important;padding-inline:12px!important}.squad-app-nav>.squad-home-shortcut{min-width:74px!important;padding:0 11px!important}.squad-app-nav>.squad-home-shortcut b{font-size:8px}}
@media(max-width:899px){.squad-theme-toggle{min-width:128px;min-height:34px;margin:7px auto 2px;padding:0 13px;font-size:8px}.squad-theme-toggle span{font-size:14px}}
@media(prefers-reduced-motion:reduce){.phone-home .home-icon i,.home-icon.snap-settle i{animation:none!important}.app-drag-ghost,.app-drag-ghost.landing{transition:none!important}}
