table, tbody, tr {
  border: none;
  border-collapse: collapse;
}

legend {
  padding: .2rem;
}

textarea {
  width: calc(100% - 2rem);
  margin: .9rem;
  padding: 0;
}

label {
  margin: 0 2rem 0 0;
}

tr {
  height: 1.5rem;
  white-space: nowrap;
}

td, .td{
  border: 1px solid #333;
  text-align: center;
  vertical-align: middle;
}

th, .th {
  font-weight: bold;
  color: #fff;
  background: #999;
  border: 1px solid #333;
}

input[type="text"] {
  width: 8rem;
  border: 1px solid #666;
  border-radius: 4px;
}

.th input[type="text"] {
  font-weight: bold;
  color: #fff;
  background: #999;
  border-color: #eee;
}

.btn:has(.menu) {
  background: #eee;
  box-shadow: inset -2px -2px #aaa, inset 2px 2px #fff;
}

p.btn {
  margin: 1rem 1rem 0;
  width: 12rem;
}

.menu {
  margin: 0;
  padding: 0;
  width: 8rem;
  position: absolute;
  list-style-type: none;
  box-shadow: 1px 1px 2px 1px #6666;
}

.menu-row {
  height: 1.8rem;
  line-height: 1.8rem;
  padding-left: 1rem;
  text-align: left;
  border-style: inset;
}

#wrapper, #result {
  overflow-x: auto;
  width: calc(100vw - 4rem);
}

#preview {
  margin: 0 1rem;
}

#acol span, #dcol span {
  width: 1.5rem;
  white-space: nowrap;
  writing-mode: vertical-lr;
}

