/* 返回顶部按钮（全站公用，独立文件，不覆盖页面原有样式） */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--border-radius-full, 9999px);
  background: linear-gradient(135deg, #1A56DB 0%, #0F3FA8 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lg, 0 16px 32px rgba(15, 23, 42, 0.12));
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, box-shadow .25s ease;
  z-index: 90;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(26, 86, 219, 0.35);
}

.back-to-top:active {
  transform: translateY(0) scale(0.94);
}

.back-to-top:focus-visible {
  outline: 2px solid #1A56DB;
  outline-offset: 3px;
}

.back-to-top__icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top__progress {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  pointer-events: none;
}

.back-to-top__progress circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
  stroke-linecap: round;
  cx: 24;
  cy: 24;
  r: 22;
}

@media (max-width: 768px) {
  /* 移动端让开底部悬浮条（body padding-bottom: 54px） */
  .back-to-top {
    right: 16px;
    bottom: 70px;
    width: 42px;
    height: 42px;
  }

  .back-to-top__icon {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
