/* Stage 21d: custom HUD layout (src/ui/hudLayout.js). Default layout = no inline styles = the rules above. */

/* measure pass: every control laid out (invisible, one synchronous step) so its stylesheet box can be read */
.touch-layer.hl-measure { display: block !important; visibility: hidden !important; }
.touch-layer.hl-measure .tc-btn { display: flex !important; transition: none !important; }

/* a moved stick: its rest point from the layout; the base + knob scale with the joystick group */
.tc-stick.is-rest.hl-pos { left: var(--hl-l); top: var(--hl-t); bottom: auto; }
.tc-stick .tc-base, .tc-stick .tc-knob { scale: var(--hl-s, 1); }

/* a moved hotbar: left / top are written as its box, so the centring transform goes */
#ui .hotbar.hl-pos { transform: none; }

/* edit mode (src/ui/hudEditor.js): every control shown, inert (the editor's proxies take the touches) */
.touch-layer.hl-editing { display: block !important; pointer-events: none !important; }
.touch-layer.hl-editing .tc-btn { display: flex !important; opacity: 1 !important; animation: none !important; transform: none !important; }
html.hl-editing #ui .hud { opacity: 1 !important; visibility: visible !important; }
html.hl-editing #ui .hotbar, html.hl-editing #ui .needs { visibility: visible !important; pointer-events: none !important; }
html.hl-editing #ui .vital.is-away, html.hl-editing #ui .vital[hidden] { opacity: 1 !important; display: flex !important; }
html.hl-editing .rotate-hint { display: none !important; }
