/* ── Chord Finder ── */
.tool-page:has(.fd-container) { max-width: 100%; }
.fd-container { display: flex; flex-direction: column; align-items: center; max-width: 960px; width: 100%; margin: 0 auto; gap: 14px; }
.fd-instruments { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.fd-instrument-btn { background: #1a1d2e; color: #888; border: 1.5px solid #2a2d3a; border-radius: 10px; padding: 7px 18px; font-size: 0.82rem; cursor: pointer; transition: all 0.2s; }
.fd-instrument-btn:hover { color: #ccc; border-color: #555; }
.fd-instrument-btn.active { background: #1e2a40; color: #7cb8ff; border-color: #3a6ea5; }
.fd-board-wrap { width: 100%; overflow-x: auto; border-radius: 10px; background: #13151e; border: 1.5px solid #2a2d3a; padding: 12px 10px; display: grid; place-items: center; min-height: 260px; }
#fd-canvas { display: block; cursor: pointer; max-width: 100%; }
.fd-mute-hint { font-size: 0.72rem; color: #555; text-align: center; margin-top: -6px; }
.fd-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fd-btn { background: #1a1d2e; color: #c0c0c0; border: 1.5px solid #2a2d3a; border-radius: 10px; padding: 8px 18px; font-size: 0.8rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.fd-btn:hover { background: #252838; color: #fff; border-color: #555; }
.fd-results { width: 100%; }
.fd-selected-notes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; min-height: 30px; align-items: center; }
.fd-note-badge { display: inline-flex; align-items: center; gap: 4px; background: #1e2a40; color: #7cb8ff; border: 1px solid #3a6ea5; border-radius: 10px; padding: 3px 10px 3px 12px; font-size: 0.8rem; font-weight: 600; }
.fd-note-badge .remove { cursor: pointer; opacity: 0.5; font-size: 0.75rem; margin-left: 2px; padding: 2px 4px; border-radius: 50%; }
.fd-note-badge .remove:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.fd-section-title {
  grid-column: 1 / -1;
  font-size: 0.72rem; font-weight: 700; color: #888;
  margin-bottom: 0; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 2px solid #2a2d3a; padding-bottom: 6px;
}
.fd-chord-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fd-match-card { background: #181b28; border: 1.5px solid #2a2d3a; border-radius: 10px; padding: 16px; transition: border-color 0.2s; display: flex; flex-direction: column; gap: 8px; }
.fd-match-card.exact { border-color: #408840; background: #141e14; }
.fd-match-card.best { border-color: #d08020; background: #1e1a14; }
.fd-match-top { display: flex; align-items: baseline; gap: 8px; }
.fd-match-name { font-size: 1.3rem; font-weight: 700; color: #e0e0e0; }
.fd-match-inv { font-size: 0.72rem; color: #777; margin-top: -4px; }
.fd-match-pct { margin-left: auto; font-size: 0.72rem; color: #666; font-weight: 600; }
.fd-note-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.fd-note-chip { padding: 2px 7px; border-radius: 10px; font-size: 0.68rem; font-weight: 600; }
.fd-note-match { background: #1c3a1c; border: 1px solid #408840; color: #a0e0a0; }
.fd-note-miss { background: #3a1c1c; border: 1px solid #884040; color: #e0a0a0; }
.fd-match-detail { font-size: 0.75rem; color: #aaa; line-height: 1.6; }
.fd-match-detail-label { color: #666; }
.fd-match-actions { display: flex; gap: 6px; margin-top: auto; }
.fd-match-actions .fd-card-play { flex: none; }
.fd-match-actions .fd-card-lib { flex: 1; }
.fd-card-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: #1a1d2e; color: #c0c0c0; border: 1.5px solid #2a2d3a; border-radius: 10px; padding: 8px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; font-family: inherit; }
.fd-card-btn svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }
.fd-card-btn:hover { background: #252838; color: #fff; border-color: #555; }
.fd-match-hidden { display: none; }
.fd-show-more { grid-column: 1 / -1; background: #1a1d2e; color: #888; border: 1.5px solid #2a2d3a; border-radius: 10px; padding: 8px 18px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.fd-show-more:hover { background: #252838; color: #fff; border-color: #555; }
.fd-no-match { grid-column: 1 / -1; text-align: center; color: #555; font-size: 0.85rem; padding: 30px 0; }
