  Let $\mathcal{F}$ be a family of subsets of $[n]$ and $L$ be a subset of
$[n]$. We say $\mathcal{F}$ is an $L$-differencing Sperner system if
$|A\setminus B|\in L$ for any distinct $A,B\in\mathcal{F}$. Let $p$ be a prime
and $q$ be a power of $p$. Frankl first studied $p$-modular $L$-differencing
Sperner systems and showed an upper bound of the form
$\sum_{i=0}^{|L|}\binom{n}{i}$. In this paper, we obtain new upper bounds on
$q$-modular $L$-differencing Sperner systems using elementary $p$-adic analysis
and polynomial method, extending and improving existing results substantially.
Moreover, our techniques can be used to derive new upper bounds on subsets of
the hypercube with restricted Hamming distances. One highlight of the paper is
the first analogue of the celebrated Snevily's theorem in the $q$-modular
setting, which results in several new upper bounds on $q$-modular $L$-avoiding
$L$-intersecting systems. In particular, we improve a result of Felszeghy,
Heged\H{u}s, and R\'{o}nyai, and give a partial answer to a question posed by
Babai, Frankl, Kutin, and \v{S}tefankovi\v{c}.
