/* Bar life (2026-10-19, after nav-premium.css + top-premium.css): both menu trays catch the sky's light (body[data-daylight], v2-launch.js),
   their stitching takes the color of the place you're in, the goal's prize wiggles when you're close, the level shows on your medallion,
   and coin numbers roll (bar-life.js). Calm mode keeps its own dark tray. */
:root{--bl-thread:#e9d3b3}
/* the picked tab decides (the Games screen opens over whatever place you were in) */
body:has(nav.bottom-nav[data-tone=town]){--bl-thread:#a9dcc2}
body:has(nav.bottom-nav[data-tone=home]){--bl-thread:#f1bcd0}
body:has(nav.bottom-nav[data-tone=trade]){--bl-thread:#cdb9ef}
body:has(nav.bottom-nav[data-tone=play]){--bl-thread:#f3d27e}
html:root body.has-goal-bar .topbar>.tb-tray::after,html:root body.ui2 nav.bottom-nav.nd.nd::after{border-color:var(--bl-thread)!important;mix-blend-mode:normal!important;transition:border-color .5s ease}
html:root body.has-goal-bar.calm-mode .topbar>.tb-tray::after{border-color:#ffffff30!important}

/* sky light: a warm rim at sunset, a rosy one in the morning */
html:root body[data-daylight=evening]:not(.calm-mode) :is(.topbar>.tb-tray,nav.bottom-nav.nd.nd){box-shadow:inset 0 3px 0 #fff4df,inset 0 -3px 0 #f0d8b8,0 5px 0 #e4c9a4,0 6px 0 #d8b88f,0 0 0 1.5px #ffd9a866,0 -4px 16px -4px #ffb37a66,0 16px 26px -12px #6b452680!important}
html:root body[data-daylight=morning]:not(.calm-mode) :is(.topbar>.tb-tray,nav.bottom-nav.nd.nd){box-shadow:inset 0 3px 0 #fff,inset 0 -3px 0 #f0dcc0,0 5px 0 #e4c9a4,0 6px 0 #d8b88f,0 0 0 1.5px #ffd6e466,0 -4px 16px -4px #ffc3d866,0 16px 26px -12px #6b452670!important}
/* night (not calm mode): moonlit cream with a lilac lip and a few twinkling stars on the top tray */
html:root body[data-daylight=night]:not(.calm-mode) :is(.topbar>.tb-tray,nav.bottom-nav.nd.nd){background:radial-gradient(90% 140% at 50% -20%,#fbfaff 0%,#f1eefb 55%,#e2dcf3 100%)!important;box-shadow:inset 0 3px 0 #fff,inset 0 -3px 0 #d9d1ee,0 5px 0 #c9bfe4,0 6px 0 #b5a8d8,0 0 14px -2px #b9a8ff55,0 16px 26px -12px #2a1d4a99!important}
html:root body[data-daylight=night]:not(.calm-mode) nav.bottom-nav.nd.nd::before{background:linear-gradient(#e4ddf566,#fff0 60%)!important;box-shadow:inset 0 2px 4px #8d7cc033!important}
html:root body[data-daylight=night]:not(.calm-mode) .topbar>.tb-tray::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
 background:radial-gradient(1.6px 1.6px at 12% 30%,#b9a8ff,transparent),radial-gradient(1.4px 1.4px at 34% 74%,#d6b8ff,transparent),radial-gradient(1.8px 1.8px at 58% 22%,#b9a8ff,transparent),radial-gradient(1.4px 1.4px at 81% 70%,#d6b8ff,transparent),radial-gradient(1.6px 1.6px at 93% 28%,#b9a8ff,transparent);animation:bl-twinkle 3.6s ease-in-out infinite}
@keyframes bl-twinkle{0%,100%{opacity:.35}50%{opacity:1}}

/* the goal's prize gets excited when you're close (bar-life.js sets .bl-close) */
html body.has-goal-bar .ui2-goal.bl-close .ui2-goal-toy{animation:bl-eager 1.6s ease-in-out infinite;transform-origin:50% 90%}
@keyframes bl-eager{0%,55%,100%{rotate:0deg;scale:1}65%{rotate:-12deg;scale:1.12}75%{rotate:10deg;scale:1.12}85%{rotate:-5deg;scale:1.05}}

/* your level on the medallion: a little gold star with the number */
html:root body.has-goal-bar.ui2 .ui2-bar .ui2-me{overflow:visible!important}
html:root body.has-goal-bar.ui2 .ui2-bar .ui2-me .v2q-lv{display:grid!important;place-items:center;position:absolute;right:-7px;bottom:-6px;width:22px;height:22px;min-width:0;padding:0;border:0;border-radius:0;background:none;z-index:3;font:900 11px/1 "Grandstander",ui-rounded,system-ui,sans-serif;color:#6b4a12;padding-top:2px;box-sizing:border-box}
html:root body.has-goal-bar.ui2 .ui2-bar .ui2-me .v2q-lv::before{content:"";position:absolute;inset:-2px;z-index:-1;background:linear-gradient(#ffe27a,#f5b84a);clip-path:polygon(50% 0,63% 33%,98% 35%,70% 57%,80% 93%,50% 73%,20% 93%,30% 57%,2% 35%,37% 33%);filter:drop-shadow(0 0 0 #fff)}
html:root body.has-goal-bar.ui2 .ui2-bar .ui2-me .v2q-lv::after{content:"";position:absolute;inset:-4.5px;z-index:-2;background:#fff;clip-path:polygon(50% 0,63% 33%,98% 35%,70% 57%,80% 93%,50% 73%,20% 93%,30% 57%,2% 35%,37% 33%)}

/* rolling coin digits (bar-life.js lays them over the number while it changes) */
html body.has-goal-bar .ui2-bar>.ui2-coins.tb-coins.bl-rolling::after{visibility:hidden}
html:root body.has-goal-bar .ui2-bar>.ui2-coins.tb-coins>.bl-roll{display:flex!important}
.bl-roll{position:absolute;top:0;bottom:0;display:flex;align-items:center;pointer-events:none;z-index:2;color:#6b3f08;-webkit-text-stroke:5px #fffbe6;paint-order:stroke fill;letter-spacing:.5px;line-height:1}
.bl-roll>span{position:relative;display:block;height:1.2em;overflow:hidden;padding:0 3px;margin:0 -3px}
.bl-roll>span>span{display:flex;flex-direction:column;line-height:1.2em}
.bl-roll>span>span>i{font-style:normal;height:1.2em}

@media(prefers-reduced-motion:reduce){html:root body[data-daylight=night] .topbar>.tb-tray::before,html body.has-goal-bar .ui2-goal.bl-close .ui2-goal-toy{animation:none}}
/* the trade tab: two squishies swapping, in the same clay as the other tabs (the old hands icon stays for other uses) */
html:root body.ui2 nav.bottom-nav .nav-trade .world-art{background-image:url('./assets/expansion-web/16-navigation-icons/trade-v2.webp')!important;background-size:contain!important;background-position:50% 60%!important;background-repeat:no-repeat!important}

/* Night menus follow the existing clock/manual night state, including Calm.
   Keep the toy art colorful; darken the trays, wells and label surfaces only. */
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) :is(.topbar>.tb-tray,nav.bottom-nav.nd.nd){background:radial-gradient(90% 140% at 50% -20%,#41476b 0%,#2c3153 55%,#222640 100%)!important;box-shadow:inset 0 3px 0 #68729a,inset 0 -3px 0 #1a1d35,0 5px 0 #191c33,0 6px 0 #11152b,0 16px 26px -12px #080d24bb!important}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) :is(.topbar>.tb-tray,nav.bottom-nav.nd.nd)::after{border-color:#9ca9d15c!important}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) nav.bottom-nav.nd.nd::before{background:linear-gradient(#11183166,#28304d00 70%)!important;box-shadow:inset 0 2px 4px #080d2444!important}
html:root body.ui2.has-goal-bar:is(.night-time,.calm-mode,[data-daylight=night]) .ui2-bar.ui2-bar>:is(.tb-today,.calm-mode-x,.sq-top-collection,.calm-moon,.ui2-goal){background:radial-gradient(120% 100% at 50% 0%,#505b80,#343e61 75%,#2b3455)!important;border-color:#8794b6!important;color:#f5edff!important}
html:root body.ui2.has-goal-bar:is(.night-time,.calm-mode,[data-daylight=night]) .ui2-bar.ui2-bar>.ui2-me{background:radial-gradient(circle at 50% 35%,#5b6e83,#34465e 70%)!important;border-color:#aab6cc!important;box-shadow:0 0 0 2.5px #b9a66e,0 0 0 4px #50516a,0 4px 0 2px #252b44,0 7px 10px #080d2444!important}
html:root body.ui2.has-goal-bar:is(.night-time,.calm-mode,[data-daylight=night]) .ui2-goal-left{color:#f5edff!important;text-shadow:none!important}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) nav.bottom-nav.nd.nd>button[data-view]>span:not(.nav-toy){background:#404c70;color:#fff3d3;box-shadow:0 2px 0 #1a213d}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) .nd-pad::before{background:radial-gradient(closest-side,#aeb9dd55 0%,#aeb9dd33 35%,transparent 100%)}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) .nd-pad::after{background:linear-gradient(#c1cbea33,#fff0 60%),#56658b;box-shadow:inset 0 -3px 0 #303e62,0 2px 4px #080d2466}
html:root body.ui2:is(.night-time,.calm-mode,[data-daylight=night]) nav.bottom-nav.nd.nd>button.active .nav-toy{filter:drop-shadow(0 10px 7px #080d2466) drop-shadow(0 0 7px #a7b8e455)}
