.back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 6px 24px #252b2526;
  cursor: pointer;
  transition: transform .2s ease;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top span { position: relative; width: 18px; height: 22px; }
.back-to-top span::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 2px;
  height: 20px;
  border-left: 2px solid currentColor;
}
.back-to-top span::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}
body:has(.cookie-banner:not([hidden])) .back-to-top { visibility: hidden; }
@media (max-width: 700px) {
  .back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
  .back-to-top:hover { transform: none; }
}
