  We investigate $r$-process nucleosynthesis and kilonova emission resulting
from binary neutron star (BNS) mergers based on a three-dimensional (3D)
general-relativistic magnetohydrodynamic (GRMHD) simulation of a hypermassive
neutron star (HMNS) remnant. The simulation includes a microphysical
finite-temperature equation of state (EOS) and neutrino emission and absorption
effects via a leakage scheme. We track the thermodynamic properties of the
ejecta using Lagrangian tracer particles and determine its composition using
the nuclear reaction network $\texttt{SkyNet}$. We investigate the impact of
neutrinos on the nucleosynthetic yields by varying the neutrino luminosities
during post-processing. The ejecta show a broad distribution with respect to
their electron fraction $Y_e$, peaking between $\sim$0.25-0.4 depending on the
neutrino luminosity employed. We find that the resulting $r$-process abundance
patterns differ from solar, with no significant production of material beyond
the second $r$-process peak when using luminosities recorded by the tracer
particles. We also map the HMNS outflows to the radiation hydrodynamics code
$\texttt{SNEC}$ and predict the evolution of the bolometric luminosity as well
as broadband light curves of the kilonova. The bolometric light curve peaks on
the timescale of a day and the brightest emission is seen in the infrared
bands. This is the first direct calculation of the $r$-process yields and
kilonova signal expected from HMNS winds based on 3D GRMHD simulations. For
longer-lived remnants, these winds may be the dominant ejecta component
producing the kilonova emission.
