Berry-phase interpretation of thin-film micromagnetism