:root {
  --bg: #f5f6f8; --karte: #fff; --text: #1d2330; --leise: #5f6b7a; --rand: #d9dde3;
  --akzent: #1d4ed8; --akzent-text: #fff; --ok: #e7f6ec; --ok-rand: #2f9e55; --warn: #fff6e0; --warn-rand: #d99a00;
  --fehler: #fdecec; --fehler-rand: #d33; --info: #eaf2fd; --info-rand: #3b7dd8;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --bg: #14171c; --karte: #1d2229; --text: #e6e9ee; --leise: #9aa4b1; --rand: #343b45;
    --akzent: #60a5fa; --akzent-text: #14171c; --ok: #15301f; --warn: #33290f; --fehler: #3a1818; --info: #16253a;
  }
}
/* Hell/Dunkel aus den Einstellungen: gilt statt der Systemeinstellung (z. B. im Web MIDI Browser, der immer hell ist) */
:root[data-thema="dunkel"] {
  --bg: #14171c; --karte: #1d2229; --text: #e6e9ee; --leise: #9aa4b1; --rand: #343b45;
  --akzent: #60a5fa; --akzent-text: #14171c; --ok: #15301f; --warn: #33290f; --fehler: #3a1818; --info: #16253a; color-scheme: dark;
}
:root[data-thema="hell"] { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--akzent); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; }
small { color: var(--leise); display: block; margin-top: .3rem; }

.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: var(--karte); border-bottom: 1px solid var(--rand); position: sticky; top: 0; z-index: 5; }
.marke { font-weight: 700; text-decoration: none; color: var(--text); }
.leiste nav { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; }
.leiste nav a { padding: .35rem .6rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.leiste nav a.aktiv, .leiste nav a:hover { background: var(--bg); color: var(--akzent); }
.abmelden { display: flex; align-items: center; gap: .5rem; color: var(--leise); }
.menue-knopf { display: none; }
@media (max-width: 700px) { /* Handy: Menü hinter ☰, aufgeklappt untereinander mit großen Tippflächen */
  .leiste { padding: .5rem .8rem; }
  .menue-knopf { display: inline-block; margin-left: auto; padding: .45rem .8rem; color: var(--text); }
  .leiste:not(.offen) nav, .leiste:not(.offen) .abmelden { display: none; }
  .leiste nav { flex-basis: 100%; flex-direction: column; }
  .leiste nav a { padding: .75rem .6rem; border-bottom: 1px solid var(--rand); border-radius: 0; }
  .abmelden { flex-basis: 100%; justify-content: space-between; padding: .2rem .6rem .3rem; }
}
.inhalt { max-width: 1150px; margin: 0 auto; padding: 1rem; }
.hinweisleiste { padding: .6rem 1rem; background: var(--warn); border-bottom: 2px solid var(--warn-rand); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 1rem; margin: 0 0 1rem; }
.karte.schmal { max-width: 380px; }
details.karte summary, details summary { cursor: pointer; font-weight: 600; }
.tabelle-rahmen { overflow-x: auto; }

label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: var(--leise); margin-bottom: .6rem; }
label.haken { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); }
input, select, textarea, button, .knopf { font: inherit; color: var(--text); }
input, select, textarea { width: 100%; padding: .45rem .55rem; border: 1px solid var(--rand); border-radius: 6px; background: var(--karte); }
input[type=checkbox], input[type=radio] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
button, .knopf { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--rand); border-radius: 6px; background: var(--karte); cursor: pointer; text-decoration: none; }
button:hover, .knopf:hover { border-color: var(--akzent); }
.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); font-weight: 600; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.raster .breit { grid-column: 1 / -1; }
.kopfdaten summary { margin-bottom: .2rem; }
.kopfdaten[open] summary { margin-bottom: .8rem; }
#kopf-kurz { font-weight: 400; color: var(--leise); }

.meldung { padding: .7rem .9rem; border-radius: 8px; border-left: 4px solid; margin: 0 0 1rem; }
.meldung.ok { background: var(--ok); border-color: var(--ok-rand); }
.meldung.warnung { background: var(--warn); border-color: var(--warn-rand); }
.meldung.fehler { background: var(--fehler); border-color: var(--fehler-rand); }
.meldung.info { background: var(--info); border-color: var(--info-rand); }

table.liste { width: 100%; border-collapse: collapse; }
table.liste th, table.liste td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
table.liste th { color: var(--leise); font-weight: 600; font-size: .85rem; }
table.liste form { margin: 0 0 .3rem; }

/* ---------- Song-Formular ---------- */
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.5; }
.hilfe { margin: 0 0 1rem; color: var(--leise); }
.hilfe code, .hilfe li { color: var(--text); }
.gefahr { border-color: var(--fehler-rand); color: var(--fehler-rand); }
.werkzeug { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.blaettern { margin-left: auto; display: flex; gap: .25rem; } /* ‹ › zum Nachbar-Song, dezent am Ende der Leiste */
.blaettern .knopf { padding: .5rem .75rem; }
.blaettern .aus { opacity: .3; cursor: default; }

/* ---------- Editor: Teil-Karten links, Vorschau rechts (schmal: untereinander) ---------- */
.editor { display: grid; grid-template-columns: minmax(330px, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.editor .vorschau { position: sticky; top: 4rem; }
@media (max-width: 900px) { .editor { grid-template-columns: minmax(0, 1fr); } .editor .vorschau { position: static; } }
.teilkarte, table.teiltypen { --blau: #0062cc; --hellblau: #0284c7; --tuerkis: #0f766e; --gruen: #008a2e; --oliv: #5f7a0a; --gelb: #a16207; --orange: #e05a00; --rot: #cc0000; --pink: #db2777; --lila: #7c3aed; --braun: #8b5a2b; --schwarz: var(--text); --grau: #888; }
.teilkarte { --farbe: var(--grau);
  background: var(--karte); border: 1px solid var(--rand); border-left: 6px solid var(--farbe); border-radius: 8px; padding: .6rem; margin: 0 0 .7rem; }
.kartenkopf { display: grid; grid-template-columns: 8.5em 3.2em 2.8em minmax(0, 1fr) minmax(0, 1fr); gap: .4rem; margin-bottom: .4rem; }
.kartenkopf select { color: var(--farbe); font-weight: 700; }
.teilkarte textarea { resize: vertical; }
.kartenknoepfe { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.kartenknoepfe button { padding: .3rem .7rem; }
.sonderkopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sonderkopf select { width: auto; } .sonderkopf .haken { margin: 0; }
.vorschaubild { display: block; max-width: 100%; max-height: 14rem; margin-top: .4rem; border: 1px solid var(--rand); }
table.teiltypen .typname { color: var(--farbe); } table.teiltypen select { width: auto; } form.teiltypen-form { max-width: 34rem; } table.teiltypen small { display: inline; margin: 0; }
.formzeichen { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .3rem; }
.formzeichen button { padding: .15rem .5rem; font-size: .85rem; min-width: 2.2em; }
.pruefung .hinweis { margin: .35rem 0 0; padding: .3rem .5rem; border-radius: 6px; background: var(--fehler); font-size: .9rem; }
.pruefung .hinweis button { padding: .15rem .6rem; margin-left: .3rem; }

/* ---------- A4-Blatt (Darstellung aus notation.js) ---------- */
.blatt-rahmen { overflow: hidden; }
.blatt {
  --papier: #fff; --tinte: #111; --leise-blatt: #555; --strich: #b8c0cc; --kopf: #eef2f6; --punkt: #e0007a;
  --blau: #0062cc; --hellblau: #0284c7; --tuerkis: #0f766e; --gruen: #008a2e; --oliv: #5f7a0a; --gelb: #a16207; --orange: #e05a00; --rot: #cc0000; --pink: #db2777; --lila: #7c3aed; --braun: #8b5a2b; --schwarz: #111; --grau: #555; --falsch: #ffe1e1; --wdh: #b45309;
  width: 210mm; height: 297mm; padding: 8mm 9mm; margin: 0 auto; background: var(--papier); color: var(--tinte);
  box-shadow: 0 3px 20px #0003; font: 800 var(--gr, 18px)/1.15 Arial, Helvetica, sans-serif;
}
.blatt.dunkel {
  --papier: #121316; --tinte: #f4f6f8; --leise-blatt: #a6adb8; --strich: #454b55; --kopf: #23262c; --punkt: #ff4fb0;
  --blau: #4db8ff; --hellblau: #7dd3fc; --tuerkis: #2dd4bf; --gruen: #4ade80; --oliv: #bef264; --gelb: #facc15; --orange: #fb923c; --rot: #ff5c5c; --pink: #f472b6; --lila: #b9a2ff; --braun: #d6a777; --schwarz: #f4f6f8; --grau: #b0b6bf; --falsch: #4a1d1d; --wdh: #ffa53d;
}
.blatt-inhalt.textansicht { overflow-y: auto; } /* Sänger mit größerer Textgröße scrollen */
.blatt-inhalt { height: 100%; overflow: hidden; display: flex; flex-direction: column; gap: .45em; }
.songkopf { background: var(--kopf); border-radius: .3em; padding: .3em .6em; text-align: center; }
.songtitel { font-size: 1.45em; line-height: 1.1; }
.songinfo { font-size: .62em; font-weight: 600; color: var(--leise-blatt); margin-top: .15em; }
.teil { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: .5em; break-inside: avoid; --farbe: var(--grau); }
.farbe-blau { --farbe: var(--blau); }
.farbe-hellblau { --farbe: var(--hellblau); }
.farbe-tuerkis { --farbe: var(--tuerkis); }
.farbe-gruen { --farbe: var(--gruen); }
.farbe-oliv { --farbe: var(--oliv); }
.farbe-gelb { --farbe: var(--gelb); }
.farbe-orange { --farbe: var(--orange); }
.farbe-rot { --farbe: var(--rot); }
.farbe-pink { --farbe: var(--pink); }
.farbe-lila { --farbe: var(--lila); }
.farbe-braun { --farbe: var(--braun); }
.farbe-schwarz { --farbe: var(--schwarz); }
.farbe-grau { --farbe: var(--grau); }
.namen-de .teil { grid-template-columns: 5.2em minmax(0, 1fr); } /* BRIDGE, ABSCHL */
.teilname { color: var(--farbe); border-right: .22em solid var(--farbe); font-size: .85em; font-weight: 900; padding-right: .3em; overflow-wrap: anywhere; cursor: default; }
.teilsound, .teilplatz { display: block; font-size: .6em; font-weight: 700; color: var(--leise-blatt); line-height: 1.15; }
.zeilen { display: flex; flex-direction: column; gap: .1em; min-width: 0; }
.reihe { display: grid; grid-template-columns: repeat(var(--spalten, 4), minmax(0, 1fr)) 2.2em; align-items: stretch; }
.takt { display: flex; align-items: flex-end; min-width: 0; border-left: 1px solid var(--strich); padding: 0 .3em; }
.reihe > .takt:nth-last-child(2) { border-right: 1px solid var(--strich); }
.takt.falsch { background: var(--falsch); outline: 2px solid var(--rot); outline-offset: -2px; cursor: help; }
.schlag { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.punkte { display: flex; gap: .18em; height: .42em; align-items: center; }
.punkte i { width: .26em; height: .26em; border-radius: 50%; background: var(--punkt); }
.akkord { align-self: flex-start; color: var(--farbe); font-size: 1.2em; white-space: nowrap; letter-spacing: -.01em; }
.akkord .zusatz { font-size: .6em; vertical-align: .55em; margin-left: .03em; }
.akkord .bass { font-size: .8em; }
.schlag.unbekannt .akkord { text-decoration: underline wavy var(--rot); }
.prozent { color: var(--leise-blatt); font-size: 1.2em; font-weight: 400; }
.wdh { color: var(--wdh); font-size: .95em; text-align: right; align-self: center; }
/* Etappe 3: Form-Zeichen */
.takt { position: relative; }
.reihe.mit-oben > .takt { padding-top: .75em; }
.oben-links, .oben-rechts { position: absolute; top: 0; font-size: .5em; font-weight: 700; line-height: 1.1; white-space: nowrap; display: flex; gap: .35em; color: var(--tinte); }
.oben-links { left: .35em; } .oben-rechts { right: .35em; }
.symbol { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Music", serif; font-size: 2.3em; font-weight: 400; line-height: .55; }
.oben-links .sound, .oben-rechts .sound { border: 1px solid currentColor; border-radius: .25em; padding: 0 .25em; }
.ansage { font-style: italic; }
.takt.volta { border-top: 1px solid var(--tinte); }
.takt.wa { border-left: .26em double var(--tinte); }
.reihe > .takt.we { border-right: .26em double var(--tinte); }
.takt.wa::before, .takt.we::after { content: ':'; position: absolute; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--tinte); }
.takt.wa::before { left: .05em; } .takt.we::after { right: .05em; }
.takt.wa { padding-left: .55em; } .takt.we { padding-right: .55em; }
.formzeichen button.an { background: #d32f2f; border-color: #d32f2f; color: #fff; } /* Keyboard hört zu */
.ist-original { color: var(--ok-rand); font-weight: 700; }
.halbton { display: inline-flex; gap: .25rem; margin-left: .3rem; vertical-align: middle; }
.halbton button { padding: .15em .55em; min-width: 2.2em; font-size: 1rem; line-height: 1.2; }
svg.noten { display: block; max-width: 100%; height: auto; overflow: visible; margin: .1em 0 .2em; }
svg.noten line { stroke: currentColor; stroke-width: .8; }
svg.noten .linie { stroke-width: .6; opacity: .7; }
svg.noten ellipse { fill: currentColor; }
svg.noten .vz path { fill: none; stroke: currentColor; }
svg.noten text { fill: currentColor; font-size: 12px; }
svg.noten .schluessel { font-size: 40px; }
svg.noten .oktave { font-size: 8px; font-weight: 700; fill: var(--leise-blatt); }
svg.noten .falsch { fill: #d32f2f; font-size: 10px; }
.stuetze { font-size: .62em; color: var(--leise-blatt); font-style: italic; }
.reihe.stuetzen > .stuetze { padding: 0 .48em; min-width: 0; }
div.ansage { font-size: .7em; font-weight: 700; text-align: right; padding-right: 2.6em; }
.teilwdh { color: var(--wdh); margin-left: .25em; white-space: nowrap; display: inline-block; }
.teilwechsel { margin-left: .4em; white-space: nowrap; display: inline-block; font-weight: 600; }
.teil.sonder { display: block; }
.teil.sonder.ablauf { display: flex; } /* sonst gewinnt block: keine Umbruchstellen, ein langer Ablauf verkleinert das ganze Blatt */
/* Schlagzeuger-Ansicht: ein großer roter Punkt blinkt auf jedem Schlag; im 3/4 je Schlag eine Farbe, darunter 1 2 3 */
.taktblinker { display: flex; flex-direction: column; align-items: center; gap: .4em; margin: 1em 0; font-size: 1.2em; color: var(--leise-blatt); }
.taktblinker .schlag { flex: none; width: 4em; height: 4em; border-radius: 50%; background: #c62828; opacity: .15;
  animation: taktblink var(--schlag) steps(1, end) infinite; }
.taktblinker .schlag.drei { animation: taktblink var(--schlag) steps(1, end) infinite, taktfarbe3 calc(var(--schlag) * 3) steps(1, end) infinite; }
.taktzahlen { display: flex; gap: 1em; font-size: 1.4em; font-weight: 700; }
.taktzahlen span { opacity: .25; animation: taktzahl calc(var(--schlag) * 3) steps(1, end) calc(var(--schlag) * var(--k)) infinite; }
@keyframes taktblink { 0% { opacity: 1; } 25% { opacity: .15; } }
@keyframes taktfarbe3 { 0% { background: #c62828; } 33.333% { background: #1565c0; } 66.667% { background: #2e7d32; } }
@keyframes taktzahl { 0% { opacity: 1; } 33.333% { opacity: .25; } }
.notiz { color: var(--farbe); font-size: .85em; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.25; }
.notiz.n-klein { font-size: .65em; } .notiz.n-gross { font-size: 1.15em; } .notiz.n-fett { font-weight: 800; }
.notiz.n-mitte { text-align: center; } .notiz.n-rechts { text-align: right; }
.bildteil { text-align: center; }
.ablauf { display: flex; flex-wrap: wrap; gap: .25em; align-items: baseline; font-size: .7em; font-weight: 800; }
.ablauf-name { color: var(--leise-blatt); margin-right: .2em; }
.ablauf-teil { color: var(--farbe); border: .12em solid var(--farbe); border-radius: .3em; padding: 0 .3em; white-space: nowrap; }
.bildteil img { width: 21em; max-width: 100%; height: auto; vertical-align: top; background: #fff; }
.blatt.dunkel .bildteil img { filter: invert(1) hue-rotate(180deg); } /* Noten-Screenshots: weißes Papier wird dunkel */
.fusszeile { margin-top: auto; font-size: .62em; color: var(--leise-blatt); border-top: 1px solid var(--strich); padding-top: .25em; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .leiste, .hinweisleiste, .werkzeug, .meldung, h1, .nicht-drucken { display: none !important; }
  .editor { display: block; }
  .inhalt { padding: 0; max-width: none; }
  .blatt { box-shadow: none; margin: 0; zoom: 1 !important; break-after: page; }
  body:has(.blatt.dunkel) { background: #121316; } /* Dunkel wird auch dunkel gedruckt, ohne weißen Rand */
  .blatt, .blatt * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Bands ---------- */
fieldset.bands { border: 1px solid var(--rand); border-radius: 8px; margin: 0 0 .8rem; padding: .4rem .8rem; display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
fieldset.bands legend { color: var(--leise); font-size: .9rem; padding: 0 .3rem; }
fieldset.bands label.haken { margin: .3rem 0; }
.leise { color: var(--leise); }
form.rechts { margin-top: .6rem; text-align: right; }
td.rechts { text-align: right; white-space: nowrap; }

/* Songliste: Suche und Filter */
.filterleiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.filterleiste input[type=search] { flex: 1 1 14rem; width: auto; }
.filterleiste select { width: auto; }

/* Import und Setlists */
.import-text { white-space: pre-wrap; font-size: .85em; max-height: 16rem; overflow: auto; background: var(--bg); border: 1px solid var(--rand); padding: .4rem; margin: .3rem 0 0; }
.setlist-reihe { list-style: none; margin: 0 0 1rem; padding: 0; }
.setlist-reihe li { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--rand); border-top: 0; background: var(--karte); cursor: grab; }
.setlist-reihe li:first-child { border-top: 1px solid var(--rand); }
.setlist-reihe li > span:first-child, .setlist-reihe li > input { flex: 1; }
.setlist-reihe li.set-trenner { font-weight: 700; border-top: 2px solid var(--text); }
.setlist-reihe li.zieht { opacity: .4; }
.setlist-reihe li button { padding: .1rem .5rem; }
.blattfolge .blatt-rahmen { margin-bottom: 1.5rem; }

/* Songliste: Filter hinter dem Filter-Knopf */
.filterwahl { position: relative; }
.filterwahl > summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; }
.filterwahl > summary::-webkit-details-marker { display: none; }
.filterfelder { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-top: .5rem; padding: .6rem; border: 1px solid var(--rand); background: var(--karte); }
.filterfelder label { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.filterwahl[open] { flex-basis: 100%; }

dialog { border: 1px solid var(--rand); border-radius: 10px; background: var(--karte); color: var(--text); max-width: min(32rem, 92vw); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.live-notiztext { white-space: normal; }

/* Live-Modus: nur das aktuelle Blatt, so groß wie der Bildschirm erlaubt. Eigene Farben, die dem Hell/Dunkel-Knopf folgen
   (nicht dem System), ruhige Knöpfe ohne Rahmen, Bernstein als Akzent: Fortschritt, Live-Notiz, aktueller Song. */
body.livemodus { --l-bg: #fff; --l-leiste: #f4f5f7; --l-text: #1d2330; --l-leise: #6b7685; --l-rand: rgba(0, 0, 0, .08);
  --l-hover: rgba(0, 0, 0, .06); --l-akzent: #b45309; --l-akzent-weich: rgba(180, 83, 9, .12); background: var(--l-bg); }
body.livemodus.dunkel-live { --l-bg: #111317; --l-leiste: #181b21; --l-text: #e8eaee; --l-leise: #8b95a3; --l-rand: rgba(255, 255, 255, .07);
  --l-hover: rgba(255, 255, 255, .08); --l-akzent: #fbbf24; --l-akzent-weich: rgba(251, 191, 36, .14); }
body.livemodus .leiste, body.livemodus .hinweisleiste, body.livemodus h1 { display: none; }
body.livemodus .inhalt { padding: 0; max-width: none; }
#blaetter.live .blatt-rahmen { display: none; }
#blaetter.live .blatt-rahmen.aktiv { display: block; }
#blaetter.live .blatt { box-shadow: none; }
/* iPad: schnelles Doppeltippen (zweimal weiter) zoomt nicht und markiert keinen Text; Zwei-Finger-Zoom bleibt */
html { touch-action: manipulation; }
body.livemodus { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.setpause { text-align: center; padding: 3rem 1rem; }
.setpause h2 { font-size: 3em; letter-spacing: .1em; margin: 0 0 .5em; }
.setpause p { font-size: 1.2em; margin: .3em 0; }
.setpause .tafel { display: grid; grid-template-columns: auto auto; justify-content: center; gap: .3em 1.2em; margin: 1em auto; font-size: 1.05em; text-align: left; }
.setpause .tafel dt { opacity: .65; }
.setpause .tafel dd { margin: 0; font-weight: 600; white-space: nowrap; }
.deckblatt h2 { letter-spacing: 0; }
.setpause .hinweis { font-size: 1em; font-style: italic; }
.setpause .unten { margin-top: 3em; font-size: 1em; }
.verlauf summary { cursor: pointer; font-weight: 600; }
tr:target td { background: var(--markiert, #fde68a55); } /* zurück aus Song oder Editor: hier war ich */
tr[id] { scroll-margin-top: 30vh; }
.livebar, .livefuss, .live-liste { background: var(--l-leiste); color: var(--l-text); }
.livebar { position: relative; display: flex; align-items: center; gap: .15rem .3rem; flex-wrap: wrap; padding: .3rem .5rem; }
.livebar::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--fortschritt, 0%); background: var(--l-akzent); border-radius: 0 3px 3px 0; transition: width .3s; }
.livebar button, .livebar .knopf, .livefuss button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 2.6rem; height: 2.6rem;
  padding: 0 .55rem; border: 0; border-radius: 999px; background: transparent; color: var(--l-text); }
.livebar button:hover, .livebar .knopf:hover, .livefuss button:hover:not(:disabled) { background: var(--l-hover); }
.livebar button:disabled, .livefuss button:disabled { opacity: .3; cursor: default; }
@media (max-width: 560px) { /* Handy: Live-Leiste bleibt einzeilig */
  .livebar { flex-wrap: nowrap; padding: .3rem .25rem; }
  .livebar button, .livebar .knopf { min-width: 2.1rem; padding-left: .25rem; padding-right: .25rem; font-size: .9rem; }
  .livebar #live-rest { display: none; }
}
.livebar #live-titel { flex: 1 1 8rem; min-width: 0; font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-zahl { display: inline-block; margin-right: .45rem; padding: .05rem .5rem; border-radius: 999px; background: var(--l-akzent-weich); color: var(--l-akzent);
  font-size: .8rem; font-variant-numeric: tabular-nums; vertical-align: .1em; }
.live-zeit { display: flex; flex-direction: column; line-height: 1.15; padding: 0 .4rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
#live-uhr { font-weight: 700; font-size: 1.1rem; }
#live-rest { font-size: .72rem; color: var(--l-leise); }
.livefuss { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-top: 1px solid var(--l-rand); z-index: 10; }
.livefuss button { height: 3.2rem; max-width: 30%; padding: 0 1rem; font-size: 1.7rem; line-height: 1; background: var(--l-hover); }
.livefuss button small { display: block; margin: 0; font-size: .8rem; color: var(--l-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#live-notiz { flex: 1; text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--l-akzent); max-height: 2.9em; overflow: hidden; }
.live-liste { position: fixed; left: 0; width: min(24rem, 92vw); overflow: auto; border-radius: 0 14px 14px 0; box-shadow: 8px 0 30px rgba(0, 0, 0, .3); z-index: 20; }
.live-liste table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.live-liste th, .live-liste td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid var(--l-rand); }
.live-liste thead th { color: var(--l-leise); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.live-liste td:nth-child(n+3), .live-liste td:first-child { color: var(--l-leise); white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-liste tbody tr { cursor: pointer; }
.live-liste tbody tr:hover { background: var(--l-hover); }
.live-liste tr.aktiv { background: var(--l-akzent-weich); font-weight: 700; box-shadow: inset 3px 0 var(--l-akzent); }
.live-liste tr.set th { color: var(--l-akzent); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .9rem; }
#live-midiknopf { font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
#live-midiknopf.midi-an { color: var(--l-akzent); }
.midi-lernen { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.midi-lernen span { flex: 1; }
.offline-stand { font-size: .8rem; color: var(--ok-rand); white-space: nowrap; background: none; border: 0; padding: .3rem .4rem; }
#live-sync.an { background: var(--ok-rand); border-color: var(--ok-rand); color: #fff; } /* Mitfolgen an */
.mitglied { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; }
.mitglied select { width: auto; }
.hilfe.liedtext textarea { width: 100%; }
.privatnotiz { white-space: pre-line; font-size: .7em; border-left: .3em solid var(--punkt); padding: .2em .6em; }
.liedteil .teilname { font-size: .55em; } /* Text-Ansicht: der Text zählt, der Teil nur als Hinweis */
.laeuft { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .5rem 1rem; background: var(--ok-rand); color: #fff; font-weight: 600; }
.laeuft .knopf { padding: .3rem .8rem; }
.liedzeilen { white-space: pre-line; font-size: .8em; line-height: 1.35; padding: .1em .3em; }
option.drin { color: var(--leise); }

/* MIDI-Raster: 4×4 Felder in Fantom-Farben */
.midi-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; max-width: 48rem; }
.midi-raster .pad { min-height: 5.5rem; margin: 0; border: 2px solid var(--pad); border-radius: 10px; background: color-mix(in srgb, var(--pad) 85%, #000);
  color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .25rem; padding: .4rem; text-align: center; overflow-wrap: anywhere; }
.pad-rot { --pad: #e53935; } .pad-orange { --pad: #fb8c00; } .pad-gelb { --pad: #fdd835; } .pad-gruen { --pad: #43a047; } .pad-tuerkis { --pad: #00acc1; }
.pad-blau { --pad: #1e88e5; } .pad-lila { --pad: #8e24aa; } .pad-pink { --pad: #d81b60; } .pad-weiss { --pad: #e0e0e0; }
.midi-raster button.pad-gelb, .midi-raster button.pad-weiss { color: #111; }
.midi-raster button.pad:disabled { opacity: .35; }
.midi-raster button.pad:active { filter: brightness(1.3); }
.midi-raster fieldset.pad { align-items: stretch; background: color-mix(in srgb, var(--pad) 30%, var(--karte)); color: var(--text); }
.midi-raster fieldset.pad legend { font-size: .8rem; font-weight: 700; padding: 0 .3rem; }
.midi-raster fieldset.pad select { width: 100%; min-width: 0; }
.pad-keine { --pad: #4b5563; }
.midi-raster .pad small { color: inherit; opacity: .8; margin: 0; }
table.befehle input, table.befehle select { width: 100%; min-width: 7rem; }
.midi-raster + .werkzeug { margin-top: .6rem; }
