/* The practice player (learn/view.js, inside the Library tab): a sticky control area (modes, transport, what to play and what
   was heard on a keyboard) above the score. The Library's list is in library.css. */
.lp { max-width: 980px; margin: 0 auto; padding: 0 16px 32px; }
.lp-sticky { position: sticky; top: 0; z-index: 10; margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 16px 10px;
             background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
             border-bottom: 1px solid var(--line); }
.lp-top { display: flex; align-items: center; gap: 6px; margin: 0 0 8px -8px; }
.lp-title { min-width: 0; flex: 1 1 auto; }
.lp-title b { display: block; font: 700 18px/1.2 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-title small { display: block; font-size: 12px; color: var(--muted); }
.lp-modes { margin-bottom: 8px; }
.lp-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.lp-play { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; background: var(--accent); color: var(--accent-ink);
           box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.lp-play svg.i { width: 22px; height: 22px; }
.lp-ctl { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lp-ctl select { min-height: 34px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; }
.lp-ctl input[type="range"] { width: 90px; accent-color: var(--accent); }
.lp-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft);
             color: var(--accent-text); font-size: 13px; }
.lp-banner span { flex: 1 1 200px; }
.lp-feedback { margin-top: 8px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "stats now" "kb kb"; gap: 6px 14px; align-items: center; }
.lp-stats { grid-area: stats; display: flex; flex-direction: column; }
.lp-stats b { font: 700 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.lp-stats small { font-size: 11px; color: var(--muted); }
.lp-now { grid-area: now; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: baseline; font-size: 13px; min-width: 0; }
.lp-now span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lp-now b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-text); }
.lp-now b.heard { color: var(--ink); font-weight: 600; }
.lp-kb { grid-area: kb; width: 100%; height: auto; max-height: 76px; display: block; }
.lp-kb .wkey { fill: var(--key); stroke: var(--line-strong); stroke-width: 1; }
.lp-kb .bkey { fill: var(--key-black); }
.lp-kb .klabel { font-size: 9px; fill: var(--muted); pointer-events: none; }
.lp-kb .tgt { fill: color-mix(in srgb, var(--accent) 45%, var(--key)); }
.lp-kb .bkey.tgt { fill: var(--accent); }
.lp-kb .ok { fill: var(--live); }
.lp-kb .bad { fill: var(--rec); }
.lp-kb .on { fill: color-mix(in srgb, var(--muted) 55%, var(--key)); }
.lp-status { margin: 10px 0 0; }
.lp-status:empty { display: none; }
.lp-done { margin-top: 12px; }
.lp-done-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--live) 14%, var(--surface));
                border: 1px solid color-mix(in srgb, var(--live) 40%, transparent); }
.lp-done-card > svg.i { color: var(--live); width: 26px; height: 26px; }
.lp-done-card div { flex: 1; min-width: 0; }
.lp-done-card b { display: block; font-size: 16px; }
.lp-done-card small { display: block; font-size: 12px; color: var(--muted); }
.lp-paper { margin-top: 12px; min-height: 120px; }
.lp-paper .err { padding: 12px; color: var(--rec); }
.lp-audio { display: none; }
@media (min-width: 720px) { .lp-feedback { grid-template-columns: auto 1fr 1.4fr; grid-template-areas: "stats now kb"; } .lp-kb { max-height: 64px; } }
