html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}
html, body {
    height: 100vh;      /* 使用視窗高度單位 */
    width: 100vw;       /* 使用視窗寬度單位 */
    margin: 0;
    padding: 0;
    display: flex;      /* 啟動彈性佈局 */
    flex-direction: column; /* 令內容由上而下排列 */
    overflow: hidden;   /* 關鍵：絕對禁止出現捲軸 */
	overscroll-behavior-x: none; /* 禁止橫向滑動觸發返回 */
	overscroll-behavior-y: contain; /* 僅允許上下滾動 */
}
canvas {
    display: block;
}
body {
    margin: 0;
}
#unity-container {
    width: 100%;
    flex: 1;            /* 關鍵：自動計算 (100vh - footer高度) */
    position: relative;
    overflow: hidden;   /* 確保 Unity 內容不會撐開容器 */
}
#unity-canvas {
    width: 100%;
    height: 100%;
	display: block;    /* 消除圖片/畫布下方的微小間隙 */
    background: #1F1F20;
}
#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#unity-logo {
    text-align: center;
}
#unity-logo img {
    max-width: 80%;
}
#unity-progress-bar-empty {
    width: 329px;
    height: 24px;
    margin: 10px 20px 20px 10px;
    text-align: left;
    border: 1px solid white;
    padding: 4px;
}
#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: white;
}
.light #unity-progress-bar-empty {
    border-color: black;
}
.light #unity-progress-bar-full {
    background: black;
}
.sticky-footer{
	background-color: black;
	width: 100%;
	justify-content: center;
	flex-shrink: 0;     /* 關鍵：不論視窗多小，都不准壓縮 Footer */
}
.sticky-footer p {
	color: white;
    margin: 0;
    padding: 0 15px;
	font-size: clamp(10px, 2vw, 16px);
    /* 確保即使視窗極窄，文字也會縮小到能看見 */
    text-align: center;
}
