h4 {
  margin-bottom: 10px;
  margin-top: 20px;
}

.tip {
  background-color: #f3f9f1;
  padding: 10px;
  border-radius: 5px;
  margin-top: 30px;
  border: 1px solid #d9e8d2;
}

.chord-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.chord-table th,
.chord-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  font-size: 14px;
  vertical-align: top;
}

.chord-table th {
  background-color: #f5f5f5;
}

.chord-table tr:nth-child(even) {
  background-color: #fafafa;
}

.chord-table tr:hover {
  background-color: #f0f0f0;
}

.chord-table td.key-name {
  background-color: #f5f5f5;
  font-weight: bold;
  vertical-align: middle;
  white-space: nowrap;
}

.chord-table .alt-chord {
  font-size: 12px;
  color: #666;
  display: block;
  margin-top: 0.6rem;
}

/* ---- 和弦指法图（对齐 jtp Chord 组件，统一 5 品） ---- */

.chord {
  display: flex;
  flex-direction: column;
  width: fit-content;
  margin: 0 auto;
}

.chord .grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background-color: #333;
  border: 1px solid #333;
  border-top: 2px solid #333;
}

.chord .grid-item {
  background-color: #fff;
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
}

.chord .grid-item p,
.chord .grid-item .active {
  position: absolute;
  background: #212121;
  width: 100%;
  height: 100%;
  z-index: 10;
  border-radius: 50%;
  scale: 0.8;
  left: -0.7rem;
  display: none;
}

.chord .active {
  display: block !important;
}

.chord .active-string1 {
  display: block !important;
  left: unset !important;
  right: -0.7rem;
}

.chord .chord-name {
  position: relative;
  font-weight: 900;
  font-size: 1.4rem;
  line-height: 1.6rem;
  text-align: center;
  margin-bottom: 0.2rem;
  min-height: 1.6rem;
}

.chord .rise-and-fall-text {
  font-size: 1.2rem;
  position: relative;
  top: -0.4rem;
  margin-left: 0.05rem;
}

.chord .building-note {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-left: -0.3rem;
  height: 2.2rem;
}

.chord .sound-control {
  font-size: 1rem;
  text-align: center;
  line-height: 0.2rem;
  min-height: 0.2rem;
}

.chord .building-note-div {
  font-size: 1rem;
  text-align: center;
  line-height: 0.2rem;
  position: relative;
}

.chord .building-note-div p:last-child {
  font-size: 0.9rem;
  position: absolute;
  top: -0.15rem;
  left: 55%;
  margin: 0;
}

@media (max-width: 768px) {
  .chord-table {
    display: block;
    overflow-x: auto;
  }

  .chord .grid-item {
    width: 1.2rem;
    height: 1.2rem;
  }

  .chord .grid-item p,
  .chord .grid-item .active {
    left: -0.6rem;
  }

  .chord .active-string1 {
    right: -0.6rem;
  }

  .chord .chord-name {
    font-size: 1.2rem;
  }
}
