/* Minnesinger Learn — basic piano and basic guitar (learn-course-instruments.js): lesson figures and the exercise kinds. */

/* ---------- lesson figures (inline inside a paragraph block) ---------- */
.cr-body .ci-figs { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin: 14px 0 18px; }
.ci-fig { display: inline-flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 10px; max-width: 100%; overflow-x: auto; }
.ci-fig .ci-svg { display: block; overflow-x: auto; }
.ci-fig svg { display: block; }
.ci-cap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); max-width: 760px; }
.ci-cap button { flex: none; }

/* ---------- the guitar-parts figure (wide with callouts; upright with a numbered list on phones) ---------- */
.gp-fig { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; margin: 12px 0 18px; }
.cr-body p:has(> .gp-fig) { max-width: none; }
.gp-fig svg { display: block; width: 100%; height: auto; }
.gp-fig .gp-port { display: none; }
.gp-fig text { font-family: Nunito, 'Segoe UI', system-ui, sans-serif; }
.gp-fig .gp-cn { font-size: 15.5px; font-weight: 800; fill: #1f2350; }
.gp-fig .gp-cd { font-size: 12.8px; font-weight: 600; fill: #454b70; }
.gp-fig .gp-nb { fill: #1f2350; }
.gp-fig .gp-nn { font-size: 12.5px; font-weight: 800; fill: #fff; }
.gp-fig .gp-lead { stroke: #545a7d; stroke-width: 1.3; }
.gp-fig .gp-hit { fill: transparent; }
.gp-fig .gp-co { cursor: pointer; outline: none; }
.gp-fig .gp-co.gp-on .gp-cn, .gp-fig .gp-co:focus-visible .gp-cn { fill: #c8391f; }
.gp-fig .gp-co.gp-on .gp-lead { stroke: #c8391f; stroke-width: 2.2; }
.gp-fig .gp-co.gp-on .gp-nb { fill: #c8391f; }
.gp-fig .gp-fn { font-size: 11px; font-weight: 800; fill: #f0e4c2; paint-order: stroke; stroke: #4a2e18; stroke-width: 3px; stroke-linejoin: round; }
.gp-fig .gp-chip { font-size: 12px; font-weight: 800; fill: #3a2513; }
.gp-fig .gp-bd { cursor: pointer; }
.gp-fig .gp-bd circle { fill: #1f2350; stroke: #fff; stroke-width: 2; }
.gp-fig .gp-bd text { font-size: 13px; font-weight: 800; fill: #fff; }
.gp-fig .gp-bd.gp-on circle { fill: #c8391f; }
.gp-fig .gp-hl .gf { fill: transparent; stroke: transparent; }
.gp-fig .gp-hl .gl { fill: none; stroke: transparent; stroke-linecap: round; }
.gp-fig .gp-hl.gp-on .gf { fill: rgba(255, 196, 0, .42); stroke: #f2a100; stroke-width: 2.4; }
.gp-fig .gp-hl.gp-on .gl { stroke: rgba(255, 196, 0, .7); }
.gp-hint { display: block; font-size: 14px; color: var(--muted); margin-top: 8px; }
.gp-legend { display: none; }
.gp-li > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.gp-li { white-space: normal; display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 9px 4px; font: inherit; font-size: 14.5px; line-height: 1.4; color: var(--text); cursor: pointer; }
.gp-li .gp-ln { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #1f2350; color: #fff; display: grid; place-items: center; font-size: 13px; }
.gp-li.gp-on { background: #fff3d6; }
.gp-li.gp-on .gp-ln { background: #c8391f; }
@media (max-width: 760px) {
  .gp-fig .gp-land { display: none; }
  .gp-fig .gp-port { display: block; max-width: 330px; margin: 0 auto; }
  .gp-legend { display: block; margin-top: 8px; }
}

/* ---------- the exercise area ---------- */
.ci-figbox { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; overflow-x: auto; text-align: center; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-figbox svg { max-width: 100%; height: auto; }
.ci-arrow { font: 800 24px/1 'Outfit', var(--ui); color: var(--muted); }
.ci-clickable .ci-cell { cursor: pointer; }
.ci-clickable .ci-cell:hover { fill: #2f5bd322; }
.ci-shape { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ci-shape .ci-figbox { margin: 0; }
.ci-prev { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.ci-played { min-height: 1.4em; margin: 8px 0 0; font-weight: 800; color: var(--text); }
.cw-kb .sel.wk, .cw-kb .sel.bk { fill: #2f5bd3; }
.cr-feedback .ci-fig { margin-top: 8px; }
@media (max-width: 720px) {
  .ci-shape { grid-template-columns: 1fr; } .ci-prev { justify-self: start; }
  /* keep the fretboard big enough to tap; it scrolls sideways inside its own box */
  .ci-figbox { justify-content: flex-start; }
  .ci-figbox svg.ci-fb { max-width: none !important; width: 620px; flex: none; }
}
