body { font-family: Inter, sans-serif; }

.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.04);
}

/* ── Root note buttons ── */
.root-btn-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.root-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-width: 36px;
  text-align: center;
}
.root-btn:hover { background: #e5e7eb; }
.root-btn.active {
  background: #065f46;
  color: #fff;
  border-color: #065f46;
}

/* ── Chord type buttons ── */
.type-btn-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.type-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.type-btn:hover { background: #e5e7eb; }
.type-btn.active {
  background: #065f46;
  color: #fff;
  border-color: #065f46;
}

/* ── Chord display ── */
.chord-display {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.chord-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 8px;
}
.chord-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.chord-notes {
  font-size: 0.85rem;
  color: #059669;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.chord-meta {
  font-size: 0.72rem;
  color: #6b7280;
  text-align: right;
  line-height: 1.5;
}

/* ── Diagrams row ── */
.diagrams-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 160px;
}

/* ── Single diagram card ── */
.diagram-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.diagram-card.selected svg rect.diagram-bg {
  fill: #ecfdf5;
  stroke: #059669;
  stroke-width: 1.5;
}
.diagram-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
}
.diagram-card.selected .diagram-label {
  color: #059669;
}

/* ── Voicing tabs (mobile) ── */
.voicing-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  justify-content: center;
}
.voicing-tab {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.voicing-tab.active {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

/* ── No chord message ── */
.no-chord {
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 2rem 0;
  width: 100%;
}

/* ── Table ── */
tbody tr:nth-child(even) { background: #f9fafb; }
tbody tr { cursor: pointer; transition: background 0.1s; }
tbody tr:hover { background: #ecfdf5; }
.symbol-cell {
  font-family: monospace;
  font-weight: 700;
  color: #065f46;
}
