The future of California’s legal marijuana industry is being shaped in a warren of cubicles tucked inside a retired basketball arena, where a garden of paper cannabis leaves sprouts on file cabinets and a burlap sack advertising “USA Home Grown” dangles from a wall. Here, in the outskirts of Sacramento, a handful of government workers face a daunting task: By next year, craft regulations and rules that will govern the state’s emerging legal pot market, from where and how plants can be grown to setting guidelines to track the buds from fields to stores.