/* iOS 26 UIRefreshControl：液态玻璃圆环 + 跟手阻尼 */

#page-home,
#page-mine {
  overscroll-behavior-y: none;
}

.ptr {
  position: fixed;
  top: calc(var(--safe-top) + 14px);
  left: 50%;
  z-index: 80;
  width: 34px;
  height: 34px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 0, 0) scale(.7);
  transform-origin: 50% 50%;
}

.ptr-glass {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .78);
  border: 0.5px solid rgba(255, 255, 255, .62);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.ptr-svg {
  display: block;
  width: 18px;
  height: 18px;
}

.ptr-track {
  fill: none;
  stroke: rgba(60, 60, 67, .16);
  stroke-width: 2.6;
}

.ptr-arc {
  fill: none;
  stroke: #8E8E93;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 8 100;
  transform: rotate(-90deg);
  transform-origin: 16px 16px;
}

body.tab-home .ptr {
  top: calc(var(--safe-top) + 98px);
}

#page-home .ios-content,
#page-mine .ios-content {
  will-change: transform;
}

body.is-ptr-refreshing .ptr {
  opacity: 1 !important;
}

body.is-ptr-refreshing .ptr-glass {
  animation: ptr-spin .68s linear infinite;
}

body.is-ptr-refreshing .ptr-arc {
  stroke-dasharray: 62 100;
  stroke: var(--ios-label-2);
}

body.is-ptr-refreshing #home-feed-grid,
body.tab-mine.is-ptr-refreshing #page-mine .ios-content {
  opacity: .42;
  transition: opacity 220ms ease;
}

#home-feed-grid,
#page-mine .ios-content {
  transition: opacity 280ms ease;
}

body.is-ptr-pulling #page-home,
body.is-ptr-pulling #page-mine,
body.is-ptr-refreshing #page-home,
body.is-ptr-refreshing #page-mine {
  touch-action: pan-x;
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #page-home .ios-content,
  #page-mine .ios-content { transition: none !important; }
  body.is-ptr-refreshing .ptr-glass { animation: none; }
  body.is-ptr-refreshing #home-feed-grid,
  body.tab-mine.is-ptr-refreshing #page-mine .ios-content { opacity: 1; }
}
