/* Saitenweise: warmer Vintage-Look (Papier, Braun, 70er-Streifen) */
:root {
  --paper: #f2e6cf;
  --card: #fbf4e6;
  --ink: #3b2a1e;
  --muted: #7d6650;
  --line: #e0cfae;
  --orange: #c0632b;
  --mustard: #d9a441;
  --sand: #e9c98a;
  --olive: #6f7a3a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(96px + var(--safe-b)); }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: .01em; }
h1 { font-size: 30px; margin: 4px 0 6px; }
h2 { font-size: 21px; margin: 26px 0 10px; }
a { color: var(--orange); }
p { margin: 0 0 12px; }
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; padding: 40px 10px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 15px; }
.meta { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.kicker { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* 70er-Streifen */
.stripes { display: flex; flex-direction: column; gap: 0; width: 64px; margin: 0 0 14px; }
.stripes i { display: block; height: 5px; }
.stripes i:nth-child(1) { background: var(--orange); }
.stripes i:nth-child(2) { background: var(--mustard); }
.stripes i:nth-child(3) { background: var(--sand); }
.stripes.big { width: 120px; margin: 0 auto 18px; }
.stripes.big i { height: 9px; }
.top { padding-top: 10px; margin-bottom: 18px; }
.top.slim h1 { margin-bottom: 0; }

/* Knöpfe */
.btn {
  display: inline-block; border: 0; border-radius: 999px; background: var(--ink); color: var(--card);
  font: 600 16px var(--sans); padding: 12px 22px; text-decoration: none; cursor: pointer;
}
.btn.big { width: 100%; padding: 16px; font-size: 18px; background: var(--orange); }
.btn.small { padding: 8px 16px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn:active { transform: translateY(1px); }

/* Karten auf Heute */
.card {
  position: relative; display: block; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 18px 92px 18px 18px; margin: 0 0 14px; color: var(--ink); text-decoration: none;
}
.card strong { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.25; margin: 4px 0; }
.card .go {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 15px;
}
.card.review { border-left: 8px solid var(--mustard); }
.card.next { border-left: 8px solid var(--orange); }
.card.done { padding-right: 18px; }
.progress .bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 22px; }
.progress .bar span { display: block; height: 100%; background: var(--olive); border-radius: 99px; }
.progress > p { margin: 8px 0 10px; font-size: 15px; color: var(--muted); }
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.chapters li.full span:first-child::before { content: "✓ "; color: var(--olive); font-weight: 700; }
.hint { margin-top: 22px; font-size: 14px; color: var(--muted); font-style: italic; }

/* Kurs */
.chapter h2 .num { display: block; font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); font-weight: 600; }
.chapter .sub { color: var(--muted); font-size: 15px; margin-top: -4px; }
.lessons { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; }
.lessons li + li { border-top: 1px solid var(--line); }
.lessons a { display: flex; gap: 14px; align-items: center; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.lessons .n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted);
}
.lessons .t { display: flex; flex-direction: column; }
.lessons small { color: var(--muted); font-size: 13px; }
.lessons li.done .n { background: var(--olive); border-color: var(--olive); color: var(--card); }
.lessons li.current .n { background: var(--orange); border-color: var(--orange); color: var(--card); }
.lessons li.current a { background: #f7e7cf; }

/* Lektion */
.back { display: inline-block; text-decoration: none; color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.type { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; margin-right: 6px; background: var(--sand); color: var(--ink); }
.t-Erfolg { background: var(--mustard); }
.t-Song { background: var(--orange); color: var(--card); }
.t-Wissen { background: #d9d3b0; }
.t-Technik { background: #e8d2b7; }
.text ul, .tips ul { padding-left: 22px; margin: 0 0 12px; }
.text li, .tips li { margin-bottom: 6px; }
.chords { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
svg.chord { width: 104px; height: auto; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 2px; }
svg.chord .cname { font: 600 13px var(--serif); text-anchor: middle; fill: var(--ink); }
svg.chord .nut { fill: var(--ink); }
svg.chord .str { stroke: var(--muted); stroke-width: 1.1; }
svg.chord .fret { stroke: var(--line); stroke-width: 1.4; }
svg.chord .dot { fill: var(--orange); }
svg.chord .fnum { font: 700 8.5px var(--sans); fill: var(--card); text-anchor: middle; }
svg.chord .open { fill: none; stroke: var(--ink); stroke-width: 1.3; }
svg.chord .mark { font: 600 11px var(--sans); fill: var(--muted); text-anchor: middle; }

.video { margin: 0 0 16px; }
.video .thumb, .video iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden; padding: 0;
  background: var(--ink); position: relative; cursor: pointer;
}
.video .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.25) saturate(.9); }
.video .play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.video .play::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 18px solid var(--card); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.video figcaption { font-size: 14px; color: var(--muted); padding: 7px 2px 0; }
.video figcaption a { white-space: nowrap; }
.video .lang { display: inline-block; font-size: 11px; font-weight: 700; border: 1.2px solid var(--muted); border-radius: 4px; padding: 0 4px; margin-right: 4px; }
.video .by::before { content: "· "; }
.video .by { font-weight: 600; margin-right: 4px; }
.links { padding-left: 20px; }

.song, .exercise, .tips, .feedback { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 4px 16px 14px; margin: 18px 0; }
.song { padding-top: 14px; border-left: 8px solid var(--orange); }
.song strong { font-family: var(--serif); font-size: 20px; }
.song p { margin: 6px 0; font-size: 15px; }
.exercise { border-left: 8px solid var(--olive); }
.timer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.timer .clock { font: 600 34px var(--serif); font-variant-numeric: tabular-nums; min-width: 86px; }
.countrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: 100%; }
.countrow[hidden] { display: none; }
.countrow input { width: 80px; font-size: 18px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); margin-left: 6px; }
.metro { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.metro .bpm { font: 600 26px var(--serif); min-width: 44px; text-align: center; }
.metro .unit { color: var(--muted); font-size: 14px; margin-right: 6px; }

.feedback .q { display: block; margin: 12px 0 6px; font-size: 15px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 8px 16px; font: 15px var(--sans); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
textarea { width: 100%; margin-top: 6px; font: 16px var(--sans); padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; }
.finish { margin: 22px 0; text-align: center; }
.donenote { color: var(--olive); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-top: 10px; }
.pager a { text-decoration: none; color: var(--muted); max-width: 48%; }

/* Wiederholung */
.reviewcard h1 { font-size: 26px; }
.reviewcard .from { font-size: 14px; color: var(--muted); }
.reviewcard details { margin: 14px 0; }
.reviewcard summary { cursor: pointer; color: var(--orange); font-weight: 600; }
.answer { font-family: var(--serif); font-size: 20px; margin-top: 8px; }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.rate button { border: 0; border-radius: 14px; padding: 14px 6px; font: 600 15px var(--sans); cursor: pointer; color: var(--ink); }
.rate [data-r="nochmal"] { background: #ecc9b0; }
.rate [data-r="okay"] { background: var(--sand); }
.rate [data-r="leicht"] { background: #cfd3a5; }
.reviewcard > .q { margin-top: 22px; color: var(--muted); }

/* Fortschritt */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 4px; text-align: center; }
.stats b { display: block; font: 600 26px var(--serif); }
.stats span { font-size: 12px; color: var(--muted); }
.pairs, .songbook, .fblist, .menu { list-style: none; padding: 0; margin: 0; }
.pairs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pairs li > div { display: flex; flex-direction: column; }
.spark { width: 46%; max-width: 220px; height: auto; flex: none; }
.spark path { fill: none; stroke: var(--orange); stroke-width: 2; }
.spark circle { fill: var(--orange); }
.spark .goal { stroke: var(--olive); stroke-dasharray: 3 3; stroke-width: 1; }
.songbook li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.songbook span { color: var(--muted); font-size: 14px; }

/* Mehr, Feedback */
.menu li { border-bottom: 1px solid var(--line); }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 14px 2px; background: none; border: 0; font: 17px var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; }
.about p { font-size: 15px; }
.fblist li { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.fblist p { margin: 2px 0; font-size: 15px; }
blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid var(--mustard); font-style: italic; }

/* Start: Profilwahl */
.welcome { text-align: center; padding-top: 40px; }
.welcome .logo svg { width: 92px; height: auto; }
.welcome h1 { font-size: 40px; margin-top: 10px; }
.welcome .lead { color: var(--muted); font-family: var(--serif); font-size: 19px; font-style: italic; }
.profiles { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto 24px; }
.profile { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px; font: 600 18px var(--serif); color: var(--ink); cursor: pointer; }
.newprofile { max-width: 320px; margin: 18px auto; display: flex; flex-direction: column; gap: 12px; }
.newprofile label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 15px; }
.newprofile input { font: 18px var(--sans); padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: center; }

/* Tab-Leiste */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
  background: rgba(251, 244, 230, .97); border-top: 1.5px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b));
}
#tabs[hidden] { display: none; }
#tabs button { flex: 1; max-width: 150px; background: none; border: 0; color: var(--muted); font: 12px var(--sans); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; cursor: pointer; }
#tabs svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#tabs button.on { color: var(--orange); }
#toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--card); padding: 11px 18px; border-radius: 14px; font-size: 15px;
  transition: .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
