/* Fretwork trainers: #/fretboard and #/chords. */

/* ---------- shared ---------- */
.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tr-head h1 { margin: 0; }
.tr-sub { font-size: 18px; margin: 0 0 12px; }
.tr-what { margin: 0 0 16px; }
.tr-big-note { font: 600 1.6em/1 var(--font-display); color: var(--accent); letter-spacing: -0.02em; vertical-align: -0.08em; }
.tr-board.compact .fb-svg { min-width: 0; }
.fb-svg .fb-sname.tr-target { fill: var(--accent); font-size: 13px; }

/* ---------- explorer ---------- */
.tr-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tr-hl { width: auto; }
.tr-readout { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-height: 28px; }
.tr-readout .tr-big-note { font-size: 24px; }
.tr-ex-board + .tr-sub { margin-top: 32px; }
.tr-shortcuts { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.tr-shortcuts li, .tr-prog { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tr-shortcuts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.tr-shortcuts li:last-child, .tr-prog:last-child { border-bottom: 0; }
.tr-shortcuts li.on span { color: var(--accent); }
.tr-shortcuts .btn { flex-shrink: 0; min-width: 60px; }

/* ---------- quizzes ---------- */
.tr-quiz { display: flex; flex-direction: column; gap: 14px; }
.tr-prompt { font: 600 20px/1.3 var(--font-display); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 48px; }
.tr-prompt .tr-big-note { font-size: 44px; }
.tr-prompt .muted { font: 500 15px var(--font); }
.tr-feedback { min-height: 32px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.tr-feedback.is-good { color: var(--good); }
.tr-feedback.is-bad { color: var(--bad); }
.tr-feedback b { color: var(--text); }
.tr-quiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tr-score, .tr-sbest { font-size: 13.5px; }
.tr-score b, .tr-sbest b { color: var(--text); font-family: var(--mono); }
.tr-clock { font: 700 13px var(--mono); }
.tr-settings > :not(summary) { margin-top: 12px; }
.tr-sbest { display: block; }
.tr-set { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.tr-set > span { width: 56px; }
.tr-set .chip { min-width: 36px; justify-content: center; font-family: var(--mono); font-weight: 600; }

.tr-answers { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tr-answers.all { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.tr-ans { height: 52px; padding: 0 4px; flex-direction: column; gap: 2px; font: 600 17px/1 var(--font-display); }
.tr-ans small { font: 500 10.5px/1 var(--font); color: var(--muted); }
.tr-ans.is-good { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.tr-ans.is-bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }

@media (max-width: 860px) {
  .tr-answers.all { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tr-prompt { font-size: 18px; min-height: 40px; }
  .tr-prompt .tr-big-note { font-size: 36px; }
  .tr-answers, .tr-answers.all { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- chord library ---------- */
.tr-filter { margin-bottom: 10px; }
.tr-chord-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.tr-chord { position: relative; }
.tr-chord-tile { display: flex; justify-content: center; width: 100%; padding: 10px 6px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; cursor: pointer; transition: border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.tr-chord-tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tr-chord-tile .chord-svg { width: 100%; max-width: 112px; }
.tr-chord-tile.hit { animation: tr-hit .5s ease-out; }
@keyframes tr-hit { from { border-color: var(--accent); background: var(--accent-soft); } }
/* bottom corner keeps it clear of the diagram's open-string marks */
.tr-chord-info { position: absolute; bottom: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font: italic 700 11px/1 Georgia, serif; cursor: pointer; }
.tr-chord-info:hover { color: var(--text); border-color: var(--muted); }
.xp-pop .tr-notes { font: 700 16px var(--mono); color: var(--text); }

/* ---------- change trainer ---------- */
.tr-trainer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tr-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tr-stage-msg { font: 600 16px/1.2 var(--font-display); color: var(--muted); text-align: center; min-height: 20px; }
.tr-stage-row { display: flex; align-items: flex-end; justify-content: center; gap: 24px; width: 100%; }
.tr-stage-now .chord-svg { width: clamp(150px, 30vw, 210px); }
.tr-stage-now.flash { animation: tr-flash .35s ease-out; }
@keyframes tr-flash { from { transform: scale(.94); opacity: .4; } to { transform: none; opacity: 1; } }
.tr-stage-next { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .55; font-size: 12px; }
.tr-stage-next .chord-svg { width: 84px; }
.tr-beats { display: flex; gap: 12px; }
.tr-beats i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); transition: background .06s, transform .06s; }
.tr-beats i.on { background: var(--accent); transform: scale(1.2); }
.tr-beats i.accent { background: var(--hot); }
.tr-start { min-width: 150px; }
.tr-pick { margin-top: 10px; }
.tr-pick .chip[data-order]:not([data-order=""])::after { content: attr(data-order); font: 700 10px/1 var(--mono); background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 2px 5px; margin-left: 2px; }
.tr-trainer-row { gap: 12px 18px; }
.tr-tempo { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.tr-tempo .slider { width: 130px; }
.tr-bpm-out { font: 700 14px var(--mono); color: var(--text); min-width: 3ch; text-align: right; }
@media (max-width: 860px) {
  .tr-trainer { grid-template-columns: 1fr; gap: 16px; }
  .tr-start { width: 100%; }
}

/* ---------- progressions ---------- */
.tr-progs { list-style: none; margin: 12px 0 0; padding: 0; }
.tr-prog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tr-prog-meta { font: 500 12px var(--mono); flex-shrink: 0; }
