html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background-color: #000;
}

#landscape-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

#game-shell {
    position: fixed;
    left: 50%;
    top: 50%;
    width: min(100vw, 56.25vh);
    height: min(100vh, 177.777778vw);
    overflow: hidden;
    isolation: isolate;
    background: #000;
    transform: translate(-50%, -50%);
}

#game-shell #content,
#game-shell .contentWrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#game-shell #Cocos3dGameContainer {
    z-index: 10;
}

#html-overlay-root {
    position: absolute;
    z-index: 20;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

#html-overlay-root.is-aligned {
    visibility: visible;
}

#game-shell #animation_container,
#game-shell #splash,
#game-shell #bulletin {
    z-index: 30;
}

#game-shell #animation_container {
    width: 100%;
    height: 100%;
}

#game-shell #error {
    z-index: 40;
}

/*
 * The Cocos runtime sets #GameDiv to `display:flex; justify-content:center`
 * to letterbox-center the canvas. #bulletin and #error are hidden/shown by
 * the engine at runtime (inline style/class, which wins over this default),
 * but without an explicit default-hidden state their intrinsic text width
 * makes them flex siblings of #Cocos3dGameContainer — overflowing the row
 * and shifting the whole centered line (canvas included) to the left.
 */
#game-shell #bulletin,
#game-shell #error {
    display: none;
}
