.imperial-powerups {
	position: absolute;
	z-index: 70;
	display: flex;
	gap: 8px;
	pointer-events: auto;
}

.imperial-powerup-button {
	position: relative;
	display: grid;
	grid-template-columns: 42px auto;
	grid-template-rows: auto auto;
	align-items: center;
	min-width: 108px;
	min-height: 52px;
	padding: 4px 9px 4px 5px;
	border: 2px solid #e9b84f;
	border-radius: 16px;
	color: #ffedb1;
	background: linear-gradient(180deg, rgba(139, 42, 28, .97), rgba(66, 15, 11, .98));
	box-shadow: inset 0 1px 0 rgba(255, 238, 170, .35), 0 4px 0 #35100b, 0 7px 13px rgba(0, 0, 0, .36);
	font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.imperial-powerup-button img {
	grid-row: 1 / 3;
	width: 40px;
	height: 40px;
	object-fit: contain;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
}

.imperial-powerup-button span {
	font-size: 14px;
	font-weight: 900;
	line-height: 1.05;
	white-space: nowrap;
}

.imperial-powerup-button small {
	color: #e5c77f;
	font-size: 9px;
	line-height: 1.05;
	white-space: nowrap;
}

.imperial-powerup-button b {
	position: absolute;
	top: -7px;
	right: -6px;
	display: grid;
	place-items: center;
	min-width: 21px;
	height: 21px;
	padding: 0 3px;
	border: 1px solid #ffe08a;
	border-radius: 999px;
	color: #fff5c9;
	background: #b53a27;
	font: 900 12px/1 "Microsoft YaHei", sans-serif;
}

.imperial-powerup-button:active:not(:disabled) {
	transform: translateY(3px) scale(.97);
	box-shadow: inset 0 1px 0 rgba(255, 238, 170, .35), 0 1px 0 #35100b;
}

.imperial-powerup-button:disabled {
	filter: grayscale(.9) brightness(.58);
	opacity: .72;
	cursor: default;
}

.imperial-powerup-button.is-activated {
	animation: imperial-powerup-pulse .42s ease;
}

@keyframes imperial-powerup-pulse {
	45% { transform: scale(1.12); filter: brightness(1.45); }
}

@media (max-width: 540px), (max-height: 760px) {
	.imperial-powerup-button {
		grid-template-columns: 34px auto;
		min-width: 91px;
		min-height: 45px;
		padding: 3px 7px 3px 4px;
	}
	.imperial-powerup-button img { width: 33px; height: 33px; }
	.imperial-powerup-button span { font-size: 12px; }
	.imperial-powerup-button small { font-size: 8px; }
}
