/* Muziek (CA_Music.Web). Uses the host's colours where it has them (--accent, --text, --bg-elevated), with fallbacks of its own. */
.mu-page { --mu-accent: var(--accent, #6b46c1); --mu-soft: var(--accent-soft, #ede7fb); --mu-card: var(--bg-elevated, #fff); --mu-text: var(--text, #222);
    --mu-muted: var(--text-muted, #666); --mu-line: currentColor; --mu-ok: #2e8b57; --mu-no: #c0392b; --mu-h1: #e8a33d; --mu-h2: #3d8fe8;
    max-width: 980px; margin: 0 auto; padding: 0.5rem 0 2rem; color: var(--mu-text); }
.mu-wait { position: sticky; top: 0; z-index: 5; margin: 0.4rem 0; padding: 0.5rem 0.8rem; border-radius: 12px; background: var(--mu-soft); font-weight: 700; text-align: center; }
.mu-loading button, .mu-loading .mu-key, .mu-loading .mu-seg { pointer-events: none; }
.mu-loading .mu-lessons, .mu-loading .mu-tools, .mu-loading .mu-naming { opacity: .55; }
.mu-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.mu-top h1 { margin: 0.3rem 0; display: flex; align-items: center; gap: 0.5rem; }
.mu-back { border: 0; background: var(--mu-soft); color: var(--mu-text); border-radius: 10px; padding: 0.1rem 0.6rem; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.mu-naming { display: inline-flex; border: 2px solid var(--mu-accent); border-radius: 12px; overflow: hidden; }
.mu-naming button { border: 0; background: transparent; padding: 0.35rem 0.7rem; font-weight: 700; cursor: pointer; color: var(--mu-text); }
.mu-naming button.on { background: var(--mu-accent); color: #fff; }
.mu-lead { font-size: 1.05rem; }
.mu-status { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin: 0.6rem 0 1rem; }
.mu-badge { background: var(--mu-accent); color: #fff; border-radius: 999px; padding: 0.15rem 0.7rem; font-weight: 700; }
.mu-muted { color: var(--mu-muted); }
.mu-small { font-size: 0.9rem; }
.mu-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.8rem; }
.mu-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; text-align: left; padding: 0.9rem 0.9rem 1.1rem;
    border: 2px solid transparent; border-radius: 16px; background: var(--mu-card); color: var(--mu-text); box-shadow: 0 2px 6px rgba(0,0,0,.08); cursor: pointer; font: inherit; }
.mu-card:hover { border-color: var(--mu-accent); }
.mu-card.next { border-color: var(--mu-accent); box-shadow: 0 0 0 3px var(--mu-soft); }
.mu-card.done { background: linear-gradient(0deg, rgba(46,139,87,.08), rgba(46,139,87,.08)), var(--mu-card); }
.mu-card-emoji { font-size: 2rem; line-height: 1; }
.mu-icon { display: inline-block; vertical-align: middle; color: var(--mu-text); }
.mu-card-emoji .mu-icon { display: block; }
.mu-tool .mu-icon { margin-right: 0.25rem; }
.mu-card-no { position: absolute; top: 0.6rem; right: 0.8rem; font-weight: 800; color: var(--mu-muted); }
.mu-card-goal { font-size: 0.88rem; color: var(--mu-muted); }
.mu-card-score { margin-top: 0.2rem; font-size: 0.85rem; font-weight: 700; color: var(--mu-accent); }
.mu-card.done .mu-card-score { color: var(--mu-ok); }
.mu-tools { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.mu-tool { border: 2px solid var(--mu-accent); background: var(--mu-card); color: var(--mu-text); border-radius: 14px; padding: 0.6rem 1rem; font-weight: 700; cursor: pointer; font-size: 1rem; }
.mu-explain p { font-size: 1.05rem; line-height: 1.5; max-width: 70ch; }
.mu-try { background: var(--mu-card); border-radius: 16px; padding: 0.9rem; box-shadow: 0 2px 6px rgba(0,0,0,.08); margin: 1rem 0; }
.mu-try-h { font-weight: 700; margin-bottom: 0.6rem; }
.mu-actions, .mu-row { display: flex; gap: 0.5rem; align-items: center; margin: 0.6rem 0; }
.mu-wrap, .mu-actions { flex-wrap: wrap; }
.mu-primary, .mu-btn { border-radius: 12px; padding: 0.5rem 0.9rem; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.mu-primary { border: 0; background: var(--mu-accent); color: #fff; }
.mu-btn { border: 2px solid var(--mu-accent); background: var(--mu-card); color: var(--mu-text); }
.mu-btn.on { background: var(--mu-accent); color: #fff; }
.mu-primary:disabled, .mu-btn:disabled { opacity: .4; cursor: default; }
.mu-show { font-size: 1.3rem; font-weight: 700; text-align: center; min-height: 1.6em; margin: 0.5rem 0; }
.mu-ok { color: var(--mu-ok); font-weight: 700; }

/* keyboard */
.mu-kb { width: 100%; max-height: 190px; display: block; margin: 0.4rem 0; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.mu-key { cursor: pointer; }
.mu-key.white rect { fill: #fff; stroke: #333; stroke-width: 1; }
.mu-key.black rect { fill: #222; stroke: #000; }
.mu-key text { font-size: 10px; font-weight: 700; pointer-events: none; }
.mu-key.white text { fill: #555; }
.mu-key.black text { fill: #fff; font-size: 9px; }
.mu-key.marked.white rect { fill: #f7d58b; }
.mu-key.marked.black rect { fill: #b8860b; }
.mu-key.right rect { fill: #7fd19b !important; }
.mu-key.wrong rect { fill: #f19a8f !important; }
.mu-key:active rect { filter: brightness(.85); }

/* staff, rhythm */
.mu-staff, .mu-rhythm { display: block; max-width: 100%; height: auto; margin: 0.4rem auto; max-height: 200px; color: var(--mu-text); }
.mu-staff { min-width: 220px; width: auto; }
.mu-line { stroke: currentColor; stroke-width: 1; }
.mu-bar { stroke: currentColor; stroke-width: 1.4; }
.mu-stem { stroke: currentColor; stroke-width: 1.3; }
.mu-flag { stroke: currentColor; stroke-width: 1.6; fill: none; }
.mu-clef path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.mu-fill, .mu-head { fill: currentColor; }
.mu-head.hl { fill: var(--mu-accent); }
.mu-hollow { fill: none; stroke: currentColor; stroke-width: 1.6; }
.mu-acc { font-size: 20px; fill: currentColor; font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", sans-serif; }
.mu-label { font-size: 9px; fill: var(--mu-muted); font-weight: 700; }
.mu-meter { font-size: 22px; font-weight: 900; fill: currentColor; font-family: Georgia, serif; }
.mu-gap { fill: var(--mu-soft); stroke: var(--mu-accent); stroke-dasharray: 4 3; }
.mu-gap-q { font-size: 22px; font-weight: 900; fill: var(--mu-accent); }

/* scale steps and the guitar */
.mu-steps { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin: 0.5rem 0; }
.mu-steps span { padding: 0.15rem 0.55rem; border-radius: 8px; font-weight: 700; color: #fff; }
.mu-steps .h1 { background: var(--mu-h1); }
.mu-steps .h2 { background: var(--mu-h2); }
.mu-steps .join { background: #888; }
.mu-steps span:nth-child(3), .mu-steps span:nth-child(7) { outline: 2px dashed rgba(0,0,0,.35); outline-offset: 1px; }
.mu-fret { width: 100%; display: block; max-height: 120px; color: var(--mu-text); }
.mu-nut { fill: #ddd; stroke: #888; }
.mu-fretline { stroke: #999; stroke-width: 2; }
.mu-string { stroke: #b08d57; stroke-width: 2.5; }
.mu-fretno { font-size: 9px; fill: var(--mu-muted); }
.mu-dot { fill: #555; }
.mu-dot.h1 { fill: var(--mu-h1); }
.mu-dot.h2 { fill: var(--mu-h2); }
.mu-dot-t { font-size: 8px; font-weight: 800; fill: #fff; pointer-events: none; }
.mu-step { font-size: 8px; fill: var(--mu-muted); font-weight: 700; }

/* circle of fifths */
.mu-circle-box { max-width: 420px; margin: 0 auto; }
.mu-circle { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; }
.mu-seg path { stroke: #fff; stroke-width: 2; cursor: pointer; }
.mu-seg.outer path { fill: #ece6f7; }
.mu-seg.inner path { fill: #d9cff0; }
.mu-seg.near path { fill: #f7e3b5; }
.mu-seg.sel path, .mu-seg.sel-soft path { fill: var(--mu-accent); }
.mu-seg.sel-soft path { opacity: .55; }
.mu-seg text { pointer-events: none; fill: #2a2140; }
.mu-seg.sel text { fill: #fff; }
.mu-maj { font-size: 17px; font-weight: 800; }
.mu-alt { font-size: 10px; font-weight: 700; opacity: .75; }
.mu-min { font-size: 12px; font-weight: 700; }
.mu-sig { font-size: 9px; fill: var(--mu-muted); font-weight: 700; }
.mu-hub { fill: var(--mu-card); stroke: #d9cff0; stroke-width: 2; }
.mu-hub-key { font-size: 26px; font-weight: 900; fill: var(--mu-text); }
.mu-hub-sig { font-size: 12px; fill: var(--mu-muted); font-weight: 700; }
.mu-circle-explore { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 1rem; align-items: start; }
.mu-circle-info h3 { margin: 0.2rem 0; }
.mu-circle-info p { margin: 0.3rem 0; }
@media (max-width: 700px) { .mu-circle-explore { grid-template-columns: 1fr; } }

/* chords and progressions */
.mu-chord { display: flex; flex-direction: column; align-items: center; min-width: 4.2rem; padding: 0.4rem 0.5rem; border-radius: 12px; border: 2px solid var(--mu-accent); background: var(--mu-card); color: var(--mu-text); cursor: pointer; font: inherit; }
.mu-chord b { font-size: 1.2rem; }
.mu-chord span { font-size: 0.85rem; }
.mu-prog { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 2.4rem; align-items: center; padding: 0.5rem; border: 2px dashed var(--mu-soft); border-radius: 12px; margin: 0.5rem 0; }
.mu-prog-chip { background: var(--mu-soft); border-radius: 10px; padding: 0.25rem 0.6rem; }

/* exercises */
.mu-quiz-top { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; margin-top: 0.6rem; }
.mu-progress { height: 8px; background: var(--mu-soft); border-radius: 99px; overflow: hidden; margin: 0.4rem 0 0.8rem; }
.mu-progress div { height: 100%; background: var(--mu-accent); transition: width .3s; }
.mu-question { font-size: 1.35rem; font-weight: 800; text-align: center; margin: 0.6rem 0; }
.mu-visual { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.mu-visual > .mu-kb { max-width: 640px; }
.mu-listen { border: 0; background: var(--mu-accent); color: #fff; font-size: 1.3rem; font-weight: 800; padding: 0.8rem 1.4rem; border-radius: 16px; cursor: pointer; }
.mu-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; max-width: 640px; margin: 1rem auto; }
.mu-option { font: inherit; font-size: 1.15rem; font-weight: 700; padding: 0.8rem; border-radius: 14px; border: 2px solid var(--mu-accent); background: var(--mu-card); color: var(--mu-text); cursor: pointer; }
.mu-option.right { background: var(--mu-ok); border-color: var(--mu-ok); color: #fff; }
.mu-option.wrong { background: var(--mu-no); border-color: var(--mu-no); color: #fff; }
.mu-option.dim { opacity: .45; }
.mu-feedback { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; font-size: 1.15rem; font-weight: 700; margin: 0.8rem 0; }
.mu-feedback.ok { color: var(--mu-ok); }
.mu-feedback.no { color: var(--mu-no); }
.mu-result { text-align: center; padding: 1.5rem; background: var(--mu-card); border-radius: 18px; margin-top: 1rem; }
.mu-result-score { font-size: 3rem; font-weight: 900; color: var(--mu-no); }
.mu-result.ok .mu-result-score { color: var(--mu-ok); }
.mu-result .mu-actions { justify-content: center; }
