  Context: Young massive star clusters (YMCs) have come increasingly into the
focus of discussions on the origin of galactic cosmic rays (CRs). The
proposition of CR acceleration inside superbubbles (SBs) blown by the strong
winds of these clusters avoids issues faced by the standard paradigm of
acceleration at supernova remnant shocks. Aims: We provide an interpretation of
the latest TeV $\gamma$-ray observations of the region around the YMC
Westerlund 1 taken with the High Energy Stereoscopic System (H.E.S.S.) in terms
of diffusive shock acceleration at the cluster wind termination shock, taking
into account the spectrum and morphology of the emission. As Westerlund 1 is a
prototypical example of a YMC, such a study is relevant to the general question
about the role of YMCs for the Galactic CR population. Methods: We generate
model $\gamma$-ray spectra, characterise particle propagation inside the SB
based on the advection, diffusion, and cooling timescales, and constrain key
parameters of the system. We consider hadronic emission from proton-proton
interaction and subsequent pion decay and leptonic emission from inverse
Compton scattering on all relevant photon fields, including the CMB, diffuse
and dust-scattered starlight, and the photon field of Westerlund 1 itself. The
effect of the magnetic field on cooling and propagation is discussed.
Klein-Nishina effects are found to be important in determining the spectral
evolution of the electron population. Results: A leptonic origin of the bulk of
the observed $\gamma$-rays is preferable. The model is energetically plausible,
consistent with the presence of a strong shock, and allows for the observed
energy-independent morphology. The hadronic model faces two main issues:
confinement of particles to the emission region and an unrealistic energy
requirement.
