Genre pictures like “The Nice Guys” that defy easy classification are an endangered species these days, relics of a time where big studio movies didn’t require some sort of attachment to a pre-existing brand.

So this period action-comedy/shaggy dog story, co-written and directed by Shane Black (“Kiss Kiss Bang Bang,” an even better example of the formula), earns points for its sheer novelty: a broad summer motion picture that is rooted in terrain resembling reality, albeit a stylized ’70s Los Angeles version of it.

It’s a flawed movie, with a plot that re-defines the meaning of the word “inconsequential,” but it benefits from sharp casting, with Ryan Gosling and Russell Crowe playing broadly against type, and from Black’s carefully honed eye for sly absurdities.

Gosling plays private investigator Holland March, teamed with enforcer Jackson Healy (Crowe) to locate the missing daughter of a governmental bigwig (Kim Basinger).

None of this matters in the slightest.

The movie offers a substantial re-creation of the tacky world of the Hollywood Hills and the Sunset Strip during the time of flashy velvet and elaborate floral patterns — in many respects it also feels like a ’70s movie — but its fundamental appeal has less to do with accomplished production design than it does the fundamental appeal of watching big movie stars stretch outside their comfort zones.

“The Nice Guys” turns on the chemistry between Gosling’s manic detective and Crowe’s tough-but-humorous Healy.

These accomplished dramatic thespians fully buy into the deadpan style tinged with a funky aesthetic, in which brutal beatings mesh seamlessly with pratfalls, and tributes to Abbott & Costello comfortably reside along sequences that might have felt at home in “Boogie Nights.”

Gosling is a particular revelation, tumbling down hills, plunging off skyscrapers and shrieking in wild terror with great abandon. It’s a mistake to be surprised when great dramatic actors demonstrate such pristine comic chops — acting is acting, afterall — but there’s something freeing about watching a man largely known for the seriousness of films like “Blue Valentine” usher in what feels like a new chapter.

That the comedy is derived from truths rather than exaggerations — if you toss a gun to someone during a shootout, there’s a good chance you might miss and it might plunge through a window — only enhances it all.