This problem has been rumbling away in my head for a while, and even though Steve's ccts are excellent and worthy, I think I may have a simpler answer, and one that also prolongs your standlight, should you wish to run one.
Essentially, take the rectifier (whatever flavour) output and then run in parallel:
- zener diode
- Supercap(s) (protected by zener)
- Low Dropout Regulator (LDO) with what ever LEDs
- LM317 regulator with extra LED(s)
Having tried them in the past, LM317s won't pass anything unless the input voltage is higher than the output, whereas the LDO will regulate and then gradually decline as the input voltage decays. This means that when you're going well, everything is on, but when you're slow or stopped, the LM317 LEDs go out and the supercap only powers the LDO and its LEDs (which I would have in the next build as 'be seen by' lights more than anything else).
Perhaps not used as the maker intended, but it's the behaviour I think you're after.