#coordinate-warp
{
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	z-index: 2;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 4px;
	background: rgba(20, 36, 42, 0.82);
	color: #fff;
	font: 12px/1.2 sans-serif;
}

#walk-mode
{
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 3px;
	background: rgba(20, 36, 42, 0.88);
	color: #fff;
	font: 600 13px/1 sans-serif;
	cursor: pointer;
}

#walk-mode:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 2px;
}

#walk-mode:disabled
{
	opacity: 0.55;
	cursor: wait;
}

#drive-mode
{
	position: absolute;
	top: 14px;
	right: 82px;
	z-index: 2;
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 3px;
	background: rgba(20, 36, 42, 0.88);
	color: #fff;
	font: 600 13px/1 sans-serif;
	cursor: pointer;
}

#drive-mode:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 2px;
}

#drive-mode:disabled
{
	opacity: 0.55;
	cursor: wait;
}

#mouse-lock
{
	position: absolute;
	top: 102px;
	right: 14px;
	z-index: 2;
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 3px;
	background: rgba(20, 36, 42, 0.88);
	color: #fff;
	font: 600 13px/1 sans-serif;
	cursor: pointer;
}

#mouse-lock:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 2px;
}

#mouse-lock:disabled
{
	opacity: 0.55;
	cursor: wait;
}

#debug-stats
{
	position: absolute;
	top: 146px;
	right: 14px;
	z-index: 2;
	padding: 5px 7px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 3px;
	background: rgba(20, 36, 42, 0.82);
	color: #fff;
	font: 11px/1.2 monospace;
	font-variant-numeric: tabular-nums;
}

#debug-stats[hidden]
{
	display: none;
}

#view-state-controls
{
	position: absolute;
	top: 58px;
	right: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 2;
}

#view-state-controls button
{
	min-height: 36px;
	padding: 7px 10px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 3px;
	background: rgba(20, 36, 42, 0.88);
	color: #fff;
	font: 600 13px/1 sans-serif;
	cursor: pointer;
}

#view-state-controls button:disabled
{
	opacity: 0.55;
	cursor: wait;
}

#view-state-controls button:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 2px;
}

#view-state-status
{
	color: #fff;
	font: 11px/1.2 sans-serif;
}

#coordinate-warp .coordinate-warp-row
{
	display: flex;
	align-items: center;
	gap: 7px;
}

#coordinate-warp .coordinate-warp-row label
{
	display: flex;
	align-items: center;
	gap: 4px;
}

#coordinate-warp .coordinate-warp-location
{
	display: flex;
	align-items: center;
	gap: 7px;
}

#coordinate-warp input,
#coordinate-warp select
{
	width: 88px;
	min-width: 0;
	padding: 5px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.95);
	color: #17282d;
	font: inherit;
}

#coordinate-warp select
{
	flex: 1;
	width: auto;
}

#coordinate-warp button
{
	min-height: 28px;
	padding: 4px 9px;
	border: 0;
	border-radius: 3px;
	background: #f1c75b;
	color: #17282d;
	font: inherit;
	cursor: pointer;
}

#coordinate-warp button:disabled
{
	opacity: 0.55;
	cursor: wait;
}

#coordinate-warp output
{
	color: #ffe09a;
}

#coordinate-warp input:focus-visible,
#coordinate-warp select:focus-visible,
#coordinate-warp button:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 2px;
}

#viewer .touch-joystick
{
	display: none;
	position: absolute;
	bottom: 20px;
	z-index: 2;
	width: 112px;
	height: 112px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 50%;
	background: rgba(20, 36, 42, 0.32);
	box-shadow: inset 0 0 0 1px rgba(15, 31, 37, 0.18), 0 2px 8px rgba(15, 31, 37, 0.2);
	touch-action: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

#viewer .touch-joystick::after
{
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(238, 246, 244, 0.76);
	box-shadow: 0 1px 5px rgba(15, 31, 37, 0.28);
	content: "";
	transform: translate(calc(-50% + var(--stick-x, 0px)), calc(-50% + var(--stick-y, 0px)));
}

#viewer .touch-joystick:focus-visible
{
	outline: 2px solid #f1c75b;
	outline-offset: 3px;
}

#viewer .touch-joystick.is-disabled
{
	visibility: hidden;
	pointer-events: none;
}

#viewer .touch-joystick-move
{
	left: 20px;
}

#viewer .touch-joystick-look
{
	right: 20px;
}

@media (hover: none) and (pointer: coarse), (max-width: 700px)
{
	#viewer .touch-joystick
	{
		display: block;
	}
}

@media (max-width: 480px)
{
	#viewer .touch-joystick
	{
		bottom: 16px;
		width: 96px;
		height: 96px;
	}

	#viewer .touch-joystick-move
	{
		left: 16px;
	}

	#viewer .touch-joystick-look
	{
		right: 16px;
	}
}
