  We show that thermal effective field theory controls the long-distance
expansion of the partition function of a $d$-dimensional QFT, with an insertion
of any finite-order spatial isometry. Consequently, the thermal partition
function on a sphere displays a fractal-like structure as a function of angular
twist, reminiscent of the behavior of a modular form near the real line. As an
example application, we find that for CFTs, the effective free energy of
even-spin minus odd-spin operators at high temperature is smaller than the
usual free energy by a factor of $1/2^d$. Near certain rational angles, the
partition function receives subleading contributions from "Kaluza-Klein vortex
defects" in the thermal EFT, which we classify. We illustrate our results with
examples in free and holographic theories, and also discuss nonperturbative
corrections from worldline instantons.
