* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #11131a;
  color: #e8e8ef;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow: hidden;
}

#game-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  display: block;
  width: min(100vw, 177.78vh);   /* keep 16:9 */
  height: min(56.25vw, 100vh);
  max-width: 1280px;
  max-height: 720px;
  background: #0a0c12;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  image-rendering: auto;
  outline: none;
  cursor: pointer;
}

#nojs {
  display: none;
  color: #ff8080;
  text-align: center;
}

/* shown only when the module fails to boot */
body.noscript #game { display: none; }
body.noscript #nojs { display: block; }
