#mokuji,
#mokuji-cat {
  background: #f3f3f3;
  border: 2px solid #d2d0c5;
  border-radius: 4px;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  box-sizing: border-box;
  display: table;
  width: 100%;
  margin-bottom: 40px;
  position: relative;
  counter-reset: counter;
  line-height: 1.3;
  font-size: 100%;
}

#mokuji-toggle {
  display: flex;
  align-items: center;
  width: 35px;
  height: 30px;
  justify-content: center;
  direction: ltr;
  cursor: pointer;
}

.mokuji-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 10px;
}

.mokuji-title:before,
.mokuji-title:before {
  content: "\76EE\6B21";
  /* content: "目次"; */
  line-height: 1.45;
  margin: 0;
  padding: 0;
  display: inline;
  text-align: left;
  vertical-align: middle;
  font-size: 110%;
  color: var(--bs-body-color);
}

#mokuji ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0px;
  padding-left: 0;
  padding: 0px 10px 8px 10px;
}

#mokuji ul li {
  list-style-type: none;
}

#mokuji li a,
#mokuji-cat li a {
  display: flex;
  align-items: start;
  gap: 4px;
  padding: 4px 0;
  text-decoration: none;
  color: #584752;
  line-height: 1.6;
}

#mokuji li a:hover,
#mokuji-cat li a:hover {
  text-decoration: underline;
}

#mokuji li a strong,
#mokuji-cat li a strong {
  font-weight: 500 !important;
}

#mokuji .mokuji-h2,
#mokuji .mokuji-h3 {
  font-size: 95%;
  user-select: none;
}

#mokuji .mokuji-h2 {
  counter-reset: sub-counter;
  text-indent: 0;
  position: relative;
}

#mokuji .mokuji-h3 {
  margin-left: 1.5em !important;
  text-indent: 0;
  position: relative;
}

#mokuji .mokuji-h3 a {
  font-size: 90%;
}

#mokuji .mokuji-h2 a:before {
  counter-increment: counter;
  content: counter(counter) ". ";
  margin-right: .2em;
}

#mokuji .mokuji-h3 a:before {
  counter-increment: sub-counter;
  content: counter(counter) "." counter(sub-counter) ". ";
  margin-right: .2em;
}


@media (min-width: 768px) {

  #mokuji,
  #mokuji-cat {
    font-size: 110%;
  }

  #mokuji ul {
    gap: 0;
  }

  .mokuji-title {
    padding: 10px 20px 10px 20px;
  }


  #mokuji ul {
    padding: 0px 20px 20px 20px;
  }
}