/* Woodwind fingering charts (saxophone, flute, clarinet, recorder). Scoped to .mtp-ww. */
.mtp-ww { --ww-tube: var(--mtp-raised-2); --ww-tube-line: var(--mtp-line); --ww-key: var(--mtp-night); --ww-key-line: var(--mtp-muted);
  --ww-on: var(--mtp-brass-bright); --ww-on-ink: #1a1206; --ww-lbl: var(--mtp-muted); }
.mtp-ww-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 0 0 14px; }
.mtp-ww-field { display: flex; flex-direction: column; gap: 4px; }
.mtp-ww-hint { margin: 0 0 8px; color: var(--mtp-muted); font-size: 14px; }

.acc { display: inline-block; width: .62em; text-align: center; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif; font-weight: 400; line-height: 1; }
.mtp-ww-name .big .acc { width: .5em; }

/* note buttons */
.mtp-ww-notes { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 22px; }
.mtp-ww-octave { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.mtp-ww-octlabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mtp-muted); }
.mtp-ww-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.mtp-tool-panel .mtp-ww-note { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; padding: 2px 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mtp-ww-note .n { font-size: 15px; font-weight: 600; }
.mtp-ww-note .e { font-size: 11px; color: var(--mtp-muted); }
.mtp-tool-panel .mtp-ww-note.black { background: var(--mtp-night); }
.mtp-tool-panel .mtp-ww-note.optional { border-style: dashed; }
.mtp-tool-panel .mtp-ww-note[aria-pressed="true"] .e { color: var(--mtp-brass); }

/* stage */
.mtp-ww-stage { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px 36px; align-items: start; }
.mtp-ww-diagram { background: var(--mtp-night); border: 1px solid var(--mtp-line); padding: 10px; border-radius: 2px; min-width: 0; }
.ww-svg { display: block; width: 100%; height: auto; max-height: 76vh; margin: 0 auto; }
.ww-tube { fill: var(--ww-tube); stroke: var(--ww-tube-line); stroke-width: 2; }
.ww-window { fill: var(--ww-key); stroke: var(--ww-tube-line); }
.ww-k { fill: var(--ww-key); stroke: var(--ww-key-line); stroke-width: 1.6; }
.ww-k.on { fill: var(--ww-on); stroke: var(--ww-on); }
.ww-k.dashed { stroke-dasharray: 3 3; }
.ww-k.bellc, .ww-k.dashed.on { stroke-dasharray: none; }
.ww-lbl { stroke: none; fill: var(--ww-lbl); font-family: "Source Sans 3", system-ui, sans-serif; pointer-events: none; }
.ww-k.on .ww-lbl { fill: var(--ww-on-ink); font-weight: 700; }
.ww-lbl-out, .ww-cap { fill: var(--ww-lbl); font-family: "Source Sans 3", system-ui, sans-serif; font-size: 12px; }
.ww-cap { font-size: 11px; letter-spacing: .12em; }

/* info */
.mtp-ww-info { min-width: 0; }
.mtp-ww-label { margin: 14px 0 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mtp-muted); }
.mtp-ww-label:first-child { margin-top: 0; }
.mtp-ww-name { margin: 0 0 8px; font-family: "Cormorant Garamond", "Source Sans 3", serif; }
.mtp-ww-name .big { font-size: clamp(44px, 8vw, 64px); line-height: 1; font-weight: 600; color: var(--mtp-brass-bright); }
.mtp-ww-name .enh { font-size: 24px; color: var(--mtp-paper); }
.mtp-ww-staff { display: block; width: 210px; max-width: 100%; min-height: 96px; margin: 4px 0 10px; background: #fffdf6; border-radius: 2px; padding: 4px; box-sizing: border-box; overflow: hidden; }
.mtp-ww-staff svg { display: block; width: 100%; height: auto; }
.mtp-ww-sounds { margin: 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.mtp-ww-fact { margin: 2px 0 12px; color: var(--mtp-muted); font-size: 14px; max-width: 52ch; }
.mtp-ww-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.mtp-ww-check { display: block; margin: 0 0 4px; font-size: 14px; }
.mtp-ww-altbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.mtp-ww-keys { margin: 0; max-width: 56ch; overflow-wrap: anywhere; }
.mtp-ww-extra { margin: 8px 0 0; color: var(--mtp-muted); max-width: 56ch; font-size: 14px; }
.mtp-ww-printbar { margin-top: 22px; }
.mtp-ww-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.mtp-ww-sources { margin-top: 16px; color: var(--mtp-muted); font-size: 14px; }
.mtp-ww-sources summary { cursor: pointer; min-height: 32px; }
.mtp-ww-sources ul { margin: 6px 0 0; padding-left: 1.2em; }
.mtp-ww:not(.ready):not(.failed) .mtp-ww-stage { min-height: 520px; }
.mtp-ww-printsheet { display: none; }

@media (max-width: 700px) {
  .mtp-ww-stage { grid-template-columns: minmax(0, 1fr); }
  .mtp-ww-diagram { max-width: 320px; margin: 0 auto; width: 100%; box-sizing: border-box; }
  .mtp-ww-notes { gap: 6px; }
  .mtp-ww-octave { width: 100%; }
  .mtp-ww-btns { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; position: relative; }
  .mtp-ww-btns .mtp-ww-note { flex: 0 0 auto; }
  .mtp-tool-panel .mtp-ww-note { min-width: 40px; padding: 2px 3px; }
}

/* print: only the full chart, white paper, black ink */
@media print {
  @page { margin: 10mm; }
  html:has(.mtp-ww), body:has(.mtp-ww) { background: #fff !important; color: #000 !important; height: auto !important; min-height: 0 !important; }
  body:has(.mtp-ww) .mtp-topnav, body:has(.mtp-ww) footer, body:has(.mtp-ww) .mtp-footer, body:has(.mtp-ww) nav,
  body:has(.mtp-ww) .mtp-tool > *:not(.mtp-tool-root), body:has(.mtp-ww) .mtp-tool-root > *:not(.mtp-ww),
  body:has(.mtp-ww) .mtp-ww > *:not(.mtp-ww-printsheet) { display: none !important; }
  body:has(.mtp-ww) .mtp-shell, body:has(.mtp-ww) main { padding: 0 !important; margin: 0 !important; min-height: 0 !important; max-width: none !important; }
  body:has(.mtp-ww) .mtp-tool { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  body:has(.mtp-ww) .mtp-ww { background: #fff !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
  .mtp-ww-printsheet { display: block; color: #000; background: #fff; font-family: "Source Sans 3", Arial, sans-serif; }
  .mtp-ww-printsheet h2 { margin: 0 0 2mm; font-size: 17pt; color: #000; }
  .mtp-ww-printsheet .ww-sub { margin: 0 0 4mm; font-size: 9pt; color: #000; }
  .ww-grid { display: grid; grid-template-columns: repeat(var(--ww-cols, 8), minmax(0, 1fr)); gap: 3mm 2mm; }
  .ww-cell { margin: 0; break-inside: avoid; text-align: center; }
  .ww-cell figcaption { display: flex; flex-direction: column; align-items: center; font-size: 8pt; line-height: 1.15; min-height: 10mm; justify-content: flex-end; color: #000; }
  .ww-cell figcaption strong { font-size: 10pt; }
  .ww-cell .enh, .ww-cell .snd { font-size: 6.5pt; color: #000; }
  .ww-cell .ww-svg { width: 100%; height: auto; max-height: 44mm; }
  .ww-url { margin: 0 0 3mm; font-size: 8pt; color: #000; }
  .ww-foot { margin: 3mm 0 0; font-size: 8pt; color: #000; }
  .mtp-ww { --ww-tube: #fff; --ww-tube-line: #000; --ww-key: #fff; --ww-key-line: #000; --ww-on: #000; --ww-on-ink: #fff; --ww-lbl: #000; }
  .ww-tube, .ww-window, .ww-k { vector-effect: non-scaling-stroke; stroke-width: 1px; }
  .ww-k.on { fill: #000 !important; stroke: #000 !important; }
  .ww-k { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
