@charset "utf-8";
/* back-to-top.css · 浮动回到顶部按钮 */

.to-top {
  position: fixed;
  inset-inline-end: clamp(20px, 4vw, 40px);
  inset-block-end: clamp(20px, 4vw, 40px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--accent-solid);
  border-radius: 50%;
  background: var(--accent-solid);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  translate: 0 12px;
  transition:
    opacity 0.28s var(--ease),
    translate 0.28s var(--ease),
    visibility 0.28s var(--ease),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  translate: 0 0;
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--accent-solid-hover);
  border-color: var(--accent-solid-hover);
}

.to-top__icon {
  width: 24px;
  height: 24px;
  fill: currentColor;

  transform: rotate(180deg);
}

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