  We derive a novel thermodynamically consistent Navier--Stokes--Cahn--Hilliard
system with dynamic boundary conditions. This model describes the motion of
viscous incompressible binary fluids with different densities. In contrast to
previous models in the literature, our new model allows for surface diffusion,
a variable contact angle between the diffuse interface and the boundary, and
mass transfer between bulk and surface. In particular, this transfer of
material is subject to a mass conservation law including both a bulk and a
surface contribution. The derivation is carried out by means of local energy
dissipation laws and the Lagrange multiplier approach. Next, in the case of
fluids with matched densities, we show the existence of global weak solutions
in two and three dimensions as well as the uniqueness of weak solutions in two
dimensions.
