/* Noten lesen im Jodel. Mobile first; always light. */
@font-face { font-family: "Bravura"; src: url("/fonts/Bravura.woff2") format("woff2"); font-display: block; }
:root {
	--bg: #fbf7ee; --card: #fffdf8; --ink: #1d1a16; --text: #26221c; --muted: #6d6456; --line: #e6dfcf;
	--red: #9d2a1f; --blue: #24457a; --green: #2f6b3f; --gold: #a9781f; --plum: #6b3a6e; --teal: #1f6f78;
	--ok: #2f6b3f; --ok-bg: #e7f3e6; --bad: #b3261e; --bad-bg: #fbe9e6;
	--shadow: 0 1px 2px rgb(60 45 20 / 0.06), 0 6px 18px rgb(60 45 20 / 0.07);
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); }
h1 { font-size: 1.9rem; line-height: 1.15; margin: 0.3em 0; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 1.5em 0 0.4em; }
h3 { font-size: 1.05rem; margin: 1em 0 0.3em; }
p, ul, ol, table, figure, dl { margin: 0 0 0.9em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.25em 0; }
button { font: inherit; }

.top, .nav, main, .foot { max-width: 800px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.brand { font: 700 1.2rem var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; }
.brand small { font: 500 0.8rem system-ui, sans-serif; color: var(--muted); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--red) url("/favicon.svg") center/cover; }
.xp-chip { font-size: 0.85rem; font-weight: 600; color: var(--gold); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.nav { display: flex; gap: 4px; padding-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 80%, transparent); }
.nav a { padding: 6px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav a.on { background: var(--ink); color: var(--bg); }
main { padding-bottom: 32px; min-height: 60vh; outline: none; }
.foot { color: var(--muted); font-size: 0.85rem; text-align: center; padding-top: 16px; padding-bottom: 90px; border-top: 1px solid var(--line); }

.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.93rem; }
.crumb { font-size: 0.9rem; color: var(--muted); margin: 0; }
.hero, .lesson, .practice, .result, .stage { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; margin: 14px 0; box-shadow: var(--shadow); }
.stage { padding: 18px 20px; }
.stage h2 { margin-top: 0; }
.hero { overflow: hidden; }
.hero h1 { margin-top: 0.2em; }
.frieze { height: 54px; margin: -22px -20px 12px; background: #f1e9d6 url("/img/frieze.svg") repeat-x left bottom / auto 54px; border-bottom: 3px solid var(--red); }
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 12px; padding: 11px 18px; font-weight: 700; text-decoration: none; cursor: pointer; margin: 4px 6px 4px 0; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn.small { padding: 7px 13px; font-size: 0.92rem; border-radius: 10px; margin: 0; }
.btn.big { font-size: 1.1rem; padding: 14px 22px; }
.btn.stop { background: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
#view:focus-visible { outline: none; }

/* Learning path */
.path { list-style: none; padding: 0; margin: 0; }
.path li { margin: 8px 0; }
.path a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); background: #fff; }
.path a:hover { border-color: var(--red); }
.path .num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--serif); background: #f1e9d6; color: var(--ink); }
.path li.done .num { background: var(--green); color: #fff; }
.path .t { flex: 1; min-width: 0; }
.path .t b { display: block; font-family: var(--serif); font-size: 1.05rem; }
.path .t small { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.path li.soon { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }
.stars { color: var(--gold); white-space: nowrap; letter-spacing: 1px; }
.stars span { color: #ddd3bd; }
.stars.big { font-size: 2.4rem; margin: 0; }
.trainers { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 0; }
.trainers li { margin: 0; }
.trainers a { display: block; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); background: #fff; font-weight: 600; font-size: 0.95rem; height: 100%; }
.trainers a:hover { border-color: var(--red); }
ul.plain { list-style: none; padding: 0; }

/* Lessons */
.lesson .txt h2:first-child { margin-top: 1.2em; }
.fig { margin: 16px 0 20px; }
.fig figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.fig-score { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 8px; }
.score-wrap { overflow-x: auto; }
.score-bar, .mixer, .tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.mixer { border-top: 0; padding-top: 0; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:disabled { opacity: 0.4; cursor: default; }
.chip.part { opacity: 0.55; text-decoration: line-through; }
.chip.part.on, .chip.part.half { opacity: 1; text-decoration: none; }
.chip.part.half { background: #fff; }
.chip.part.p-j1.on { background: var(--red); border-color: var(--red); } .chip.part.p-j1.half { color: var(--red); border-color: var(--red); }
.chip.part.p-j2.on { background: var(--gold); border-color: var(--gold); } .chip.part.p-j2.half { color: var(--gold); border-color: var(--gold); }
.chip.part.p-t1.on { background: var(--blue); border-color: var(--blue); } .chip.part.p-t1.half { color: var(--blue); border-color: var(--blue); }
.chip.part.p-t2.on { background: var(--teal); border-color: var(--teal); } .chip.part.p-t2.half { color: var(--teal); border-color: var(--teal); }
.chip.part.p-b1.on { background: var(--green); border-color: var(--green); } .chip.part.p-b1.half { color: var(--green); border-color: var(--green); }
.chip.part.p-b2.on { background: var(--plum); border-color: var(--plum); } .chip.part.p-b2.half { color: var(--plum); border-color: var(--plum); }
.lesson-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.nav-prev-next { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 0.92rem; text-align: left; }
.tbl { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.tbl th, .tbl td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.glossary dt { font: 700 1.02rem var(--serif); margin-top: 0.8em; }
.glossary dd { margin: 0; }
.sources li { margin: 0.7em 0; }

/* Scores */
svg.score { display: block; max-width: 100%; height: auto; margin: 0 auto; }
svg.score .mus { font-family: "Bravura"; font-size: 40px; fill: var(--ink); }
svg.score .ln { stroke: var(--ink); }
svg.score .fl { fill: var(--ink); }
svg.score .tie { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
svg.score .lyric { font: italic 13.5px/1 Georgia, serif; text-anchor: middle; fill: var(--ink); }
svg.score .nlabel { font: 700 12px/1 system-ui, sans-serif; text-anchor: middle; fill: var(--muted); }
svg.score .slabel { font: 700 10.5px/1 system-ui, sans-serif; fill: var(--muted); }
svg.score .harm { font: 700 13px/1 system-ui, sans-serif; text-anchor: middle; fill: var(--muted); }
svg.score .harm.h-I { fill: var(--red); } svg.score .harm.h-IV { fill: var(--green); } svg.score .harm.h-V { fill: var(--blue); }
svg.score .volta { font: 11px/1 system-ui, sans-serif; fill: var(--ink); }
svg.score .hit { fill: transparent; cursor: pointer; }
svg.score .hit:hover { fill: rgb(157 42 31 / 0.18); }
svg.score .nt { cursor: pointer; }
svg.score .nt.d1 .head, svg.score .nlabel.d1 { fill: var(--red); }
svg.score .nt.d3 .head, svg.score .nlabel.d3 { fill: var(--blue); }
svg.score .nt.d5 .head, svg.score .nlabel.d5 { fill: var(--green); }
svg.score .nt.on .mus, svg.score .rest.on .mus { fill: #e2571c; }
svg.score .nt.on .ln { stroke: #e2571c; }
svg.score .nt.ok .mus { fill: var(--ok); } svg.score .nt.bad .mus { fill: var(--bad); }
.opt svg.score .nt { cursor: inherit; }

/* Diagrams */
svg.dia { display: block; width: 100%; height: auto; max-width: 640px; margin: 0 auto; font: 15px system-ui, sans-serif; fill: var(--text); }
svg.dia .h { font: 700 16px var(--serif); fill: var(--ink); }
svg.dia .small { font-size: 13px; fill: var(--muted); }
svg.dia .tiny { font-size: 11px; fill: var(--muted); }
svg.dia .w { fill: #fff; } svg.dia .small.w { fill: #fff; font-weight: 600; }
svg.dia .badge { font: 700 13px system-ui, sans-serif; fill: #fff; }
svg.dia .badge.big { font-size: 17px; }
svg.dia .card { fill: #fff; stroke: var(--line); }
svg.dia .card.c1 { stroke: var(--red); } svg.dia .card.c2 { stroke: var(--blue); } svg.dia .card.c3 { stroke: var(--green); } svg.dia .card.c4 { stroke: var(--gold); }
svg.dia .dot.c0 { fill: #cfc5ad; } svg.dia .dot.c1, svg.dia .bar.c1 { fill: var(--red); } svg.dia .dot.c2 { fill: var(--blue); } svg.dia .dot.c3, svg.dia .bar.c3 { fill: var(--green); } svg.dia .dot.c4, svg.dia .bar.c4 { fill: var(--gold); }
svg.dia .ink { stroke: var(--ink); stroke-width: 1.4; }
svg.dia .head { fill: var(--ink); } svg.dia .head.l1, svg.dia .l1 { fill: var(--red); } svg.dia .head.l2, svg.dia .l2 { fill: var(--blue); } svg.dia .l4 { fill: var(--gold); }
svg.dia .arrow, svg.dia .arc { fill: none; stroke: var(--red); stroke-width: 2; }
svg.dia .cell { stroke: #fff; } svg.dia .v0 { fill: #f3d9d5; } svg.dia .v1 { fill: #f1e2c2; } svg.dia .v2 { fill: #d9e8d6; } svg.dia .v3 { fill: #d5dff0; } svg.dia .v4 { fill: #e6d8e8; }
svg.dia .mus { font-family: "Bravura"; font-size: 26px; fill: var(--ink); }
svg.dia .wkey { fill: #fff; stroke: var(--ink); } svg.dia .bkey { fill: var(--ink); } svg.dia .bk { fill: #fff; font-size: 12px; }
svg.dia .key { cursor: pointer; } svg.dia .wkey.key:hover { fill: #f6ddd8; } svg.dia .bkey.key:hover { fill: var(--red); }
svg.dia .ring { fill: none; stroke: var(--line); stroke-width: 2; } svg.dia .ring.in { stroke-dasharray: 3 5; }
svg.dia .guide { stroke: var(--line); stroke-dasharray: 3 4; }
svg.dia.piano { max-width: 560px; }

/* Tools */
.tool, .explorer { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.fig .explorer, .tool .fig-score { border: 0; padding: 0; }
.explorer svg.score { margin: 0 auto; }
.explorer-name { text-align: center; font: 700 1.3rem var(--serif); margin: 0; color: var(--red); }
.tool-text { margin: 8px 0 0; font-size: 0.95rem; }
.tool-row { border-top: 0; padding-top: 0; }
.slider { width: 100%; margin: 10px 0 4px; accent-color: var(--red); }

/* Exercises */
.progress { height: 8px; background: #efe7d5; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress-fill { display: block; height: 100%; background: var(--red); border-radius: 99px; width: 0; transition: width 0.3s; }
.w1 { width: 5%; } .w2 { width: 10%; } .w3 { width: 15%; } .w4 { width: 20%; } .w5 { width: 25%; } .w6 { width: 30%; } .w7 { width: 35%; } .w8 { width: 40%; } .w9 { width: 45%; } .w10 { width: 50%; }
.w11 { width: 55%; } .w12 { width: 60%; } .w13 { width: 65%; } .w14 { width: 70%; } .w15 { width: 75%; } .w16 { width: 80%; } .w17 { width: 85%; } .w18 { width: 90%; } .w19 { width: 95%; } .w20 { width: 100%; }
.q-prompt { font: 600 1.15rem/1.4 var(--serif); margin: 6px 0 12px; }
.q-body .fig-score { border: 0; padding: 0; margin-bottom: 10px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.options.pics { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.opt { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 10px; font-weight: 600; cursor: pointer; color: var(--text); min-height: 50px; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); } .opt.bad { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; color: var(--text); }
.opt .fig-score { background: transparent; pointer-events: none; }
.feedback { border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.feedback.ok { background: var(--ok-bg); border-left: 5px solid var(--ok); } .feedback.bad { background: var(--bad-bg); border-left: 5px solid var(--bad); }
.btn.listen { background: var(--blue); }
.btn.next { display: block; width: 100%; font-size: 1.05rem; padding: 13px; }
.tap-pad { display: block; width: 100%; height: 130px; border-radius: 18px; border: 3px solid var(--ink); background: #f1e9d6; font: 700 1.3rem var(--serif); color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tap-pad.hit { background: var(--red); color: #fff; }
.result { text-align: center; }
.result ul { text-align: left; display: inline-block; }

.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; z-index: 20; box-shadow: var(--shadow); font-size: 0.92rem; }
.consent p { margin: 0 0 8px; } .consent a { color: #fff; } .consent-actions { margin: 0; display: flex; gap: 8px; }
.consent .btn.secondary { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
[hidden] { display: none !important; }
@media (max-width: 520px) { body { font-size: 16px; } h1 { font-size: 1.6rem; } .hero, .lesson, .practice, .result, .stage { padding: 18px 14px; border-radius: 14px; } .frieze { margin: -18px -14px 12px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.q-body > .fig-score svg.score, .explorer svg.score { width: 100%; max-width: 460px; }
.opt svg.score { width: 100%; }
svg.score .dyn { font: italic 700 15px/1 Georgia, serif; text-anchor: middle; fill: var(--ink); }
svg.score .dyn.word { font: italic 12.5px/1 Georgia, serif; text-anchor: start; }
svg.dia .bar.c2 { fill: var(--blue); }
.bar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.bar-cell { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border: 2px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.bar-cell .muted { flex-basis: 100%; font-size: 0.8rem; }
.bar-cell.ok { border-color: var(--ok); background: var(--ok-bg); } .bar-cell.bad { border-color: var(--bad); background: var(--bad-bg); }
a.chip { text-decoration: none; }
