Bohr sets in sumsets I: Compact abelian groups