/* /tools/scale-finder/ — shares look with chord-identifier.css (loaded separately per page, so shared rules are repeated). */
.mtp-ci-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.mtp-ci-row input[type="text"] { flex: 1 1 260px; min-width: 0; font-size: 18px; letter-spacing: .02em; }
.mtp-ci-hint { margin: 8px 0 0; color: var(--mtp-muted); font-size: 14px; max-width: 70ch; }
.mtp-ci-error { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--mtp-copper); color: #f0b49a; font-size: 14px; }
.mtp-sf [hidden] { display: none; }
.mtp-ci-play { display: flex; flex-wrap: wrap; gap: 8px; }
.mtp-ci-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mtp-ci-table th, .mtp-ci-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--mtp-line); vertical-align: top; }
.mtp-ci-table thead th { color: var(--mtp-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.mtp-ci-table tbody th { font-weight: 700; color: var(--mtp-brass-bright); white-space: nowrap; }
.mtp-ci-staff { background: #f4e9cf; border-radius: 2px; padding: 6px; line-height: 0; text-align: center; margin: 16px 0; }
.mtp-ci-staff svg { max-width: 100%; height: auto; }
.mtp-ci-staff:empty { display: none; }
.mtp-sf h3 { margin: 22px 0 8px; font-size: 16px; color: var(--mtp-paper); }

.mtp-sf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mtp-sf-controls { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 20px; }
.mtp-sf-controls > div { display: flex; flex-direction: column; gap: 4px; }
.mtp-sf-controls select { min-width: 150px; }
.mtp-sf-name { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; color: var(--mtp-brass-bright); font-weight: 700; }
.mtp-sf-head { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: flex-start; }
.mtp-sf-notes { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mtp-sf-notes li { min-width: 44px; padding: 8px 10px; text-align: center; border: 1px solid var(--mtp-line); background: var(--mtp-night); font-size: 20px; font-weight: 700; color: var(--mtp-paper); }
.mtp-sf-notes li:first-child { border-color: var(--mtp-brass); color: var(--mtp-brass-bright); }
.mtp-sf-notes li.is-playing { background: var(--mtp-brass); color: #1a1205; }
.mtp-sf-formula th { width: 1%; }
.mtp-sf-links { margin: 16px 0 0; }
.mtp-sf-tablewrap { overflow-x: auto; }
.mtp-sf-count { color: var(--mtp-muted); margin: 14px 0 6px; }
.mtp-sf-results { list-style: none; margin: 0; padding: 0; }
.mtp-sf-results li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--mtp-line); }
.mtp-sf-results strong { color: var(--mtp-brass-bright); font-size: 17px; }
.mtp-sf-results .mtp-sf-r-notes { color: var(--mtp-paper); font-size: 15px; grid-column: 1; }
.mtp-sf-results .mtp-sf-r-meta { color: var(--mtp-muted); font-size: 13px; grid-column: 1; }
.mtp-sf-results .mtp-sf-r-act { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mtp-sf-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--mtp-brass); color: var(--mtp-brass-bright); font-size: 12px; vertical-align: 2px; }
.mtp-sf-keys { margin: 16px 0 0; }

@media (max-width: 720px) {
  .mtp-ci-play button { flex: 1 1 auto; }
  .mtp-sf-results li { grid-template-columns: minmax(0, 1fr); }
  .mtp-sf-results .mtp-sf-r-act { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

/* On-screen keyboard (buttons). Colours are fixed so it looks like a piano in any theme. */
.mtp-kb { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.mtp-kb-inner { position: relative; height: 150px; min-width: 520px; user-select: none; }
.mtp-tool-panel .mtp-kb-key { position: absolute; top: 0; padding: 0; margin: 0; min-height: 0; box-sizing: border-box; cursor: pointer; border-radius: 0 0 3px 3px; font-size: 11px; }
.mtp-tool-panel .mtp-kb-white { height: 100%; background: #f6f1e4; border: 1px solid #8a7a55; color: #3b3220; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; z-index: 1; min-height: 40px; }
.mtp-tool-panel .mtp-kb-black { height: 62%; background: #17121f; border: 1px solid #000; z-index: 2; color: #fff; min-height: 40px; }
.mtp-tool-panel .mtp-kb-white:hover { background: #efe3c2; border-color: #8a7a55; color: #3b3220; }
.mtp-tool-panel .mtp-kb-black:hover { background: #2b2240; border-color: #000; color: #fff; }
.mtp-tool-panel .mtp-kb-white.is-on { background: #e0bd72; color: #1a1205; border-color: #8a6a1e; }
.mtp-tool-panel .mtp-kb-black.is-on { background: #c49a49; border-color: #6e4f12; }
.mtp-tool-panel .mtp-kb-key.is-root { box-shadow: inset 0 -8px 0 #a84f2a; }
.mtp-kb-key:focus-visible { outline: 2px solid var(--mtp-brass-bright); outline-offset: -3px; z-index: 3; }

@media (max-width: 720px) {
  .mtp-ci-cols { grid-template-columns: minmax(0, 1fr); }
  .mtp-ci-play button { flex: 1 1 auto; }
}
.mtp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
