Holding a fist up next to his head like a soldier, Huang Chunhao makes a solemn vow.
"I hereby swear an oath: from today onwards, I will correct bad habits, be kind to others and try my best to get rid of gambling addiction."
Gambling was outlawed in mainland China along with other activities deemed vices by the Communist Party when it took over in 1949, but is making a comeback via websites and apps aimed at Chinese customers and based offshore.
One of these, based in the Philippines, dragged Huang into what his wife Zhao Jing called a "bottomless pit" of compulsive wagering that left them more than two million yuan ($290,000) poorer.
"It always will be a losing game and has ripped my family apart," said Huang, a 32-year-old vegetable wholesaler.
Helping him climb out this hole is Si Guoqi, a former hair salon owner and self-proclaimed gambling expert who now operates a Shanghai rehabilitation centre.
Established in 2017, it has been billed as the country's first rehab solely dedicated to gambling addiction.
During the centre's standard week-long programme, participants are given an old mobile phone without internet access to prevent them from logging on and placing bets.
Treatment is a mix of behind-the-scenes education on how gambling is arranged to ensure that "the house always wins", psychological treatment and advice on lifestyle changes to promote healthy routines and keep one's mind off gambling.
- 'You can't get away' -
Si's own family was nearly torn apart by his wife's compulsive gambling at the Chinese game mahjong, and he used to sell mahjong-playing equipment.
He calls online gambling a "virus".
"If it activates your greed, you can't get away," he said.
With the growth of internet access and mobile communications in China, increasing numbers of operators are seeking to take advantage with Chinese-language gambling platforms, according to official data.
Online gambling options abound, offering everything from baccarat to blackjack and sports betting.
Si estimates that 70 percent of such operators set up servers in the Philippines.
In the first half of 2020, Chinese police busted more than 250 cross-border gambling cases, arresting more than 11,500 suspects, according to state media.
Gambling was a huge business in China in pre-Communist times, and there are signs of growing official unease that it could return.
The central government is even planning to impose restrictions on Chinese citizens travelling to overseas tourist destinations where gambling is rife, state news agency Xinhua reported on August 26.
- 'I can't be slack' -
Online platforms sometimes entice unwitting victims with ruses -- Huang clicked a pop-up ad for a part-time jobs site but was quickly diverted into gambling.
He lost 80,000 yuan in one bet as his debts spiralled.
This year's lengthy pandemic lockdowns made it worse as Huang attempted to use the time to recoup past losses.
His debts forced him to sell his family's home in rural eastern China, and his wife –- from whom Huang once surreptitiously syphoned away 30,000 yuan -– divorced him.
Up to 50 people enrol in the centre's programme per month and Si says he has helped more than 10,000 people over the past dozen years. Many are tech-savvy teens.
Though they are now divorced, Huang's wife Zhao Jing is supporting him as he battles his demons.
They now plan to work toward clearing his debts within a year, get remarried and make a new start.
"Seeing how much he has changed, I'm more than 90 percent reassured, Zhao said.
"But I can't be slack."