/* v3.5.7.2 — global back-to-top control */
.back-to-top {
  position: fixed;
  inset-inline-start: max(18px, env(safe-area-inset-left));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 70;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(237, 28, 46, 0.48);
  border-radius: 999px;
  background: rgba(14, 14, 15, 0.94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, border-color .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top::before {
  content: "↑";
  font: 800 24px/1 Arial, sans-serif;
  transform: translateY(-1px);
}

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

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: #ed1c2e;
  background: #ed1c2e;
  outline: none;
}

@media (max-width: 640px) {
  .back-to-top {
    width: 42px;
    height: 42px;
    inset-inline-start: 14px;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  }
}

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