/* ゲームの描画面をウィンドウに合わせ、縮尺と安全領域はUnity側で統一する。 */
html,
body,
.game-shell {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #0a1426;
    color: #fff5df;
    font-family: system-ui, sans-serif;
}

.game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.game-canvas:focus-visible {
    outline: 2px solid #95dfef;
    outline-offset: -2px;
}

.loading-panel {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    background: #0a1426;
    text-align: center;
}

.loading-panel[hidden] {
    display: none;
}

.loading-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #ffc25b;
}

.loading-progress {
    width: min(28rem, 75vw);
    height: 1rem;
    accent-color: #ffc25b;
}

.reload-button {
    min-height: 44px;
    padding: 0.75rem 2rem;
    border: 0;
    border-radius: 0.75rem;
    background: #ffc25b;
    color: #342421;
    font: inherit;
    cursor: pointer;
}

/* 読み込みパネル内だけに戻る導線を置き、プレイ中のCanvasへ重ねない。 */
.loading-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    flex-wrap: wrap;
}

.loading-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #95dfef;
    text-underline-offset: 0.2em;
}

.loading-links a:focus-visible {
    outline: 2px solid #95dfef;
    outline-offset: 3px;
}
