:root {
  --bg: #eef1f4;
  --surface: #f8fafb;
  --ink: #1c2733;
  --muted: #5b6876;
  --line: #cfd6dd;
  --brass: #9a6f1e;      /* Saiten/Bünde: Akzent und "knapp" */
  --brass-soft: #e9dcc0;
  --tune: #23714f;       /* sauber */
  --tune-soft: #cfe6da;
  --plum: #7d4672;       /* daneben – bewusst kein Alarm-Rot */
  --plum-soft: #ead9e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

main {
  max-width: 30rem;
  margin: 0 auto;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: 2.6rem; line-height: 1.05; }
h2 { font-size: 1.6rem; line-height: 1.2; }

p { margin: 0; }

.lede { color: var(--muted); margin-top: 0.5rem; max-width: 26rem; }

.stack > * + * { margin-top: 1rem; }

.grow { flex: 1; }

/* ---- Knöpfe ---- */

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.btn {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
}

.btn.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
}

.btn:disabled { opacity: 0.4; cursor: default; }

.btn-row { display: flex; gap: 0.6rem; }
.btn-row .btn { flex: 1; }

.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2.5px solid var(--brass);
  outline-offset: 3px;
}

/* ---- Startseite ---- */

.home-top { padding-top: 12vh; }

.choice {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-top: 2.5rem;
}

.choice button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  min-height: 2.6rem;
  color: var(--muted);
}

.choice button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.choice-note { color: var(--muted); font-size: 0.92rem; margin-top: 0.6rem; min-height: 1.4em; }

details {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }

details .body { margin-top: 0.75rem; color: var(--muted); }
details .body p + p { margin-top: 0.75rem; }

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  color: var(--ink);
}
.setting small { display: block; color: var(--muted); font-size: 0.85rem; }

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 3rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: calc(1.75rem - 6px);
  height: calc(1.75rem - 6px);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.15s;
}
.switch:checked { background: var(--tune); }
.switch:checked::after { transform: translateX(1.25rem); }

.privacy { color: var(--muted); font-size: 0.85rem; margin-top: 1.5rem; }

/* ---- Übung ---- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.5rem;
}

.dots { display: flex; gap: 6px; }
.dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
}
.dots .done-clean { background: var(--tune); border-color: var(--tune); }
.dots .done-ok { background: var(--brass); border-color: var(--brass); }
.dots .done-off { background: var(--plum); border-color: var(--plum); }
.dots .now { border-color: var(--ink); }

.prompt { margin-top: 1.75rem; }
.prompt .chord { color: var(--muted); }

.tuner {
  display: block;
  width: min(78vw, 19rem);
  margin: 1.5rem auto 0.5rem;
  overflow: visible;
}

.tuner .scale { stroke: var(--line); }
.tuner .scale-mid { stroke: var(--muted); }
.tuner .zone { stroke: var(--tune-soft); }
.tuner .hold { stroke: var(--ink); transition: stroke-dashoffset 0.12s linear; }
.tuner .level { fill: var(--surface); stroke: var(--line); transition: r 0.08s linear; }
.tuner .needle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; transition: transform 0.35s cubic-bezier(.3,1.4,.5,1); }
.tuner .needle.hidden { opacity: 0; }
.tuner .note {
  font-family: var(--serif);
  font-size: 64px;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: central;
}
.tuner .tick-label { font-size: 11px; fill: var(--muted); text-anchor: middle; }

.tuner.clean .needle { stroke: var(--tune); }
.tuner.clean .note { fill: var(--tune); }
.tuner.ok .needle { stroke: var(--brass); }
.tuner.ok .note { fill: var(--brass); }
.tuner.off .needle, .tuner.wrong_note .needle { stroke: var(--plum); }
.tuner.off .note, .tuner.wrong_note .note { fill: var(--plum); }

.status { text-align: center; min-height: 4.6rem; }
.status strong { display: block; font-size: 1.15rem; }
.status span { color: var(--muted); }

.actions { margin-top: auto; padding-top: 1rem; }
.actions > * + * { margin-top: 0.6rem; }

/* ---- Auswertung ---- */

.results { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.results li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.results li:first-child { border-top: 1px solid var(--line); }
.results .val { color: var(--muted); text-align: right; white-space: nowrap; }
.results .mark {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: 0.05em;
}
.mark.clean { background: var(--tune); }
.mark.ok { background: var(--brass); }
.mark.off, .mark.wrong_note { background: var(--plum); }

.insight {
  background: var(--surface);
  border-left: 3px solid var(--brass);
  padding: 0.9rem 1rem;
  margin-top: 1.5rem;
}
.insight p + p { margin-top: 0.5rem; }

.error {
  background: var(--plum-soft);
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Mikro-Test ---- */

.meter {
  height: 14px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--tune);
  transition: width 0.06s linear;
}
.diag {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* ---- Live-Linie ---- */

.trace-wrap { margin: 1.25rem 0 0.75rem; }

.trace {
  display: block;
  width: 100%;
  height: min(46vh, 380px);
  background: var(--surface);
  border-radius: 12px;
}

.readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.6rem;
  min-height: 1.8rem;
}
.readout #live-note { font-family: var(--serif); font-size: 1.35rem; }
.readout #live-cents { color: var(--muted); }

.hold-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 0.4rem;
}
.hold-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.1s linear;
}

/* ---- Gitarre ---- */

.guitar-panel { margin-top: 0.75rem; }
.guitar-panel[hidden] { display: none; }

.fretboard { display: block; width: 100%; height: auto; }
.fb-zone { fill: var(--surface); }
.fb-fret { stroke: var(--line); stroke-width: 1.5; }
.fb-nut { stroke: var(--ink); stroke-width: 4; }
.fb-string { stroke: var(--muted); }
.fb-inlay { fill: var(--line); }
.fb-label, .fb-num { fill: var(--muted); font-size: 11px; dominant-baseline: central; }
.fb-num { text-anchor: middle; }
.fb-dot { stroke: var(--bg); stroke-width: 1.5; }
.fb-dot.root { fill: var(--brass); }
.fb-dot.target { fill: var(--tune); }
.fb-dot-label { fill: #fff; font-size: 8.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }

.fb-text { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }
.fb-text p + p { margin-top: 0.2rem; }
.fb-text strong { color: var(--ink); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.45rem; vertical-align: 0.05em; }
.key.root { background: var(--brass); }
.key.target { background: var(--tune); }

.chips { margin-top: 1.25rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  min-width: 3.1rem;
  font-size: 0.9rem;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- Startseite mit zwei Bereichen ---- */

.h1-small { font-size: 2rem; }
.h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-top: 1.5rem; }

.hub { margin-top: 2.5rem; display: grid; gap: 0.9rem; }
.hub-card {
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.hub-card strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.hub-card span { display: block; color: var(--muted); margin-top: 0.25rem; }
.hub-card:active { border-color: var(--ink); }

/* ---- Klang-Labor ---- */

.steps { margin: 0.5rem 0 0; padding-left: 1.3rem; color: var(--muted); }
.steps li + li { margin-top: 0.35rem; }
.steps strong { color: var(--ink); }

.chip.vowel { min-width: 3rem; font-family: var(--serif); font-size: 1.1rem; }
.chip.vowel.small { min-width: 2.2rem; padding: 0.2rem 0.5rem; font-size: 0.95rem; }

.section-label { color: var(--muted); font-size: 0.85rem; margin-top: 1.1rem; margin-bottom: 0.35rem; }
.harm { display: block; width: 100%; height: 130px; }
.vmap { display: block; width: 100%; height: 220px; border-radius: 12px; }

.metrics { margin-top: 1rem; display: grid; gap: 0.6rem; }
.metric { display: grid; grid-template-columns: 7.5rem 1fr; align-items: baseline; gap: 0.2rem 0.6rem; }
.metric span { color: var(--muted); }
.metric b { font-weight: 600; text-align: right; font-size: 0.95rem; }
.metric i {
  grid-column: 1 / -1;
  position: relative;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
}
.metric i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 2px;
  height: 12px;
  background: var(--muted);
}
.metric em { position: absolute; top: 0; height: 100%; border-radius: 999px; }
.metric em.up { background: var(--tune); }
.metric em.down { background: var(--brass); }

.legend-ring { margin-left: 0.6rem; padding: 0 0.4rem; background: var(--brass-soft); border-radius: 4px; color: var(--ink); font-size: 0.78rem; }
details.explain { border: none; padding: 0.4rem 0 0; }
details.explain summary { font-weight: 500; color: var(--brass); text-decoration: underline; text-underline-offset: 3px; justify-content: flex-start; }
details.explain summary::after { content: ""; }

.results li > span:first-child { white-space: nowrap; }

/* ---- Song-Training ---- */

.star { display: block; width: 100%; height: min(42vh, 300px); border-radius: 12px; margin-top: 1rem; }
.song-notes { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 0.75rem; }
.song-notes div { display: flex; flex-direction: column; align-items: center; min-width: 2.6rem; }
.song-notes .syl { color: var(--muted); font-size: 0.85rem; }
.song-notes b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.song-notes small { color: var(--muted); font-size: 0.7rem; text-align: center; max-width: 5.5rem; line-height: 1.2; }
.mark.missed { background: var(--line); }

/* ---- Aufnahmen ---- */
#takes { margin-top: 1.5rem; }
.take { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.take-head { display: flex; flex-direction: column; }
.take-head span { color: var(--muted); font-size: 0.9rem; }
.take audio { width: 100%; margin: 0.45rem 0 0.25rem; height: 36px; }
.practice-at { margin-left: 0.5rem; font-size: 0.9rem; }

details.takes { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.takes summary { font-weight: 600; }
.take-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.92rem; }
.saved-note { display: block; margin-top: 0.3rem; color: var(--tune); }

.tempo-row { display: flex; align-items: center; justify-content: flex-start; gap: .75rem; margin-top: .6rem; }
.tempo-row .btn { width: auto; min-width: 3.5rem; padding: .5rem .8rem; margin: 0; }
.tempo-row label { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.tempo-row input { width: 4.5rem; font: inherit; font-size: 1.15rem; text-align: center; padding: .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }

/* ---------- Warm-up ---------- */
.warm-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.45rem; }
.warm-item {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.warm-item small { color: var(--muted); white-space: nowrap; }
.warm-kicker { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.2rem; }
.warm-task { margin: 0.4rem 0 0; font-size: 1.05rem; }
.why { margin-top: 0.5rem; color: var(--muted); }
.why summary { cursor: pointer; color: var(--brass); }
.why p { margin: 0.35rem 0 0; }
.warm-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-top: 1rem; }
.warm-chip {
  min-width: 1.9rem; height: 1.9rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.warm-chip.now { border-color: var(--ink); color: var(--ink); }
.warm-chip.ok { background: var(--tune); border-color: var(--tune); color: #fff; }
.warm-target { text-align: center; font-size: 1.15rem; margin: 0.8rem 0 0; min-height: 1.6rem; }
.warm-target b { font-family: var(--serif); }
.big-check {
  display: inline-flex; width: 3.2rem; height: 3.2rem; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--tune); color: #fff; font-size: 1.9rem; animation: pop 0.35s ease-out;
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.free-pitch { width: 100%; height: 260px; display: block; margin: 1.1rem 0 0.6rem; background: var(--surface); border-radius: 12px; }
.breath-wrap { display: flex; flex-direction: column; align-items: center; margin: 2rem 0 1rem; }
.breath {
  width: 140px; height: 140px; border-radius: 50%; background: var(--tune-soft);
  animation: breath 10s ease-in-out infinite;
}
@keyframes breath { 0% { transform: scale(0.55); } 40% { transform: scale(1); } 100% { transform: scale(0.55); } }
#breath-label { color: var(--muted); margin-top: 0.9rem; }
.metro-box { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 2rem 0 1rem; }
.metro-beat { width: 64px; height: 64px; border-radius: 50%; background: var(--line); }
.metro-beat.on { animation: beat 0.25s ease-out; }
.metro-beat.on.accent { background: var(--brass); }
@keyframes beat { from { transform: scale(1.25); background: var(--tune); } to { transform: scale(1); } }
.warm-prep { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.warm-prep ul { margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.warm-prep li { margin: 0.15rem 0; }
.topbar-links { display: flex; gap: 1rem; }
.breath.still { animation: none; transform: scale(0.8); opacity: 0.7; }
.last-result { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }
.lyrics { font-family: var(--serif); font-size: 1.35rem; line-height: 1.6; text-align: center; margin: 0.6rem 0 0.4rem; color: var(--ink); }
.lyrics span { transition: color 0.15s; opacity: 0.6; }
.lyrics span.now { color: var(--tune); opacity: 1; font-weight: 700; }
.lyrics span.past { opacity: 0.35; }
.rec-toggle { margin-bottom: 0.6rem; }
.btn.stop { background: var(--plum); border-color: var(--plum); color: #fff; }
.loop-toggle { margin-bottom: 0.4rem; }

/* ---------- Werkzeuge ---------- */
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.5rem; }
.tool-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.8rem 0.9rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.tool-card strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.tool-card span { color: var(--muted); font-size: 0.85rem; }
.tuner-wrap { display: flex; justify-content: center; margin-top: 0.6rem; }
.headstock { width: 100%; max-width: 340px; height: auto; }
.hs-string { stroke: transparent; stroke-width: 4; stroke-linecap: round; }
.hs-string.active { stroke: var(--brass); }
.hs-string.ok { stroke: var(--tune); }
.hs-hit { fill: transparent; }
.hs-key { fill: transparent; stroke: transparent; stroke-width: 5; }
.hs-badge { fill: var(--surface); stroke: var(--line); stroke-width: 2.5; }
.hs-label { font: 600 30px Georgia, serif; fill: var(--ink); text-anchor: middle; pointer-events: none; }
.hs-peg { cursor: pointer; }
.hs-peg.active .hs-key { stroke: var(--brass); }
.hs-peg.active .hs-badge { stroke: var(--brass); stroke-width: 4; }
.hs-peg.locked .hs-badge { fill: color-mix(in srgb, var(--brass) 25%, var(--surface)); }
.hs-peg.ok .hs-key, .hs-peg.ok .hs-badge { stroke: var(--tune); }
.hs-check { display: none; }
.hs-check circle { fill: var(--tune); }
.hs-check path { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.hs-peg.ok .hs-check { display: inline; }
.tune-read { text-align: center; margin-top: 0.4rem; }
.tune-note { font-family: var(--serif); font-size: 2rem; margin: 0; min-height: 2.6rem; }
.tune-gauge { position: relative; height: 34px; margin: 0.5rem 0; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.tune-zone { position: absolute; left: 45%; width: 10%; top: 0; bottom: 0; background: var(--tune-soft); }
.tune-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0.4; }
.tune-needle { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--brass); transition: left 0.08s linear; }
.tune-needle.ok { background: var(--tune); }
.tune-hint { color: var(--muted); min-height: 1.4rem; margin: 0; }
#auto.on { border-color: var(--ink); }
.metro-dots { display: flex; justify-content: center; gap: 0.8rem; margin: 2rem 0 1.4rem; }
.metro-dots span { width: 34px; height: 34px; border-radius: 50%; background: var(--line); transition: transform 0.06s; }
.metro-dots span.first { border: 2px solid var(--brass); }
.metro-dots span.on { background: var(--tune); transform: scale(1.15); }
.metro-dots span.first.on { background: var(--brass); }
.metro-bpm { justify-content: center; }
.metro-bpm input { font-size: 1.6rem; width: 6rem; }
.tool-row { display: flex; justify-content: center; gap: 0.75rem; margin: 0.4rem 0 1rem; }
.tool-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; width: 92px; padding: 0.7rem 0.4rem 0.55rem;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.tool-tile svg { width: 44px; height: 44px; }
.tool-tile .ic-body { fill: color-mix(in srgb, var(--brass) 22%, var(--surface)); stroke: var(--brass); stroke-width: 2; stroke-linejoin: round; }
.tool-tile .ic-line { stroke: var(--brass); stroke-width: 1.6; opacity: 0.7; }
.tool-tile .ic-arm { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.tool-tile .ic-weight { fill: var(--ink); }
.tool-tile .ic-pivot { fill: var(--ink); }
.tool-tile .ic-peg { fill: var(--surface); stroke: var(--brass); stroke-width: 2; }
.hs-peg:focus { outline: none; }
.hs-peg:focus-visible .hs-badge { stroke: var(--ink); stroke-width: 4; }
.hub-card strong .kind { display: inline-flex; gap: 0.3rem; vertical-align: middle; margin: 0 0 0 0.35rem; color: var(--muted); }
.kind-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Singen & Spielen ---------- */
.stage-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.5rem; }
.stage-btn {
  display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; padding: 0.7rem 0.8rem; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
}
.stage-btn:active { border-color: var(--ink); }
.stage-num {
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); font-weight: 700; font-size: 0.9rem;
}
.stage-btn .stage-num:not(:empty) { color: var(--ink); }
.stage-txt strong { display: block; }
.stage-txt small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.1rem; }
.stage-kicker { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.2rem; }
.stage-text { margin-top: 0.4rem; }
.stage-ok { color: var(--tune); font-weight: 700; text-align: center; margin: 0.2rem 0 0.6rem; }
.pattern-row .chip { font-size: 1.05rem; letter-spacing: 0.04em; }

.rgrid { display: grid; gap: 0.5rem; margin: 0.8rem 0 0.6rem; }
.rbar { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0.25rem 0.35rem 0.2rem; min-width: 0; transition: border-color 0.15s; }
.rbar.intro { border-style: dashed; }
.rbar.now { border-color: var(--brass); }
.rchords { position: relative; height: 1.35rem; font-weight: 700; font-size: 0.95rem; }
.rchords span { position: absolute; top: 0; padding-left: 0.15rem; }
.rchords em { position: absolute; right: 0.1rem; top: 0.1rem; font-style: normal; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.rslots { display: grid; }
.slot { display: flex; flex-direction: column; align-items: center; line-height: 1.1; border-radius: 6px; padding: 0.1rem 0; }
.slot b { font-size: 1.25rem; font-weight: 700; }
.slot.rest b { color: var(--line); }
.slot i { font-style: normal; font-size: 0.68rem; color: var(--muted); }
.slot.beat i { color: var(--ink); font-weight: 700; }
.slot.now { background: var(--brass-soft); }
.slot.good b { color: var(--tune); }
.slot.ok b { color: var(--brass); }
.slot.off b { color: var(--plum); }
.slot.missed b { color: var(--muted); opacity: 0.45; }
.slot.missed { outline: 1.5px dashed var(--plum); outline-offset: -2px; }
.rsyl { position: relative; height: 2.5rem; font-size: 0.82rem; }
.rsyl .syl { position: absolute; white-space: nowrap; padding-left: 0.15rem; color: var(--muted); transition: color 0.1s; }
.rsyl .syl.l0 { top: 0.1rem; }
.rsyl .syl.l1 { top: 1.2rem; }
.rsyl .syl.now { color: var(--tune); font-weight: 700; }
.rsyl .syl.good { color: var(--tune); font-weight: 700; }
.rsyl .syl.ok { color: var(--brass); font-weight: 700; }
.rsyl .syl.off { color: var(--plum); font-weight: 700; }
.stage-num.done { background: var(--tune); border-color: var(--tune); color: #fff; }
[hidden] { display: none !important; }

/* ---------- Farbwelten (Shama) ---------- */
:root {
  --accent2: var(--tune);
  --accent: var(--brass);
  --accent-soft: var(--brass-soft);
  --bird: var(--ink);
  --bird-belly: #b5562a;
  --bird-white: var(--surface);
  --bird-branch: var(--muted);
  --display: var(--serif);
}

/* Lagerfeuer: Creme, dunkles Holz, Glut – dazu sparsam das Blauschwarz der Shama */
[data-theme="campfire"] {
  --bg: #f3eadc; --surface: #fbf6ee; --ink: #2a1c13; --muted: #76604f; --line: #e2d2bd;
  --brass: #a8601a; --brass-soft: #f1dcc0; --tune: #2f7a4f; --tune-soft: #d5e9d8; --plum: #8c3b52; --plum-soft: #f2dde3;
  --accent: #c96a1e; --accent-soft: #f4dfc4; --accent2: #2c4f8a;
  --bird: #1f2b4d; --bird-belly: #c8632a; --bird-white: #fbf6ee; --bird-branch: #8a5a32;
}
/* Notenpapier (gewählt): fast weiß, blaue Tinte, Koralle – dazu sparsam Shama-Blau */
[data-theme="paper"] {
  --bg: #faf8f3; --surface: #ffffff; --ink: #1d2f6b; --muted: #56658c; --line: #e3e0d7;
  --brass: #a86f12; --brass-soft: #f5e7cc; --tune: #23714f; --tune-soft: #d6ece0; --plum: #8a3f72; --plum-soft: #f1dfeb;
  --accent: #e4572e; --accent-soft: #fde2d8; --accent2: #2c4f8a;
  --bird: #1d2f6b; --bird-belly: #e4572e; --bird-white: #ffffff; --bird-branch: #9aa2b5;
}
.link { color: var(--accent); }
:focus-visible { outline-color: var(--accent); }

/* Kopf mit Logo und Namen */
.brand { display: flex; align-items: center; gap: 0.9rem; padding-top: 7vh; margin-bottom: 1.2rem; }
.shama-logo { width: 92px; height: auto; flex: none; }
.sb-body { fill: var(--bird); }
.sb-belly { fill: var(--bird-belly); }
.sb-white { fill: var(--bird-white); }
.sb-eye { fill: var(--bg); }
.sb-branch { fill: none; stroke: var(--bird-branch); stroke-width: 3.5; stroke-linecap: round; }
.sb-legs { stroke: var(--bird-branch); stroke-width: 2; stroke-linecap: round; }
.wordmark { font-family: var(--display); font-size: 2.9rem; line-height: 1; letter-spacing: 0.01em; font-weight: 600; }
.tagline { color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; text-wrap: balance; }
[data-theme="paper"] .brand {
  /* fünf Notenlinien hinter dem Namen */
  background: repeating-linear-gradient(to bottom, transparent 0 13px, color-mix(in srgb, var(--ink) 9%, transparent) 13px 14px) 0 50% / 100% 70px no-repeat;
}
[data-theme="campfire"] .wordmark { font-style: italic; }

/* Übungskarten mit Symbol */
.hub { margin-top: 1rem; }
.hub-card { display: flex; align-items: flex-start; gap: 0.9rem; color: var(--ink); }
.hub-card .hub-txt { display: block; margin: 0; color: var(--ink); min-width: 0; }
.hub-card .hub-desc { display: block; color: var(--muted); margin-top: 0.25rem; }
.hub-card .hub-ic {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin: 0.1rem 0 0 !important;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent) !important;
}
.hub-ic svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hub-card strong { font-size: 1.3rem; }
.tool-tile .ic-body { fill: color-mix(in srgb, var(--accent) 20%, var(--surface)); stroke: var(--accent); }
.tool-tile .ic-line, .tool-tile .ic-peg { stroke: var(--accent); }
.theme-pick { color: var(--muted); font-size: 0.85rem; margin-top: 1.5rem; text-align: center; }
.theme-pick .on { font-weight: 700; text-decoration: none; color: var(--ink); }
.swash { display: block; width: 7.5rem; height: 0.7rem; margin: 0.15rem 0 0 0.1rem; }
.swash path { fill: none; stroke: var(--swash, var(--accent2)); stroke-width: 3; stroke-linecap: round; }
.tool-tile .ic-body { fill: color-mix(in srgb, var(--accent2) 16%, var(--surface)); stroke: var(--accent2); }
.tool-tile .ic-line, .tool-tile .ic-peg { stroke: var(--accent2); }
.kind-ic { width: 20px; height: 20px; }
.kind-ic .mesh { stroke-width: 0.9; }
.hub-card strong .kind { color: var(--muted); }

/* Sprachwahl oben rechts auf der Startseite */
.home-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 -1rem; position: relative; z-index: 1; }
.lang-switch { display: flex; gap: 0; }
.lang-switch button {
  font: inherit; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.35rem 0.8rem; min-width: 3rem;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.lang-switch button:first-child { border-radius: 999px 0 0 999px; }
.lang-switch button:last-child { border-radius: 0 999px 999px 0; border-left: none; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Gag am Ende der Startseite */
.buff { margin: 2rem auto 0; text-align: center; max-width: 15rem; }
.buff img { width: 100%; height: auto; display: block; }
.buff figcaption { color: var(--muted); font-family: var(--serif); font-style: italic; margin-top: 0.3rem; }
/* Pinselstrich unter „Shama“: tropisches Orange, bewusst anders als der Schriftzug */
:root { --swash: #f0a91e; }
/* ---- Willkommen, Anmeldung, Konto ---- */

.welcome h2 { margin-top: 0.4rem; }
.welcome .lede { max-width: none; }
.welcome .lede, .welcome-not li, .welcome-list li span { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.welcome-invite {
  background: var(--accent-soft, var(--brass-soft));
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-top: 0.6rem;
}
.welcome-list { list-style: none; padding: 0; margin: 1rem 0 0.4rem; display: grid; gap: 0.7rem; }
.welcome-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.wl-ic {
  width: 1.6rem; height: 1.6rem; flex-shrink: 0; margin-top: 0.05rem;
  fill: none; stroke: var(--accent2, var(--ink)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.welcome .btn-row { margin-top: 0.9rem; }
.wl-dots { display: flex; justify-content: center; gap: 0.45rem; margin-top: 1.4rem; }
.wl-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--muted); opacity: 0.35; }
.wl-dot.on { background: var(--ink); opacity: 1; }
/* Startfragen im Willkommen */
.sf-hint { margin: 0.15rem 0 0.5rem; color: var(--muted); font-size: 0.85rem; }
.welcome h3 + .sf-row { margin-top: 0.5rem; }
.sf-row .chip { font-size: 0.95rem; padding: 0.45rem 0.8rem; text-align: left; }
.sf-field { margin-top: 0.2rem; font-weight: 500; }
.sf-age { margin-top: 0.5rem; max-width: 9rem; }

/* Stimmtest: Stimmlage von Hand nachstellen */
.voice-adjust { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.4rem; }
.voice-adjust .btn { width: 3.4rem; min-height: 3rem; padding: 0; font-size: 1.4rem; }
.voice-adjust strong { min-width: 8.5rem; text-align: center; font-family: var(--serif); font-size: 1.3rem; }
.welcome h3 { margin: 1.4rem 0 0; font-size: 1.1rem; }
.welcome-toc { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.welcome-not { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; color: var(--muted); }
.welcome-not li { display: flex; gap: 0.5rem; }
.welcome-not li::before { content: "✗"; color: var(--ink); font-weight: 700; }
.welcome-gif { display: block; width: 100%; max-width: 382px; height: auto; margin: 0.8rem auto 0; border-radius: 10px; }

.login { gap: 0.9rem; }
.login .lede { margin-top: 0; }
.field { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
.field input, .invite-link {
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0.75rem 0.9rem; width: 100%;
}
.field input:focus, .invite-link:focus { outline: none; border-color: var(--ink); }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; accent-color: var(--ink); flex-shrink: 0; }
.check small { display: block; color: var(--muted); }
.login .error, .danger-box .error { margin-top: 0; }
.login .privacy { margin-top: 0; }

.card-block { margin-top: 1.4rem; }
.invite-link { font-size: 0.9rem; margin-top: 0.7rem; }
.invite-btn { margin-top: 1.2rem; }
.danger-box {
  margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); display: grid; gap: 0.8rem;
}
.footer-links a { color: var(--muted); text-underline-offset: 3px; }
.footer-links { margin-top: 0.4rem; }
.chip:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Einwilligung Nutzungsstatistik ---- */
.consent {
  margin: 0.2rem 0 1rem; padding: 0.9rem 1rem; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--accent2, var(--line));
  display: grid; gap: 0.7rem; font-size: 0.95rem;
}
.consent a { color: var(--accent2, var(--ink)); text-underline-offset: 3px; }
.consent small { color: var(--muted); }
.consent .btn { min-height: 2.8rem; padding: 0.5rem 1rem; }
/* Über Shama */
.about-pill {
  font: inherit; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
}
.about-pill:active { background: var(--ink); color: var(--bg); }
.about h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 0 0 0.4rem; }
.about-sec { padding-top: 1rem; border-top: 1px solid var(--line); }
.about-sec p + p { margin-top: 0.6rem; }
.yt-card { display: block; width: 13rem; margin: 0.9rem auto 0; color: var(--ink); text-decoration: none; }
.yt-thumb {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--line);
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; color: transparent; }
.yt-play {
  position: absolute; inset: 0; margin: auto; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
}
.yt-play svg { width: 1.6rem; height: 1.6rem; fill: #fff; margin-left: 0.2rem; }
.yt-card:active .yt-thumb { transform: scale(0.98); }
.yt-meta { display: block; text-align: center; margin-top: 0.5rem; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
