  We prove a Koszul duality theorem between the category of weight modules over
the quantized Coulomb branch (as defined by Braverman, Finkelberg and Nakajima)
attached to a group $G$ and representation $V$ and a category of
$G$-equivariant D-modules on the vector space $V$. This is proven by relating
both categories to an explicit, combinatorially presented category.
  These categories are related to generalized categories $\mathcal{O}$ for
symplectic singularities. Letting $\mathcal{O}_{\operatorname{Coulomb}}$ and
$\mathcal{O}_{\operatorname{Higgs}}$ be these categories for the Coulomb and
Higgs branches associated to $V$ and $G$, we obtain a functor
$\mathcal{O}_{\operatorname{Coulomb}}^!\to \mathcal{O}_{\operatorname{Higgs}}$
from the Koszul dual of one to the other. This functor is an equivalence in the
special cases where the hyperk\"ahler quotient of $T^*V$ by $G$ is a Nakajima
quiver variety or smooth hypertoric variety. This includes as special cases the
parabolic-singular Koszul duality of category $\mathcal{O}$ in type A, the
categorified rank-level duality proposed by Chuang and Miyachi and proven by
Shan, Vasserot and Varagnolo, and the hypertoric Koszul duality proven by
Braden, Licata, Proudfoot and the author.
  We also show that this equivalence intertwines so-called twisting and
shuffling functors. This together with the duality discussed confirms the most
important components of the symplectic duality conjecture of Braden, Licata,
Proudfoot and the author in this case.
