  We present a new derivation of gravitational entropy functionals in
higher-curvature theories of gravity using corner terms that are needed to
ensure well-posedness of the variational principle in the presence of corners.
This is accomplished by cutting open a manifold with a conical singularity into
a wedge with boundaries intersecting at a corner. Notably, our observation
provides a rigorous definition of the action of a conical singularity that does
not require regularization. For Einstein gravity, we compute the R\'enyi
entropy of gravitational states with either fixed-periodicity or fixed-area
boundary conditions. The entropy functional for fixed-area states is equal to
the corner term, whose extremization follows from the variation of the Einstein
action of the wedge under transverse diffeomorphisms. For general Lovelock
gravity the entropy functional of fixed-periodicity states is equal to the
Jacobson--Myers (JM) functional, while fixed-area states generalize to
fixed-JM-functional states, having a flat spectrum. Extremization of the JM
functional is shown to coincide with the variation of the Lovelock action of
the wedge. For arbitrary $F$(Riemann) gravity, under special periodic boundary
conditions, we recover the Dong--Lewkowycz entropy for fixed-periodicity
states. Since the variational problem in the presence of corners is not
well-posed, we conjecture the generalization of fixed-area states does not
exist for such theories without additional boundary conditions. Thus, our work
suggests the existence of entropy functionals is tied to the existence of
corner terms which make the Dirichlet variational problem well-posed.
