Afghanistan’s leader has exerted full control over a city that once enjoyed looser social norms, even under Taliban rule.