For any curve V in a toric surface X, we study the critical locus S subset of V of the moment map mu from V to its compactified amoeba mu(V). For any complete linear system |L| given by an ample line bundle L on X, we show that the critical locus S subset of V is smooth as long as the curve V is outside of a subset of real codimension 1 in |L|. In particular, the complement of the latter subset appears to be disconnected for general L. It suggests a classification problem analogous to Hilbert's Sixteenth Problem, namely the topological classification of pairs (V,S) for curves V is an element of|L|. The description of the critical locus S in terms of the logarithmic Gau ss map gamma:V -> CP1 relates the latter problem to the study of the Lyashko-Looijenga map (ll). The map ll associates to a generic curve V is an element of|L| the unordered set of the critical values of gamma on CP1. We prove two statements concerning ll that are crucial for our classification problem: the map ll is algebraic; the map ll extends to nodal curves in |L|. This fact allows us to construct many examples of pairs (V,S) by perturbing nodal curves.