.ic-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ic-notes { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.ic-note { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 0; padding: 10px 14px 14px; border: 1px solid var(--mtp-line); border-radius: 2px; min-width: 0; }
.ic-note legend { padding: 0 6px; color: var(--mtp-brass-bright); font-size: 14px; font-weight: 600; }
.ic-note label, .ic-row label, .ic-clefsel { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ic-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-top: 12px; }
.ic-row:first-child { margin-top: 0; }
.ic-row input[type="number"] { width: 120px; }

.ic-out { margin-top: 20px; min-height: 2em; }
.ic-title { margin: 0 0 6px; font-size: clamp(22px, 3.8vw, 32px); line-height: 1.15; color: var(--mtp-brass-bright); overflow-wrap: anywhere; }
.ic-sentence { margin: 0 0 12px; }
.ic-dl { margin: 0; border-top: 1px solid var(--mtp-line); }
.ic-r { display: grid; align-items: start; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 0 12px; border-bottom: 1px solid var(--mtp-line); }
.mtp-tool .ic-dl .ic-r > dt, .mtp-tool .ic-dl .ic-r > dd { margin: 0; padding: 7px 0; line-height: 1.4; min-height: 0; text-transform: none; letter-spacing: 0; }
.ic-dl dt { color: var(--mtp-muted); font-size: 14px; }
.ic-dl dd { overflow-wrap: anywhere; }
.ic-warn { margin: 10px 0 0; color: var(--mtp-brass-bright); font-size: 14px; }
.ic-list { margin: 0 0 8px; padding-left: 20px; }
.ic-sub { margin: 6px 0 12px; color: var(--mtp-muted); font-size: 14px; }

.ic-visual { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--mtp-line); }
.ic-visual[hidden] { display: none; }
.ic-visual-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; justify-content: space-between; }
.ic-h { margin: 0 0 10px; font-size: 20px; }
.ic-staff { max-width: 340px; }
.ic-staff svg { width: 100%; height: auto; display: block; }
.ic-keys { max-width: 560px; margin-top: 8px; }
.ic-kbd { width: 100%; height: auto; display: block; }
.ic-kbd .kw { fill: #f4efe3; stroke: #2a2418; stroke-width: 1; }
.ic-kbd .kb { fill: #1a1610; stroke: #000; stroke-width: 1; }
.ic-kbd .kw.k1, .ic-kbd .kb.k1 { fill: #d9a441; }
.ic-kbd .kw.k2, .ic-kbd .kb.k2 { fill: #62a8c9; }
.ic-kbd .kw.k12, .ic-kbd .kb.k12 { fill: #b6c46a; }
.ic-kbd .kt { font-size: 7px; fill: #5b5240; font-family: inherit; }
.ic-kbd .kdot { stroke: #000; stroke-width: 1; }
.ic-kbd .kdot.k1 { fill: #f3c261; } .ic-kbd .kdot.k2 { fill: #8cc7e4; } .ic-kbd .kdot.k12 { fill: #d3df8a; }
.ic-kbd .kdt { font-size: 9px; font-weight: 700; fill: #000; font-family: inherit; }

.ic-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 18px; }
.mtp-tool-panel .ic-playbtn { border-color: var(--mtp-brass); color: var(--mtp-brass-bright); font-weight: 600; }
.ic-actions [hidden] { display: none; }
.ic-msg { min-height: 1.4em; margin: 10px 0 0; color: var(--mtp-brass-bright); font-size: 14px; }

.ic-ref { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--mtp-line); }
.ic-tablewrap { overflow-x: auto; max-width: 100%; }
.ic-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.ic-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ic-table th, .ic-table td { padding: 6px 10px; border: 1px solid var(--mtp-line); text-align: left; }
.ic-table thead th { color: var(--mtp-muted); font-size: 13px; font-weight: 600; text-transform: none; }
.ic-table tbody th { font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 15px; color: inherit; }
.ic-table tr.ic-grp th { background: var(--mtp-raised-2); color: var(--mtp-brass-bright); font-size: 14px; }

@media (max-width: 640px) {
  .ic-r { grid-template-columns: minmax(0, 1fr); }
  .ic-dl dt { padding-bottom: 0; }
  .ic-dl dd { padding-top: 2px; }
  .ic-note { width: 100%; box-sizing: border-box; }
  .ic-table th, .ic-table td { padding: 5px 6px; font-size: 14px; }
}

/* Print: the result, staff, keyboard and reference table on white paper in black ink. */
@media print {
  @page { margin: 14mm; }
  body:has(.ic) .mtp-tool > *:not(.mtp-tool-root),
  body:has(.ic) .ic-tabs, body:has(.ic) .ic-controls, body:has(.ic) .ic-actions, body:has(.ic) .ic-msg, body:has(.ic) .ic-clefsel,
  body:has(.ic) .mtp-topnav, body:has(.ic) header, body:has(.ic) footer, body:has(.ic) .mtp-footer, body:has(.ic) nav, body:has(.ic) aside { display: none !important; }
  body:has(.ic), body:has(.ic) .mtp-tool-panel { background: #fff !important; color: #000 !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
  .ic, .ic * { color: #000 !important; background: #fff !important; border-color: #000 !important; }
  .ic { font-size: 10pt; }
  .ic-out { margin-top: 0; }
  .ic-title { font-size: 17pt; }
  .ic-dl dt, .ic-dl dd { padding: 2pt 6pt 2pt 0; font-size: 9.5pt; }
  .ic-r { grid-template-columns: 150pt minmax(0, 1fr); }
  .ic-visual { margin-top: 8pt; padding-top: 6pt; display: block; }
  .ic-visual[hidden] { display: none; }
  .ic-staff svg *, .ic-staff svg text { fill: #000 !important; stroke: #000 !important; }
  .ic-staff svg rect { fill: #000 !important; }
  .ic-staff { max-width: 200pt; }
  .ic-keys { max-width: 300pt; }
  .ic-kbd .kw { fill: #fff !important; stroke: #000 !important; }
  .ic-kbd .kb { fill: #000 !important; stroke: #000 !important; }
  .ic-kbd .kw.k1, .ic-kbd .kb.k1 { fill: #999 !important; }
  .ic-kbd .kw.k2, .ic-kbd .kb.k2 { fill: #ccc !important; }
  .ic-kbd .kw.k12, .ic-kbd .kb.k12 { fill: #aaa !important; }
  .ic-kbd .kdot { fill: #fff !important; stroke: #000 !important; }
  .ic-kbd .kdt, .ic-kbd .kt { fill: #000 !important; }
  .ic-ref { margin-top: 0; padding-top: 0; border-top: 0; break-before: page; }
  .ic-ref .ic-h { font-size: 13pt; margin-bottom: 2pt; }
  .ic-ref .ic-sub { font-size: 8.5pt; margin: 0 0 4pt; }
  .ic-tablewrap { overflow: visible; }
  .ic-table { font-size: 8pt; width: 100%; }
  .ic-table th, .ic-table td { padding: 0 4pt; line-height: 1.15; border: .5pt solid #000; }
  .ic-table tr { break-inside: avoid; }
  .ic-table tr.ic-grp th { background: #e6e6e6 !important; font-size: 8.5pt; }
  body:has(.ic) .mtp-tool, body:has(.ic) .mtp-tool-root { margin: 0 !important; padding: 0 !important; }
  body:has(.ic) .mtp-tool h1 { display: none !important; }
}
