button,
input,
select {
  font-size: 16px;
  border-radius: 4px;
}

button,
input[type=button] {
  cursor: pointer;
}

button:disabled {
  cursor: auto;
}

body {
  margin: 20px 80px 0;
  background-color: #e0edfd;
}

header {
  display: flex;
  gap: 10px;
}

#title {
  width: 300px;
  padding: 8px;
  margin: 0;
  border-left: 5px solid #3e62ad;
  background-color: #bfddfc;
  color: #3e62ad;
  font-weight: bold;
}

#lang {
  width: 75px;
  height: 36px;
  margin-top: 8px;
}

main {
  margin: 20px 0 40px;
}

#setting-graph {
  display: flex;
  gap: 50px;
  height: 500px;
}

#setting {
  position: relative;
  min-width: 380px;
  max-height: 476px;
  padding: 12px;
  background-color: white;
}

#matrix {
  position: relative;
  margin: 50px auto;
  padding-left: 40px;
}

#item,
#user {
  position: absolute;
}

#item {
  top: -45px;
  left: 35%;
}

#user {
  writing-mode: vertical-rl;
  top: 35%;
  left: -5px;
}

#item button {
  width: 60px;
  height: 28px;
}

#user button {
  width: 28px;
  height: 60px;
}

#item button,
#user button {
  border: none;
  background-color: #6892da;
  color: white;
}

#item button:disabled,
#user button:disabled {
  opacity: 0.5;
}

#matrix > tbody > tr:not(:first-child) > th {
  padding-right: 4px;
}

#matrix > tbody > tr > th,
#matrix > tbody > tr > td {
  width: 28px;
  height: 28px;
}

.matrix-element-0,
.matrix-element-1 {
  width: 28px;
  height: 28px;
  border: 1px solid #808080;
}

.matrix-element-0 {
  background-color: white;
  color: #808080;
}

.matrix-element-1 {
  background-color: #808080;
  color: white;
}

.matrix-element-0.highlight {
  border-color: #bfddfc;
  background-color: #bfddfc;
}

.matrix-element-1.highlight {
  border-color: #789def;
  background-color: #789def;
}

#matrix > tbody > tr > th.no-display,
.matrix-element-0.no-display,
.matrix-element-1.no-display {
  display: none;
}

#setting-bottom {
  display: flex;
  gap: 15px;
  position: absolute;
  bottom: 20px;
}

#recommendation-method,
#calculation-method {
  display: block;
  width: 250px;
  padding: 2px 0;
  text-align: center;
}

#recommendation-method {
  margin-bottom: 10px;
}

#random {
  display: block;
  height: 50px;
  padding: 10px 5px;
  margin: 5px auto 0;
  border: none;
  background-color: #6892da;
  color: white;
}

#graph {
  width: 500px;
  height: 500px;
  border: 2px solid #808080;
  background-color: white;
}

#formula {
  height: 200px;
  margin-top: 30px;
}

#formula1,
#formula2 {
  margin-bottom: 20px;
  font-size: 24px;
}

#formula1 mtext,
#formula2 mtext {
  font-size: 16px;
}

footer {
  text-align: center;
}