Marijuana is legal in Maine, sort of.

Adults age 21 and up can possess it. They can also smoke it, cook with it and eat it. They can even give it away.

But, what they can’t do – more than a year after it was legalized by referendum – is buy it or sell it, which raises the question of where all this legal pot is supposed to be coming from.

It’s a system that’s designed for confusion and abuse, one that creates uncertainty for honest entrepreneurs who might want to invest in taxpaying businesses and makes life easier for those who don’t mind breaking the law.

We can call it “The LePage Doctrine,” named for the person most responsible for the disordered state of the law.

Gov. LePage campaigned against the referendum and ended up on the losing side.

In November, he scuttled a 10-month process to write the rules for legal sales by vetoing a bipartisan bill that would have set up a regulated market to replace the black market and honor the will of the voters.

LePage didn’t have the votes to repeal the citizen-initiated law or to pass a regulatory scheme more to his liking, but he did have House Republican Leader Ken Fredette, who was able to hold enough of his caucus together to deny the regulation bill the two-thirds support it would have needed to pass over the governor’s objection.

LePage won the day, but he and his allies have created a regulatory mess, and they own it. Despite voters saying that marijuana sales should be taxed and governed by rules like those for alcohol, the state can’t collect a dime from what may develop into a $325 million-a-year industry, and it can’t regulate who gets to sell it, what products are sold, where they are sold or to whom.

While it’s illegal to sell marijuana, it is perfectly legal to sell a container that happens to be full of marijuana, as long as the pot inside is considered a gift. Someone could pay a drug dealer an exorbitant fee to deliver “free” pot, without coming into conflict with the law or paying a sales tax.

It’s the worst of all worlds: It’s as if the 21st Amendment were ratified to end Prohibition, but it kept the bootleggers and gangsters in business instead of permitting legal bars and liquor stores.

A bipartisan group of lawmakers is gamely trying again to come up with a regulatory scheme that will get past the governor and his allies. There will be another public hearing and series of work sessions, where the administration and House Republicans will have an opportunity to present their ideas for how it should work.

We hope that this time they can work it out, but ultimately, whether LePage or Fredette think marijuana should be legal doesn’t really matter.

That issue was already decided at the polls, and unless there is an effort to go back to the voters, that is the law. The task for lawmakers in 2018 is to write rules that let sales go forward in a way doesn’t fuel the black market.