/* Pachelbel, Canon in D — piece styles on top of book.css. Classes use the pc- prefix. */

.pc-workshop { grid-template-columns: .72fr 1.28fr; }
.pc-name { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--teal-soft); font-size: 14px; line-height: 1.55; color: var(--ink); }
.pc-name strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 4px; letter-spacing: -.02em; }
.pc-name em { color: var(--teal); font-style: italic; }
.pc-canvas { justify-content: flex-start; gap: 4px; }
.pc-school { margin: -4px 3px 0; font-size: 13px; }
.pc-school a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }

/* The canon lesson needs the full width for its three lanes. */
.pc-workshop.pc-wide { grid-template-columns: 1fr; gap: 22px; }
.pc-wide .lesson-text { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 36px; align-items: start; }
.pc-wide .lesson-text h3 { grid-row: 1 / span 5; }
.pc-wide .lesson-text > :not(h3) { grid-column: 2; }
.pc-wide .lesson-text .lesson-question { margin-top: 6px; }

/* 1. The walking bass: eight stepping stones. */
.pc-stones { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); justify-items: center; gap: 8px; align-items: start; padding: 4px 0 40px; }
.pc-stone { --c: var(--teal); position: relative; aspect-ratio: 1; width: 100%; max-width: 78px; min-width: 48px; min-height: 48px; padding: 0; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 22%, #fffdf5); color: color-mix(in srgb, var(--c) 78%, #1d2a26); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 45%, #d9d5c3); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1; transition: transform .15s, background .15s, box-shadow .15s; }
.pc-stone { transform: translateY(var(--drop, 0)); }
.pc-stone small { font: 600 10px var(--body); margin-top: 4px; opacity: .7; }
.pc-stone:hover { background: color-mix(in srgb, var(--c) 32%, #fffdf5); }
.pc-stone.changed { border-style: dashed; }
.pc-stone.changed::after { content: '✦'; position: absolute; top: -4px; right: -2px; font-size: 13px; color: var(--rust); }
.pc-stone.on { background: var(--c); color: #fffdf5; box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent); }
.pc-loop { text-align: right; font-size: 12px; color: var(--muted); margin: 10px 4px 0; }

/* 2. Three violins: canon lanes. */
.pc-lanes { width: 100%; }
.pc-canon-svg { width: 100%; height: auto; display: block; fill: none; stroke: none; }
.pc-lane-bg { fill: #fbf8ef; stroke: #e2dfcd; stroke-width: 1; transition: fill .2s; }
.pc-lane.entering .pc-lane-bg { fill: #e7efe3; stroke: #a4c2ae; }
.pc-lane-label { fill: var(--ink); font: 600 19px var(--body); dominant-baseline: middle; }
.pc-note { fill: color-mix(in srgb, #9aa59b 55%, #f0eddf); transition: opacity .2s; }
.pc-note.tune { fill: var(--c); opacity: .78; }
.pc-note.on { opacity: 1; fill: var(--c); stroke: #1d2a26; stroke-width: 1.5; }
.pc-lane.muted .pc-note, .pc-lane.muted .pc-lane-label { opacity: .18; }
.pc-bass-dot { fill: color-mix(in srgb, var(--c) 45%, #fffdf5); stroke: var(--c); stroke-width: 2; }
.pc-bass-dot.on { fill: var(--c); }
.pc-barline { stroke: #d6d2bf; stroke-width: 1; stroke-dasharray: 3 5; }
.pc-bar-label { fill: var(--muted); font: 500 15px var(--body); }
.pc-playhead { stroke: var(--rust); stroke-width: 3; stroke-linecap: round; }
.pc-violin-toggles button[data-violin][aria-pressed=false] { text-decoration: line-through; color: var(--muted); }

/* 3. Chord cards. */
.pc-chords { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.pc-chord { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 118px; padding: 12px 4px 10px; border-radius: 14px; background: var(--sheet); border: 2px solid #e2dfcd; transition: background .15s, transform .25s; }
.pc-chord strong { font: 500 clamp(18px, 2vw, 25px)/1 var(--serif); white-space: nowrap; letter-spacing: -.03em; color: var(--teal); }
.pc-chord small { font-size: 10px; font-weight: 500; color: var(--muted); }
.pc-chord.minor strong { color: #6a5893; }
.pc-chord.flipped { border-color: var(--rust); border-style: dashed; background: #fbeee6; transform: rotate(-2deg); }
.pc-chord.on { background: var(--teal); border-color: var(--teal); }
.pc-chord.on strong, .pc-chord.on small { color: #fffdf5; }
.pc-chord-bass { margin-top: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 25%, #fffdf5); border: 2px solid var(--c); font: 500 15px var(--serif); color: #1d2a26; }

/* 4. Faster feet. */
.pc-speed-choices { margin-top: 0; }
.pc-speed-choices b { font-family: var(--serif); font-size: 19px; font-weight: 500; margin-right: 2px; }
.pc-speed-view { margin-top: 12px; }
.pc-speed-svg { width: 100%; height: auto; display: block; fill: none; stroke: none; }
.pc-step-col { fill: #f7f4ea; transition: fill .15s; }
.pc-step-col.on { fill: #e3ecde; }
.pc-tune-dot { fill: color-mix(in srgb, var(--c) 55%, #fffdf5); stroke: var(--c); stroke-width: 2; }
.pc-tune-dot.on { fill: var(--c); stroke: #1d2a26; }
.pc-step-stone circle { fill: color-mix(in srgb, var(--c) 25%, #fffdf5); stroke: var(--c); stroke-width: 3; }
.pc-step-stone text { fill: #1d2a26; font: 500 20px var(--serif); text-anchor: middle; }
.pc-step-stone.on circle { fill: var(--c); }
.pc-step-stone.on text { fill: #fffdf5; }

@media (max-width: 1050px) {
  .pc-workshop { grid-template-columns: .8fr 1.2fr; gap: 24px; }
  .pc-workshop .lesson-text h3 { font-size: 30px; }
}
@media (max-width: 820px) {
  .pc-workshop { grid-template-columns: 1fr; }
  .pc-wide .lesson-text { display: block; }
  .pc-chords { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pc-chord { min-height: 104px; }
}
@media (max-width: 600px) {
  .pc-stones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 12px; padding: 4px 0 40px; }
  .pc-stone { min-height: 56px; font-size: 22px; }
  .pc-lanes, .pc-speed-view { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px 6px; }
  .pc-canon-svg { min-width: 600px; }
  .pc-speed-svg { min-width: 460px; }
}

.pc-find { border-color: #a4c2ae; color: var(--teal); background: var(--sheet); }
