Kirikiri, or rather KAG, is configured by superimposing, what is referred to as, a "layer" on the screen(similar to layers of Photoshop).
For instance, in case of the following display...

Display example
The layer structure is as follows:

Layer composition
In KAG, first of all, there is one
background layer base and it is displayed below (very back) most. There are three
foreground layers (0, 1, 2) on/above the background layer. In addition, there are two
message layers above all. Layers can be hidden or displayed by toggling between visible=false and visible=true with the layopt tag. By default, all the foreground layers and one message layer is kept hidden. It is also possible to display foreground layer with the image tag.
There are two sets(pages) of similar layer structures in KAG, called
'(Recto)Fore page' and
'Reverse back page'. The reverse back page can't be displayed on the screen, though the fore page can be displayed on the screen.
The layer attribute and the page attribute of image tag has to be specified. Layer has to be either 'fore' or 'base'. Also, it's optional to specify base/0/1/2 in the layer attribute.
Note
The three foreground layers and two message layers is the default setting in Config.tjs.
The number of the foreground and the message layers can be changed in 'numCharacterLayers' and 'numMessageLayers' respectively. Also, it can be changed when using the 'laycount' tag.
Note
"Background", "foreground", "recto fore", "reverse back" is likely to be confusing. Fore, specified in the page attribute, is intended to represent the "front screen", NOT a "foreground layer".
The recto fore or the reverse back page corresponds with fore and back in the page attribute respectively. In the layer attribute, specify 0, 1 or 2, which specifies the base in the case of the background layer.