Dont know which version you are using(a6/a7)
but afaik all a7 versions support both c-sctipt an lite-c [Lite-c versions only support lite-c]
and if you are able to use the panel in you first post, then you cn use lite-c.
And yes,checked the manual, panels doesnt have the INVISIBLE flag.
just dont use any flags , delete the flags = VISIBLE; line from definition and it will be invisible.
to make it visible at runtime you can use
set(some_panel,VISIBLE);
toggle(some_panel,VISIBLE); toggles the visibility.