A night shift
A diary day is a calendar date, not the hour you woke up.
A line lands on the date you pick after the draft. A night snack can stay on the day that is ending or open the next one. The point is not to log it twice.
Coffee with sugar and a bun at 4 a.m. fall out of “three meals” easily. Sugar on this site is counted by the teaspoon: 5 g.
The target does not recalculate because the shift is at night. The questionnaire and the usual day in the profile set it.