/* Weboberfläche des Liederbuchs — ruhig, papierartig, zum Arbeiten am
 * großen Bildschirm. Die Liedansicht selbst kommt aus /lib/ansicht.css. */

:root {
  --papier: #faf6f0;
  --karte: #fff;
  --text: #1f1a16;
  --leise: #7a6f66;
  --akzent: #b4541f;
  --rand: #e6ddd2;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #16130f;
    --karte: #1e1a16;
    --text: #ece5dc;
    --leise: #9a8e82;
    --akzent: #e08a4e;
    --rand: #322b24;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--akzent); }

.kopf {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: .9rem 1.4rem;
  border-bottom: 1px solid var(--rand);
  background: var(--karte);
}

.marke { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); }
.kopf nav { display: flex; gap: 1.1rem; }
.kopf nav a { text-decoration: none; font-size: .93rem; color: var(--leise); }
.kopf nav a:hover { color: var(--akzent); }

.inhalt { max-width: 62rem; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }
/* Lesen will schmale Spalten, Arbeiten will Platz: der Editor darf den
 * Bildschirm ausnutzen, die Liedansicht bleibt bei 62rem. */
.inhalt.weit { max-width: min(110rem, 96vw); }
.fuss { text-align: center; color: var(--leise); font-size: .8rem; padding: 0 0 2rem; }

h1 { font-size: 1.5rem; margin: 0 0 .3rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .7rem; }

.leise { color: var(--leise); }
.klein { font-size: .87rem; }

/* ---- Formulare und Knöpfe ---------------------------------------------- */

input[type=text], input[type=password], input[type=number], input[type=url], textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 7px;
  padding: .5rem .65rem;
  width: 100%;
}
textarea { font-family: var(--mono); font-size: .88rem; line-height: 1.45; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }

label { display: block; font-size: .82rem; color: var(--leise); margin: 0 0 .25rem; }
.feld { margin: 0 0 .9rem; }
.reihe { display: flex; gap: .9rem; flex-wrap: wrap; }
.reihe > .feld { flex: 1 1 12rem; }

button, .knopf {
  font: inherit;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--rand);
  background: var(--karte);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .knopf:hover { border-color: var(--akzent); color: var(--akzent); }
button.haupt, .knopf.haupt {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}
button.haupt:hover, .knopf.haupt:hover { filter: brightness(1.08); color: #fff; }
button.still { border-color: transparent; background: none; color: var(--leise); }

.knopfreihe { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1.2rem 0 0; }
.schub { margin-left: auto; }

/* ---- Sammlung ----------------------------------------------------------- */

.suchleiste { display: flex; gap: .6rem; margin: 0 0 1.2rem; flex-wrap: wrap; }
.suchleiste input { flex: 1 1 16rem; }

.tagleiste { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.tag {
  font-size: .78rem;
  padding: .2rem .6rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  text-decoration: none;
  color: var(--leise);
  background: var(--karte);
}
.tag.an { background: var(--akzent); border-color: var(--akzent); color: #fff; }

.lieder { list-style: none; margin: 0; padding: 0; }
.lieder li { border-bottom: 1px solid var(--rand); }
.lieder a {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  padding: .7rem .2rem;
  text-decoration: none;
  color: var(--text);
}
.lieder a:hover { background: var(--karte); }
.lieder .titel { font-weight: 600; }
.lieder .wer { color: var(--leise); font-size: .9rem; }
.lieder .rechts { margin-left: auto; display: flex; gap: .5rem; align-items: baseline; }
.marke-tonart {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--leise);
  border: 1px solid var(--rand);
  border-radius: 4px;
  padding: 0 .35rem;
}
.kann { color: var(--akzent); font-size: .8rem; }

.leerhinweis {
  text-align: center;
  color: var(--leise);
  padding: 3rem 1rem;
  border: 1px dashed var(--rand);
  border-radius: 10px;
}

/* ---- Lied --------------------------------------------------------------- */

.liedkopf { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.liedkopf h1 { margin: 0; }
.liedkopf .wer { color: var(--leise); }

.leiste {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: .6rem .8rem;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 9px;
  margin: 0 0 1.4rem;
  position: sticky;
  top: 0;
  z-index: 5;
}
.leiste .gruppe { display: flex; gap: .3rem; align-items: center; }
.leiste .beschriftung { font-size: .74rem; color: var(--leise); margin-right: .2rem; }
.leiste button { padding: .3rem .6rem; font-size: .88rem; }
.leiste .wert { font-family: var(--mono); font-size: .88rem; min-width: 2.2rem; text-align: center; }

.lb-ansicht { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 1.4rem; }

.notizkarte {
  background: color-mix(in srgb, var(--akzent) 8%, transparent);
  border-left: 3px solid var(--akzent);
  padding: .7rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 1.2rem;
}

/* ---- Editor mit Vorschau ------------------------------------------------ */

.zweispalt { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 60rem) { .zweispalt { grid-template-columns: 1fr; } }
.zweispalt textarea { min-height: 32rem; }
.vorschau { position: sticky; top: 1rem; }
.vorschau h2 { margin-top: 0; }

.hilfe {
  font-size: .82rem;
  color: var(--leise);
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: .7rem .9rem;
  margin: .8rem 0 0;
}
.hilfe code { font-family: var(--mono); color: var(--akzent); }
.hilfe .beispiel {
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--papier);
  border: 1px solid var(--rand);
  border-radius: 7px;
  padding: .7rem .8rem;
  margin: .5rem 0 .9rem;
  overflow-x: auto;          /* lange Zeilen scrollen, statt die Seite zu dehnen */
}

/* ---- Akkordkarte als Überblendung -------------------------------------- */

.blatt-hinter {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 40;
}
.blatt {
  background: var(--karte);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  max-width: 30rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.blatt .zu { float: right; }

.meldung {
  padding: .7rem 1rem;
  border-radius: 8px;
  margin: 0 0 1.2rem;
  background: color-mix(in srgb, var(--akzent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--akzent) 30%, transparent);
}
.fehler { background: color-mix(in srgb, #c0392b 12%, transparent); border-color: #c0392b55; }

/* ---- Akkord-Nachschlagewerk -------------------------------------------- */

.akkordgitter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; }
.akkordgitter button { font-family: var(--mono); }

kbd {
  font-family: var(--mono);
  font-size: .8em;
  border: 1px solid var(--rand);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .05em .35em;
}

.token {
  font-family: var(--mono);
  font-size: .82rem;
  word-break: break-all;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 7px;
  padding: .6rem .7rem;
}
