html {
  scroll-behavior: smooth;
}

.page-top-button {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border: 1px solid #292d25;
  border-radius: 50%;
  background: #f7f5ee;
  color: #292d25;
  box-shadow: 0 3px 12px #20231e26;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.page-top-button:hover {
  background: #292d25;
  color: #f7f5ee;
}

.page-top-button:focus-visible {
  outline: 3px solid #db5036;
  outline-offset: 4px;
}

@media (max-width: 650px) {
  .page-top-button {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-top-button { transition: none; }
}
