/* Piano kit (piano-kit.js). Works on drill pages (shared.css tokens) and content pages (lesson.css tokens). */
.pk { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; touch-action: manipulation;
    --pk-white: #ffffff; --pk-white-line: #a8a29e; --pk-black: #1c1917; --pk-black-top: #44403c;
    --pk-lab: #44403c; --pk-lab-b: #f5f5f4;
    --pk-on: #0b7c72; --pk-on-ink: #ffffff; --pk-ok: #15803d; --pk-bad: #b91c1c; --pk-hint: #fde68a; --pk-hint-b: #b45309; --pk-mc: #0b7c72; }
body.dark-mode .pk { --pk-white: #e7e2dd; --pk-white-line: #57534e; --pk-black: #0f0d0c; --pk-black-top: #57534e;
    --pk-lab: #44403c; --pk-on: #2dd4bf; --pk-on-ink: #10211f; --pk-ok: #22c55e; --pk-bad: #ef4444; --pk-hint: #fcd34d; --pk-hint-b: #d97706; --pk-mc: #0b7c72; }

.pk-key .pk-face { transition: fill .12s ease; }
.pk-w .pk-face { fill: var(--pk-white); stroke: var(--pk-white-line); stroke-width: 1; }
.pk-b .pk-face { fill: var(--pk-black); stroke: var(--pk-black-top); stroke-width: .8; }
.pk-lab { font: 600 11px Inter, system-ui, sans-serif; fill: var(--pk-lab); pointer-events: none; }
.pk-b .pk-lab { font-size: 7.5px; fill: var(--pk-lab-b); }
.pk-mc { fill: var(--pk-mc); opacity: .55; pointer-events: none; }

.pk [role="button"] { cursor: pointer; outline: none; }
.pk-w[role="button"]:hover .pk-face { fill: #f0eeec; }
.pk-b[role="button"]:hover .pk-face { fill: #3a3532; }
body.dark-mode .pk-w[role="button"]:hover .pk-face { fill: #d6d0ca; }
.pk [role="button"]:focus-visible .pk-face { stroke: var(--pk-on); stroke-width: 2.5; }

/* highlights: the face takes the color, the label switches to stay readable */
.pk .pk-on .pk-face { fill: var(--pk-on); }
.pk .pk-ok .pk-face { fill: var(--pk-ok); }
.pk .pk-bad .pk-face { fill: var(--pk-bad); }
.pk .pk-hint .pk-face { fill: var(--pk-hint); }
.pk .pk-b.pk-hint .pk-face { fill: var(--pk-hint-b); }
.pk .pk-press .pk-face { fill: var(--pk-on); opacity: .75; }
.pk .pk-on .pk-lab { fill: var(--pk-on-ink); }
.pk .pk-ok .pk-lab, .pk .pk-bad .pk-lab { fill: #fff; }
.pk .pk-on .pk-mc, .pk .pk-ok .pk-mc, .pk .pk-bad .pk-mc { fill: #fff; opacity: .8; }

@media (prefers-reduced-motion: reduce) { .pk-key .pk-face { transition: none; } }
@media print { .pk .pk-face { transition: none; } }
