html,body{height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:#202c3b;font-family:Arial,"Microsoft YaHei",sans-serif}
body{height:100dvh;display:flex;justify-content:center;align-items:center}
#player{position:relative;height:100%;width:min(100vw,calc(100dvh * 9 / 16));}
#game{display:block;width:100%;height:100%;outline:none;touch-action:none;-webkit-user-select:none;user-select:none}
#loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;background:#e7f8ff;color:#173d54;text-align:center;padding:20px;z-index:3}
#loading[hidden],#toast[hidden]{display:none}
#loading strong{font-size:30px}#loading p{margin:8px 0;font-size:14px}progress{width:min(300px,80vw);height:16px;accent-color:#19b5dc}
button{border:0;border-radius:12px;background:#19b5dc;color:#fff;font-size:18px;padding:12px 24px;cursor:pointer}
#toast{position:fixed;bottom:calc(env(safe-area-inset-bottom,0px) + 32px);left:50%;transform:translateX(-50%);max-width:80vw;padding:12px 18px;background:rgba(17,53,74,.94);border-radius:14px;color:white;z-index:5;text-align:center}
dialog{border:0;border-radius:22px;background:#f5fcff;color:#173d54;max-width:min(340px,78vw);padding:26px;text-align:center}dialog::backdrop{background:#0c2435aa}dialog h2{margin-top:0}dialog p{line-height:1.8;white-space:pre-line}dialog button{width:100%}
#toast{pointer-events:none}
