\section{An angular estimate on a quaternion shell}\label{sec:angular} Fix \(n,x,H\) as in Theorem~\ref{thm:main}. We first count coordinate representations with an angular weight and prescribed local conditions. \subsection{The norm shell} Let \(R=\Z[\omega]\) and \(K=\Q(\omega)\). The Eisenstein lattice is norm Euclidean, since every complex number is within squared distance \(1/3\) of a lattice point. Write \(B=K+Kj\), where \(j^2=-1\) and \(jz=\bar z j\), and put \(\Oq=R+Rj\). Its reduced norm is \(\nrd(z+wj)=N(z)+N(w)\). The trace pairing on \(1,\omega,j,\omega j\) has determinant \(-9\), so the order has reduced discriminant \(3\). The algebra is definite and the number of ramified places is even, so it is ramified at \(3\) and infinity. Thus \(\Oq\) is maximal. Rounding both complex coordinates gives a remainder of reduced norm at most \(2/3\). In any nonzero integral right ideal, take a least positive norm element \(\alpha\) and divide on the left by \(\alpha\). The remainder in that ideal has norm smaller than \(\nrd(\alpha)\) unless it vanishes. Every right ideal is therefore principal, as are the fractional ideals by scaling. The unit group \(U\) consists of the twelve elements of \(R^\times\cup R^\times j\). For \(3\nmid m\), let \(\mathcal Q_m=\{\alpha\in\Oq:\nrd(\alpha)=m\}\). At each \(\ell^e\Vert m\), integral right ideals correspond locally to index-\(\ell^e\) sublattices of \(\Z_\ell^2\), of which there are \(1+\ell+\cdots+\ell^e\). Each ideal has twelve generators of norm \(m\), giving \begin{equation}\label{eq:shell} |\mathcal Q_m|=12\sigma(m),\qquad \sigma(m)=\sum_{d\mid m}d . \end{equation} We use this all-ideal convention throughout \cite[Propositions~41.3.1 and~41.3.6]{Voight}. The number of coordinates of a positive norm \(a\) is \(6f(a)\), where \(f\) is multiplicative. Its local values are \(f(p^e)=e+1\) at split primes \(p\equiv1\bmod3\), \(f(p^e)=1\) at \(3\), and \(f(p^e)=\mathbf1_{2\mid e}\) at inert primes \(p\equiv2\bmod3\). Indeed a split prime has two conjugate factors in \(R\), and a choice of their exponents gives each possibility up to a unit. The ramified prime in \(R\) above \(3\) is generated by \(1-\omega\) and has norm \(3\). In particular, \(f(a)\le\tau(a)\), where \(\tau\) is the divisor function. At an inert prime, \(R/pR\) is a field, so norm divisibility by \(p\) is equivalent to coordinate divisibility by \(p\). For even \(m\), both component norms have the same parity. Both are even precisely on the shell scaled by \(2\) from \(m/4\). The odd-component shell therefore has size \begin{equation}\label{eq:odd-shell} R_o(m)=12\{\sigma(m)-\sigma(m/4)\},\qquad \frac{R_o(m)}m=18\prod_{\substack{p^e\Vert m\\p\ge5}} \frac{\sigma(p^e)}{p^e}, \end{equation} where \(\sigma(m/4)=0\) if \(4\nmid m\). \subsection{Finite tests and the Hecke bound} Use the finite group \(G\) obtained by multiplying the fixed factor \(G_3=(\Oq/3\Oq)^\times/\F_3^\times\) and any factors \(\PGL_2(\Z/p^a\Z)\) at \(p\ge5\), with \(a=1\) or \(2\). The Hecke index in this subsection is coprime to the level. Write \(\Gamma\) for the image of \(U\) in \(G\). The kernel on \(U\) is \(\{\pm1\}\), as is seen at \(3\). Each group has a norm squareclass map, using determinant at split quaternion places. Both squareclasses occur. At \(3\), for example, the norms of \(1\) and \(1+j\) give the two classes. They are detected modulo \(p\) at every odd level prime. For \(k\ge0\), let \(\rho_k=\Sym^{2k}\C^2\) denote the unitary representation of \(\SU(2)\) on that space. For a real quaternion of nonzero norm use \(u_\alpha=\alpha/\sqrt{\nrd(\alpha)}\in\SU(2)\), under the usual identification of unit quaternions with \(\SU(2)\). The action on order units descends to \(\Gamma\). Use the space of functions \(F:G\to\Sym^{2k}\C^2\) satisfying \(F(\gamma g)=\rho_k(\gamma)F(g)\), with squared norm summed once per left coset. The all-ideal Hecke operator is \begin{equation}\label{eq:hecke} (T_m F)(g)=\frac1{12}\sum_{\alpha\in\mathcal Q_m} \rho_k(u_\alpha)^{-1} F(\alpha_{\rm fin} g), \end{equation} where \(\alpha_{\rm fin}\) is projective reduction in \(G\). Let \(\mathcal K\) be the product of the projective order-unit groups at the finite places, and \(\mathcal K_0\) the kernel of reduction to \(G\). At \(3\) we use order units, with reduction modulo \(3\Oq_3\). A residue unit lifts to an order unit since its reduced norm is a \(3\)-adic unit. At each \(p\ge5\) in the level, the corresponding reduction of \(\mathrm{GL}_2(\Z_p)\) is surjective modulo \(p^a\). Thus \(\mathcal K/\mathcal K_0=G\). Class number one gives \(PB^\times(\mathbb A_f)=PB^\times(\Q)\mathcal K\), where \(\mathbb A_f\) denotes the finite adeles. A rational element stabilizing \(\mathcal K\) has a representative locally equal to a scalar times an order unit. A single rational scalar cancels the valuations of the local scalars, giving an element of \(U\). Consequently the finite adelic quotient is \(\Gamma\backslash G\). The projective rational stabilizer at any level coset is trivial. Indeed, \(\mathcal K_0\) is normal in \(\mathcal K\) and only the units \(\pm1\) lie in the kernel of reduction. With coefficients, rational left equivariance gives the stated action of \(\Gamma\) \cite[Section~2, (4)--(6) and Proposition~2.5]{GV}. Each orbit has \(|\Gamma|\) elements and hence the same finite measure. At infinity Schur orthogonality for a unit test vector gives the factor \(1/(2k+1)\). The resulting automorphic norm differs from the counting norm by a common scalar. To see the direction and normalization in \eqref{eq:hecke}, lift \(g\) to \(\tilde g\in\mathcal K\) supported at level primes. A right-ideal representative \(a\) in the correspondence of norm \(m\) can be chosen supported at primes of \(m\), so \(\tilde g a=a\tilde g\). If the ideal is \(\alpha\Oq\), write \(a=\alpha u\) with \(u\in\mathcal K\) projectively. At level primes \(u\) reduces to \(\alpha_{\rm fin}^{-1}\). Hence the summand is \(\rho_k(u_\alpha)F(\alpha_{\rm fin}^{-1}g)\). Changing \(\alpha\) by a right order unit cancels by equivariance. Averaging over all twelve generators implements the sum once per ideal. Replacing \(\alpha\) by \(\bar\alpha\) gives \eqref{eq:hecke}. Conjugation also proves self-adjointness. We use the bound \begin{equation}\label{eq:hecke-norm} \|T_m\|\le \tau(m)\sqrt m \end{equation} on the whole space for \(k>0\), and on the complement of the joint norm-squareclass characters for \(k=0\). Here are the relevant hypotheses for cuspidal transfer. A finite-dimensional smooth irreducible local factor at a split place \(\ell\) is trivial on the norm-one group, since its open normal kernel contains the elementary unipotents by diagonal conjugation. Such a factor cannot occur at positive weight. In fact \(\Oq[1/\ell]^1\) has dense real image in \(\SU(2)\). Equation \eqref{eq:shell} gives infinitely many norm-one elements \(\alpha/\ell^a\) of exact denominator \(\ell^a\) by taking \(\nrd(\alpha)=\ell^{2a}\) and omitting \(\ell\Oq\). There are at most \(12(2a+1)\) single-component points of that norm, so these elements extend outside the Eisenstein torus normalizer. A proper infinite closed subgroup of \(\SU(2)\) normalizes its one-dimensional identity component. It contains the order-three unit \(\omega\), which must then lie in that torus and determines it as the Eisenstein torus. This contradicts the points outside its normalizer. For a finite adelic representative \(g\), impose the congruences \(g^{-1}\gamma g\) belonging to the level away from \(\ell\). They cut out a finite-index subgroup of \(\Oq[1/\ell]^1\), still dense by connectedness. At \(\ell\) the discrepancy is absorbed by invariance under the local norm-one group. Rational left invariance then forces the coefficient at \(g\) to be fixed by that dense subgroup, which is impossible in the nontrivial irreducible representation. For \(k=0\), suppose the factor at \(\ell\) is finite-dimensional and let \(h\) be a finite adelic norm-one element. Strong approximation for \(B^1\) away from \(\{\infty,\ell\}\) lets us choose a rational norm-one element \(\gamma\) approximating \(ghg^{-1}\) outside \(\ell\) \cite[Main Theorem~28.5.3]{Voight}. In \(gh=\gamma g(g^{-1}\gamma^{-1}gh)\), the final factor can be taken in the right stabilizer of the vector away from \(\ell\). At \(\ell\) it has norm one and acts trivially. Thus the exceptional constituents are invariant under the entire finite adelic norm-one group. On \(\mathcal K\) they depend only on the joint norm squareclasses in \(G\). Indeed, at the odd level primes a square norm can be scaled to one, and outside the level the order units already act trivially. Conversely, each product of local signs comes from a quadratic Dirichlet character composed with reduced norm. This is projectively well-defined since scalar norms are squares, and it has trivial real type since real reduced norms are positive. By \eqref{eq:hecke} its eigenvalue is \(\sigma(m)\) times its value on the norm class of \(m\). These sign functions span the scalar exceptional space. The remaining constituents have infinite-dimensional factors at split places. Jacquet--Langlands gives cuspidal \(\mathrm{GL}_2\) representations of holomorphic weight \(2k+2\) and trivial central character, unramified at every \(\ell\mid m\) \cite[Theorem~14.4 and Proposition~5.20]{JL}. Let \(\alpha_\ell,\beta_\ell\) be their unitary Satake parameters. Their product is one. The classical Hecke roots are \(\ell^{k+1/2}\alpha_\ell,\ell^{k+1/2}\beta_\ell\), so Deligne's bound gives \(|\alpha_\ell|=|\beta_\ell|=1\) \cite[Theorems~4.9 and~5.1]{DeligneModular} \cite[Theorem~1.6]{DeligneWeil}. For the operator at \(\ell^a\) the all-ideal right cosets are represented by upper triangular matrices with diagonal \(\ell^i,\ell^{a-i}\) and upper right entry modulo \(\ell^i\), for \(0\le i\le a\). In normalized unramified induction \cite[Section~3]{JL}, the spherical vector has value \(\ell^{a/2-i}\alpha_\ell^i\beta_\ell^{a-i}\) there. Summing the \(\ell^i\) choices of the upper right entry gives the eigenvalue \[ \ell^{a/2}\sum_{i=0}^{a}\alpha_\ell^i\beta_\ell^{a-i}. \] This includes imprimitive ideals and equals the classical coefficient at \(\ell^a\) divided by \(\ell^{ak}\). In particular, the recurrence is \(T_{\ell^a}=T_\ell T_{\ell^{a-1}}-\ell T_{\ell^{a-2}}\) for \(a\ge2\). The eigenvalue has modulus at most \((a+1)\ell^{a/2}\). Multiplicativity now gives \eqref{eq:hecke-norm} with the same bound at every weight and level. \subsection{A finite test with a prescribed direction} For a test \(b:G\to\C\) and a unit vector \(v\) in degree \(k\), define \[ F(g)=\frac1{|\Gamma|}\sum_{\gamma\in\Gamma} \rho_k(\gamma)v\, b(\gamma^{-1}g). \] This is the orthogonal projection of \(b(g)v\) onto equivariant functions in the full counting norm on \(G\). Its coset norm is at most \(\|b\|_{\ell^2(G)}/\sqrt{|\Gamma|}\). For another unit vector \(w\), reindexing the shell by the left unit lift of each \(\gamma\) gives \begin{equation}\label{eq:projection} 12\langle w,(T_mF)(1)\rangle =\sum_{\alpha\in\mathcal Q_m} b(\alpha_{\rm fin})\,\langle w,\rho_k(u_\alpha)^{-1}v\rangle . \end{equation} Here the inner product is linear in its second variable. The averaging factor cancels because for a lift \(\gamma_0\) the substitution \(\alpha=\gamma_0\alpha'\) cancels \(\rho_k(\gamma)\) against the archimedean multiplier. This formula allows \(b\) to distinguish the two components. Writing \(\alpha=z+yj\), put \(t_\alpha=(N(z)-N(y))/m\). For \(v=w\) the unit vector proportional to \(X^kY^k\), the matrix coefficient in \eqref{eq:projection} equals \(P_k(t_\alpha)\), where \(P_k\) is the degree-\(k\) Legendre polynomial with \(P_k(1)=1\). Indeed, the polynomial action gives the binomial formula \[ P_k(t_\alpha)=\sum_{j=0}^k(-1)^j\binom{k}{j}^2 (N(z)/m)^{k-j}(N(y)/m)^j. \] Passing to \(u_\alpha^{-1}\) leaves the coefficient unchanged. In degree zero, projecting onto the sign characters replaces \(b\) by its average conditioned on the joint norm squareclasses of \(m\). Indeed these characters form an orthogonal basis for functions of the squareclasses, and the eigenvalue signs evaluate them at \(m\). The averaging defining \(F\) preserves these means. For a product of local tests the conditional mean is the product of their conditional means. At each positive degree, evaluation at one coset has norm at most one, so \eqref{eq:projection} is bounded in absolute value by \(12\tau(m)\sqrt m\|b\|_{\ell^2(G)}\). The same error bound applies to the scalar cuspidal part. \subsection{The cost of a translated window} Choose a fixed smooth \(0\le\phi\le1\) of compact support in \((-1/2,1/2)\) and integral \(I_\phi>0\). Put \(h=H/n\), \(b=M/n\), and \(\lambda=x/n\). We use the bump \[ W(t)=\phi\!\left(\frac{(1+t)/2-\lambda}{h}\right). \] As \(h\le b\), on its support \(1-t^2\asymp b\), and the support has length at most \(2h\). The constant Legendre coefficient of \(W\) is \(I_\phi h\). \begin{lemma}\label{lem:bump} The Legendre expansion \(W=\sum_{k\ge0}c_kP_k\) converges uniformly and absolutely, with \(\sum_{k\ge1}|c_k|\ll_\phi\sqrt{b/h}\). \end{lemma} \begin{proof} We use \(|P_k(t)|\ll k^{-1/2}(1-t^2)^{-1/4}\) for \(-1