What do ギリギリすぎる and 設定 mean in this sentence?


> Person A: くしゃみをしたら元の根暗に戻った  
>  Person B: ギリギリすぎる設定ですな  
>  Person C: あんただってギリギリじゃない

The context here is that someone has a split personality and when she sneezes
her character changes, the first line is explaining this (くしゃみをしたら元の根暗に戻った),
the second line is someone commenting on this (ギリギリすぎる設定ですな) and the third
line is the person with the split personality (あんただってギリギリじゃない) but I can't
understand what ぎりぎり and 設定 mean in the sentence.




  * 設定 in this context is "(character) settings", i.e., how the author characterize a person in the plot. Normally, a character in a story don't talk about his own 設定, but this may be some sort of metafictional joke.

  * ギリギリ is an adjective that literally means "nearing the borderline/edge/extremity". In this context, the character is talking about the borderline of acceptable/unacceptable or laughable/not-laughable. The nuance is almost the same as [キワモノ explained here](https://japanese.stackexchange.com/a/46923/5010).




  * 設定 in this context is "(character) settings", i.e., how the author characterize a person in the plot. Normally, a character in a story don't talk about his own 設定, but this may be some sort of metafictional joke.

  * ギリギリ is an adjective that literally means "nearing the borderline/edge/extremity". In this context, the character is talking about the borderline of acceptable/unacceptable or laughable/not-laughable. The nuance is almost the same as [キワモノ explained here](https://japanese.stackexchange.com/a/46923/5010).

