/* The native canvas keeps its aspect ratio; the surrounding art fills unused space. */
body.playing{overflow:hidden}
#game-view{position:fixed;inset:0;display:flex;flex-direction:column;min-width:0;height:100vh;height:100dvh;overflow:hidden;background:linear-gradient(#07170d66,#08150c99),url('images/jianghu-gateway.webp') center/cover no-repeat}
.game-screen{position:relative;display:grid;place-items:center;flex:1;min-width:0;min-height:0;overflow:hidden;margin:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#game{display:block;width:var(--game-display-width,800px)!important;height:var(--game-display-height,600px)!important;max-width:none;max-height:none;margin:0;image-rendering:auto;box-shadow:0 0 0 1px #c9b27135,0 18px 65px #0008}
#status{position:absolute;z-index:1;left:20px;right:20px;bottom:18px;width:fit-content;max-width:calc(100% - 40px);margin:0 auto;padding:12px 16px;border:1px solid #bc9a5d70;background:#10231af2;color:#f0e4c7;font:13px/1.7 GiangHo,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 5px 25px #0006}
#game-view.is-loading #game{visibility:hidden}#game-view.is-loading #status{top:50%;bottom:auto;transform:translateY(-50%);text-align:center}
#game-view:fullscreen{width:100vw;height:100vh}#game-view:-webkit-full-screen{width:100vw;height:100vh}

/* Fullscreen retains the responsive dock and its safe-area padding. */
#game-view:is(:fullscreen,:-webkit-full-screen,.is-immersive) .game-screen{margin-bottom:env(safe-area-inset-bottom)}

#game-view.is-loading #status{visibility:hidden}
/* iOS callout/selection belongs only to real text editors, never game gestures. */
#game-view,#game-view *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#game-view input,#game-view textarea,#game-view [contenteditable="true"]{-webkit-user-select:text!important;user-select:text!important;-webkit-touch-callout:default}

.display-quality-select{position:fixed;z-index:3;box-sizing:border-box;margin:0;padding:0 8px;background:#211e13;color:#f0dfb8;border:1px solid #a18147;border-radius:3px;font-family:'JX Roboto Condensed',Arial,sans-serif;cursor:pointer;touch-action:manipulation}.display-quality-select[hidden]{display:none!important}.display-quality-select:focus-visible{outline:2px solid #ebcf8d;outline-offset:1px}
