/* Quax & Dino Gitarrenschule – kinderfreundliches Design */

:root {
  --bg: #fff8e7;
  --bg-soft: #fffdf5;
  --text: #3d3d3d;
  --heading: #2c3e50;
  --accent: #ff9f43;
  --accent-dark: #e67e22;
  --primary: #3498db;
  --primary-dark: #2980b9;
  --success: #2ecc71;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --muted: #95a5a6;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 18px;

  /* Saitenfarben */
  --saite-6: #e74c3c;
  --saite-5: #9b59b6;
  --saite-4: #3498db;
  --saite-3: #2ecc71;
  --saite-2: #f1c40f;
  --saite-1: #e67e22;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  font-family: "Nunito", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* iOS/iPadOS: Textauswahl + Kontextmenue beim Antippen verhindern (Bug 18.08.) */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  text-align: center;
  padding: 2rem 1rem;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-header.compact {
  padding: 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.site-header h1 {
  margin: 0;
  color: var(--heading);
  font-size: 2.2rem;
  line-height: 1.2;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.2rem;
  color: #6c5ce7;
  font-weight: 700;
}

.back-link {
  display: inline-block;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* Container */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.2rem;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #dfe6e9;
  color: var(--text);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-large {
  font-size: 1.2rem;
  padding: 0.9rem 1.8rem;
  width: 100%;
}

.btn-tuner {
  background: #fff3e0;
  color: #e65100;
  border: 2px solid #ffb74d;
  white-space: nowrap;
}

.icon-gitarre {
  height: 1.15em;
  width: auto;
  vertical-align: -0.18em;
  margin-right: 0.3em;
}

.btn-tuner:hover {
  background: #ffe0b2;
}

.btn-done {
  background: white;
  border: 3px solid var(--success);
  color: var(--success);
  border-radius: 50%;
  width: 56px;
  height: 56px;  padding: 0;
  font-size: 1.4rem;
}

.btn-done.aktiv {
  background: var(--success);
  color: white;
}

.btn-nav {
  min-width: 100px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  background: var(--accent);
  color: white;
}

.btn-nav:hover {
  background: var(--accent-dark);
}

.btn-small {
  min-height: 40px;
  padding: 0.3rem 0.9rem;
  font-size: 0.95rem;
}

/* Fortschritt */
.fortschritt-box {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.fortschritt-box h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--heading);
}

.fortschritt-bar {
  width: 100%;
  height: 24px;
  background: #dfe6e9;
  border-radius: 999px;
  overflow: hidden;
}

.fortschritt-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success), var(--warning));
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Kategorien-Kacheln */
.kategorien h2 {
  font-size: 1.5rem;
  color: var(--heading);
  margin-bottom: 1rem;
}

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.kachel {
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  border-top: 8px solid var(--accent);
}

.kachel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.kachel-icon {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.kachel h3 {
  margin: 0.3rem 0;
  font-size: 1.2rem;
  color: var(--heading);
}

.kachel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.alle-lektionen {
  margin: 2rem 0;
  text-align: center;
}

/* Filter */
.filter-bar {
  background: var(--bg-soft);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
}

.filter-bar label {
  font-weight: 700;
  margin-right: 0.5rem;
}

.filter-bar select {
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: white;
  min-height: 48px;
}

/* Lektionen-Liste */
.seitenfilter-info {
  text-align: center;
  font-weight: 700;
  color: #7a5a1f;
  background: #fff7e6;
  border: 2px solid #f0d9a8;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 0 0 1rem;
}
.seitenfilter-info a {
  color: #0071e3;
  font-weight: 700;
}
.lektionen-liste {
  display: grid;
  gap: 0.8rem;
}

.lektion-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s;
}

/* ✏️ Notizen-Icon auf der Lektionskarte (Gisbert 18.08.) */
.lektion-notiz {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.5;
  transition: opacity 0.1s;
  padding: 2px 4px;
}
.lektion-notiz:hover {
  opacity: 1;
}
.lektion-notiz-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
}

.lektion-card:hover {
  transform: scale(1.01);
}

.lektion-nr {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
}

.lektion-info h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--heading);
}

.lektion-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lektion-verdict {
  font-size: 1.6rem;
}

/* Viewer */
.viewer-body {
  padding-bottom: 90px;
}

.viewer-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.viewer-title {
  flex: 1;
  text-align: center;
}

.viewer-title span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.viewer-main {
  padding-top: 1.5rem;
}

.notation-section {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.dateien-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.datei-tab {
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.datei-tab.aktiv {
  background: var(--primary);
  color: white;
}

/* 🖐️ Fingerakrobaten-Tab (Gisbert 18.08.): alternative Grifffassung mit
   gegriffenem H (4. Finger). Eigene Farbe, damit das Zusatzangebot auffällt. */
.finger4-tab {
  border-color: #8e44ad;
  color: #8e44ad;
  background: #f9f0ff;
}

.finger4-tab.aktiv {
  background: #8e44ad;
  border-color: #8e44ad;
  color: white;
}

/* Klick-Notenzeilen (GS66 Rhythmusbausteine): jede Zeile = eine Datei,
   Klick startet das Audio direkt (Gisbert 07.08.) */
.notenzeilen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.notenzeile {
  position: relative;
  border: 3px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}
.notenzeile:hover {
  border-color: var(--primary);
}
.notenzeile.aktiv {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}
.notenzeile img {
  display: block;
  width: 100%;
  height: auto;
}
/* Dateinamen-Labels ausgeblendet (Gisbert 12.08.: stören in GS66, Dateien fertig bearbeitet) */
body.schueler .zeile-label, body.schueler .file { display: none !important; }
.zeile-label {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: #555;
  pointer-events: none;
}

#scroll-wrap {
  width: 100%;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  position: relative;
}

#alphatab {
  width: 100%;
  min-height: 240px;
  background: #fff;
  position: relative;
}

/* Übungs-Lektionen: alphaTab-Rendering off-screen — der Player bleibt aktiv
   für „Anhören“, aber die Darstellung der generierten Datei soll nicht über
   der Übung erscheinen (Gisbert 13.08.: „Noten oben falsch“) */
#alphatab.uebung-versteckt {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 100%;
  min-height: 0;
}

/* PNG-Notenansicht (06.08.): Buchgetreues Notenbild statt alphaTab-Rendering,
   alphaTab bleibt als unsichtbarer Klang-Player aktiv */
.noten-png {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0;
}
.noten-png img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--ui-h, 160px));
  max-height: calc(100dvh - var(--ui-h, 160px));
  margin: 0 auto;
}
/* alphaTab-SVG bei PNG-Ansicht ausblenden – der Container behält keine Höhe */
#noten-png + #alphatab { min-height: 0; }
/* Cursor-Overlay-Layer von alphaTab würde sonst mit Partitur-Höhe stehen
   bleiben und eine große weiße Fläche erzeugen (08.08.2026, L54) */
#noten-png ~ #alphatab .at-cursors { display: none !important; }

/* ⛶ Vollbild für die Noten (Gisbert 18.08.): #scroll-wrap füllt den ganzen
   Bildschirm (dunkle Bühne wie die Diashow), Notenbilder werden auf volle
   Höhe skaliert statt auf 100dvh − UI begrenzt (Querformat-Problem). */
#scroll-wrap:fullscreen,
#scroll-wrap:-webkit-full-screen {
  background: #000;
  border-radius: 0;
  overflow: auto;
}
#scroll-wrap:fullscreen .noten-png,
#scroll-wrap:-webkit-full-screen .noten-png {
  box-shadow: none;
  border-radius: 0;
}
#scroll-wrap:fullscreen .noten-png img,
#scroll-wrap:-webkit-full-screen .noten-png img {
  max-height: calc(100dvh - 64px);
}
/* Vollbild-Leiste: nur sichtbar, wenn der Container selbst im Vollbild ist */
.vollbild-leiste {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem;
  background: rgba(20, 20, 20, 0.92);
}
#scroll-wrap:fullscreen .vollbild-leiste,
#scroll-wrap:-webkit-full-screen .vollbild-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
/* Abgegrenzte Sektionen in der Vollbild-Leiste (Gisbert 24.08.) */
.vollbild-leiste .vb-sektion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vollbild-leiste .vb-aufnahme-sektion {
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  padding-left: 0.8rem;
}
.vollbild-leiste .vb-rec-modus {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ddd;
}
.vollbild-leiste .vb-rec-modus.aktiv {
  background: #7a1f1f;
  border-color: #ff5a5a;
  color: #fff;
}
.vollbild-leiste .rec-zeit {
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 3em;
  text-align: center;
}

/* Vorzähler-Leiste über Übungen (Gisbert 24.08.) */
.vorzaehler-leiste {
  display: flex;
  justify-content: flex-end;
  padding: 0.3rem 0 0.4rem;
}

/* Software-Vollbild-Overlay (Fallback für Browser ohne Element-Fullscreen:
   DuckDuckGo, Ecosia – WKWebView, Gisbert 18.08.) */
.noten-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  background: #000;
  overflow: auto;
}
.noten-overlay.aktiv { display: flex; }
.noten-overlay .vollbild-leiste { display: flex; }
.noten-overlay .noten-png {
  box-shadow: none;
  border-radius: 0;
}
.noten-overlay .noten-png img {
  max-height: calc(100dvh - 64px);
}
body.noten-overlay-offen { overflow: hidden; }

/* ✏️ Notizen-Panel (ToDo-Liste pro Lektion, Gisbert 18.08.) */
.benutzer-chips {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.benutzer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1.5px solid #8e44ad;
  color: #6c3483;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.benutzer-chip-gast {
  border-color: #3498db;
  color: #2980b9;
  text-decoration: none;
}
.benutzer-logout {
  background: none;
  border: none;
  color: #8e44ad;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 2px;
  margin-left: 2px;
}
.benutzer-logout:hover { color: #c0392b; }
.benutzer-chip-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: top;
}
.nachrichten-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: top;
}
.notizen-identitaet {
  margin-bottom: 0.4rem;
}
.notizen-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: top;
}
.notizen-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100vw);
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  z-index: 9997;
  /* WICHTIG: display:none als Basis – das hidden-Attribut würde sonst von
     display:flex überschrieben (UA-[hidden] hat geringeres Gewicht) */
  display: none;
  flex-direction: column;
}
.notizen-panel:not([hidden]) {
  display: flex;
}
.notizen-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  font-weight: 700;
  font-size: 1rem;
}
.notizen-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.notizen-eintrag {
  border: 1px solid #e2e0da;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  background: #fffdf7;
}
.notizen-eintrag.erledigt .notizen-text {
  text-decoration: line-through;
  color: #999;
}
.notizen-eintrag-kopf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.notizen-datum {
  font-size: 0.75rem;
  color: #888;
  font-weight: 600;
  flex: 1;
}
.notizen-lehrer-badge {
  background: #eaf3ff;
  color: #2980b9;
  border: 1px solid #bcd9f0;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 8px;
  white-space: nowrap;
}
.notizen-loeschen {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
}
.notizen-text {
  margin-top: 0.3rem;
  white-space: pre-wrap;
}
.notizen-leer {
  color: #999;
  text-align: center;
  padding: 1rem 0;
}
.notizen-hinweis {
  font-size: 0.75rem;
  color: #999;
}
.notizen-form textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem;
  font: inherit;
}
.notizen-audio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
#notizen-audio-vorschau {
  max-width: 100%;
}
.notizen-form-aktionen {
  margin-top: 0.4rem;
}
.notizen-fuss {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

/* macOS: Keine blaue Auswahl-Markierung beim Klicken auf die Vollbild-Buttons
   (Gisbert 18.08.: „Abspielen im Vollbild legt blaue Auswahl über den ganzen
   Bildschirm“). Auswahl im Vollbild-/Overlay-Bereich komplett deaktivieren,
   Bild-Drag verhindern – wie es die Diashow per body-global schon tut. */
#scroll-wrap:fullscreen, #scroll-wrap:fullscreen *,
#scroll-wrap:-webkit-full-screen, #scroll-wrap:-webkit-full-screen *,
.noten-overlay, .noten-overlay * {
  user-select: none;
  -webkit-user-select: none;
}
#scroll-wrap:fullscreen img, .noten-overlay img {
  -webkit-user-drag: none;
}
/* Auch außerhalb des Vollbilds: Notenbilder nicht ziehbar machen */
.noten-png img {
  -webkit-user-drag: none;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.2rem 0 0;
  padding: 1rem 1.2rem;
  /* Seit 28.08.: aus dem 960px-Container „ausgebrochen“ (zentriert über den
     Container hinaus), damit Transport + Aktionen in EINE Zeile passen */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, calc(100vw - 2.4rem));
  background: #fff;
  border: 1px solid #e2e0da;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.transport-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
/* Player-Buttons gebündelt: bei Übungen ohne Audio verschwindet nur dieser
   Teil, Notizen/Nachrichten/Anmelden rechts bleiben sichtbar */
.transport-spieler {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
/* Notizen/Nachrichten/Anmelden nutzen den freien Platz in der unteren Zeile
   (Gisbert 28.08.) – rechtsbündig, Header bleibt einzeilig */
.transport-chips {
  margin-left: auto;
}
.player-controls.ohne-player .transport-spieler,
.player-controls.ohne-player .control-row {
  display: none;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.control-row input[type="range"] {
  flex: 1;
  min-width: 160px;
}

.control-wert {
  font-weight: 700;
  color: var(--heading);
  min-width: 2.2rem;
  text-align: right;
}

.control-einheit {
  color: var(--muted);
  font-weight: 700;
  margin-right: 0.4rem;
}

.btn-loop {
  background: #fff3e0;
  color: #e65100;
  border: 2px solid #ffb74d;
}

.btn-loop.aktiv {
  background: #ff9800;
  color: white;
  border-color: #e65100;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3);
}

/* Takt-Eingabe für die Übestelle (Gisbert 29.08.: Takte eintippen statt
   Klick in die Audiospur – die Taktzahlen stehen in den Noten) */
.ab-eingabe {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #e0f2f1;
  border: 2px solid #b2dfdb;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  color: #00695c;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ab-eingabe input {
  width: 3.2rem;
  min-height: 2rem;
  border: 1px solid #b2dfdb;
  border-radius: 8px;
  padding: 0.15rem 0.3rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  color: #00695c;
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ab-eingabe input::-webkit-outer-spin-button,
.ab-eingabe input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ab-eingabe input:disabled {
  background: #f0f0f0;
  color: #999;
}

.btn-ab {
  min-height: 40px;
  min-width: 40px;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 2px solid #b2dfdb;
  background: #e0f2f1;
  color: #00695c;
}

.btn-ab-clear {
  border-color: #ffcdd2;
  background: #ffebee;
  color: #c62828;
}

.ab-badge {
  background: #e0f2f1;
  color: #00695c;
  border: 1px solid #b2dfdb;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.ab-badge-warn {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffb74d;
}

.loop-badge {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.tempo-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--heading);
  min-width: 7.2rem;
}

input[type="range"] {
  min-height: 48px;
}

.lektion-text-section,
.buchseite-section,
.video-section,
.quax-hilfe,
.bogen-section {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.lektion-text-section h2,
.buchseite-section h2,
.video-section h2,
.quax-hilfe h2,
.bogen-section h2 {
  margin-top: 0;
  color: var(--heading);
  font-size: 1.3rem;
}

/* Noto Music: rendert Musikzeichen (𝅘𝅥 𝅗𝅥 𝄞 𝄿), die System-Fonts nicht haben */
@font-face {
  font-family: 'Noto Music';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/NotoMusic-Regular.woff2') format('woff2');
}

.lektion-text {
  white-space: pre-wrap;
  font-size: 1.1rem;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Music", sans-serif;
}

/* Quax-Maskottchen mit Sprechblase */
.icon-quax {
  height: 1.5em;
  width: auto;
  vertical-align: -0.35em;
  margin-right: 0.25em;
  border-radius: 6px;
}
.quax-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff8e8;
  border: 2px solid #f0d9a8;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.quax-figur {
  width: 150px;
  height: auto;
  flex-shrink: 0;
  align-self: center;
}
.quax-blase {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  position: relative;
}
.quax-blase::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: #fff;
}
@media (max-width: 600px) {
  .quax-box { flex-direction: column; align-items: center; text-align: left; }
  .quax-blase::before { display: none; }
}

/* Redaktioneller Lektionstext (Gisbert 23.08.): strukturierte Abschnitte
   Einstieg / So übst du / Liedtext + Lehrer-Kasten (nur Lehrer-Rolle) */
.lektion-text h3 {
  margin: 14px 0 6px;
  font-size: 1.05rem;
  color: #b45309;
}
.lektionstext-schritte {
  margin: 6px 0 10px;
  padding-left: 22px;
}
.lektionstext-schritte li {
  margin: 4px 0;
}
.lektionstext-lehrer {
  margin-top: 14px;
  padding: 0.7rem 1rem;
  background: #fff4e0;
  border: 2px dashed #e5a83d;
  border-radius: 14px;
}
.lektionstext-lehrer h3 {
  margin-top: 0;
}
.lektionstext-eltern {
  margin-top: 14px;
  padding: 0.7rem 1rem;
  background: #eef4fb;
  border: 2px dashed #7aa7d9;
  border-radius: 14px;
}
.lektionstext-eltern h3 {
  margin-top: 0;
  color: #2c5f8a;
}

.buchseite-wrapper {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.buchseite-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.video-card {
  flex: 1 1 280px;
  max-width: 430px;
}

.video-titel {
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.video-card video {
  width: 100%;
  border-radius: 6px;
  background: #000;
}

.note-hotspot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.18);
  border: 2px solid rgba(255, 59, 48, 0.55);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.35);
  pointer-events: none;
  display: none;
  z-index: 9;
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.saiten-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.saite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.saite-6 { background: var(--saite-6); }
.saite-5 { background: var(--saite-5); }
.saite-4 { background: var(--saite-4); }
.saite-3 { background: var(--saite-3); }
.saite-2 { background: var(--saite-2); color: #3d3d3d; text-shadow: none; }
.saite-1 { background: var(--saite-1); }

/* Footer / Viewer-Footer */
.site-footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.viewer-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  z-index: 20;
}
/* Aktionen (Notizen/Nachrichten/Anmelden) zwischen Vorherige/Nächste
   (Gisbert 28.08.: fester Footer = immer sichtbar, kein Scrollen nötig) */
.footer-aktionen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* alphaTab Cursor Overrides (in case not inlined) */
.at-cursor-bar {
  fill: rgba(220, 50, 50, 0.25) !important;
  stroke: #d32f2f !important;
  stroke-width: 2px !important;
}
.at-cursor-beat {
  fill: rgba(220, 80, 50, 0.4) !important;
  stroke: none !important;
}

/* Loading */
.loading {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .site-header h1 { font-size: 1.8rem; }
    .viewer-footer { flex-wrap: wrap; }
  .btn-nav { flex: 1; }
}

/* ===================== Mischpult ===================== */
.mixer {
  margin-top: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: #f5f3ee;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.mixer-header {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #555;
}
.mixer-tracks {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.mixer-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #e5e2da;
}
.mixer-track.git { border-left: 4px solid #4caf50; }
.mixer-track.perc { border-left: 4px solid #ff9800; }
.mixer-label {
  min-width: 8rem;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mixer-btn {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  font-weight: bold;
  font-size: 0.8rem;
  cursor: pointer;
  line-height: 1;
}
.mixer-btn.solo { color: #e65100; }
.mixer-btn.mute { color: #c62828; }
.mixer-btn.aktiv {
  background: #333;
  color: #fff;
  border-color: #333;
}
.mixer-vol {
  flex: 1;
  min-width: 4rem;
}

.mixer-pan {
  width: 80px;
  accent-color: #8e44ad;
}

/* ===================== Aufnahme ===================== */
.aufnahme {
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  background: #fdf8f0;
  border: 1px solid #e8dcc8;
  border-radius: 8px;
}

.aufnahme-header {
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.aufnahme-modi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.rec-modus {
  background: #fff;
  border: 2px solid #d7d3cb;
  color: var(--text);
}

.rec-modus.aktiv {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

.rec-hinweis {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  min-height: 1.1rem;
}

.aufnahme-aktionen {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-rec {
  background: #d32f2f;
  color: white;
}

.btn-rec.laeuft {
  background: #b71c1c;
  animation: rec-puls 1.2s infinite;
}

@keyframes rec-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(211, 47, 47, 0); }
}

.rec-zeit {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}

.aufnahme-status {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.2rem;
  margin-top: 0.3rem;
}

.aufnahme-status.fehler {
  color: #c62828;
}

.aufnahme-pan {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-weight: 700;
  color: var(--heading);
}

.aufnahme-pan input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: #8e44ad;
}

.aufnahme-pan span {
  min-width: 3.2rem;
  text-align: right;
  color: var(--muted);
}

.aufnahme-ergebnis {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.rec-fertig {
  font-weight: 700;
  color: #2e7d32;
}
