:root {
  --bg-color: #fafaff;
  --border-color: #ccc;
}

body {
  background-color: var(--bg-color);
}

div {
  margin: 3px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  /*height: -webkit-fill-available;*/
}

@media screen and (min-aspect-ratio: 4/3) {
  div.main {
    width: calc(50vw - 40px);
  }
}

@media screen and (max-aspect-ratio: 4/3) {
  div.main {
    width: 100%;
  }
}

button {
  margin: 2px;
  /* width: 32%; */
  padding: 0 15px;
  height: 24px;
  font-weight: bold;
}

textarea {
  border-color: var(--border-color);
  width: 100%;
  resize: none;
}

select {
  border-color: var(--border-color);
}

textarea.textbox {
  display: block;
  padding: 8px;
  margin: 2px;
  height: calc(50vh - 137px);
  font-size: 18px;
  font-weight: bold;
}

textarea.cell {
  direction: ltr;
  margin-left: 2px;
  width: 89px;
  height: 22px;
  font-weight: bold;
}

select {
  width: 93px;
  height: 22px;
  margin-left: 2px;
  font-weight: bold;
}

label {
  height: 20px;
  font-size: 14px;
  font-weight: bold;
}

label.checkboxlabel {
  width: 110px;
}

label.celllabel {
  width: 105px;
}

input[type="file"] {
  display: none;
}

hr {
  border-top: 3px dashed #bbb;
  width: 100%;
  height: 0;
}

table {
  border: 1px solid #999999;
  width: 100%;
  table-layout: fixed;
}

th, td {
  border: 1px solid #999999;
  text-align: center;
}

canvas {
  background-color: #999999;
  border: 2px solid #000000;
  border-radius: 2px;
  width: 50%;
}

.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
  height: auto;
}

.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  transition: 0.3s;
}

.tab button:hover {
  background-color: #ddd;
}

.tab button.active {
  background-color: #ccc;
}

.tabcontent {
  display: none;
  border: 1px solid #ccc;
  border-top: none;
}
