@font-face { font-family: 'MtpClefAcc'; src: url('/vendor/vexflow/fonts/bravura-acc.woff2') format('woff2'); font-style: normal; font-weight: 400 700; unicode-range: U+266D-266F; font-display: swap; }
/* Clef notes tool (treble / bass staff): find a note, practise, quiz sheet. Scoped to .cnt. */
@font-face { font-family: 'MtpClefBravura'; src: url('/vendor/vexflow/fonts/bravura-staff.woff2') format('woff2'); font-style: normal; font-weight: 400; unicode-range: U+E000-EFFF; font-display: block; }
.cnt { --cnt-ink: var(--mtp-paper, #f4e9cf); --cnt-accent: var(--mtp-brass-bright, #e0bd72); max-width: 100%; }
.cnt-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 14px; }
.cnt-seg { display: inline-flex; flex-wrap: wrap; gap: 0; }
.cnt .cnt-seg button { min-height: 44px; margin: 0 -1px 0 0; }
.cnt-pane[hidden], .cnt [hidden] { display: none !important; }

/* staff */
.cnt-svg { display: block; width: 100%; height: auto; color: var(--cnt-ink); overflow: visible; }
.cnt-clefglyph { font-family: 'MtpClefBravura', serif; }
.cnt-explore-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px 28px; align-items: start; }
.cnt-stage { min-width: 0; }
.cnt-staffhost { max-width: 360px; margin: 0 auto; outline-offset: 3px; touch-action: manipulation; }
.cnt-staffhost svg { user-select: none; -webkit-user-select: none; }
/* CLS: the staff and the piano are drawn by JS; hold their space until then (aspect ratio of the drawn staff) */
.cnt-staffhost:empty { aspect-ratio: 360 / 587; }
.cnt-kb:empty { min-height: 57px; }
.cnt-zones rect { cursor: pointer; }
.cnt-guides line { stroke: var(--cnt-ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: .28; }
.cnt-ghost { fill: none; stroke: var(--cnt-accent); stroke-width: 3; opacity: .5; pointer-events: none; }
.cnt-sel { color: var(--cnt-accent); pointer-events: none; }
.cnt-sel .cnt-note-g { color: var(--cnt-accent); }
.cnt-notelabel { font: 700 18px 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; fill: var(--cnt-accent); }
.cnt-stepbtns { display: flex; gap: 8px; justify-content: center; margin: 8px 0 0; }
.cnt .cnt-stepbtns button { min-height: 48px; min-width: 96px; font-size: 16px; }

/* result card */
.cnt-result { margin: 0 0 8px; }
.cnt-note { font: 700 44px/1 'MtpClefAcc', 'Cormorant Garamond', Georgia, "Iowan Old Style", "Times New Roman", serif; margin: 0 0 6px; color: var(--cnt-accent); letter-spacing: .01em; overflow-wrap: anywhere; }
.cnt-where { margin: 0 0 6px; font-size: 18px; }
.cnt-meta { margin: 0; color: var(--mtp-muted, #c9b990); font-size: 14px; }
.cnt-kb { max-width: 520px; margin: 10px 0; }
.cnt-hint { margin: 6px 0; color: var(--mtp-muted, #c9b990); font-size: 13px; }
.cnt-opts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0; }
.cnt-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px !important; color: var(--cnt-ink) !important; }
.cnt-check input { width: 18px; height: 18px; }
.cnt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; }
.cnt-actions .mtp-button, .cnt-setup .mtp-button { cursor: pointer; min-height: 44px; }
.cnt-copied { font-size: 13px; color: var(--cnt-accent); }

/* piano keys (same look as the chart keyboards) */
.cnt .mtp-kb { display: block; width: 100%; height: auto; }
.cnt .mtp-kb .wk rect { fill: #f4e9cf; stroke: #3a2c18; stroke-width: 1; }
.cnt .mtp-kb .bk rect { fill: #1c1428; stroke: #000; stroke-width: 1; }
.cnt .mtp-kb .kt { font: 700 8px "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; fill: #6b5a3a; pointer-events: none; }
.cnt .mtp-kb .k { cursor: pointer; }
.cnt .mtp-kb .wk.on rect { fill: #e0bd72; }
.cnt .mtp-kb .bk.on rect { fill: #c49a49; }
.cnt .mtp-kb .on .kt, .cnt .mtp-kb .lab .kt { fill: #1a1209; font-size: 9px; }

/* labelled staff */
.cnt-labelled-wrap { margin: 18px 0 0; }
.cnt-printtitle { margin: 0 0 6px; font-size: 14px; color: var(--mtp-muted, #c9b990); }
.cnt-scroll { overflow-x: auto; max-width: 100%; padding: 4px 0 8px; -webkit-overflow-scrolling: touch; }
.cnt-svg-wide { min-width: 760px; width: 100%; }
.cnt-lbl { font: 700 21px 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; fill: var(--cnt-ink); text-anchor: middle; }
.cnt-lbl-oct { font-weight: 400; }
.cnt-lbl-mc { font: 600 11px 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; fill: var(--cnt-accent); text-anchor: middle; }
.cnt-note-g.is-c { color: var(--cnt-accent); }

/* practice */
.cnt-setup { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin: 0 0 12px; }
.cnt-setup label { display: flex; flex-direction: column; gap: 4px; }
.cnt-setup .cnt-check { flex-direction: row; }
.cnt-setup select { min-width: 190px; }
.cnt-quiz { max-width: 440px; }
.cnt-qhead { margin: 0 0 8px; font-size: 14px; color: var(--mtp-muted, #c9b990); font-variant-numeric: tabular-nums; }
.cnt-qstaff { max-width: 260px; margin: 0 auto 6px; }
.cnt-prompt { margin: 4px 0 8px; text-align: center; font-weight: 600; }
.cnt-letters { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cnt .cnt-letters button { min-height: 56px; padding: 0; font-size: 22px; font-weight: 700; }
.cnt .cnt-letters button.is-right { background: #2f6b3a; border-color: #6fcf85; color: #fff; }
.cnt .cnt-letters button.is-wrong { background: #7a2b2b; border-color: #e07a7a; color: #fff; }
.cnt .cnt-letters button:disabled { cursor: default; opacity: 1; }
.cnt-feedback { min-height: 3em; margin: 8px 0 4px; font-size: 16px; }
.cnt-feedback.is-ok { color: #8fe0a1; }
.cnt-feedback.is-bad { color: #f0a0a0; }
.cnt-qactions { display: flex; gap: 8px; flex-wrap: wrap; }
.cnt .cnt-qactions button { min-height: 44px; }
.cnt-score { font: 700 30px 'Cormorant Garamond', Georgia, "Iowan Old Style", "Times New Roman", serif; margin: 0 0 4px; color: var(--cnt-accent); }
.cnt-missed { margin: 4px 0 12px; padding-left: 1.2em; }

/* quiz sheet: always paper-like (light) so what you see is what prints */
.cnt-paper { max-width: 760px; }
.cnt-sheet, .cnt-key { background: #fff; color: #111; padding: 18px 20px; margin: 0 0 14px; border-radius: 2px; }
.cnt-sheet .cnt-svg, .cnt-key { color: #111; }
.cnt-sheet-title { font: 700 22px/1.2 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0 0 8px; color: #111; }
.cnt-sheet-meta { margin: 0 0 6px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.cnt-sheet-sub { margin: 0 0 12px; font-size: 13px; color: #444; }
.cnt-blank { display: inline-block; width: 120px; border-bottom: 1px solid #111; height: 1em; }
.cnt-blank-long { width: 190px; } .cnt-blank-short { width: 40px; }
.cnt-cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; counter-reset: cell; }
.cnt-cell { position: relative; counter-increment: cell; padding: 0 0 2px; break-inside: avoid; }
.cnt-cell::before { content: counter(cell) "."; position: absolute; left: 0; top: 0; font: 700 13px 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #111; }
.cnt-answerline { display: block; margin: -8px 0 0 18px; height: 22px; border-bottom: 1px solid #111; }
.cnt-keylist { columns: 4; column-gap: 18px; margin: 0; padding-left: 1.8em; font-size: 14px; }
.cnt-keylist li { break-inside: avoid; margin: 0 0 3px; }
.cnt-nokey .cnt-key { display: none; }

@media (max-width: 760px) {
  .cnt-explore-grid { grid-template-columns: minmax(0, 1fr); }
  .cnt-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cnt-keylist { columns: 2; }
  .cnt-setup select { min-width: 0; width: 100%; }
  .cnt-setup label:not(.cnt-check) { flex: 1 1 150px; }
  .cnt-note { font-size: 38px; }
}

/* printing (printTool() sets html.mtp-print-tool; chart-tool.css hides everything else) */
@media print {
  html.mtp-print-tool .cnt { padding: 0 !important; border: 0 !important; margin: 0 !important; background: #fff !important; }
  html.mtp-print-tool .cnt-pane[hidden] { display: none !important; }
  html.mtp-print-tool .cnt[data-mode="explore"] .cnt-labelled-wrap { display: block !important; margin: 0; }
  html.mtp-print-tool .cnt[data-mode="explore"] .cnt-explore-grid { display: none !important; }
  html.mtp-print-tool .cnt-scroll { overflow: visible; }
  html.mtp-print-tool .cnt-svg-wide { min-width: 0; width: 100%; }
  html.mtp-print-tool .cnt-printtitle { color: #111 !important; font-size: 12pt; }
  html.mtp-print-tool .cnt-lbl, html.mtp-print-tool .cnt-lbl-mc { fill: #111 !important; }
  html.mtp-print-tool .cnt-svg { color: #111 !important; }
  html.mtp-print-tool .cnt-note-g.is-c { color: #111; }
  html.mtp-print-tool .cnt-sheet, html.mtp-print-tool .cnt-key { padding: 0 !important; margin: 0 !important; }
  html.mtp-print-tool .cnt-sheet *, html.mtp-print-tool .cnt-key * { color: #111 !important; }
  html.mtp-print-tool .cnt-blank, html.mtp-print-tool .cnt-answerline { border-bottom: 1px solid #111 !important; }
  html.mtp-print-tool .cnt-key { break-before: page; page-break-before: always; padding-top: 6mm !important; }
  html.mtp-print-tool .cnt-nokey .cnt-key { display: none !important; }
  html.mtp-print-tool .cnt-cells { gap: 3mm 6mm; }
  html.mtp-print-tool .cnt-cell .cnt-svg { width: 82%; }
  html.mtp-print-tool .cnt-answerline { margin-top: -4px; height: 18px; }
  html.mtp-print-tool .cnt-sheet-sub { margin-bottom: 6px; }
  html.mtp-print-tool .cnt-keylist { columns: 3; font-size: 11pt; }
}
