@media screen and (min-width: 769px) {
  .sitemap-sp {
    margin-top: 13em;
    color: var(--color-mediumblue-500);

    img {
      position: unset;
    }

    .shadow-box {
      margin-top: 3em;
      padding: 0.5em 1em;
      border-radius: 10px;
      background-color: white;
      --shadow-size: 6px;
    }

    .sitemap-item {
      &:not(.sitemap-top):not(.open) {
        display: none;
      }
    }

    .toggle-sitemap-item {
      cursor: pointer;
    }

    a {
      text-decoration: none;
      color: var(--color-mediumblue-500);
    }

    .sitemap-top {
      display: flex;
      align-items: center;
      justify-content: center;
      max-width: 180px;
      height: 70px;

      img {
        width: 3em;
      }

      p {
        font-size: 2rem;
        font-weight: bold;
      }
    }

    .shadow-box {
      > span {
        font-size: 1.875rem;
        font-weight: bold;
        transform: rotate(-90deg);
      }

      &:has(+ .open) {
        > span {
          transform: rotate(90deg);
          display: none;
        }
      }
    }

    .sitemap-about {
      display: flex;
      justify-content: space-between;
      max-width: 220px;
      height: 70px;

      p {
        line-height: 1.3em;
        font-size: 1.2em;
      }

      p.font-10 {
        font-size: 14px;
      }

      > span {
        font-size: 14px;
      }
    }

    .sitemap-medium {
      display: flex;
      justify-content: space-between;
      max-width: 175px;
      padding-right: 0.1em !important;
      height: unset !important;
      margin-top: 1.5em;
      border-width: 3px;
      border-radius: 6px;
      --shadow-size: 4px;

      > span {
        font-size: 0.6875rem;
      }
    }

    .sitemap-small {
      max-width: 160px;
      height: unset !important;
      margin-top: 1.25em;
      padding-top: 1px;
      padding-bottom: 0;
      border-width: 2px;
      border-radius: 4px;
      --shadow-size: 4px;

      &:before {
        width: calc(1em + 2px);
      }
    }

    .group {
      position: relative;
      margin-bottom: 5rem;
margin-right: -5em;

      &:before {
        position: absolute;
        z-index: -1;
        top: 0;
        bottom: calc(20px - 3px);
        margin-left: 3em;
        content: "";
      }

      > .sitemap-pc {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1em;
        margin-left: 0;

        &:before {
          content: none;
        }

        > .sitemap-item {
          position: relative;
          --bar-bottom: calc(20px - 3px);

          &:before {
            position: absolute;
            z-index: -1;
            top: 4em;
            bottom: var(--bar-bottom);
            margin-left: 1em;
            content: "";
            border-left: 3px solid var(--color-mediumblue-500);
          }

          > .shadow-box {
            position: relative;

            &:before {
              position: absolute;
              top: 50%;
              left: 0;
              width: calc(2em + 3px);
              content: "";
              transform: translateX(-100%);
              border-top: none;
            }
          }

          > div:not(.shadow-box) {
            position: relative;
            margin-left: 3em;
            --bar-bottom: calc(10px - 3px);

            .shadow-box {
              position: relative;

              &:before {
                position: absolute;
                top: 50%;
                left: 0;
                width: calc(1em + 2px);
                content: "";
                transform: translateX(-100%);
                border-top: 3px solid var(--color-mediumblue-500);
              }
            }

            &:before {
              position: absolute;
              z-index: -1;
              top: 0;
              bottom: var(--bar-bottom);
              margin-left: 3em;
              content: "";
            }

            > div:not(.shadow-box) {
              margin-left: 3em;
            }
          }
        }

        > .sitemap-pc-item {
          margin-top: 2em;

          &:before {
            border: none;
          }

          .shadow-box {
            &:before {
              position: absolute;
              top: 50%;
              left: 0;
              width: calc(2em + 2px);
              content: "";
              transform: translateX(-100%);
              border-top: none;
            }
          }
        }
      }
    }
  }

  .container.sitemap-sp.pc {
    width: 100%;
    max-width: 1280px;
  }
}

.sitemap-sp {
  & .group {
    & > .sitemap-pc {
      & > .sitemap-item {
        & > div:not(.shadow-box) {
          & > div:not(.shadow-box) {
            & > div:not(.shadow-box) {
              > div:not(.shadow-box) {
                margin-left: 2em;
              }
            }
          }
        }
      }
    }
  }
}

.sitemap-sp {
  & .group {
    & > div:not(.shadow-box) {
      & > div:not(.shadow-box) {
        &:before {
          position: absolute;
          z-index: -1;
          top: 0;
          bottom: var(--bar-bottom);
          margin-left: 1em;
          content: "";
          border-left: 3px solid var(--color-mediumblue-500);
        }
      }
    }
  }
}

.sitemap-sp {
  & .group {
    & > .sitemap-pc {
      & > .sitemap-item {
        & > div:not(.shadow-box) {
          & .shadow-box {
            &:before {
              position: absolute;
              top: 50%;
              left: 0;
              width: calc(2em + 2px);
              content: "";
              transform: translateX(-100%);
              border-top: 3px solid var(--color-mediumblue-500);
            }
          }
        }
      }
    }
  }
}

.sitemap-sp {
  & .group {
    & > div:not(.shadow-box) {
      & :not(.shadow-box) {
        &::before {
          position: absolute;
          z-index: -1;
          top: 0px;
          margin-left: 2em;
          content: "";
          border-left: 3px solid var(--color-mediumblue-500);
        }
      }
    }
  }
}

.sitemap-sp {
  & .group {
    & > .sitemap-pc {
      & > .sitemap-item {
        & > div:not(.shadow-box) {
          &:before {
            position: absolute;
            z-index: -1;
            top: 0;
            bottom: var(--bar-bottom);
            margin-left: 2em;
            content: "";
            border-left: 3px solid var(--color-mediumblue-500);
          }
        }
      }
    }
  }
}

@media screen and (min-width: 769px) {
  .sitemap-small {
    &:before {
      width: calc(1em + 2px) !important;
    }

    + * {
      --bar-bottom: calc(20px - 3px);
      position: relative;

      &::before {
        position: absolute;
        z-index: -1;
        top: -2em !important;
        bottom: var(--bar-bottom);
        margin-left: calc(1em - 2px) !important;
        content: "";
        border-left: 3px solid var(--color-mediumblue-500);
      }
    }
  }

  .sitemap-pc {
    > .sitemap-item {
      &:before {
        top: 5em !important;
      }

      &:nth-child(2) {
        .sitemap-medium {
          white-space: nowrap;
        }
      }
    }
  }
}
