BEIJING — For much of the past century, the Forbidden City has been an imposing void in the otherwise bustling heart of Beijing .

The 180-acre compound, where emperors and their advisers plotted China’s course for centuries, was stripped of its purpose when the last emperor abdicated in 1912. Since then, the palace grounds have at times lain empty or been treated as a perfunctory museum, with most of the halls closed to the public and the few that were open crammed with tourists on package tours.

But as the Forbidden City approaches its 600th birthday next year, a dramatic change has been taking place , with even dark and dusty corners of the palace restored to their former glories for all to see.

As recently as 2012, only 30 percent of the vast complex was open to the public. Now, 80 percent is accessible — quickly filling with exhibition spaces, stylish restaurants and cafes, bookstores, and highly profitable gift stores, as well as quiet walkways, shady stands of trees and odd nooks that invite contemplation of bygone dynasties.