html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

canvas {
  display: block;
  position: absolute;
}

/* ===== 中文版顶部标题栏 ===== */
#banner {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #1f2d3d 0%, #2c4a6b 100%);
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  z-index: 10;
}

.banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

#banner h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

#banner .badge {
  display: inline-block;
  background: #e6a23c;
  color: #1f2d3d;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}

#banner .tips {
  margin: 0;
  font-size: 13px;
  color: #cfe0f0;
}

/* ===== 原版布局适配（带标题栏） ===== */
#main {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-around;
	flex: 1;
	min-height: 0;
}

#area {
	position: relative;
	width: 100%;
	height: 100%;
	flex: 1;
	display: flex;
	justify-content: space-around;
	overflow: auto;
}

#tools {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	overflow: auto;
	width: 580px;
	height: 100%;
	transition: width .8s;
}
@media only screen and (max-width: 1700px) {
	#tools {
		width: 440px;
	}
}

@media only screen and (max-width: 1540px) {
	#tools {
		width: 300px;
	}
}
@media only screen and (max-width: 1380px) {
	#tools {
		width: 160px;
	}
}

#tools > div {
	display: block;
	background-image: url('../textures/01_130x66_130x230.png');
	background-repeat: no-repeat;
	background-size: auto;
	width: 130px;
	height: 230px;
	border: 2px dashed transparent;
	box-sizing: border-box;
}

#tools > div.selected {
	border-color: #b05355;
}

@media only screen and (max-width: 966px) {

	#main {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}
	
	#tools {
		display: flex;
		align-items: center;
		overflow: auto;
		width: 100%;
		height: 240px;
	}
	#area {
		justify-content: flex-start;
	}

	#banner .tips {
		font-size: 11px;
	}
	#banner h1 {
		font-size: 16px;
	}
	
}
