.harmony-toggle {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #46553b;
  font-size: 13px;
  white-space: nowrap;
}

.harmony-toggle[aria-pressed="true"] {
  background: #2a3920;
  border-color: #668344;
  color: var(--accent);
}

.harmonic-field {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid #394531;
  border-radius: 10px;
  background: #171e15;
}

.harmonic-field-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0 0 9px;
  padding-inline: 2px;
}

.harmonic-field-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.harmonic-field-heading span {
  color: #aabc98;
  font-size: 12px;
}

.harmonic-degrees {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.harmonic-degree {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 49px;
  padding: 4px 1px;
  border: 1px solid #364331;
  border-radius: 6px;
  background: #202a1b;
  overflow-wrap: anywhere;
}

.harmonic-degree small {
  color: #aabc98;
  font-size: 11px;
}

.harmonic-degree strong {
  color: var(--accent);
  font-size: clamp(11px, 1.55vw, 15px);
}

.chord-trigger {
  display: inline-block;
  appearance: none;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  vertical-align: baseline;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chord-trigger:is(:hover, :focus-visible) {
  background: #2a3920;
  text-decoration: underline;
  text-underline-offset: .14em;
}

.stage-mode .harmonic-field {
  position: fixed;
  z-index: 10;
  inset: var(--stage-harmony-top, 66px) 0 auto;
  margin: 0;
  padding: 6px clamp(8px, 2vw, 30px);
  border-width: 0 0 1px;
  border-radius: 0;
  touch-action: manipulation;
}

.stage-mode .harmonic-field-heading {
  display: none;
}

.stage-mode .harmonic-degree {
  min-height: 43px;
  padding-block: 2px;
}

.stage-mode.harmonic-field-visible .sheet-scroll {
  top: var(--stage-harmony-sheet-top, 122px);
}

.chord-info-dialog {
  max-width: 484px;
  padding: clamp(16px, 4vw, 28px);
}

.chord-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.chord-info-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(29px, 6vw, 44px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.chord-info-header p, .chord-info-section p {
  margin: 3px 0 0;
}

.chord-info-caption {
  font-weight: 650;
}

.chord-info-header .icon-button {
  border: 1px solid #46553b;
}

.chord-info-section {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid #394531;
}

.chord-info-section :is(h3, h4) {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
}

.chord-note-list, #chordInfoRelatedList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chord-note-list li, #chordInfoRelatedList li {
  display: grid;
  gap: 3px;
  min-width: 63px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #26331e;
}

.chord-note-list span, #chordInfoRelatedList span {
  color: #aabc98;
  font-size: 12px;
}

.chord-info-section :is(#chordInfoBass, #chordInfoVoicing), #chordInfoRelated {
  margin-top: 10px;
}

@media (max-width: 420px) {
  .harmonic-field { padding: 9px 6px; }
  .harmonic-degrees { gap: 3px; }
  .stage-top-actions .harmony-toggle { padding-inline: 4px; }
}

@media print {
  .harmonic-field { display: none !important; }
  .chord-trigger { background: transparent !important; text-decoration: none; }
}
