.nav {
  background-color: #2a2a2a;
  width: 100%;
  position: fixed;
  z-index: 1001;
  height: 45px;
}

.nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav ul li {
  margin-left: 20px;
  height: 100%;
}

.nav ul li.right {
  margin-left: auto;
  margin-right: 20px;
}

.nav ul li.rightend {
  margin-right: 20px;
}

.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  box-sizing: border-box;
  transition-duration: 0.35s;
  -webkit-text-size-adjust: 100%; /* iOS Safari対策 */
}

.nav a:hover {
  color: #f0ffff;
  background-color: #3a3a3a;
}

.nav img {
  display: block;
  max-height: 30px;
  max-width: 30px;
  margin-right: 10px;
}

@media screen and (max-width: 640px) {
  .nav a {
    font-size: 16px;
    line-height: 24px;
  }
}
