.chord-grid-major-container h1 {
  text-align: center;
}

.chord-grid-major-container table {
  table-layout: fixed;
  width: 100%;
  max-width: 500px;
  margin: auto;
  border-collapse: collapse;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.chord-grid-major-container th,
.chord-grid-major-container td {
  width: 14.28%;
  min-width: 75%;
  max-width: 75%;
  border: 1px solid black;
  padding: 4px;
  text-align: center;
  font-size: 20px;
  height: 0;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.chord-grid-major-container th {
  background-color: #e1e1e1;
}

.chord-grid-major-container td button {
  font-family: 'Times New Roman', serif;
  background-color: #fff;
  color: #333;
  border: 1px solid #333;
  padding: 5px;
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  border-radius: 8px;
}

.chord-grid-major-container td button.tonic {
  background-color: #f194b8;
  color: #000000;
  border: 1px solid #000000;
}

.chord-grid-major-container td button.predominant {
  background-color: #b3c7f7;
  color: #000000;
  border: 1px solid #000000;
}

.chord-grid-major-container td button.dominant {
  background-color: #b9e192;
  color: #000000;
  border: 1px solid #000000;
}

.chord-grid-major-container td button.dominant-inv {
  background-color: #cfebb6;
  color: #000000;
  border: 1px solid #000000;
}

.chord-grid-major-container td button.submediant {
  background-color: #9b8bf4;
  color: #000000;
  border: 1px solid #000000;
}

.chord-grid-major-container td button.disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #6c757d;
  cursor: not-allowed;
}

.chord-grid-major-container td button.pressed {
  background-color: #ffdb58;
}

.chord-grid-major-container .vertical-text {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  padding: 10px 0;
  border: 1px solid #000;
  background-color: #ddd;
  margin-right: 10px;
  width: 25px;
  height: 200px;
  position: absolute;
  left: 0;
  top: 0;
}

.chord-grid-major-container .table-container {
  display: flex;
  justify-content: center;
}

.chord-grid-major-container span {
  font-size: 16px;
  position: relative;
  padding-left: 0.5em;
}

.chord-grid-major-container sup,
.chord-grid-major-container sub {
  position: absolute;
  left: 0;
  line-height: 0.8;
  font-size: .6em;
}

.chord-grid-major-container sup {
  top: 0;
}

.chord-grid-major-container sub {
  bottom: 0;
}

.chord-grid-major-container #message-display {
  text-align: center;
  font-size: 24px;
  margin-top: 20px;
}
