/* ===== Scroll to Top ===== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 998;
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s, box-shadow 0.2s;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--border);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pile items: fade-in without overriding custom transforms */
.pile-reveal {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pile-reveal.visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .scroll-top {
    bottom: 12px;
    left: 64px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
