  We present a physical framework that can account for most of the observed
spectral properties of the prompt gamma-ray burst emission. This includes the
variety of spectral shapes, shape evolutions, and spectral correlations between
flux and spectral peak, within bursts described by Borgonovo & Ryde, and among
bursts described by Amati/Ghirlanda. In our proposed model the spectral peak is
given by the photospheric emission from a relativistic outflow for which the
horizon length is much smaller than the radial width. The observed duration of
the thermal flash will be given by the radial light-crossing time. This then
gives that the typical emission site is at ~10e11 cm from the center, with a
Lorentz factor of ~300. This emission is accompanied by non-thermal emission
from dissipation locations outside the photosphere. The relative strength of
these two components depend on injection effects at the central engine leading
to varying relative location of the saturation and photospheric radii. The
total emission can then reproduce the observed variety. The spectral
correlations are found by assuming that the amount of energy dissipated depends
non-linearly on the averaged particle density. Beside the spectral correlations
this also gives a description of how the relative strength of the thermal
component varies with temperature within a burst.
