
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the function $f\left(x\right)=2\sin ^{2}(\frac{π}{4}+x)-\sqrt{3}\cos 2x$, where $x\in [\frac{π}{4}$,$\frac{π}{2}]$. Find:<br/>$(Ⅰ)$ the maximum and minimum values of $f\left(x\right)$;<br/>$(Ⅱ)$ the range of real number $m$ if the inequality $|f\left(x\right)-m| \lt 2$ holds for $x\in [\frac{π}{4}$,$\frac{π}{2}]$.

Present the answer in LaTex format: \boxed{Your answer}
user