/* Reuse the page's vertical scroll. The app handles only refresh at its boundaries. */
html:has(.bottom-nav, .manager-dock) {
  overscroll-behavior-y: contain;
}

.gesture-indicator {
  position: fixed;
  z-index: 12;
  inset-inline-start: 50%;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 4px 16px #0003;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.gesture-indicator[data-edge="top"] { top: calc(12px + env(safe-area-inset-top)); }
.gesture-indicator[data-edge="bottom"] { bottom: calc(var(--dock-clearance, 102px) + 6px); }
.gesture-indicator[data-phase="armed"] { border-color: var(--accent-readable); }
.gesture-indicator-ring {
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--accent-readable);
  border-radius: 50%;
}
.gesture-indicator[data-phase="working"] .gesture-indicator-ring { animation: gesture-spin .7s linear infinite; }
.gesture-indicator[data-phase="finished"] .gesture-indicator-ring { display: none; }
@keyframes gesture-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .gesture-indicator[data-phase="working"] .gesture-indicator-ring { animation: none; }
}
