.cobb-mobile-controls {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	font-family: Arial, Helvetica, sans-serif;
}

.cobb-mobile-controls,
.cobb-mobile-controls * {
	box-sizing: border-box;
	touch-action: none;
}

.cobb-mobile-controls__cluster {
	position: absolute;
	bottom: max(18px, env(safe-area-inset-bottom));
	display: flex;
	align-items: flex-end;
	gap: 12px;
	pointer-events: auto;
}

.cobb-mobile-controls__cluster--move {
	left: max(16px, env(safe-area-inset-left));
}

.cobb-mobile-controls__cluster--actions {
	right: max(16px, env(safe-area-inset-right));
	align-items: center;
}

.cobb-mobile-controls__stick {
	position: relative;
	width: 136px;
	height: 136px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: rgba(8, 9, 12, 0.46);
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.28),
		0 10px 28px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(4px);
}

.cobb-mobile-controls__stick::before,
.cobb-mobile-controls__stick::after {
	content: "";
	position: absolute;
	background: rgba(255, 255, 255, 0.22);
}

.cobb-mobile-controls__stick::before {
	left: 22px;
	right: 22px;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
}

.cobb-mobile-controls__stick::after {
	top: 22px;
	bottom: 22px;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
}

.cobb-mobile-controls__stick-knob {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 54px;
	height: 54px;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 50%;
	background: rgba(246, 195, 67, 0.84);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.cobb-mobile-controls__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	height: 72px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	background: rgba(8, 9, 12, 0.54);
	color: #ffffff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.24),
		0 10px 28px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(4px);
	appearance: none;
	-webkit-appearance: none;
}

.cobb-mobile-controls__button--select {
	width: 82px;
	height: 82px;
	background: rgba(246, 195, 67, 0.88);
	color: #151515;
}

.cobb-mobile-controls__button--back {
	width: 62px;
	height: 62px;
	font-size: 15px;
}

.cobb-mobile-controls__button.is-active,
.cobb-mobile-controls__stick.is-active .cobb-mobile-controls__stick-knob {
	filter: brightness(1.12);
	transform: translate(-50%, -50%) scale(0.95);
}

.cobb-mobile-controls__button.is-active {
	transform: scale(0.95);
}

@media (hover: none), (pointer: coarse), (max-width: 900px) {
	.cobb-mobile-controls {
		display: block;
	}
}

@media (max-width: 520px) {
	.cobb-mobile-controls__stick {
		width: 118px;
		height: 118px;
	}

	.cobb-mobile-controls__stick-knob {
		width: 48px;
		height: 48px;
	}

	.cobb-mobile-controls__button--select {
		width: 74px;
		height: 74px;
	}

	.cobb-mobile-controls__button--back {
		width: 58px;
		height: 58px;
	}
}

@media (max-height: 430px) {
	.cobb-mobile-controls__cluster {
		bottom: max(10px, env(safe-area-inset-bottom));
	}

	.cobb-mobile-controls__stick {
		width: 108px;
		height: 108px;
	}

	.cobb-mobile-controls__stick-knob {
		width: 44px;
		height: 44px;
	}

	.cobb-mobile-controls__button--select {
		width: 68px;
		height: 68px;
	}

	.cobb-mobile-controls__button--back {
		width: 54px;
		height: 54px;
	}
}
