/* Gitarrenseite. Richtung und Regeln: guitar/DESIGN.md („Notenheft“: warmes Notenpapier, Einband aus dunklem
   Buchbinderleinen, Titel in einer klassischen Notenausgaben-Schrift, Notenlinien als Trenner). Noten zuerst, Handy zuerst. */

@font-face {
  font-family: "Libre Bodoni";
  src: url("fonts/bodoni.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Bodoni";
  src: url("fonts/bodoni-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farbschema Rosé Pine Dawn (rosepinetheme.com): cremiges Papier, gedämpftes Pflaumengrau als Schrift,
     Rosé als einziger Akzent. Kopf und Leisten sind das etwas dunklere Creme („Overlay“). */
  --cover: #f2e9e1;
  --cover-deep: #dfdad9;
  --wash: #f4ede8;
  --on-cover: #575279;
  --on-cover-muted: #797593;
  /* Akzent (Rosé Pine „love“): Cursor in den Noten, Auswahl, Fokus, Regler */
  --accent: #b4637a;
  --pencil: var(--accent);

  /* Papier bis Tinte, in festen Stufen */
  --g0: #fffaf3;
  --g1: #faf4ed;
  --g2: #f2e9e1;
  --g3: #dfdad9;
  --g4: #797593;
  --g5: #575279;
  --g6: #464261;

  --ground: var(--g1);
  --surface: var(--g0);
  --ink: var(--g6);
  --muted: var(--g4);
  --line: var(--g2);
  --edge: var(--g3);
  --warn: #a8701a;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --title: "Literata", Georgia, "Times New Roman", serif;
  --label-serif: "Libre Bodoni", Georgia, "Times New Roman", serif;
  --radius: 4px;
  /* Fünf Notenlinien als Trenner */
  --staff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='13' viewBox='0 0 100 13' preserveAspectRatio='none'%3E%3Cg stroke='%23dfdad9' stroke-width='1' vector-effect='non-scaling-stroke'%3E%3Cpath d='M0 .5h100M0 3.5h100M0 6.5h100M0 9.5h100M0 12.5h100'/%3E%3C/g%3E%3C/svg%3E") top left / 100% 13px no-repeat;
  --cloth-color: var(--cover);
  --cloth: none;
  /* Papierkörnung, kaum sichtbar */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .28 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sheet-scale: 1;
  color-scheme: light;
}


* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  scrollbar-color: var(--edge) transparent;
}

body {
  margin: 0;
  background-color: var(--cloth-color);
  background-image: var(--cloth);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
  accent-color: var(--accent);
}

::selection { background: var(--accent); color: var(--g0); }

a { color: var(--ink); text-decoration-color: var(--edge); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }

button, select, textarea, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .fill { fill: currentColor; stroke: none; }

/* Inhalte liegen als Blatt Notenpapier auf dem Einband: Körnung, Schatten zur Heftung links, darunter zwei Blattkanten */
.wrap {
  max-width: 46rem;
  margin: 0 auto calc(1.75rem + env(safe-area-inset-bottom));
  padding: 1.6rem 1.25rem 3rem;
  border-radius: 2px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent 1.25rem), var(--grain), var(--g0);
  color: var(--ink);
  box-shadow:
    0 1px 3px rgba(87, 82, 121, 0.18),
    3px 3px 0 -1px var(--g0), 3px 3px 0 0 rgba(87, 82, 121, 0.16),
    6px 6px 0 -1px var(--g0), 6px 6px 0 0 rgba(87, 82, 121, 0.12);
}
@media (max-width: 48rem) {
  .wrap { margin-inline: 0.6rem 0.95rem; padding-inline: 1.1rem; }
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-family: var(--title); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
h3 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- Kopf der Listen: Einband mit Etikett ---------- */

.masthead {
  color: var(--on-cover);
  padding-top: env(safe-area-inset-top);
}
.masthead-inner { max-width: 46rem; margin: 0 auto; padding: 0.9rem 1.1rem 1.75rem; }
.masthead-nav { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; font-weight: 600; }
.masthead-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  color: var(--on-cover);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--on-cover-muted);
  transition: background-color 0.15s ease, transform 0.16s var(--ease-out);
}
.masthead-nav a:active { transform: scale(0.97); }
.masthead-nav a .icon { width: 1.125rem; height: 1.125rem; }
.label {
  position: relative;
  width: fit-content;
  min-width: min(100%, 17rem);
  max-width: 100%;
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem 1rem;
  border-radius: 6px;
  background: var(--g0);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.label::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  pointer-events: none;
}
.masthead h1 {
  font-family: var(--label-serif);
  font-size: clamp(2.75rem, 13vw, 4.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.masthead-count { margin: 0.35rem 0 0; color: var(--muted); font-family: var(--label-serif); font-style: italic; font-size: 1.0625rem; }


/* ---------- Umschalter, Filter, Eingaben: Standard-Steuerelemente, eckig ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; }
.chip, .toggle button {
  min-height: 2.5rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.16s var(--ease-out);
}
.chip:active, .toggle button:active { transform: scale(0.97); }
.chip[aria-pressed="true"], .toggle button[aria-pressed="true"],
.chip[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--g0);
  font-weight: 600;
}

.toggle { display: inline-flex; }
.toggle button { min-height: 2.25rem; padding: 0.2rem 0.75rem; font-size: 0.875rem; }
.toggle button + button { margin-left: -1px; }

.finder { display: grid; gap: 0.75rem; }
.search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem 0.4rem 2rem;
  border: 0;
  border-bottom: 1px solid var(--muted);
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23797593' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E") left 0.15rem center / 1.2rem no-repeat;
  font-size: 1.125rem;
  -webkit-appearance: none;
  appearance: none;
}
.search::placeholder { color: var(--muted); font-family: var(--serif); font-style: normal; }
.search:focus { border-bottom-color: var(--accent); outline: none; box-shadow: 0 1px 0 var(--accent); }
.finder-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.select { display: grid; gap: 0.1rem; color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.select select {
  min-height: 2.5rem;
  padding: 0 1.6rem 0 0.1rem;
  border: 0;
  border-bottom: 1px solid var(--edge);
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23797593' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 0.1rem center / 1.1rem no-repeat;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  -webkit-appearance: none;
  appearance: none;
}
.select select:focus { border-bottom-color: var(--accent); outline: none; box-shadow: 0 1px 0 var(--accent); }
.finder .chips { margin: 0; }

/* ---------- Songliste: Haarlinien, gleiche Ausstattung je Zeile ---------- */

.toc-head {
  margin: 2.25rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
}
.wrap > .toc-head:first-child { margin-top: 0.25rem; }
.song-list { margin: 1.5rem 0 0; padding: 13px 0 0; list-style: none; background: var(--staff); }
.toc-head + .song-list { margin-top: 0; padding-top: 1.25rem; }
.song-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 -0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}
.song-no { flex: none; width: 1.4rem; color: var(--muted); font-family: var(--serif); font-size: 1.0625rem; font-style: normal; text-align: right; }

.song-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.song-line { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.song-title { min-width: 0; font-family: var(--title); font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
/* Punktlinie vom Titel zur Schwierigkeit, wie im Inhaltsverzeichnis */
.leader {
  flex: 1;
  min-width: 1.25rem;
  height: 3px;
  background: radial-gradient(circle, var(--edge) 0 1px, transparent 1.3px) left bottom / 6px 3px repeat-x;
}
.song-sub { justify-content: space-between; }
.song-artist { color: var(--muted); font-family: var(--serif); font-size: 1rem; font-style: normal; }
.song-tags { margin-top: 0.15rem; color: var(--muted); font-size: 0.8125rem; }
.song-side { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.status { flex: none; font-size: 0.8125rem; color: var(--muted); }
.status-practice, .status-want { color: var(--pencil); font-weight: 600; }
.status-done { color: var(--ink); font-weight: 700; }
.empty { padding: 1rem 0.1rem; color: var(--muted); }

/* Schwierigkeit: fünf Notenköpfe, gefüllt = erreicht, hohl = offen */
.dots { display: inline-flex; flex: none; align-items: center; gap: 2px; }
.dots i { width: 8px; height: 6px; border: 1.25px solid var(--g4); border-radius: 50%; transform: rotate(-24deg); }
.dots i.on { border-color: var(--ink); background: var(--ink); }

/* ---------- Notenleser: Kopf und Leiste als Einband-Bänder, dazwischen Notenpapier ---------- */

.reader {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  background: var(--g0);
}

.reader-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: calc(2.5rem + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 0.5rem 0 0.25rem;
  border-bottom: 1px solid var(--g3);
  background-color: var(--cover);
  color: var(--on-cover);
}
.reader-head .back {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  color: var(--on-cover);
}
.reader-head :focus-visible, .reader-bar :focus-visible { outline-offset: -2px; }
.reader-title { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
/* Lange Titel (Knockin’ on Heaven’s Door) werden abgeschnitten statt unter die Abspielzeit zu laufen; die Zeile darunter zuerst. */
.reader-title h1 { flex: 0 1 auto; min-width: 0; overflow: hidden; font-family: var(--title); font-size: 1.1875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.reader-meta {
  flex: 0 1000 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--on-cover-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Abspielzeit, bewusst klein und leise rechts im Kopf. */
.reader-time {
  flex: none;
  margin-left: auto;
  padding: 0 0.25rem;
  color: var(--on-cover-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reader-time + .keys-info { margin-left: 0.4rem; }

/* Tastenkürzel-Hinweis: nur am PC (Maus), ein kleines „i“ rechts im Kopf, Liste beim Drüberfahren oder Fokussieren. */
.keys-info { display: none; position: relative; flex: none; margin-left: auto; }
@media (hover: hover) and (pointer: fine) {
  .keys-info { display: block; }
}
.keys-btn {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--on-cover-muted);
  border-radius: 50%;
  background: transparent;
  color: var(--on-cover-muted);
  font: 600 0.8125rem/1 var(--serif);
  cursor: help;
}
.keys-tip {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 30;
  display: none;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  width: max-content;
  max-width: min(24rem, 90vw);
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--g3);
  border-radius: var(--radius);
  background: var(--g0);
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.keys-tip dt { font-weight: 600; white-space: nowrap; }
.keys-tip dd { margin: 0; color: var(--muted); }
.keys-info:hover .keys-tip, .keys-info:focus-within .keys-tip { display: grid; }
.keys-btn:hover, .keys-btn:focus-visible { color: var(--on-cover); border-color: var(--on-cover); }

/* Die Seite ist immer weißes Papier, auch im dunklen Modus: Noten lesen sich schwarz auf weiß am besten. */
.reader-page {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--grain), #fffaf3;
  box-shadow: inset 0 7px 6px -6px rgba(0, 0, 0, 0.3), inset 0 -7px 6px -6px rgba(0, 0, 0, 0.25);
  color: #464261;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.reader-page:focus { outline: none; }
/* Die Notenseite hält nur den Fokus für die Tasten (Leertaste, A/D …): kein Rahmen darum, wie sonst bei YouTube nach Leertaste. */
.reader-page:focus-visible { outline: none; }
.reader-sheet { max-width: 64rem; margin: 0 auto; will-change: transform; }
.reader-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: #797593;
  text-align: center;
}
.reader-msg[hidden] { display: none; }
.reader-sheet .at-cursor-bar { background: rgba(180, 99, 122, 0.08); }
.reader-sheet .at-selection div { background: rgba(86, 82, 126, 0.12); }
.reader-sheet .at-cursor-beat { background: var(--pencil); width: 3px; }
.reader-sheet .at-highlight * { fill: var(--pencil); stroke: var(--pencil); }

.listen-chip {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--g0);
  font-size: 0.8125rem;
  font-weight: 600;
  pointer-events: none;
}
.listen-chip[hidden] { display: none; }

/* „Hören“ gibt es beim Noten-Klang (stummschalten) und beim Backing Track (Lead aus den Noten), nicht beim Original. */
[data-synth][hidden], .reader[data-mode="original"] [data-hear] { display: none !important; }
/* Original-Modus: das YouTube-Video steht als Quadrat links in der unteren Leiste (muss sichtbar bleiben, sonst startet es am Handy nicht).
   Es ist ein 16:9-Video, in der Mitte zugeschnitten. Die Leiste wird dafür zweizeilig: Seitenwahl + Optionen oben, Abspielen darunter. */
.reader[data-original] .reader-bar {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  grid-template-areas: "video pager more" "video play play";
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
}
.reader[data-original] .orig-video { grid-area: video; }
.reader[data-original] .pager { grid-area: pager; margin-right: 0; justify-content: space-between; }
.reader[data-original] .reader-bar .more { grid-area: more; }
.reader[data-original] .reader-bar .play { grid-area: play; justify-content: center; width: 100%; }
.orig-video {
  position: relative;
  width: 6rem;
  height: 6rem;
  overflow: hidden;
  border-radius: 2px;
  background: #1a1823;
}
.reader:not([data-original]) .orig-video { display: none; }
.orig-video iframe { position: absolute; top: 0; left: 50%; width: 10.667rem; height: 6rem; border: 0; transform: translateX(-50%); }
.orig-note { margin: 0; padding: 0.4rem 0.75rem; background: var(--cover); font-size: 0.875rem; color: var(--on-cover-muted); text-align: center; }
.orig-note[hidden] { display: none; }

/* Erscheint, wenn man beim Abspielen weitergeblättert hat: holt die Seite mit der gespielten Stelle zurück. */
.resume-chip {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  z-index: 5;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  transform: translateX(-50%);
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--g0);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.resume-chip[hidden] { display: none; }

/* Seitenleiste: ein gleich breiter Streifen pro Seite, die aktuelle Seite in Rosé, ein Strich über Seiten mit neuem Abschnitt. */
.page-strip {
  display: flex;
  flex: none;
  gap: 3px;
  height: 22px;
  padding: 7px 0.75rem 0;
  border-top: 1px solid var(--g3);
  background: var(--cover);
  cursor: pointer;
}
.page-strip i {
  position: relative;
  flex: 1;
  min-width: 2px;
  background: var(--cover-deep);
  border-radius: 1px;
  transition: background-color 0.15s ease;
}
.page-strip i.on { background: var(--accent); }
.page-strip i.sec::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 2px;
  height: 4px;
  background: var(--on-cover-muted);
}
.page-strip.dense { gap: 0; }
.page-strip.dense i { border-radius: 0; }
.page-strip:empty { display: none; }

.reader-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background-color: var(--cover);
  color: var(--on-cover);
}
.pager { display: flex; align-items: center; margin-right: auto; }
.pager button, .reader-bar .more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.75rem;
  min-height: 2.5rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-cover);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.16s var(--ease-out);
}
.pager button:active, .reader-bar .more:active, .reader-bar .play:active { transform: scale(0.96); }
.pager button:disabled { opacity: 0.35; cursor: default; background: transparent; }
.pageno {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.5rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.15;
}
.section-now { max-width: 6rem; overflow: hidden; color: var(--on-cover-muted); font-size: 0.6875rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.section-now:empty { display: none; }
.reader-bar .more { padding: 0 0.6rem; font-size: 0.9375rem; font-weight: 600; }
.reader-bar .play {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  min-width: 7.25rem;
  padding: 0 0.95rem 0 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--on-cover);
  color: var(--cover);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out);
}
.reader-bar .play .icon { width: 1.25rem; height: 1.25rem; }
.reader-bar .play:disabled { opacity: 0.7; cursor: progress; }

@media (max-width: 26rem) {
  .reader-bar .more { padding: 0; }
  .reader-bar .more span { display: none; }
  .reader-bar .play { min-width: 0; }
}

/* Optionen schweben über der Seite, damit sich die Seitenhöhe nicht ändert. */
.reader-options {
  position: absolute;
  right: 0.5rem;
  bottom: calc(var(--dock, 4.5rem) + 0.25rem);
  max-height: calc(100% - var(--dock, 4.5rem) - 3.5rem);
  overflow-y: auto;
  z-index: 10;
  display: grid;
  gap: 0.75rem;
  width: min(21rem, calc(100% - 1rem));
  padding: 1rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.32);
  font-size: 0.9375rem;
  transform-origin: bottom right;
  animation: options-in 0.18s var(--ease-out);
}
@keyframes options-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.reader-options[hidden] { display: none; }
.option-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.option-row > span, .option-row > label:first-child { font-weight: 600; }
.option-row.checks { justify-content: flex-start; gap: 0.4rem 1.25rem; }
.option-row.checks label { font-weight: 400; }
.option-row select { min-height: 2.25rem; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.option-row input[type="range"] { width: 10rem; }
/* Lautstärke: beim Backing Track eine Überschrift mit zwei Zeilen (Backing Track, Lead), Regler bündig untereinander */
.option-row[hidden] { display: none; }
.option-volume { display: grid; gap: 0.5rem; }
.volume-title { font-weight: 600; }
.volume-title[hidden] { display: none; }
.reader[data-mode="backing"] .option-volume .option-row > label:first-child { font-weight: 400; }
.option-row > [data-ios-hint] { font-size: 0.875rem; font-weight: 400; }
/* „Lead wird vorbereitet …“ unter dem Regler, rechtsbündig */
.option-row > [data-lead-hint] { flex-basis: 100%; margin-top: -0.2rem; font-size: 0.875rem; font-weight: 400; text-align: right; }
/* Spuren: zwei gleich breite Knöpfe, Rolle groß, Spieler klein darunter */
.option-tracks { display: grid; gap: 0.4rem; }
.track-toggle { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.track-toggle button { display: flex; flex-direction: column; align-items: flex-start; min-height: 3rem; padding: 0.35rem 0.7rem; text-align: left; line-height: 1.2; }
.track-toggle button b { font-weight: 700; }
.track-toggle button small { font-size: 0.75rem; opacity: 0.8; }
.option-row .check { display: inline-flex; align-items: center; gap: 0.45rem; }
.option-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }

/* ---------- Unter den Noten: Blöcke mit kräftiger Linie darüber ---------- */

.song-more { margin-top: 1.25rem; }
.song-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; margin: 0 0 0.75rem; color: var(--muted); font-size: 0.875rem; }
.song-facts a { color: inherit; }
.song-facts a:hover { color: var(--accent); }
.tex-note { margin: 0 0 1rem; }
.hint { color: var(--muted); font-size: 0.9375rem; }

.block { margin-top: 2.5rem; padding-top: 1.4rem; background: var(--staff); }
.block > h2, .block-head { margin-bottom: 1rem; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; }
.block-head .hint { margin: 0; }

/* Griffbilder: alle im gleichen Maßstab auf einer Grundlinie, ohne Kästen */
.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 1rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: end;
}
.chord-grid li { display: flex; flex-direction: column; align-items: center; }
.diagram { width: 5.5rem; }
.diagram .string, .diagram .fret { stroke: var(--muted); stroke-width: 1; }
.diagram .nut { fill: var(--ink); }
.diagram .dot { fill: var(--ink); }
.diagram .open { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.diagram .mark { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.diagram .fretno { fill: var(--muted); font-size: 10px; }
.chord-name { margin-top: 0.15rem; font-family: var(--title); font-weight: 600; font-size: 1.1875rem; }
.chord-sound { color: var(--muted); font-size: 0.8125rem; }

/* Ablauf */
.form { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: 0.9375rem; }
.form li:not(:last-child)::after { content: "–"; margin-left: 0.4rem; color: var(--muted); }

/* Akkordblatt: vier Takte pro Zeile, Taktstriche als Linien */
.sheet { font-size: calc(1.3rem * var(--sheet-scale)); }
.sheet-section { padding: 0.9rem 0 0.4rem; scroll-margin-top: 1rem; }
.sheet-section h3 { margin-bottom: 0.4rem; }
.bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-right: 2px solid var(--ink);
  margin-bottom: 0.5rem;
}
.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25em;
  min-width: 0;
  min-height: 2.6em;
  padding: 0.55em 0.4em;
  border-left: 1.5px solid var(--ink);
}
.bar b { min-width: 0; font-family: var(--title); font-weight: 600; overflow-wrap: anywhere; }
.bar.is-half { background: var(--wash); }
.bar small { align-self: flex-start; color: var(--muted); font-size: 0.55em; font-weight: 700; }
.sheet-note { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9375rem; }

/* Schlagmuster */
.strum { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; font-size: calc(1.4rem * var(--sheet-scale)); font-weight: 700; letter-spacing: 0.06em; }
.strum span { padding: 0.15rem 0.6rem; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }

/* ---------- Klang: Hornet als das dunkle Gerät, Gitarre auf Papier ---------- */

.tone-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.tone-tabs .chip { min-height: 2.25rem; font-size: 0.875rem; }
.tone-tabs .chip.is-alt { border-style: dashed; }
.tone-name { margin: 0 0 0.75rem; font-family: var(--title); font-weight: 600; font-size: 1.1875rem; }
.tone-alt-label { flex-basis: 100%; margin-top: 0.3rem; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }

.amp-panel {
  padding: 0.8rem 0.75rem 0.9rem;
  border-radius: var(--radius);
  background: #1f1b18;
  color: #f1ebe2;
}
.amp-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.amp-led {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: #2b0e0a;
  color: #ff6a4a;
  font: 700 1.15rem/1 var(--font);
}
.amp-model { min-width: 0; font-size: 0.9375rem; }
.amp-model span { color: #aea294; font-size: 0.8125rem; }
.amp-knobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem 0.25rem; }
.amp-knob, .g-knob { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.knob { width: 2.75rem; height: 2.75rem; }
.knob-ring { fill: none; stroke: #4f4740; stroke-width: 1; stroke-dasharray: 2 3.4; }
.knob-cap { fill: #302b27; stroke: #5a524b; stroke-width: 1; }
.knob-pointer { stroke: #f6f0e6; stroke-width: 2.5; stroke-linecap: round; }
.knob.is-dim { opacity: 0.35; }
.knob-label { margin-top: 0.2rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.knob-value { color: #c0b5a8; font-size: 0.75rem; line-height: 1.3; }

.guitar-panel {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  align-items: start;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
}
.guitar-panel .knob-cap { fill: var(--g1); stroke: var(--edge); }
.guitar-panel .knob-ring { stroke: var(--edge); }
.guitar-panel .knob-pointer { stroke: var(--ink); }
.guitar-panel .knob-value { color: var(--muted); }
.pickup { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.slots { display: flex; align-items: center; gap: 0.3rem; height: 2.75rem; }
.slots small { color: var(--muted); font-size: 0.6875rem; }
.slot { width: 0.7rem; height: 0.7rem; border: 1.5px solid var(--muted); }
.slot.is-on { border-color: var(--ink); background: var(--ink); }
.tone-note { margin: 0.8rem 0 0.25rem; }
.tone-how { margin: 0.25rem 0 0; }
.tone-unsure { margin-top: 0.75rem; font-size: 0.9375rem; }

@media (min-width: 40rem) {
  .amp-knobs { grid-template-columns: repeat(8, 1fr); }
}

@media (max-width: 30rem) {
  .guitar-panel { grid-template-columns: repeat(3, 1fr); }
  .pickup { grid-column: 1 / -1; }
}

/* Tipps, Schritte, Songs zur Technik */
.tips, .steps { margin: 0; padding-left: 1.2rem; }
.tips li + li, .steps li + li { margin-top: 0.45rem; }
.steps li::marker { font-weight: 700; }
.unsure-head { margin: 1.25rem 0 0.4rem; color: var(--warn); }
.unsure { color: var(--warn); }
.tech-songs { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.tech-songs a { font-weight: 600; }
.tech-songs span { color: var(--muted); font-size: 0.9375rem; }
/* Übungsliste der Technik-Seiten: Taktbereich als Knopf, daneben Name und Hinweis */
.exercises { display: grid; gap: 0.7rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.exercises li { display: grid; grid-template-columns: 6.25rem 1fr; gap: 0.15rem 0.75rem; align-items: start; }
.ex-go { min-height: 2.25rem; padding: 0.2rem 0.6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-text { padding-top: 0.3rem; }
.ex-text strong { display: block; font-weight: 700; }
.in-song { margin: 0 0 0.6rem; }
.in-song a { font-weight: 600; }
.in-song span { color: var(--muted); font-size: 0.9375rem; }

/* Video-Tutorials auf den Technik-Seiten. Der YouTube-Rahmen kommt erst nach dem Tippen. */
.videos { display: grid; gap: 1.5rem; margin: 0 0 0.75rem; padding: 0; list-style: none; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--g2);
  overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.16s var(--ease-out);
}
.video-play:hover { background: var(--g3); }
.video-play:active { transform: scale(0.99); }
.video-play .icon { width: 2.5rem; height: 2.5rem; margin-bottom: 0.25rem; fill: currentColor; stroke: none; }
.video-title { font-family: var(--title); font-size: 1.0625rem; font-weight: 600; line-height: 1.25; }
.video-by { color: var(--muted); font-size: 0.9375rem; }
.video + .video { padding-top: 0; }
.video .hint { margin: 0.5rem 0 0; }

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  resize: vertical;
}
textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
textarea::placeholder { color: var(--muted); }

.links ul { margin: 0 0 0.5rem; padding-left: 1.2rem; }

/* ---------- Akustik-Bereich (#akustik): gleiches Notenheft, eigener Akzent ---------- */
/* Pine aus Rosé Pine Dawn statt Rosé: Pro Bereich bleibt es bei einem Akzent, man sieht aber sofort, wo man ist. */
:root[data-area="akustik"] { --accent: #286983; }
:root[data-area="akustik"] .reader-sheet .at-cursor-bar { background: rgba(40, 105, 131, 0.08); }

/* Umschalter E-Gitarre / Akustik im Kopf der Listen */
.area-switch { display: flex; margin-top: 1.25rem; font-size: 0.9375rem; font-weight: 600; }
.area-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  color: var(--on-cover);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--on-cover-muted);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.16s var(--ease-out);
}
.area-switch a:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.area-switch a + a { margin-left: -1px; border-radius: 0 var(--radius) var(--radius) 0; }
/* Der aktive Bereich bekommt unten eine Linie in seiner Akzentfarbe (E-Gitarre Rosé, Akustik Pine). */
.area-switch a[aria-current="page"] { background: var(--ink); color: var(--g0); box-shadow: inset 0 0 0 1px var(--ink), inset 0 -3px 0 var(--accent); }
.area-switch a:active { transform: scale(0.97); }

/* Akkorde in der Übersicht */
.chord-links { margin-top: 0.75rem; }
/* Tippen auf das Griffbild spielt den Akkord, „Üben“ darunter führt zur Akkord-Seite */
.chord-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.25rem 0.4rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.16s var(--ease-out);
}
.chord-play:active { transform: scale(0.97); }
.chord-play .chord-name { transition: color 0.15s ease; }
.chord-play.is-playing .chord-name { color: var(--accent); }
.chord-more {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.5rem;
  padding: 0 0.6rem 0 0.75rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.16s var(--ease-out);
}
.chord-more .icon { width: 1rem; height: 1rem; }
/* „Zum Stimmgerät“ in der ersten Grundlagen-Lektion (die Übersicht führt das Stimmgerät nicht mehr). */
.tuner-go {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.75rem;
  padding: 0 0.75rem 0 1rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.16s var(--ease-out);
}
.tuner-go .icon { width: 1rem; height: 1rem; }
.tuner-go:active { transform: scale(0.97); }
.chord-more:active { transform: scale(0.97); }
.chord-links-foot { justify-content: center; margin-top: 1rem; }
.chord-links-hint { margin: 0.5rem 0 0; text-align: center; }

/* Seitenkopf ohne Notenleser (Akkord, Stimmgerät) */
.page-head + .wrap { margin-top: 1rem; }
a.chip { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
a.chip[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--g0); font-weight: 600; }

/* Akkord-Seite */
.chord-switch { margin: 0 0 1.5rem; }
.chord-switch .chip { min-width: 2.75rem; justify-content: center; font-weight: 600; }
.chord-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.chord-big .diagram { width: 10.5rem; }
.chord-side { flex: 1 1 13rem; }
.chord-side p { margin: 0 0 0.6rem; }
.chord-long { font-family: var(--title); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.diagram .finger { fill: var(--g0); font-family: var(--font); font-size: 7.5px; font-weight: 700; text-anchor: middle; }
.diagram .str.is-current .string { stroke: var(--accent); stroke-width: 2.4; }
.diagram .str.is-current .dot { fill: var(--accent); }
.diagram .str.is-current .open { stroke: var(--accent); stroke-width: 2; }
.diagram .str .string, .diagram .str .dot { transition: stroke 0.15s ease, fill 0.15s ease; }
.hear-btn { display: inline-flex; align-items: center; gap: 0.45rem; }
/* Lautstärke fürs Vorspielen (Anhören, Saitentöne, Stimmtöne) */
.hear-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.vol-range { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.9375rem; }
.vol-range input { width: 8.5rem; }
.tuner-vol { margin-top: 1rem; }
.hear-btn .icon { width: 1rem; height: 1rem; }

/* Prüfen übers Mikrofon */
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 1rem 0; }
.check-start {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--g0);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.16s var(--ease-out);
}
.check-start:active { transform: scale(0.97); }
.check-start[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); }
.level { display: block; width: 6rem; height: 4px; overflow: hidden; border-radius: 2px; background: var(--g2); }
.level i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 60ms linear; }
.check-result { margin: 0 0 1rem; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--wash); box-shadow: inset 3px 0 0 var(--edge); }
.check-result:empty { display: none; }
.check-result strong { display: block; font-family: var(--title); font-size: 1.375rem; font-weight: 600; line-height: 1.25; }
.check-result span { display: block; margin-top: 0.3rem; color: var(--muted); }
.check-result.is-ok { box-shadow: inset 3px 0 0 var(--accent); }
.check-result.is-ok strong { color: var(--accent); }
.check-result.is-close, .check-result.is-other { box-shadow: inset 3px 0 0 var(--g5); }
.check-result.is-wait strong { color: var(--muted); }
.string-steps { display: grid; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.string-steps[hidden] { display: none; }
.string-step {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.string-steps .is-current .string-step { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.step-name { min-width: 5.25rem; font-weight: 600; }
.step-note { flex: 1; color: var(--muted); }
.step-state { font-weight: 700; }
.string-steps .is-done .step-state { color: var(--accent); }

/* Stimmgerät */
.tuner { padding: 1.5rem 1rem 1.25rem; border-radius: var(--radius); background: var(--wash); text-align: center; }
.tuner-note { margin: 0; font-family: var(--title); font-size: 4.5rem; font-weight: 600; line-height: 1; transition: color 0.15s ease; }
.tuner-string { margin: 0.4rem 0 1.25rem; color: var(--muted); }
.tuner-meter {
  position: relative;
  max-width: 22rem;
  height: 3rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--edge);
  background: repeating-linear-gradient(to right, var(--edge) 0 1px, transparent 1px 10%) left bottom / 100% 0.6rem no-repeat;
}
.tuner-center { position: absolute; bottom: 0; left: 50%; width: 2px; height: 100%; background: var(--ink); transform: translateX(-1px); }
.tuner-tick { position: absolute; top: 0; color: var(--muted); font-size: 0.75rem; }
.tuner-tick.is-low { left: 0; }
.tuner-tick.is-high { right: 0; }
.tuner-needle {
  position: absolute;
  bottom: 0;
  left: calc(50% - 2px);
  width: 4px;
  height: 2.4rem;
  border-radius: 2px;
  background: var(--g5);
  opacity: 0.25;
  transition: transform 0.12s var(--ease-out), background-color 0.15s ease, opacity 0.15s ease;
}
.tuner.is-ok .tuner-needle { background: var(--accent); }
.tuner.is-ok .tuner-note { color: var(--accent); }
.tuner-say { min-height: 1.5em; margin: 1rem 0; }
.tuner-strings { margin-top: 1.25rem; overflow-x: auto; }
.tuner-strings .toggle button { min-width: 2.6rem; padding-inline: 0.5rem; font-weight: 600; }

/* Hover nur mit echter Maus, sonst bleibt der Zustand am Handy nach dem Tippen hängen. */
@media (hover: hover) and (pointer: fine) {
  .area-switch a:not([aria-current]):hover, .chord-play:hover { background: var(--cover-deep); }
  .chord-play:hover .chord-name, .chord-more:hover { color: var(--accent); }
  .chord-more:hover { background: var(--cover-deep); }
  .string-step:hover { border-color: var(--ink); }
  .check-start:hover { background: var(--g5); }
  .check-start[aria-pressed="true"]:hover { background: var(--accent); filter: brightness(1.08); }
  .chip:hover, .toggle button:hover { border-color: var(--ink); }
  .song-row:hover { background: color-mix(in srgb, var(--wash) 55%, transparent); }
  .song-row:hover .song-title { color: var(--accent); }
  .pager button:hover, .reader-bar .more:hover, .reader-head .back:hover, .masthead-nav a:hover { background: var(--cover-deep); }
}

/* Weniger Bewegung: keine Ortswechsel, Farbe und Deckkraft bleiben als Rückmeldung. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip:active, .toggle button:active, .pager button:active, .reader-bar .more:active, .reader-bar .play:active, .masthead-nav a:active { transform: none; }
  .area-switch a:active, .chord-play:active, .chord-more:active, .check-start:active { transform: none; }
  .tuner-needle, .level i { transition: none; }
  .reader-options { animation-name: options-fade; }
  @keyframes options-fade { from { opacity: 0; } }
}
