:root { --game-base-width:480px; --game-base-height:920px; --game-design-width:480px; }
html, body { width:100%; height:100%; min-width:0; min-height:0; margin:0; overflow:hidden; overscroll-behavior:none; }
#app-viewport {
  position:fixed; inset:0 auto auto 0; display:flex; align-items:center; justify-content:center;
  width:100%; height:100%; overflow:hidden; box-sizing:border-box;
  padding:var(--game-safe-top,env(safe-area-inset-top,0px)) var(--game-safe-right,env(safe-area-inset-right,0px)) var(--game-safe-bottom,env(safe-area-inset-bottom,0px)) var(--game-safe-left,env(safe-area-inset-left,0px));
  background:radial-gradient(ellipse at center,#242419 0%,#090a08 75%);
}
#app-stage { position:relative; flex:0 0 auto; }
#game-root {
  position:absolute; top:0; left:0; width:var(--game-base-width); height:var(--game-base-height);
  transform-origin:0 0; overflow:hidden; container-type:size; container-name:game-canvas;
  background:#0c0e0b; isolation:isolate;
}
#game-content { position:absolute; inset:0; z-index:0; }
#app { width:100%; height:100%; min-height:0; }
#game-overlay-root { position:absolute; inset:0; pointer-events:none; z-index:1000; }
#game-overlay-root > * { pointer-events:auto; }
#game-overlay-root { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
#game-overlay-root :is(input,textarea,select,[contenteditable="true"]) { -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; }
#game-overlay-root img { -webkit-user-drag:none; }
#game-overlay-root > .notice-layer, #game-overlay-root > .reward-notice-layer { pointer-events:none; z-index:10000; }
:where(#game-overlay-root) > dialog { position:absolute; inset:0; height:fit-content; margin:auto; max-height:calc(var(--game-base-height) - 32px); }
.game-dialog-mask { position:absolute; inset:0; background:rgba(3,4,3,.76); backdrop-filter:blur(3px); }
#game-root [inert] { pointer-events:none; }
#game-root .game-content, #game-root .page-panel, #game-overlay-root .attribute-modal__content { overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
