Why does InnoDB allow a 772 byte unique constraint?
Revised math:


8 bytes for BIGINT -- Do you really need more than 4 billion values?  Consider INT UNSIGNED at only 4 bytes.
2 byte length of VARCHAR
764 bytes for 191 characters (potentially 4 bytes per utf8mb4 character)


2+764 &lt; 767, so the VARCHAR column passes that test
8+2+764 &lt; 3KB, so the entire index passes another test.  (As would a pair of 191-char VARCHAR)

Edit

The reference manual has some complicated limits on indexes.  Generally you will be safe with a column taking no more than 767 bytes, and the entire index taking no more than 3072 bytes.  Keep in mind that one character in utf8mb4 counts (for these limits) as 4 bytes.  I have a compilation of limits.