/* Thema's. Elk element met data-theme krijgt zijn eigen kleuren, zo tonen de knoppen bij Instellingen meteen een voorbeeld. */
/* Figtree (SIL Open Font License, zie fonts/Figtree-OFL.txt): één variabel bestand met alle diktes van 300 tot 900. */
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }
:root, [data-theme] { color: var(--ink); }
:root { --ease: cubic-bezier(.2, .7, .2, 1); --ease-soft-pop: cubic-bezier(.3, 1.35, .5, 1); }
:root, [data-theme=auto], [data-theme=licht] {
  color-scheme: light dark;
  --font: "Figtree", system-ui, sans-serif;
  --bg: #f6f1e7; --card: #fffdf8; --ink: #22302e; --muted: #6a7370; --line: #e2d9c8; --accent: #1f5c57; --on-accent: #fffdf8; --star: #c08a2b; --note: #f7e3cf;
  --stage-paper: #fffdf8; --stage-ink: #22302e; --stage-line: #ece4d5; --stage-staff: #a8a497; --stage-hit: #eef3ec; --stage-right: #2c7a73; --stage-left: #b5762a;
  --stage-good: #5d9a52; --stage-missed: #b3564c; --stage-slip: #c9a24a; --stage-hint: #bcd9d3; --stage-white: #ffffff; --stage-black: #2a2f2e; --stage-keytext: #77807c;
}
[data-theme=licht] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]), [data-theme=auto] {
    --bg: #16201f; --card: #1e2a28; --ink: #ece7dc; --muted: #9eaaa6; --line: #33423f; --accent: #6fb8ae; --on-accent: #10201e; --star: #dcae57; --note: #4a3826;
    --stage-paper: #1a2523; --stage-ink: #ece7dc; --stage-line: #2a3735; --stage-staff: #71807c; --stage-hit: #22322f; --stage-right: #5fb0a5; --stage-left: #d69a50;
    --stage-good: #7fbb73; --stage-missed: #d1796f; --stage-slip: #d8b765; --stage-hint: #5d8a83; --stage-white: #dcd8ce; --stage-black: #0d1312; --stage-keytext: #59625f;
  }
}
[data-theme=donker] {
  color-scheme: dark; --font: "Figtree", system-ui, sans-serif;
  --bg: #16201f; --card: #1e2a28; --ink: #ece7dc; --muted: #9eaaa6; --line: #33423f; --accent: #6fb8ae; --on-accent: #10201e; --star: #dcae57; --note: #4a3826;
  --stage-paper: #1a2523; --stage-ink: #ece7dc; --stage-line: #2a3735; --stage-staff: #71807c; --stage-hit: #22322f; --stage-right: #5fb0a5; --stage-left: #d69a50;
  --stage-good: #7fbb73; --stage-missed: #d1796f; --stage-slip: #d8b765; --stage-hint: #5d8a83; --stage-white: #dcd8ce; --stage-black: #0d1312; --stage-keytext: #59625f;
}
/* Neon: de kleuren uit Layers. Platte vlakken op bijna-zwart paars, geen gloed. */
[data-theme=neon] {
  color-scheme: dark; --font: "Figtree", system-ui, sans-serif;
  --bg: #0b0916; --card: #15112a; --ink: #ffffff; --muted: #a49dc4; --line: #2a2350; --accent: #a58bff; --on-accent: #0b0916; --star: #ffc857; --note: #3a2880;
  --stage-paper: #0b0916; --stage-ink: #e2ddf0; --stage-line: #1d1838; --stage-staff: #6a6290; --stage-hit: #1a1435; --stage-right: #a58bff; --stage-left: #ff7fb0;
  --stage-good: #4fe0c8; --stage-missed: #ff7a59; --stage-slip: #ffc857; --stage-hint: #44277e; --stage-white: #e2ddf0; --stage-black: #15112a; --stage-keytext: #6a6290;
}
/* Vinyl: warm bruin met oranje en salie, als een platenhoes. */
[data-theme=vinyl] {
  color-scheme: dark; --font: "Figtree", system-ui, sans-serif;
  --bg: #1e1a18; --card: #2a2421; --ink: #f0e4cc; --muted: #b3a48c; --line: #3e3430; --accent: #dda63a; --on-accent: #1e1a18; --star: #dda63a; --note: #4a3422;
  --stage-paper: #221d1a; --stage-ink: #f0e4cc; --stage-line: #352d29; --stage-staff: #6b5f55; --stage-hit: #2e2622; --stage-right: #7c9cbf; --stage-left: #c07f95;
  --stage-good: #7fa886; --stage-missed: #d9694a; --stage-slip: #dda63a; --stage-hint: #4a5a6e; --stage-white: #e8dcc4; --stage-black: #14110f; --stage-keytext: #6b5f55;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background-color .4s, color .4s; }
h1, h2, .brand { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .4rem; text-wrap: balance; }
h1:focus { outline: none; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.muted, small { color: var(--muted); }
small { font-size: .85rem; }
main { max-width: 1100px; margin: 0 auto; padding: 1rem max(1rem, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.5rem; padding: calc(.5rem + env(safe-area-inset-top)) 1rem .5rem; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--accent); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .2rem; }
nav a { padding: .6rem .8rem; min-height: 44px; color: var(--muted); text-decoration: none; border-radius: 10px; transition: background-color .25s, color .25s; }
nav a.active { color: var(--ink); background: var(--card); }
section { margin-bottom: 2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; margin-bottom: 1rem; }
.text { max-width: 720px; }
.hero { padding: 1.5rem 0; }
.stats { display: flex; flex-wrap: wrap; gap: 2rem; margin: 1.5rem 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font: 750 2rem/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .stats dt { color: var(--muted); font-size: .9rem; }
.list { padding: 0; overflow: hidden; margin-top: .8rem; }
.item { transition: background-color .2s; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; min-height: 56px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item span small { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.2rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color .2s, border-color .2s, transform .15s, opacity .2s; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 650; }
.btn:disabled { opacity: .5; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.center { text-align: center; justify-content: center; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .2rem; background: var(--line); border-radius: 12px; padding: .2rem; margin-bottom: .6rem; }
.seg button { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color .25s, box-shadow .25s; }
.seg button.active { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.field { display: block; margin-bottom: .6rem; } .field > span { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .2rem; }
.input { min-height: 46px; padding: 0 .8rem; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
input[type=range] { width: 100%; max-width: 340px; min-height: 40px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; } .check input { width: 22px; height: 22px; accent-color: var(--accent); }
.stars { color: var(--line); white-space: nowrap; font-size: 1.2rem; } .stars .on { color: var(--star); }
.overlay .stars { font-size: 2.4rem; }
.note { background: var(--note); border-radius: 12px; padding: .8rem 1rem; }
.player-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: start; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .4rem 1.5rem; }
.stage { position: relative; height: max(340px, calc(100dvh - 260px)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.offer { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; padding: .7rem 1rem; width: max-content; max-width: 94%; }
.record { color: var(--star); font-weight: 600; }
.heard { font: 700 5rem var(--font); letter-spacing: -0.03em; text-align: center; }
.meter { height: 14px; background: var(--line); border-radius: 7px; overflow: hidden; margin-bottom: .6rem; } .meter div { height: 100%; background: var(--accent); transition: width .1s; }
.loading { text-align: center; padding: 20vh 1rem; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 1rem; background: var(--note); }

/* Week: een rustige staafjesrij, vol bij een kwartier. */
.week { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 1.4rem 0 0; }
.week li { display: flex; flex-direction: column; align-items: center; gap: .2rem; width: 2rem; }
.week .day { display: flex; align-items: flex-end; width: 10px; height: 44px; border-radius: 5px; background: var(--line); overflow: hidden; }
.week .day span { display: block; width: 100%; border-radius: 5px; background: var(--accent); transition: height .6s ease; }
.week .today small { color: var(--ink); font-weight: 600; }

/* Uitleg met tekening */
.explain { max-width: 760px; }
.explain p { font-size: 1.08rem; white-space: pre-line; }
.figure { margin: 1.2rem 0 1.4rem; padding: 1rem; border-radius: 14px; background: var(--stage-paper); border: 1px solid var(--line); }
.figure svg { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.figure figcaption { margin-top: .8rem; }
.figure .staff, .figure .ledger { stroke: var(--stage-staff); stroke-width: 1.2; }
.figure .ledger { stroke: var(--stage-ink); }
.figure .clef { fill: none; stroke: var(--stage-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.figure .ink, .figure .head, .figure .accidental { fill: var(--stage-ink); }
.figure .head.mark { fill: var(--stage-right); }
.figure .accidental { font: 600 19px Georgia, serif; text-anchor: middle; }
.figure .name { fill: var(--muted); font: 650 15px var(--font); text-anchor: middle; }
.figure .name.mark { fill: var(--stage-right); }
.figure .key { stroke: var(--stage-staff); stroke-width: 1; }
.figure .key.white { fill: var(--stage-white); } .figure .key.black { fill: var(--stage-black); }
.figure .key.used { fill: var(--stage-hint); } .figure .key.mark { fill: var(--stage-right); }
.figure .keyname { fill: var(--stage-ink); font: 700 11px var(--font); text-anchor: middle; }
.figure .keyname.on-black { fill: var(--stage-white); font-size: 9px; }
.figure .keyname.quiet { fill: var(--stage-keytext); font-weight: 400; font-size: 10px; }
.figure .key.mark + g .keyname { fill: var(--on-accent); }
/* Zelf ontdekken */
.figure .probe-hit { fill: transparent; cursor: pointer; }
.figure .probe-hit:hover { fill: color-mix(in srgb, var(--stage-right) 12%, transparent); }
.figure .probe ellipse { fill: var(--stage-right); opacity: .85; animation: appear .25s var(--ease) both; }
.figure .probe .name { fill: var(--stage-right); }
.figure .key.probed { fill: var(--stage-right); }

/* Laat horen: elke kolom veert kort op en kleurt, samen met zijn toets. */
@keyframes sing { 0%, 100% { transform: none; } 25% { transform: translateY(-4px) scale(1.12); } }
@keyframes sing-color { 0%, 100% { } 25% { fill: var(--stage-good); } }
.figure .sing .col { transform-box: fill-box; transform-origin: center; animation: sing .6s var(--ease) both; }
.figure .sing .col .head, .figure .sing .col .name { animation: sing-color .6s var(--ease) both; animation-delay: inherit; }
.figure .sing .key.used, .figure .sing .key.mark { animation: sing-color .6s var(--ease) both; }

/* Voorbeeld van het blad */
.sheet-preview { margin-top: .6rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--stage-paper); }
.sheet-preview canvas { display: block; width: 100%; }

/* Versie boven het speelvlak */
.versions { margin: 0 0 .6rem; gap: .2rem .8rem; }
.versions .seg { margin: 0; }

/* Uitslag in delen */
.score { display: flex; justify-content: center; gap: 2rem; margin: .4rem 0 .6rem; }
.score div { display: flex; flex-direction: column-reverse; align-items: center; }
.score dd { margin: 0; font: 750 1.8rem/1.1 var(--font); font-variant-numeric: tabular-nums; } .score dt { color: var(--muted); font-size: .9rem; }

/* Vijf minuten op maat */
.plan { margin-bottom: .8rem; gap: .4rem; }
.plan span:not(.muted) { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; color: var(--muted); transition: background-color .3s var(--ease), color .3s var(--ease); }
.plan .now { background: var(--accent); border-color: var(--accent); color: var(--on-accent) !important; font-weight: 650; }
.plan .done { color: var(--ink) !important; border-color: var(--stage-good); }

/* Notentrainer */
.quick { margin-top: 1.2rem; }
.hardest { flex-basis: 100%; }
.note-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .5rem; }
.note-stats div { display: flex; flex-direction: column; align-items: center; padding: .5rem; border-radius: 10px; border: 1px solid var(--line); }
.note-stats b { font-size: 1.05rem; } .note-stats span { font-size: .85rem; color: var(--muted); }
.note-stats .good { border-color: var(--stage-good); } .note-stats .ok { border-color: var(--stage-slip); } .note-stats .hard { border-color: var(--stage-missed); background: color-mix(in srgb, var(--stage-missed) 10%, transparent); }

/* Kalibreren */
.big-step { font-size: 1.25rem; font-weight: 700; margin-bottom: .3rem; }
.cal-notes { display: flex; gap: .6rem; list-style: none; padding: 0; margin: 1rem 0; }
.cal-notes li { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; border: 2px solid var(--line); font: 700 1.4rem var(--font); color: var(--muted); transition: background-color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease-soft-pop); }
.cal-notes li.now { border-color: var(--accent); color: var(--ink); transform: scale(1.08); }
.cal-notes li.done { background: var(--stage-good); border-color: var(--stage-good); color: var(--on-accent); }
.ticks { display: flex; gap: .5rem; margin: 1rem 0; }
.ticks span { width: 22px; height: 22px; border-radius: 50%; background: var(--line); transition: background-color .2s var(--ease), transform .3s var(--ease-soft-pop); }
.ticks span.on { background: var(--accent); transform: scale(1.15); }
.cal-result { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: .8rem 0 1rem; }
.cal-result div { display: flex; flex-direction: column-reverse; } .cal-result dd { margin: 0; font: 700 1.4rem var(--font); } .cal-result dt { color: var(--muted); font-size: .9rem; }
@keyframes breathe { 0%, 100% { transform: scale(.85); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
.pulse-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); margin: .6rem 0 1rem; animation: breathe 1.6s var(--ease) infinite; }

/* Beheer */
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn.danger { background: var(--stage-missed); border-color: var(--stage-missed); color: var(--on-accent); }
.note.done { background: color-mix(in srgb, var(--stage-good) 22%, var(--card)); }
.input.wide { width: 100%; }
.small-print { font-size: .85rem; margin-top: .8rem; }
.list .item a { color: inherit; text-decoration: none; flex: 1; }

/* Beheer: veel bestanden tegelijk nalopen */
.batch-list { display: grid; gap: .5rem; margin: 1rem 0; }
.batch-row { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; align-items: start; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; transition: opacity .25s var(--ease), border-color .25s var(--ease); animation: appear .35s var(--ease) both; }
.batch-row .check { min-height: 46px; }
.batch-row.off { opacity: .55; }
.batch-row.bad { border-color: color-mix(in srgb, var(--stage-missed) 45%, var(--line)); }
.batch-fields { display: grid; grid-template-columns: 2fr 1.4fr auto; gap: .5rem; align-items: center; }
.batch-fields .input { width: 100%; min-width: 0; }
.batch-fields .seg { margin: 0; }
.seg.small button { min-height: 38px; padding: 0 .7rem; font-size: .9rem; }
.batch-info { grid-column: 2; overflow-wrap: anywhere; }
.bad-text { color: var(--stage-missed); }
@media (max-width: 760px) { .batch-fields { grid-template-columns: 1fr; } }

/* Cursussen */
.courses { display: grid; gap: .8rem; }
.course { padding: 0; overflow: hidden; margin: 0; }
.course summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; min-height: 64px; cursor: pointer; list-style: none; }
.course summary::-webkit-details-marker { display: none; }
.course summary::after { content: ""; flex: none; width: .55rem; height: .55rem; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: .2rem; }
.course[open] summary::after { transform: rotate(225deg); }
.course-title { font-weight: 600; } .course-title small { display: block; font-weight: 400; }
.course .list { margin: 0; border-top: 1px solid var(--line); }
.progress { flex: 0 0 90px; height: 8px; margin-left: auto; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* Welkom: twee korte stappen bij het eerste bezoek. */
.welcome { max-width: 640px; margin: 6vh auto 0; padding: 2rem; }
.welcome .steps { font-size: .9rem; margin-bottom: .3rem; }
.welcome h1 { font-size: 2.1rem; }
.choices { display: grid; gap: .6rem; margin: 1rem 0 1.4rem; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .9rem 1.1rem; min-height: 64px; text-align: left; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .15s var(--ease); }
.choice b { font-weight: 650; }
.choice.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.choice:active { transform: scale(.98); }

/* Start: elke keer de keuze tussen de cursus en de liedjes. */
.start { padding: 1rem 0 0; }
.start > .seg { margin-bottom: 1rem; }
.start h1 { font-size: 2.2rem; }
.lead { font-size: 1.15rem; margin-bottom: 1.4rem; }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.path { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.5rem; margin: 0; min-height: 250px; color: inherit; text-decoration: none; transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.path b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.path i { font-style: normal; font-weight: 600; }
.path .progress { flex: none; width: 100%; max-width: 260px; margin: .3rem 0 0; }
.path { position: relative; }
.path .stretch { margin-top: auto; }
.path .stretch::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.path .more { position: relative; z-index: 1; align-self: flex-start; min-height: 32px; color: var(--muted); font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.path .more:hover { color: var(--ink); }
.path-icon { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.paths > * { animation: rise .5s var(--ease) both; } .paths > :nth-child(2) { animation-delay: .07s; }
.start .quick { margin-top: 1.4rem; }

/* Welkom: voortgang in stippen, dagdoel als grote knoppen */
.dots { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 .8rem; }
.dots li { width: 28px; height: 6px; border-radius: 3px; background: var(--line); transition: background-color .4s var(--ease), width .4s var(--ease); }
.dots li.done { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.dots li.now { width: 44px; background: var(--accent); }
.welcome .steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.welcome > h1 { animation: rise .45s var(--ease) both; }
.goals { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin: 1rem 0 1.4rem; }
.goal-choice { display: flex; flex-direction: column; align-items: center; padding: .8rem .2rem; min-height: 72px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .15s var(--ease); }
.goal-choice b { font-size: 1.5rem; line-height: 1.1; }
.goal-choice.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.goal-choice:active { transform: scale(.97); }

/* Start: begroeting met het dagdoel ernaast */
.start-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.cheer { display: inline-block; margin: .2rem 0 .5rem; padding: .3rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--star) 16%, transparent); font-size: .95rem; font-weight: 550; }
.goal-ring { position: relative; flex: none; display: grid; place-items: center; width: 104px; height: 104px; color: inherit; text-decoration: none; }
.goal-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.goal-ring .track { stroke: var(--line); }
.goal-ring .fill { stroke: var(--accent); transition: stroke-dasharray .9s var(--ease); }
.goal-ring.reached .fill { stroke: var(--star); }
.goal-ring span { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.goal-ring b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.goal-ring small { font-size: .75rem; }
.week .goal .day span { background: var(--star); }
.goal-done { color: var(--star); font-weight: 600; }

/* Liedjes */
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; color: inherit; text-decoration: none; background: color-mix(in srgb, var(--accent) 9%, var(--card)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.suggestion b { display: block; font-size: 1.2rem; } .suggestion small { display: block; }
.suggestion .btn { pointer-events: none; flex: none; }
.song-tools { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 1.2rem 0 .4rem; }
.song-tools .seg { margin: 0; }
.search { flex: 1 1 240px; max-width: 420px; }
.song-group { margin: 1.6rem 0 0; }
.song-group h2 { margin-bottom: .7rem; }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.song { display: flex; flex-direction: column; gap: .1rem; margin: 0; padding: 1rem 1.1rem; min-height: 120px; color: inherit; text-decoration: none; transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.song-title { font-weight: 650; line-height: 1.25; }
.song-meta { display: flex; align-items: center; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.song-meta .stars { margin-left: auto; font-size: 1rem; }
.song.played { border-color: color-mix(in srgb, var(--star) 35%, var(--line)); }
.level { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.level i { width: 4px; border-radius: 2px; background: var(--line); }
.level i:nth-child(1) { height: 6px; } .level i:nth-child(2) { height: 10px; } .level i:nth-child(3) { height: 14px; }
.level.l1 i:nth-child(1), .level.l2 i:nth-child(-n+2), .level.l3 i { background: var(--accent); }
.song-grid > * { animation: appear .4s var(--ease) both; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Terug naar waar je vandaan kwam */
.crumb { display: inline-flex; align-items: center; min-height: 40px; margin: -.4rem 0 .2rem; padding-right: .6rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.crumb:hover { color: var(--ink); }

/* Thema kiezen: elke knop staat in zijn eigen thema. */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.theme-choice { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .6rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 600 .95rem var(--font); cursor: pointer; transition: border-color .2s, transform .15s; }
.theme-choice.active { border-color: var(--accent); }
.swatch { display: flex; gap: 6px; align-items: flex-end; width: 100%; height: 44px; padding: 8px; border-radius: 9px; background: var(--stage-paper); }
.swatch i { flex: 1; border-radius: 4px; }
.swatch i:nth-child(1) { height: 60%; background: var(--stage-right); } .swatch i:nth-child(2) { height: 100%; background: var(--stage-left); } .swatch i:nth-child(3) { height: 40%; background: var(--stage-good); }

/* Beweging: rustig en kort, overal dezelfde zachte uitloop. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: scale(1); } }
@keyframes settle { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
main > * { animation: rise .45s var(--ease) both; }
main > :nth-child(2) { animation-delay: .04s; } main > :nth-child(3) { animation-delay: .08s; } main > :nth-child(n+4) { animation-delay: .12s; }
.courses > * { animation: rise .45s var(--ease) both; }
.courses > :nth-child(2) { animation-delay: .05s; } .courses > :nth-child(3) { animation-delay: .1s; } .courses > :nth-child(4) { animation-delay: .15s; } .courses > :nth-child(n+5) { animation-delay: .2s; }
.list > .item { animation: appear .4s var(--ease) both; }
.list > .item:nth-child(2) { animation-delay: .03s; } .list > .item:nth-child(3) { animation-delay: .06s; } .list > .item:nth-child(4) { animation-delay: .09s; } .list > .item:nth-child(n+5) { animation-delay: .12s; }
.overlay { animation: appear .35s var(--ease) both; }
.overlay .card { animation: settle .5s .05s var(--ease-soft-pop) both; }
.overlay .stars span { display: inline-block; animation: pop .5s var(--ease-soft-pop) both; }
.overlay .stars span:nth-child(1) { animation-delay: .3s; } .overlay .stars span:nth-child(2) { animation-delay: .45s; } .overlay .stars span:nth-child(3) { animation-delay: .6s; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translateX(-50%); } }
.offer { animation: drop .4s var(--ease) both; }
.note { animation: appear .3s var(--ease) both; }
.card, .seg, .input, .theme-choice, .stage, .progress span, .week .day span { transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), box-shadow .25s var(--ease); }
.btn { transition: background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease), opacity .2s; }
.btn:active, .theme-choice:active { transform: scale(.97); transition-duration: .08s; }
@media (hover: hover) {
  .item:hover { background: color-mix(in srgb, var(--line) 35%, transparent); }
  .btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgb(0 0 0 / .1); }
  .theme-choice:hover { transform: translateY(-2px); }
  .song:hover, .suggestion:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .07); }
  .goal-choice:hover, .choice:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
  .path:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgb(0 0 0 / .08); }
  .choice:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
}
.course summary::after { transition: transform .35s var(--ease); }
.progress span { transition: width .8s var(--ease); }
/* Merk: vier toetsjes die bij het laden en bij aanwijzen even meedeinen. */
.brand { display: inline-flex; align-items: center; gap: .45rem; }
.mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.mark i { width: 4px; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: key-in .7s var(--ease-soft-pop) both; }
.mark i:nth-child(1) { height: 10px; } .mark i:nth-child(2) { height: 16px; animation-delay: .08s; } .mark i:nth-child(3) { height: 12px; animation-delay: .16s; } .mark i:nth-child(4) { height: 18px; animation-delay: .24s; }
@keyframes key-in { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes key-bob { 0%, 100% { transform: none; } 40% { transform: scaleY(.55); } }
@media (hover: hover) { .brand:hover .mark i { animation: key-bob .6s var(--ease) both; } .brand:hover .mark i:nth-child(2) { animation-delay: .07s; } .brand:hover .mark i:nth-child(3) { animation-delay: .14s; } .brand:hover .mark i:nth-child(4) { animation-delay: .21s; } }

/* Welkom: elke stap schuift zacht in, van rechts, of van links bij terug. */
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes step-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.step { animation: step-in .45s var(--ease) both; }
.step.back { animation-name: step-back; }
.choices > *, .goals > * { animation: rise .4s var(--ease) both; }
.choices > :nth-child(2), .goals > :nth-child(2) { animation-delay: .05s; } .choices > :nth-child(3), .goals > :nth-child(3) { animation-delay: .1s; } .goals > :nth-child(4) { animation-delay: .15s; } .goals > :nth-child(5) { animation-delay: .2s; }
.choice { position: relative; padding-right: 2.6rem; }
.choice::after { content: ""; position: absolute; right: 1rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--line); transition: border-color .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease); }
.choice.active::after { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); animation: pop .35s var(--ease-soft-pop) both; }
.goal-choice.active b { animation: pop .35s var(--ease-soft-pop) both; }

/* Voortgang groeit vanaf nul als je de pagina opent. */
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes ring-in { from { stroke-dasharray: 0 100; } }
.progress span { transform-origin: left; animation: grow-x 1s .25s var(--ease) both; }
.week .day span { transform-origin: bottom; animation: grow-y .8s var(--ease) both; }
.week li:nth-child(2) .day span { animation-delay: .04s; } .week li:nth-child(3) .day span { animation-delay: .08s; } .week li:nth-child(4) .day span { animation-delay: .12s; } .week li:nth-child(5) .day span { animation-delay: .16s; } .week li:nth-child(6) .day span { animation-delay: .2s; } .week li:nth-child(7) .day span { animation-delay: .24s; }
.goal-ring .fill { animation: ring-in 1.2s .2s var(--ease) both; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--star) 45%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
.goal-ring.reached { border-radius: 50%; animation: glow 1.6s 1.3s var(--ease) both; }
.cheer { animation: rise .5s .2s var(--ease) both; }
.stats dd { animation: rise .5s .15s var(--ease) both; }

/* Tegels op het startscherm: het icoon beweegt mee bij aanwijzen. */
.path-icon { transition: transform .4s var(--ease-soft-pop); }
@media (hover: hover) { .path:hover .path-icon { transform: translateY(-3px) rotate(-6deg); } }

/* Liedjes: kaarten verschijnen kort na elkaar. */
.song-grid > :nth-child(2) { animation-delay: .03s; } .song-grid > :nth-child(3) { animation-delay: .06s; } .song-grid > :nth-child(4) { animation-delay: .09s; } .song-grid > :nth-child(5) { animation-delay: .12s; } .song-grid > :nth-child(n+6) { animation-delay: .15s; }

/* Drie sterren: een paar noten stijgen rustig op en vervagen; de sterren glanzen één keer. */
.float-notes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.float-notes span { position: absolute; bottom: -2rem; left: calc(12% + var(--i) * 15%); font-size: calc(1.4rem + var(--i) * .15rem); color: var(--star); opacity: 0; animation: float-up 3.2s calc(.5s + var(--i) * .35s) var(--ease) both; }
.float-notes span:nth-child(even) { color: var(--accent); }
@keyframes float-up { 0% { opacity: 0; transform: translateY(0) rotate(-8deg); } 20% { opacity: .8; } 100% { opacity: 0; transform: translateY(-60vh) rotate(10deg); } }
.overlay .card { position: relative; z-index: 1; }
.overlay.top .stars span:nth-child(1) { animation-delay: .3s, 1.1s; }
.overlay.top .stars .on { animation: pop .5s var(--ease-soft-pop) both, shine 1.2s 1.1s var(--ease) both; }
.overlay.top .stars span:nth-child(2) { animation-delay: .45s, 1.25s; } .overlay.top .stars span:nth-child(3) { animation-delay: .6s, 1.4s; }
@keyframes shine { 0%, 100% { filter: none; } 50% { filter: brightness(1.35) drop-shadow(0 0 6px color-mix(in srgb, var(--star) 70%, transparent)); } }
.overlay .record, .overlay .goal-done { animation: rise .5s .8s var(--ease) both; }

/* PDF lezen: een rustige band die heen en weer glijdt; hoe lang het duurt is niet te voorspellen. */
.pdf-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: .8rem 0 1rem; }
.pdf-bar span { display: block; width: 30%; height: 100%; border-radius: 3px; background: var(--accent); animation: glide 2.4s ease-in-out infinite alternate; }
@keyframes glide { from { transform: translateX(-10%); } to { transform: translateX(243%); } }

/* Thema wisselen: het oude beeld vloeit in het nieuwe. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
