The elderly Chinese men and women who gather each morning in Portsmouth Square for their tai chi routines would seem to have little to do with a proposed hotel, office and condo complex a half-mile away at First and Mission streets.

But in compact San Francisco, where high end and low end mingle cheek by jowl, the shadows that the proposed 2 million-square-foot Oceanwide Center at 50 First St. would cast on two Chinatown open spaces have emerged as the biggest political hurdle to the approval of what would probably be downtown San Francisco’s last mega-project.

Designed by British Pritzker Prize-winning architect Norman Foster, Oceanwide Center would include a 905-foot skyscraper with more than 1 million square feet of office space and 19 floors of condominiums. A second, shorter tower would contain 169 hotel rooms with an additional 154 condos. The taller of the two buildings would be the city’s second tallest, topped only by the Salesforce Tower, which is under construction at 101 First St. and will reach 970 feet.

For boosters of the nascent Transbay Transit District, the Oceanwide Center is key not just for the office space, hotel rooms and housing units it would generate, but also for the hundreds of millions of dollars in taxes and fees it would pump into the struggling Transbay Transit Center, a project the city is bailing out with a $260 million loan.

The project, which heads to the Planning Commission on Thursday for approval, would generate $117 million in one-time impact fees, which would probably be paid in November, when Oceanwide is expecting to obtain construction permits. In addition, it would pay about $647 million in Mello-Roos special taxes over 30 years, which would fund infrastructure in the Transbay district, including a possible Caltrain rail extension into the Transit Center.

1984 proposition in play

But critics argue that economic benefits don’t justify a violation of 1984’s Proposition K — the “Sunlight Ordinance” — which blocks construction of any building over 40 feet that casts an adverse shadow on Recreation and Park Department property unless the Planning Commission decides the shadow is insignificant.

The project would throw a shadow on Portsmouth Square between 8:05 and 9:10 a.m. from late October to early February. It would shadow St. Mary’s Square, also in Chinatown, in March and September. It would also shadow Justin Herman Plaza, at the foot of Market Street, from mid-October to late February, and Union Square from early May to early August.

“It really clobbers Portsmouth Square,” said Allan Low, an attorney and a member of the Recreation and Park Commission.

After six months of negotiating with the city, Oceanwide Holdings — a Chinese developer that also has projects in New York and Los Angeles — has agreed to mitigate the shadows with a $12 million endowment for recreation and parks programming in Chinatown, a fund that will help pay for amenities like sports, after-school programs and senior fitness programs, said Low, who helped hammer out the deal.

Needed funding

“I am loath to negotiate a cash-for-shadow deal, but to their credit, Oceanwide did recognize the significant impact their project will have on Portsmouth Square and the Chinatown parks,” he said.

He said funding for programming is desperately needed.

“We can build the parks, but we have to have money for programs and services for the people in the parks,” Low said. “For the majority of people in Chinatown, the parks and recreation centers are the only open spaces to go outside of their SRO rooms.”

The commitment to Chinatown recreation is not enough to appease those who have fought to keep shadows out of city parks. Bill Maher, a former supervisor and director of the Department of Parking and Traffic who wrote Prop. K, said trading shadows for dollars is “flatly illegal.” Prop. K’s shadow-limiting powers are clear, he said.

“Planners have completely disregarded the voters’ decision on Prop. K,” Maher said. “They have simply administratively overruled the voters. They have changed the rules, without legal authority, to say the economic value of the project is the driving force. If that is the case, no park will survive.”

He added: “Once you build a building, you can never get the park back. Downtown will become a perennial wind tunnel of darkness.”

Attorney Sue Hestor, who also worked on Prop. K legislation, agreed.

Housing concerns, too

“Everyone throws money at things, but shadows are shadows,” said Hestor, who has long been involved in battles over development. “Portsmouth Square is the living room for people who live in 10-by-10 rooms,” she said.

In addition to the shadow issue, Oceanwide has faced blowback from affordable housing proponents, who contend the project will exacerbate already inflated housing prices. The Oceanwide project will probably stand out even in a neighborhood becoming defined by high-end buildings like Lumina and Millennium Tower. Plans call for a a 17,000-square-foot, ultra-luxury penthouse at the top of the taller tower, the city’s largest. No price has been set, but it is likely to surpass the $49 million being asked for the 15,000-square-foot penthouse at nearby Lumina.

To meet that headwind, Oceanwide has agreed to pay $40 million for off-site affordable housing, $33 million of which would go toward making permanent existing affordable housing stock within a mile of the project, according to Jeff Buckley, senior housing policy director for Mayor Ed Lee.

“Over the past several months, Oceanwide has worked closely with affordable housing and park advocates on a comprehensive community benefits package that will improve Chinatown parks and allow the city to secure affordable housing sites and SRO hotels within a 1-mile radius of the project,” said Boe Hayward, who led the negotiations on behalf of Oceanwide.

Stabilizing residential hotels

The $33 million would target apartment buildings and residential hotels in Chinatown, an area that is increasingly attractive to investors looking to take advantage of the city’s astronomical rents.

“We felt they could do more, and to their credit, they understood that,” Buckley said. “We have invested a lot of money in stabilizing SROs in the Mission and the Tenderloin and Sixth Street. Chinatown we have not invested in, largely because it wasn’t necessary. But in the last few years we have seen a dramatic rent increase for vacant units in Chinatown. We want to make sure the housing stock will remain affordable.”

An additional $7 million would go to new construction of affordable housing at Fourth and Folsom streets, a parcel owned by the Metropolitan Transportation Commission.

“The craziness of the real estate market is impacting us in ways that we have not seen before,” said Malcolm Yeung, deputy director of the Chinatown Community Development Center. “This will allow us to stabilize some Chinatown buildings in ways that have not done before.”

And the project is big in more than just size. If approved, Oceanwide Center would be the last major office development passed until next year, because it alone will eat up two-thirds of the 1.5 million square feet of office space available for 2016 under the Proposition M office-space cap passed by voters in 1986.

“It’s sort of the swan song in terms of big downtown projects because there are not that many sites,” said Josh Switzky, who heads up citywide planning for the Planning Department.

J.K. Dineen is a San Francisco Chronicle staff writer. Email: jkdineen@sfchronicle.com Twitter: @SFjkdineen