
/* 素人のコードなので、あまり見ないであげてください( ;∀;) */

html {
  height: 100%;
  width: 100%;
}
body {
  height: 100%;
  width: 100%;
  display:  flex;
  margin: 0;

  font-family: sans-serif;

  overflow: scroll;
}
div.wrapper {
  position: relative;
  flex-grow: 1;
  padding: 10px;
  min-width: 250px;
}

div.tab_wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  display:  flex;
  flex-direction: column;
}
div.tab_bar_wrapper {
  flex-basis: 35px;
  flex-grow: 0;
  flex-shrink: 0;
  padding: 7px 10px 10px 10px;
  
  background-color: #eaeaea;
}
div.tab_bar {
  display: flex;
  flex-direction: row;
  height: 100%;
  padding-bottom: 10px;

  overflow: scroll visible;
}
div.tab_tab {
  flex-basis: 150px;
  flex-grow: 0;
  flex-shrink: 1;
  min-width: 100px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 6px 5px 5px 5px;
  margin-right: 5px;

  border-radius: 3px;
  box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.2);

  user-select: none;
}
div.tab_tab:hover {
  background-color: #ddd;
}
span.tab_caption {
  line-height: 1em;
}
div.tab_content {
  min-height: 50px;
  flex-grow: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

div.side_bar1,div.side_bar2 {
  flex-basis: 250px;
  min-width: 150px;
  flex-grow: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;

  /*border-style: solid;
  border-width: 1px;*/
}
div.main_space {
  flex-basis: 300px;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}
div.question_area {
  flex-basis: 100px;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  border-style: double;
}
span.question_number {
  font-size: 4rem;
  text-align: center;
  display: none;
}
div.message_area {
  flex-basis: 50px;
  flex-grow: 0;
  flex-shrink: 0;

  text-align: center;
  font-size: 2rem;
  font-family: monospace;
}
div.output_area {
  flex-basis: 50px;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: 5px;
  padding: 5px;
  justify-content: flex-end;

  border-style: solid;
  border-width: 1px;
}
div.output_cell {
  flex-basis: 50px;
  flex-grow: 0;
  flex-shrink: 0;

  border-style: none none solid none;
  border-width: 3px;

  font-size: 2rem;
  text-align: center;
}
div.input_area {
  flex-basis: 250px;
  flex-grow: 0;
  flex-shrink: 0;
  min-height: 200px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
}
div.input_button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 5px;

  border-radius: 10px;
  background-color: #ccf;
}
div.input_button:hover {
  background-color: #aaf;
}
div.input_button:active {
  background-color: #99f;
}
span.input_button {
  font-size: 2rem;
  text-align: center;
  line-height: 1em;
  user-select: none;
}


div.log_area,div.memo_area {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}
span.area_body {
  padding: 3px;
  border: 1px solid;
  min-height: 0;
  overflow: scroll;
}
.log_body,.memo_body {
  flex-grow: 1;
  display: none;

  font-family: sans-serif;
  resize: none;
}

span.area_caption {
  font-size: 1.2rem;
}

div.q2 {
  display: none;
}

div.tab_wrapper.display1 div.tab_tab.tab1,
div.tab_wrapper.display2 div.tab_tab.tab2,
div.tab_wrapper.display3 div.tab_tab.tab3,
div.tab_wrapper.display4 div.tab_tab.tab4,
div.tab_wrapper.display5 div.tab_tab.tab5,
div.tab_wrapper.display6 div.tab_tab.tab6{
  background-color: #fff;
}

div.tab_wrapper.display1 .area_body.content1,
div.tab_wrapper.display2 .area_body.content2,
div.tab_wrapper.display3 .area_body.content3,
div.tab_wrapper.display4 .area_body.content4,
div.tab_wrapper.display5 .area_body.content5,
div.tab_wrapper.display6 .area_body.content6{
  display: initial;
}

div.tab_wrapper.display1 .question_number.content1,
div.tab_wrapper.display2 .question_number.content2,
div.tab_wrapper.display3 .question_number.content3,
div.tab_wrapper.display4 .question_number.content4,
div.tab_wrapper.display5 .question_number.content5,
div.tab_wrapper.display6 .question_number.content6{
  display: initial;
}

div.tab_wrapper.display5 .question_area.q2 {
  display: flex;
}
div.tab_wrapper.display5 .message_area.q2 {
  display: initial;
}


.clear_back {
  display: none;
  position: fixed;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);

  z-index: 10;
}
.clear_back.show {
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear_back.initial {
  left: -300%;
  top: -300%;
}


.clear_wrapper {
  position: relative;
  height: 400px;
  width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #ddd;
  border-radius: 20px;
  
}

.clear_close_box {
  position: absolute;
  right: 10px;
  top: 10px;
  height: 40px;
  width: 40px;

  background-color: #ccc;
  border-radius: 20px;
}
.clear_close_box:hover {
  background-color: #bbb;
}
.clear_close_box::before, .clear_close_box::after { /* 共通設定 */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px; /* 棒の幅（太さ） */
  height: 25px; /* 棒の高さ */
  background: #555;
}
.clear_close_box::before {
  transform: translate(-50%,-50%) rotate(45deg);
} 
.clear_close_box::after {
  transform: translate(-50%,-50%) rotate(-45deg);
}

.clear_message {
  text-align: center;
}
.level_clear {
  font-size: 3rem;
}
.clear_share {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.share_btn {
  display: none;
}
.share_btn.show {
  display: block;
}

.red {
  color: red;
}
.blue {
  color: blue;
}
.black {
  color: black;
}
.green {
  color: green;
}
.strike {
  text-decoration: line-through;
  text-decoration-thickness: 0.15em;
}


@media screen and (max-width: 680px) {
  div.tab_content {
    flex-direction: column;
  }
  div.main_space {
    order: 1;
  }
  div.side_bar1 {
    order: 2;
    flex-basis: 200px;
    min-height: 0;
  }
  div.side_bar2 {
    order: 3;
    flex-basis: 200px;
  }
  
}
