* { margin: 0; }

.container {
  position: relative;
  width: 70%;
  height: 70vh;
  margin: 1vh 15%;
  box-sizing: border-box;
  overflow: auto;
  line-height: 1.5rem;
  padding: 10px 20px;
  background-color: #fff;
  color: #777;
  user-select: none;
}

main {
  position: fixed;
  top: 10px;
  bottom: 10px;
  left: 155px;
  right: 20px;
  border: inset 1px;
  padding: 10px 20px;
  font-family: monospace, Arial;
  font-size: 12px;
  line-height: 1.2rem;
  overflow: auto;
  background-color: #ddb;
}

#rule {
  width: 200vw;
  height: 2.5vh;
}

#main_demo, #section_1_demo, #section_2_demo {
  position: relative;
  height: 30vh;
  border-bottom: groove 3px #fff;
  padding: 10px;
  font-family: Arial;
  font-size: 12px;
  line-height: 22px;
}

#main_demo > h4, #section_1_demo > h4, #section_2_demo > h4 {
  position: sticky;
  top: 0;
}
#demo input {
  width:50px;
  font-size:11px;
  text-align:center;
}

#main_demo > figure, #section_1_demo > figure, #section_2_demo > figure {
    display: flex;
    flex-direction:column;
    align-items: flex-end;
    justify-items: space-between;
    position:relative;
    margin-top: 15px;
    padding-right:5px;
    height: calc(30vh - 40px);
    overflow: auto;
  }

h4 { color: #fff; font-size: 12px; background-color: #079; padding: 2px 10px; }

#demo {
  position: fixed;
  top: 0vh;
  left:0;
  width: 150px;
  height: 99vh;
  border: solid 1px #999;
  box-shadow: 2px 2px 4px #00000090;
  background-color:#eee;
  line-height: 1.5rem;
  z-index: 5;
}
