.wp-block-tobitate-blocks-table-of-contents {
  background-color: #fff;
  border: 1px solid #808080;
  border-radius: 5px;
  width: 100%;
  max-width: 70%;
  padding: 0;
  margin: 24px 0;
}

.wp-block-tobitate-blocks-table-of-contents .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 15px;
  background-color: #0068b6;
}

.wp-block-tobitate-blocks-table-of-contents .header p {
  margin: 0;
  color: #231815;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #FFF;
  font-size: 1.125em;
}

.wp-block-tobitate-blocks-table-of-contents .header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 96px;
  height: 36px;
  padding: 0 14px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  color: #0068b6;
  border: 1px solid #0068b6;
  background-color: #fff;
  transition: 0.2s;
}

.wp-block-tobitate-blocks-table-of-contents .header a::after {
  content: '+';
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
  font-size: 14px;
  border-radius: 9999px;
  border: 1px solid #0068b6;
  color: #0068b6;
  background-color: #fff;
}

.wp-block-tobitate-blocks-table-of-contents .header a.is-open::after {
  content: '−';
  border-color: #fff;
  background-color: #fff;
  color: #0068b6;
}

.wp-block-tobitate-blocks-table-of-contents .header a.is-open {
  background-color: #0068b6;
  color: #fff;
}

.wp-block-tobitate-blocks-table-of-contents .header a:hover {
  opacity: 0.9;
}

.wp-block-tobitate-blocks-table-of-contents .body {
  padding: 15px;
}

.wp-block-tobitate-blocks-table-of-contents .root {
  margin: 0;
  padding-left: 0;
  list-style: none !important;
  counter-reset: toc-root;
}

.wp-block-tobitate-blocks-table-of-contents .root > li {
  margin: 10px 0;
  position: relative;
  padding-left: 2.4em;
  counter-increment: toc-root;
  line-height: 0;
}

.wp-block-tobitate-blocks-table-of-contents .root > li::before {
  content: counter(toc-root) ".";
  position: absolute;
  left: 0;
  top: 0;
  height: 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 2em;
  color: #0068b6;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.6;
}

.wp-block-tobitate-blocks-table-of-contents .root a {
  display: inline-block;
  width: 100%;
  color: #0068b6;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.6;
}

.wp-block-tobitate-blocks-table-of-contents .root a:hover {
  text-decoration: underline;
}

.wp-block-tobitate-blocks-table-of-contents .child {
  margin-top: 8px;
  list-style: none !important;
}

.wp-block-tobitate-blocks-table-of-contents .child li {
  margin: 8px 0;
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  column-gap: 0.2em;
  align-items: start;
}

.wp-block-tobitate-blocks-table-of-contents .child li::before {
  content: '・';
  display: block;
  width: 1em;
  text-align: center;
  color: #231815;
  font-weight: 700;
  line-height: 1.6;
  transform: translateY(-0.06em);
}

.wp-block-tobitate-blocks-table-of-contents .child a {
  display: block;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: #231815;
  line-height: 1.6;
}

.wp-block-tobitate-blocks-table-of-contents:not(.is-open) .body {
  display: none;
}

@media (max-width: 767px) {
  .wp-block-tobitate-blocks-table-of-contents {
    max-width: 100%;
  }
}

