Text this: A Generalization of Electromagnetic Fluctuation-Induced Casimir Energy