/* NoteJemp – im Erscheinungsbild von GuitarJemp.
   Layout: eine ruhige, zentrierte Spalte; das Notensystem ist die Bühne, Antworten darunter. */
@font-face {
  font-family: 'Bravura';
  src: url('assets/bravura.woff2') format('woff2');
  font-display: block;
}

:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  touch-action: manipulation;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.lbl { font: 600 10px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.kbd { font: 500 10px/1.5 var(--font-mono); color: inherit; opacity: .55; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 6px; }

/* header */
.top { display: flex; align-items: center; gap: 12px; height: 52px; max-width: 760px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 17px/1 var(--font-display); color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.top-r { margin-left: auto; display: flex; gap: 2px; }

/* buttons */
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 13px var(--font-body); white-space: nowrap; }
.gbtn:hover { background: var(--raise); color: var(--fg); }
.gbtn[aria-pressed="true"] { color: var(--brass); }
.icon-only { padding: 0; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--brass); color: var(--brass-ink); font: 600 15px var(--font-body); }
.pbtn:hover { filter: brightness(1.07); }
.pbtn.big { width: 100%; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); min-height: 32px; padding: 0 12px; border-radius: 8px; font: 500 13px var(--font-body); white-space: nowrap; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--raise); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); }
.switch { width: 38px; height: 22px; border-radius: 999px; border: 0; background: var(--line2); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); transition: transform .15s; }
.switch[aria-pressed="true"] { background: var(--brass); }
.switch[aria-pressed="true"]::after { transform: translateX(16px); background: var(--brass-ink); }

/* layout */
.view { max-width: 760px; margin: 0 auto; padding-bottom: 32px; }
.panel { background: var(--surface); border-radius: 16px; padding: 6px 16px; }
.vrow { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 0; flex-wrap: wrap; }
.vrow + .vrow { border-top: 1px solid var(--line); }
.vrow > span { color: var(--muted); font-size: 14px; }
.vrow small { display: block; color: var(--faint); font-size: 12px; }

/* home */
.hero { padding: 18px 0 18px; }
.hero h1 { font-size: 30px; line-height: 1.15; }
.hero p { color: var(--muted); margin: 8px 0 0; max-width: 56ch; }
.ex-list { display: flex; flex-direction: column; gap: 8px; }
.ex-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; text-align: left; border: 0; background: var(--surface); border-radius: 16px; padding: 12px 16px 12px 12px; }
.ex-card:hover { background: var(--raise); }
.ex-thumb { background: var(--bg); border-radius: 10px; padding: 4px 6px; height: 72px; display: flex; align-items: center; }
.ex-thumb .staff { width: 100%; height: 64px; }
.ex-body b { display: block; font: 600 17px var(--font-display); }
.ex-body > span { display: block; color: var(--muted); font-size: 13.5px; }
.ex-stat { display: flex; align-items: center; gap: 10px; margin-top: 8px; font: 500 11.5px var(--font-mono); color: var(--faint); }
.meter { width: 64px; height: 4px; border-radius: 2px; background: var(--line2); overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; background: var(--brass); }
.home-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* quiz */
.qhead { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; }
.qhead h2 { font-size: 22px; }
.qsub { display: block; color: var(--faint); font-size: 12.5px; }
.qstats { margin-left: auto; display: flex; gap: 14px; font: 500 12px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.qstats b { color: var(--fg); font-weight: 600; }
.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.progress i { display: block; height: 100%; background: var(--brass); transition: width .3s; }
.stage { background: var(--surface); border-radius: 18px; padding: 14px 12px; display: flex; justify-content: center; }
.stage .staff { width: 100%; height: clamp(150px, 26vh, 230px); }
.stage.wide .staff { height: clamp(130px, 24vh, 210px); }
.feedback { text-align: center; font-weight: 600; min-height: 1.6em; margin: 14px 0; font-size: 16px; }
.feedback .ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 8px; font-size: 13px; vertical-align: -3px; }
.feedback.ok { color: var(--ok); }
.feedback.ok .ic { background: var(--ok); color: var(--bg); }
.feedback.bad { color: var(--bad); }
.feedback.bad .ic { background: var(--bad); color: var(--bg); }
.feedback small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 2px; }
.answers { display: grid; gap: 8px; }
.answers.letters { grid-template-columns: repeat(7, 1fr); }
.answers.two { grid-template-columns: 1fr 1fr; }
.abtn { position: relative; min-height: 58px; border: 0; border-radius: 12px; background: var(--surface); color: var(--fg); font: 600 18px var(--font-body); box-shadow: inset 0 0 0 1px var(--line); transition: transform .06s, background .15s; padding: 6px; }
.abtn:hover:not(:disabled) { background: var(--raise); }
.abtn:active:not(:disabled) { transform: scale(.97); }
.abtn:disabled { cursor: default; }
.abtn.ok { box-shadow: inset 0 0 0 2px var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.abtn.bad { box-shadow: inset 0 0 0 2px var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.abtn.dim { opacity: .45; }
.abtn .k { position: absolute; top: 5px; right: 7px; font: 500 10px var(--font-mono); color: var(--faint); }
.abtn.txt { font-size: 15px; }
.abtn .staff { width: 100%; height: 104px; }
.accs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.feedback.hint { color: var(--brass); }
.accs button[data-acc] { min-width: 56px; font-size: 18px; }
.reveal { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.where { background: var(--surface); border-radius: 14px; padding: 10px 12px 6px; }
.where .fret { width: 100%; height: auto; display: block; margin-top: 4px; }
.hintline { color: var(--faint); font-size: 12px; text-align: center; margin-top: 12px; }

/* staff glyphs */
.staff { display: block; color: var(--fg); overflow: visible; }
.staff .lines line { stroke: currentColor; stroke-width: 1.1; opacity: .8; }
.staff .glyph { font-family: 'Bravura', serif; font-size: 40px; fill: currentColor; }
.staff .stroke { stroke: currentColor; }
.staff .fillc { fill: currentColor; }
.staff .gap { fill: color-mix(in srgb, var(--brass) 8%, transparent); stroke: var(--brass); stroke-width: 2; stroke-dasharray: 6 5; }
.staff .qmark { font: 700 34px var(--font-display); fill: var(--brass); }
.staff .ok { fill: var(--ok); stroke: var(--ok); }
.staff .bad { fill: var(--bad); stroke: var(--bad); }
.staff .good { fill: var(--ok); stroke: var(--ok); }
.staff .mid { fill: var(--mid); stroke: var(--mid); }
.staff .weak { fill: var(--bad); stroke: var(--bad); }
.staff .none { fill: var(--faint); stroke: var(--faint); }
.staff .gap.ok { stroke-dasharray: none; }

/* mini fretboard */
.fret .f-open { fill: var(--open); stroke: var(--open-line); }
.fret .f-wood { fill: var(--wood); }
.fret .f-inlay { fill: var(--inlay); opacity: .15; }
.fret .f-nut { fill: var(--nut); }
.fret .f-wire { fill: var(--fret); }
.fret .f-string { stroke: var(--string); }
.fret .f-label { font: 600 9px var(--font-mono); fill: var(--faint); text-anchor: middle; dominant-baseline: central; }
.fret .f-num { font: 500 8.5px var(--font-mono); fill: var(--faint); text-anchor: middle; }

/* result */
.result { text-align: center; padding: 10px 0; display: flex; flex-direction: column; gap: 16px; }
.result .big { font: 700 72px/1 var(--font-display); letter-spacing: -.03em; }
.result .big small { font-size: 28px; color: var(--muted); }
.result .rmsg { color: var(--muted); margin: 0; }
.rstats { display: flex; justify-content: center; gap: 22px; font: 500 12.5px var(--font-mono); color: var(--muted); flex-wrap: wrap; }
.rstats b { color: var(--fg); }
.missed { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 6px 0 12px; text-align: center; }
.miss { background: var(--bg); border-radius: 10px; padding: 6px; font-size: 12.5px; color: var(--muted); }
.miss .staff { height: 60px; width: 100%; }
.ractions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; max-width: 360px; width: 100%; margin: 0 auto; }

/* progress view */
.prog h2 { font-size: 22px; }
.prog section { margin-top: 16px; }
.prog .panel { padding: 14px 16px; }
.prog .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.prog .row + .row { border-top: 1px solid var(--line); }
.scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.scroll .staff { height: 120px; min-width: 620px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: 500 12px var(--font-mono); border-radius: 999px; padding: 3px 10px; background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); }
.chip.weak { color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); }
.chip.good { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.muted { color: var(--muted); font-size: 13px; }

/* help popover */
.pop { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 40; width: min(340px, calc(100vw - 32px)); background: var(--raise); border: 1px solid var(--line2); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-pop); }
.pop h3 { margin: 0 0 10px; font: 700 15px var(--font-display); }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 12.5px; }
.pop dt { font-family: var(--font-mono); color: var(--brass); white-space: nowrap; }
.pop dd { margin: 0; color: var(--muted); }

@media (max-width: 560px) {
  .hero h1 { font-size: 25px; }
  .ex-card { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .ex-thumb { height: 60px; }
  .ex-thumb .staff { height: 52px; }
  .abtn .staff { height: 86px; }
  .answers.letters { grid-template-columns: repeat(4, 1fr); }
  .qstats { gap: 10px; }
  .qhead h2 { font-size: 19px; }
  .abtn .k { display: none; }
  .gbtn .lb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .progress i, .switch::after, .abtn { transition: none; }
}

/* Zurück zur JempHub-Übersicht (in allen Apps gleich) */
.hub-link { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 2px; margin-right: -2px; border-right: 1px solid var(--line); color: var(--muted); font: 500 13px var(--font-body); text-decoration: none; white-space: nowrap; flex: none; }
.hub-link svg { fill: currentColor; }
.hub-link:hover, .hub-link:focus-visible { color: var(--fg); }
@media (max-width: 640px) { .hub-link span { display: none; } .hub-link { padding-right: 8px; } }
a.gbtn { text-decoration: none; }
/* Optionen in der Übung */
.optbtn { margin-left: 2px; }
.panel.opts { margin-bottom: 12px; }
@media (max-width: 440px) { .qhead h2 { font-size: 19px; } .qstats { gap: 8px; } .qstats span { white-space: nowrap; } }

/* Nach der Antwort: Weiter-Knopf bleibt am unteren Rand sichtbar, ohne Scrollen */
.actions.dock { position: sticky; bottom: 0; z-index: 5; margin-top: 12px; padding: 14px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, transparent, var(--bg) 14px); }
.actions.dock { display: flex; gap: 8px; flex-wrap: nowrap; }
.actions.dock .pbtn { flex: 1 1 auto; }
.actions.dock .sbtn { flex: none; }
