/* ジハンピチケット TOP / 活用事例 — 右下 ページ先頭へ（共通） */
.jihanpi-back-to-top {
  position: fixed;
  z-index: 10050;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #0174c6;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 8px, 0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.jihanpi-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.jihanpi-back-to-top.is-visible:hover {
  background-color: #0063ad;
}

.jihanpi-back-to-top.is-visible:active {
  background-color: #00579a;
}

.jihanpi-back-to-top__icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.jihanpi-back-to-top:focus-visible {
  outline: 2px solid #0174c6;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .jihanpi-back-to-top {
    transition-duration: 0.01ms;
  }
}
