@charset "UTF-8";

/* 本文やスマホの下部メニューに重なりにくい「先頭へ戻る」ボタン。 */
body #go-to-top {
  right: clamp(16px, 2.5vw, 32px);
  bottom: calc(24px + var(--cocoon-child-footer-menu-height, 0px));
  z-index: 90;
  transition: opacity 220ms ease, visibility 220ms ease;
}

body #go-to-top .go-to-top-button {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 54px;
  height: 54px;
  padding: 8px;
  border: 1px solid #6b8195;
  border-radius: 16px;
  background: #203247;
  color: #eee3cf;
  box-shadow: 3px 4px 0 rgba(109, 135, 156, 0.45);
  opacity: 1;
  transition: background-color 180ms ease, transform 220ms ease, box-shadow 220ms ease;
}

#go-to-top .go-to-top-button svg {
  display: block;
  width: 18px;
  height: 18px;
}

#go-to-top .back-top-label {
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

body #go-to-top .go-to-top-button:focus-visible {
  outline: 3px solid #c6a675;
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body #go-to-top .go-to-top-button:hover {
    background: #2d465c;
    color: #fff4df;
    transform: translateY(-3px);
    box-shadow: 3px 7px 0 rgba(109, 135, 156, 0.45);
  }

  body #go-to-top .go-to-top-button:active {
    transform: translateY(1px);
    box-shadow: 1px 2px 0 rgba(109, 135, 156, 0.45);
  }
}

@media screen and (min-width: 1024px) {
  body #go-to-top {
    right: clamp(48px, 5vw, 88px);
    bottom: calc(56px + var(--cocoon-child-footer-menu-height, 0px));
  }

  body #go-to-top .go-to-top-button {
    width: 68px;
    height: 68px;
    gap: 5px;
    border-radius: 18px;
  }

  #go-to-top .go-to-top-button svg {
    width: 24px;
    height: 24px;
  }

  #go-to-top .back-top-label {
    font-size: 10px;
  }
}

@media screen and (max-width: 640px) {
  body #go-to-top {
    bottom: calc(16px + var(--cocoon-child-footer-menu-height, 0px));
  }

  body #go-to-top .go-to-top-button {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

/* 同じ役割のボタンは、浮かせたものに一本化する。 */
.mobile-footer-menu-buttons .top-menu-button {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  body #go-to-top,
  body #go-to-top .go-to-top-button {
    transition: none;
  }
}
