The seismological dynamics of magnetars are largely determined by a strong hydromagnetic coupling between the solid crust and the fluid core. In this paper, we set up a ‘spectral’ computational framework in which the magnetar’s motion is decomposed into a series of basis functions that are associated with the crust and core vibrational eigenmodes. A general relativistic formalism is presented for evaluation of the core Alfvén modes in the magnetic flux coordinates, as well for eigenmode computation of a strongly magnetized crust of finite thickness. By considering coupling of the crustal modes to the continuum of Alfvén modes in the core, we construct a fully relativistic dynamical model of the magnetar which allows: (i) fast and long simulations without numerical dissipation; and (ii) very fine sampling of the stellar structure. We find that the presence of strong magnetic field in the crust results in localizing of some high-frequency crustal elastomagnetic modes with the radial number n≥ 1 to the regions of the crust where the field is nearly horizontal. While the hydromagnetic coupling of these localized modes to the Alfvén continuum in the core is reduced, their energy is drained on a time-scale of ≪1 s. Therefore, the puzzle of quasi-periodic oscillations with frequencies larger than 600 Hz still stands.