.gotop{
  display: flex;
  position: fixed;
  visibility: hidden;
  flex-direction: column;
  justify-content: center;

  bottom: 2vw;
  right: 2vw;
  height: 10vw;
  width: 9.5vw;
  max-height: 60px;
  max-width: 55px;

  background-color: transparent;
  color: var(--color-black);
  font-size: 1.5rem;
  text-align: center;
  text-justify: center;
  border: 1px solid var(--color-black);
  cursor: pointer;
  z-index: var(--z-gotop);
  transition: all 0.2s ease;
  box-shadow: 2px 2px 0 var(--color-shadow);
}

.gotop:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--color-shadow);
}

.gotop:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 var(--color-shadow);
}
.gotop__icon {
  display: inline-block;
  position: relative;
  align-self: center;
  width: 20px;
  height: 20px;
}
.gotop__line1 {
  content: '';
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 0px;
  width: 12px;
  height: 1px;
  background-color: var(--color-black);
  transform: translateY(-50%) rotate(-45deg); /* 自身の半分だけ上にずらして中央配置 */
  transform-origin: center;
}
.gotop__line2 {
  content: '';
  display: inline-block;
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 1px;
  background-color: var(--color-black);
  transform: translateY(-50%) rotate(45deg);
  transform-origin: center;
}

.gotop--show {
  visibility: visible;
  opacity: 1;
}

.gotop--mobile {
  /* top: 3vw; */
  /* right: calc(3vw + 9.5vw + 2rem); */
  height: calc(10vw * 1.0);
  width: calc(9.5vw * 1.0);
  max-height: calc(60px * 1.3);
  max-width: calc(55px * 1.3);

  line-height: 40px;
  font-size: 20px;
}

/* アニメーション */
.gotop{
  --anm-duration: 0.4s;
}
.gotop--anm-fade-in {
  animation: gotopFadeIn var(--anm-duration) ease-out forwards;
}
.gotop--anm-fade-out {
  animation: gotopFadeOut var(--anm-duration) ease-out forwards;
}

@keyframes gotopFadeIn {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1; /* 不透明にする */
    visibility: visible;
  }
}
@keyframes gotopFadeOut {
  0% {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  50% {
    opacity: 0;
  }
  100% {
    transform: translateY(-20px);
    opacity: 0;
  }
}