/* Back-to-top button styles */
.back-to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, opacity .2s ease;
  z-index: 1200;
}
.back-to-top:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.16); }
.back-to-top:active{ transform: translateY(0); }
.back-to-top[hidden]{ opacity: 0; pointer-events: none; }

/* Respect safe area on iOS */
@supports (padding: max(0px)){
  .back-to-top{ right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* Dark mode friendly */
@media (prefers-color-scheme: dark){
  .back-to-top{ background: #141414; color: #f0f0f0; border-color: rgba(255,255,255,0.08); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
}
