#patternPractice { margin: 18px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#patternPractice * { letter-spacing: 0; }
.pp-heading, .pp-status, .pp-actions, .pp-select-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-heading { justify-content: space-between; margin-bottom: 18px; }
.pp-heading h2 { margin: 0; font-size: 22px; }
.pp-heading > span, #ppProgress, .pp-option small { color: var(--muted); font-size: 13px; }
.pp-layout { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 24px; }
.pp-pool { min-width: 0; }
.pp-pool summary { cursor: pointer; font-weight: 700; padding: 0 0 12px; }
#ppCount { margin-left: 8px; color: var(--accent); }
#patternPractice fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#ppSearch { width: 100%; }
.pp-select-actions { margin: 10px 0; }
#patternPractice button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 8px 12px; }
#patternPractice button:disabled { opacity: .45; cursor: default; }
#patternPractice button:focus-visible, .pp-pool summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pp-options { max-height: 310px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.pp-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pp-option span { overflow-wrap: anywhere; }
#patternPractice input[type="checkbox"], #patternPractice input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.pp-modes { display: flex; gap: 16px; flex-wrap: wrap; }
.pp-modes legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pp-modes label, .pp-actions label { display: flex; align-items: center; gap: 7px; }
.pp-session { min-width: 0; }
.pp-status { justify-content: space-between; margin: 22px 0 12px; min-height: 36px; }
#ppPhase { font-size: 26px; color: var(--accent-dark); }
.pp-question { min-height: 242px; }
.pp-beats, .pp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pp-beats span { text-align: center; border-bottom: 3px solid var(--line); padding: 8px; font-weight: 700; }
.pp-beats span.is-current { color: white; background: var(--accent); border-color: var(--accent-dark); }
.pp-chords { margin-top: 10px; }
.pp-chords strong { text-align: center; padding: 6px; background: #e9ede5; font-size: 28px; border-radius: 4px; }
.pp-patterns { margin-top: 10px; }
#patternPractice .pp-pattern, #patternPractice .pp-fill { background: var(--pp-color); color: white; border: 0; overflow-wrap: anywhere; font-weight: 700; min-height: 56px; padding: 8px; font-size: 15px; }
.pp-fills { margin-top: 8px; min-height: 48px; }
#patternPractice .pp-fill { font-size: 13px; min-height: 48px; }
.pp-empty { display: grid; place-items: center; min-height: 242px; border-block: 1px dashed var(--line); color: var(--muted); }
#ppNotice { min-height: 40px; margin: 8px 0; font-size: 14px; color: var(--warn); }
#patternPractice #ppStart { color: white; background: var(--accent); }
.pp-preview { max-width: min(90vw, 900px); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.pp-preview::backdrop { background: #0009; }
.pp-preview > button { float: right; font-size: 24px; }
.pp-preview img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; }
@media (max-width: 720px) {
  .pp-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pp-options { max-height: 200px; }
  .pp-heading h2 { font-size: 20px; }
  .pp-chords strong { font-size: 24px; }
  .pp-beats, .pp-row { gap: 5px; }
}
