/* v516 — polished accessory art + sticky studio + horizontal-only drawers */
body.avatar-page.gg-avatar-v516 #ggV514Center{
  position:relative!important;top:auto!important;z-index:auto!important;align-self:start;
  filter:none;
}
body.avatar-page.gg-avatar-v516 #ggV514Center>#ggAvatarSwitcherV339{
  position:relative!important;inset:auto!important;transform:none!important;z-index:130!important;
  width:100%!important;margin:0 0 8px!important;padding:7px!important;
  background:linear-gradient(145deg,#f7f9fc,#d7dde5 50%,#aeb7c3)!important;border:1px solid #8f98a6!important;border-radius:17px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78),0 8px 18px rgba(28,34,44,.12)!important;
}
body.avatar-page.gg-avatar-v516 #ggV515StudioWrap{position:relative!important;width:100%!important}
body.avatar-page.gg-avatar-v516 #ggV515StudioWrap>#avatarStage{padding-top:0!important;position:relative;z-index:121}

/* main dropdown rails: never become tall grids */
body.avatar-page.gg-avatar-v516 #ggV515SubNav,
body.avatar-page.gg-avatar-v516 #optionLoop,
body.avatar-page.gg-avatar-v516 #ggV515HandsPanel,
body.avatar-page.gg-avatar-v516 #ggV515Favorites,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .pet-grid,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .skin-row,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .accessory-row{
  display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;gap:9px!important;
  overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important;width:100%!important;
  scroll-snap-type:x proximity!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;padding:9px!important;
}
body.avatar-page.gg-avatar-v516 #ggV515SubNav::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 #optionLoop::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 #ggV515HandsPanel::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 #ggV515Favorites::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .pet-grid::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .skin-row::-webkit-scrollbar,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .accessory-row::-webkit-scrollbar{display:none}
body.avatar-page.gg-avatar-v516 #optionLoop>button{flex:0 0 118px!important;width:118px!important;min-width:118px!important;scroll-snap-align:start!important}
body.avatar-page.gg-avatar-v516 #ggV515SubNav>button{flex:0 0 auto!important;white-space:nowrap!important;scroll-snap-align:start}
body.avatar-page.gg-avatar-v516 #ggV515HandsPanel>button{flex:0 0 124px!important;min-width:124px!important}
body.avatar-page.gg-avatar-v516 #ggV515Favorites>button{flex:0 0 160px!important;min-width:160px!important}
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .pet-grid>button{flex:0 0 150px!important;min-width:150px!important;scroll-snap-align:start}
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .skin-row>strong,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .accessory-row>strong{flex:0 0 100%;display:none!important}
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .skin-row>button,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .accessory-row>button{flex:0 0 auto!important;min-width:118px!important;white-space:nowrap!important}

/* familiar mode is a dedicated rail: avatar-only menus disappear completely */
body.avatar-page.gg-avatar-v516.gg-v516-familiar-mode #ggV515CategoryShell,
body.avatar-page.gg-avatar-v516.gg-v516-familiar-mode #optionDrawer,
body.avatar-page.gg-avatar-v516.gg-v516-familiar-mode #ggAvatarSearchV144{display:none!important}
body.avatar-page.gg-avatar-v516.gg-v516-familiar-mode #ggV514Right{padding:0!important;background:transparent!important;border:0!important}
body.avatar-page.gg-avatar-v516.gg-v516-familiar-mode #ggFamiliarBuilderV339{display:block!important;max-height:none!important;overflow:visible!important}

/* New accessory art language: rounded, dimensional, glossy without killing animations. */
#avatarSvg :is(#eyeAccessory,#lashAccessory,#mouthAccessory,#beakAccessory,#earAccessory,#facialHair,#extraAccessory,#extraAccessory2,#headAccessory).gg-v516-redesigned{transform-box:fill-box;transform-origin:center}
#avatarSvg :is(#eyeAccessory,#extraAccessory,#extraAccessory2,#headAccessory) .gg-v516-art-shine{mix-blend-mode:screen}
#avatarSvg #eyeAccessory :is(rect,circle,ellipse,path,polygon){stroke-linecap:round!important;stroke-linejoin:round!important}
#avatarSvg #eyeAccessory :is(rect,circle,ellipse)[fill*="rgba"],
#avatarSvg #eyeAccessory :is(rect,circle,ellipse)[fill-opacity]{filter:saturate(1.08) brightness(1.05)}
#avatarSvg :is(#extraAccessory,#extraAccessory2,#headAccessory) :is(path,rect,circle,ellipse,polygon){stroke-linejoin:round!important}
#avatarSvg #facialHair{transform:translateY(8px);transform-box:fill-box;transform-origin:center}

/* Option cards inherit the same black/gold/purple premium treatment. */
body.avatar-page.gg-avatar-v516 #optionLoop>button,
body.avatar-page.gg-avatar-v516 .gg-v515-sub-btn,
body.avatar-page.gg-avatar-v516 .gg-v515-hand-option,
body.avatar-page.gg-avatar-v516 .gg-v515-fav-chip,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 button{
  background:linear-gradient(145deg,#f4f4f4 0%,#d1d1d1 48%,#b7b7b7 100%)!important;border:1px solid #51465a!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 4px 10px rgba(0,0,0,.18)!important;
color:#181818;}
body.avatar-page.gg-avatar-v516 #optionLoop>button:is(.active,.selected,[aria-pressed="true"]),
body.avatar-page.gg-avatar-v516 .gg-v515-sub-btn.active,
body.avatar-page.gg-avatar-v516 .gg-v515-hand-option.active,
body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 button.active{
  background:linear-gradient(145deg,#f4f4f4 0%,#d1d1d1 48%,#b7b7b7 100%)!important;border-color:#e0bd62!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),0 0 16px rgba(222,183,88,.2)!important;color:#181818;}

@media(max-width:760px){
  body.avatar-page.gg-avatar-v516 #ggV514Center{top:4px!important}
  body.avatar-page.gg-avatar-v516 #ggV514Center>#ggAvatarSwitcherV339{width:100%!important;margin-bottom:5px!important}
  body.avatar-page.gg-avatar-v516 #avatarStage{min-height:360px!important;max-height:52vh!important}
  body.avatar-page.gg-avatar-v516 #avatarSvg{max-height:52vh!important}
  body.avatar-page.gg-avatar-v516 #optionLoop>button{flex-basis:108px!important;width:108px!important;min-width:108px!important}
  body.avatar-page.gg-avatar-v516 .gg-familiar-builder-v339 .pet-grid>button{flex-basis:132px!important;min-width:132px!important}
}
