/* Arrange mode (client/js/ui/arrange.js): Cancel / Rotate / View / Place bar while a shelf is being carried, and the touch "Move" button
   shown when you face a movable shelf. Same glass as the HUD; never covers the joystick / touch cluster zones. */
#arrange-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--sab, 0px) + 20px); z-index: 30;
  display: flex; gap: 6px; padding: 6px; border-radius: 20px; pointer-events: auto;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), var(--hl), 0 14px 36px rgba(0, 0, 0, .4);
}
#arrange-bar[hidden], #arrange-move[hidden] { display: none; }
.ar-btn {
  pointer-events: auto; touch-action: none; cursor: pointer; border: 0; margin: 0;
  min-width: 76px; height: 56px; padding: 0 14px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-1); font-family: var(--font-ui); font-weight: 600; font-size: 12px; line-height: 1;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .12s, background-color .15s; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.ar-btn:hover { background: rgba(255, 255, 255, .1); }
.ar-btn:active { transform: scale(.95); }
.ar-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ar-btn .ar-ico { display: inline-flex; line-height: 1; color: var(--text-2); }
.ar-btn .ar-ico .ico-svg { width: 20px; height: 20px; }
.ar-btn .ar-lbl { color: var(--text-2); }
.ar-btn.place { background: var(--accent-600); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 18px -6px rgba(0, 135, 81, .6); min-width: 96px; }
.ar-btn.place:hover { background: var(--accent-650); }
.ar-btn.place .ar-ico, .ar-btn.place .ar-lbl { color: #fff; }
.ar-btn.cancel .ar-ico { color: var(--red-300); }
#arrange-move {
  position: fixed; z-index: 30; pointer-events: auto;
  right: calc(var(--sar, 0px) + 16px + 222px * var(--tsz, 1)); bottom: calc(var(--sab, 0px) + 28px);
  border-radius: 50%; width: 68px; height: 68px; min-width: 0; padding: 0;
  background: rgba(12, 15, 14, .6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 8px 22px rgba(0, 0, 0, .32); font-size: 11px;
}
#arrange-move .ar-ico { color: #fff; }
html.nsr-arranging #touch-layer .tl-cluster .tl-btn { opacity: 0; pointer-events: none; }
html.is-phone #arrange-bar { gap: 4px; padding: 5px; }
html.is-phone .ar-btn { min-width: 62px; height: 52px; padding: 0 10px; }
/* touch: the bar takes the button-cluster corner (its buttons are hidden while arranging), 2 x 2 big targets, the joystick side stays free */
html.is-touch #arrange-bar { left: auto; right: calc(var(--sar, 0px) + 12px); transform: none; bottom: calc(var(--sab, 0px) + 12px); display: grid; grid-template-columns: 1fr 1fr; }
html.is-touch .ar-btn { min-width: 84px; height: 64px; }
html.is-touch #touch-layer.lefty ~ #ui #arrange-bar, html.is-touch.nsr-lefty #arrange-bar { right: auto; left: calc(var(--sal, 0px) + 12px); }
@media (max-height: 420px) { #arrange-bar { bottom: calc(var(--sab, 0px) + 8px); } .ar-btn { height: 46px; } }
