Chinese authorities here want to know what you eat and when you eat it. How you style your hair, how you dress, and what songs are on your iPad or smartphone.
Stung by a string of terrorist attacks by Uighurs, members of a Muslim minority who live in northwestern China's Xinjiang region, the Communist Party has stepped up an intrusive campaign against expressions of religious identity in the group.
Throughout Kashgar, a Silk Road city of 500,000 considered the heartland of the Uighurs, restrictions are enforced by closed-circuit cameras and an army of police and neighborhood patrols.
Black-clad, helmet-wearing paramilitary forces were seen in several locations in recent days, stopping Uighur men to check their IDs and scroll through the playlists of their phones. As for women, they are targeted by the Communist Party's version of the fashion police. Under a local initiative known as Project Beauty, guards at mobile checkpoints detain women whose clothing looks too Islamic.
China's Constitution allows freedom of religious thought, but the Communist Party has always tried to rein in religious fervor, whether by Muslims, Christians or Buddhists. Periods of tolerance are followed by waves of repression. Experts say the repression has gotten worse under the country's new president, Xi Jinping.
Nobody disputes that China is confronting a serious terrorism problem. Since the beginning of last year, nearly 300 people have been killed in violence blamed on Uighur militants.
Among the shockers: a bomb-laden car that plowed down pedestrians under the nose of Mao Tse-tung's iconic portrait at Tiananmen Square, and a gang of men and women dressed ninja-style that slashed random passengers at a train station in Kunming. Last week, 96 people were killed after a gang armed with knives and axes ambushed vehicles on the main road 120 miles south of Kashgar in Shache, also known as Yarkant, authorities said.
Terrorism experts say stringent restrictions on religion could be exacerbating the tension.
"You can't say that because somebody wears a scarf or grows a long beard they are a violent extremist. It is a lazy way for government officials to say they are striking hard against terrorism," said Yang Shu, director of the Institute for Central Asian Studies at Lanzhou University in neighboring Gansu province. "By adopting a hard line against the practice of religion, you risk escalating the conflict."
About 10 million Uighurs live in China. They speak a Turkic language unrelated to Chinese. Theirs is a deeply conservative society, in which couples still are matched in arranged marriages. Unlike young Chinese, who this summer favor cut-off denim shorts in the 90-degree-plus heat, Uighur women wear skirts that cover the knees and sleeves that fall below the elbows.
By all accounts, the prohibitions against Islam are applied more strictly to the Uighurs than to other Chinese Muslims, such as the ethnic Hui people, who resemble the majority Han and live throughout China. During the Muslim holy month of Ramadan, which ended Monday, Kashgar authorities enacted extraordinary measures to prevent people from observing the ritual fast, in which the devout abstain from eating and drinking during daylight hours.
Cafeterias at some government offices were directed to keep records of who ate lunch. Restaurants were required to remain open during the day, even if there were no customers.
University students were required to eat lunch with their teachers and forced to drink from bottles of mineral water at 4 p.m.
"You couldn't leave the classroom until you drank at least one-third of the bottle," said a 21-year-old student at Kashgar Normal University, who asked not to be quoted by name.
University officials also tried to prohibit students from eating after sunset. To enforce the ban, teachers conducted surprise inspections of dormitories between 2 a.m. and 4 a.m. to make sure nobody had sneaked in flatbread, the most popular food for late-night snacking.
Eight female students who locked their dormitory door overnight in defiance of the rules were given an administrative punishment, meaning they could stay in school but not receive diplomas.
Students said there were spot checks of their laptops, iPads and smartphones to make sure there was no religious content.
"They don't want us listening to any songs in Arabic or anything that has to do with religion," said the 21-year-old student, who paused to hum a tune by the Lebanese-born Swedish singer Maher Zain, whose album "Thank You Allah" is popular throughout the Muslim world but banned for students in Kashgar.
"If there has been an attack, it is much worse," a young male student said. "They are always looking at us."
Among the other taboos for students? Females cannot cover their heads at all, not even with a kerchief. Beards and mustaches are banned for males. A joke among students is that portraits of Marx, Lenin and Engels, which were removed in the 1990s, came down because the Communist Party didn't like their facial hair.
The crackdown is provoking a violent backlash.
In May, people beat up a middle school principal who was accused of helping authorities detain students wearing scarves. As many as four people were reported to have been shot to death in the ensuing melee in Kuqa County.
On Wednesday, the 74-year-old imam of Kashgar's main mosque, Juma Tahir, was stabbed to death in broad daylight in the crowded square outside the mosque. The assailants were believed to be angry about Tahir's support of religious restrictions. Two of the attackers were shot and killed; a third was arrested.
"Religious repression has gotten much worse since Xi Jinping took over," said Dilxat Raxit, a Sweden-based spokesman for the World Uygher Congress. Xi was installed as Communist Party leader in 2012 and as China's president last year.
"Xi Jinping has taken a much more public posture in opposing terrorism," said Jacob Zenn, an analyst of Eurasian and African affairs for the Jamestown Foundation in Washington. "If more attacks occur, then Xi's leadership era could end up being defined by instances of insecurity, which is what he does not want.
"I personally don't believe that people commit mass murder because of restrictions during Ramadan or prayer, but there is concern that restrictions on Ramadan could be exploited by jihadists for their own agenda."
A complication is that moderate Uighur voices have been silenced. Names of people interviewed for this article have been withheld because of the likelihood of government retaliation.
The most prominent example is Ilham Tohti. The best-known Uighur economist, who taught at the Central University for Nationalities in Beijing, was charged Wednesday with separatism, a crime that in china can carry the death penalty.
Extra restrictions apply to civil servants, a wide swath of the workforce defined to include teachers, students and employees of state-owned enterprises.
"They are always testing us. They have meetings that go into lunchtime," said a 32-year-old Kashgar municipal employee, who asked not to be named. "Some people call in sick the whole month so they are not forced to eat."
In some cases, the restrictions have been extended to relatives as well. A Uighur photographer living in Beijing complained recently that his mother was barred from making a pilgrimage to Mecca because his sister teaches middle school.
"It was my mother's greatest dream to go to Mecca," Kurbanjian Samat told Chinese news media. When his sister offered to quit her job, officials said it didn't make any difference because her husband was also a teacher.
As for clothing, China is not alone in restricting head scarves. France and Turkey are among other countries that have imposed limits on head coverings to promote secularism. But monitoring there is not as invasive as in China.
Kashgar, an atmospheric city popular with tourists, has adopted some of the most aggressive measures as part of Project Beauty.
At one checkpoint near Kashgar's main mosque, three Uighur women in colorful, sequined calf-length dresses and a man in sunglasses sat under a large blue umbrella the weekend before last watching people shopping for the coming Eid al-Fitr holiday, which marked the end of Ramadan.
When a motorcycle drove by with two women and a toddler, they flagged it down and told the woman in back to dismount. The woman, who looked to be in her 40s, was wearing a long black-and-white striped dress, a patterned red scarf and a white veil that covered her mouth and nose.
Within minutes, a white van pulled up at the checkpoint with a large red sign on the side reading "Strictly Attack Terrorism and Protect the Stability of Society." The woman climbed in the van without protest and was driven off, presumably to a Project Beauty headquarters to be given a lecture on appropriate dress.
The other woman and the toddler looked somewhat bewildered and drove off.
About five minutes later, the checkpoint nabbed an older woman, who appeared to be about 60, who was wearing an ankle-length tan dress and a brown scarf that covered most of her hair and face.
Kashgar residents said the women would just be lectured, not fined, if it was their first offense, especially as they were not wearing what Uighurs call the jilibafu, a full-length black cloak.
Photos on billboards explaining the dos and don'ts at the checkpoints show that women are allowed to wear scarves, preferably in bright colors, over their heads, not their faces.
"Let our hair flow and reveal our beautiful faces. Abandon old and outdated customs," the billboards declare. Join with "1.3 billion Chinese sons and daughters to realize the great Chinese dream."
Bans against Islamic clothing vary by municipality. In Turpan and Aksu, civil servants and students have been made to sign "guarantees" that they will not wear offending clothing. Manufacturers have been fined for making black garments.
In Shache, the town where the 96 people were killed last week, inspectors from the dadui, a labor brigade, detain women at their offices and will not allow them to go home until they agree to change clothing, according to a resident.
"It used to be our custom that young women covered their heads, and married women their faces. After they started lecturing us, my mother stopped," said the woman in her 20s. "But for some people, the more you tell them not to, the more they want to do it."