/* 右下の「ページの先頭へ戻る」ボタン（js/hs-totop.js） */
.hs-totop {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  display: block;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #153d32; /* ロゴの背景色に合わせた緑 */
  color: #fff;
  box-shadow: 0 6px 18px rgba(21, 61, 50, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s, background-color .25s ease, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.hs-totop.is-show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.hs-totop:hover {
  background: #1f5444;
  box-shadow: 0 10px 24px rgba(21, 61, 50, .34);
}
.hs-totop:focus-visible {
  outline: 3px solid #153d32;
  outline-offset: 3px;
}

/* 進捗の輪 */
.hs-totop__ring {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}
.hs-totop__track,
.hs-totop__bar {
  fill: none;
  stroke-width: 2;
}
.hs-totop__track { stroke: rgba(255, 255, 255, .22); }
.hs-totop__bar {
  stroke: #fff;
  stroke-linecap: round;
}

/* 上向きの矢印 */
.hs-totop__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin: -3px 0 0 -6px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s ease;
}
.hs-totop:hover .hs-totop__arrow {
  transform: translateY(-3px) rotate(45deg);
}

/* スマホの全画面メニューが開いている間は出さない */
.hs-menu-open .hs-totop {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 767px) {
  .hs-totop {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
  }
  .hs-totop__ring { top: 0; left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-totop,
  .hs-totop__arrow { transition-duration: .01s !important; }
}
