/* Shared shell only. Game canvases and avatar/lesson palettes keep their colours. */
html body:has(#app){--ink:#173650;--muted:#526d83;--purple:#086bb4;--accent:#086bb4;--ui-accent:#086bb4;--ui-line:#c5dbea;background:#f1f7fc!important;color:#173650!important}
html body:not(.isSignedOut) > header.topbar{box-sizing:border-box!important;background:#fff!important;border-color:#c5dbea!important;transform:none!important;filter:none!important;backdrop-filter:none!important;perspective:none!important;contain:none!important;will-change:auto!important;isolation:auto!important}
html body:not(.isSignedOut) > header.topbar .mainNav{box-sizing:border-box!important;max-width:none!important;min-width:0!important;margin:0!important;background:#fff!important;border-color:#c5dbea!important;scrollbar-width:thin;scrollbar-color:#8baec5 transparent}
html body:not(.isSignedOut) > header.topbar .mainNav .navItem{box-sizing:border-box!important;min-height:48px!important;color:#36566e!important;white-space:normal!important;flex-shrink:0!important;cursor:pointer}
html body:not(.isSignedOut) > header.topbar .mainNav .navItem.active{background:#086bb4!important;color:#fff!important;border:1px solid #086bb4!important;box-shadow:none!important}
html body:not(.isSignedOut) > header.topbar .mainNav .navItem:not(.active):is(:hover,:focus-visible){background:#e1f2ff!important;color:#16446a!important;border-color:#87b7d8!important}
html body:not(.isSignedOut) > header.topbar .mainNav .navItem[hidden]{display:none!important}
html body:not(.isSignedOut) > header.topbar :is(.userChip,.nizurBalance){background:#edf6fd!important;color:#173e5d!important;border-color:#c5dbea!important}
html body:not(.isSignedOut) > header.topbar .globalSearch{box-sizing:border-box!important;min-width:0!important;background:#edf6fd!important;border:1px solid #c5dbea!important;color:#173e5d!important}
html body:not(.isSignedOut) > header.topbar .globalSearch input{color:#173e5d!important;min-width:0!important}
html body:not(.isSignedOut) > header.topbar .globalSearch input::placeholder{color:#526d83!important;opacity:1}
html body:not(.isSignedOut) > header.topbar .headerActions :is(button,a){min-height:44px!important;min-width:44px!important}
html body:not(.isSignedOut) > main:has(#app){box-sizing:border-box;min-width:0}
@media(min-width:1201px) and (pointer:fine){
 html body:not(.isSignedOut) > header.topbar{height:88px!important;min-height:88px!important;padding:8px 24px!important;gap:20px!important}
 html body:not(.isSignedOut) > header.topbar .mainNav{position:fixed!important;inset:88px auto 0 0!important;width:218px!important;height:auto!important;max-height:calc(100dvh - 88px)!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;padding:18px 12px!important;gap:6px!important;overflow-x:hidden!important;overflow-y:auto!important;z-index:130!important}
 html body:not(.isSignedOut) > header.topbar .mainNav .navItem{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;padding:12px!important;height:auto!important}
 html body:not(.isSignedOut) > header.topbar .mainNav .navItem span{display:inline!important;font-size:13px!important;line-height:1.35!important}
 html body:not(.isSignedOut) > main:has(#app){margin-left:218px!important;padding:30px clamp(20px,3vw,48px) 48px!important}
}
@media(max-width:1200px),(pointer:coarse){
 html body:has(#app){--mobile-menu-height:80px;padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))!important;min-width:0!important}
 html body:not(.isSignedOut) > header.topbar{position:sticky!important;top:0!important;left:auto!important;right:auto!important;width:100%!important;max-width:none!important;height:auto!important;min-height:124px!important;display:grid!important;grid-template-columns:minmax(72px,1fr) auto!important;grid-template-rows:60px 48px!important;gap:4px 12px!important;padding:4px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important;overflow:visible!important;z-index:140!important}
 html body:not(.isSignedOut) > header.topbar .brand{grid-column:1!important;grid-row:1!important;width:116px!important;min-width:72px!important;max-width:100%!important;flex-basis:auto!important}
 html body:not(.isSignedOut) > header.topbar .nizurBrandLogo{width:116px!important;height:54px!important;max-width:100%!important;object-fit:contain!important}
 html body:not(.isSignedOut) > header.topbar .headerActions{grid-column:2!important;grid-row:1!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:6px!important;min-width:0!important;max-width:none!important;width:auto!important;margin:0!important}
 html body:not(.isSignedOut) > header.topbar .globalSearch{position:relative!important;inset:auto!important;grid-column:1/-1!important;grid-row:2!important;width:100%!important;height:44px!important;max-width:none!important;margin:0!important;transform:none!important;z-index:150!important}
 html body:not(.isSignedOut) > header.topbar .mainNav{position:fixed!important;inset:auto 0 0 0!important;width:100%!important;max-width:100vw!important;height:calc(80px + env(safe-area-inset-bottom,0px))!important;min-height:80px!important;max-height:calc(80px + env(safe-area-inset-bottom,0px))!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;padding:4px max(8px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left))!important;gap:4px!important;border:0!important;border-top:1px solid #bdd3e4!important;border-radius:0!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;touch-action:pan-x;box-shadow:0 -4px 18px #174a6b12!important;z-index:160!important}
 html body:not(.isSignedOut) > header.topbar .mainNav .navItem{display:flex!important;flex:1 0 76px!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;width:76px!important;min-width:76px!important;max-width:110px!important;height:64px!important;min-height:64px!important;padding:6px 4px!important;gap:5px!important;border-radius:12px!important}
 html body:not(.isSignedOut) > header.topbar .mainNav .navItem span{display:block!important;font-size:11px!important;line-height:1.2!important;text-align:center!important;white-space:normal!important}
 html body:not(.isSignedOut) > header.topbar .mainNav .navItem svg{width:22px!important;height:22px!important}
 html body:not(.isSignedOut) > main:has(#app){margin:0!important;padding:20px 14px 24px!important;max-width:100%!important;width:100%!important}
 html body:has(#app) :is(.view,.card,.socialPanel,.profileHero,.shopGrid,.newShopGrid,.adminWorkspace){box-sizing:border-box;min-width:0;max-width:100%}
 html body:has(#app) :is(.accountLayout,.avatarStudio,.adminLayout,.admin3dLayout,.adminWorkspace,.tradeLayout){grid-template-columns:minmax(0,1fr)!important}
 html body:has(#app) :is(.shopFilters,.avatarFilters,.gameCategories,.accountTabs,.bodyPartTabs){max-width:100%;flex-wrap:wrap}
 html body:has(#app) :is(input,select,textarea){font-size:16px}
 html body:has(#app) :is(.dialogButtons,.tryOnActions,.tradePicker,.profileActions){flex-wrap:wrap}
 html body:has(#app) dialog{box-sizing:border-box;max-width:calc(100vw - 20px)!important;max-height:calc(var(--visual-height,100dvh) - 24px)!important;overflow:auto;overscroll-behavior:contain}
 html body:has(#app).gameShellOpen > header.topbar .mainNav,html.mobileKeyboardOpen body > header.topbar .mainNav{display:none!important}
}
@media(max-width:600px){
 html body:not(.isSignedOut) > header.topbar .brand,html body:not(.isSignedOut) > header.topbar .nizurBrandLogo{width:84px!important}
 html body:not(.isSignedOut) > header.topbar .headerActions{gap:3px!important}
 html body:not(.isSignedOut) > header.topbar .headerActions .nizurBalance{padding:6px!important;gap:4px!important;min-width:0!important}
 html body:not(.isSignedOut) > header.topbar .headerActions .nizurBalance small{display:none!important}
 html body:not(.isSignedOut) > header.topbar .headerActions .userChip{padding:0!important}
 html body:not(.isSignedOut) > header.topbar .headerActions #headerUsername{max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px!important;font-size:12px}
 html body:not(.isSignedOut) > header.topbar .headerActions .userAvatar{display:none!important}
 html body:has(#app) :is(.newShopGrid,.tradeInventoryGrid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:380px){html body:not(.isSignedOut) > header.topbar .headerActions #headerUsername{max-width:58px}html body:not(.isSignedOut) > header.topbar .headerActions .tradeHeaderButton{gap:2px!important;padding:4px!important}}
