/* Fotobuch – ruhig, Werkstatt-Notizbuch: Tannengrün als Akzent, Bernstein für offene Probleme */
:root {
  --papier: #f6f5f1; --flaeche: #ffffff; --tinte: #1e2522; --leise: #5f6a65; --linie: #dfe2dd;
  --akzent: #2d4a3e; --akzent-hell: #e3ece7; --offen: #b9741a; --offen-hell: #faefdd; --geloest: #2f7a50; --geloest-hell: #e1f1e7;
  --schrift: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-theme="dark"] {
  --papier: #121614; --flaeche: #1b211e; --tinte: #e4ebe7; --leise: #9aa7a0; --linie: #2b3430;
  --akzent: #8fc6ad; --akzent-hell: #1f2e28; --offen: #e6a54e; --offen-hell: #33281a; --geloest: #79c99b; --geloest-hell: #1c2e23;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--schrift); font-size: 17px; line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top, 0px)) 16px .6rem;
  background: var(--akzent); color: #fff; }
:root[data-theme="dark"] .kopf { background: #1f3a2f; }
.kopf h1 { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zurueck, .rund { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 999px; min-width: 2.4rem; height: 2.4rem; font-size: 1.3rem; cursor: pointer; }
main { max-width: 46rem; margin: 0 auto; padding: 1rem 16px calc(5rem + env(safe-area-inset-bottom, 0px)); }
.liste { display: grid; gap: .6rem; }
.karte { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px;
  padding: .75rem .9rem; cursor: pointer; }
.karte .vorschau { width: 3.4rem; height: 3.4rem; flex: 0 0 auto; border-radius: 8px; background: var(--akzent-hell) center/cover no-repeat; display: grid; place-items: center; color: var(--akzent); font-size: 1.3rem; }
.karte .inhalt { flex: 1; min-width: 0; }
.karte b { display: block; font-size: 1.02rem; }
.karte small { color: var(--leise); }
.punkt { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .1rem .55rem; }
.punkt.offen { background: var(--offen-hell); color: var(--offen); }
.punkt.geloest { background: var(--geloest-hell); color: var(--geloest); }
.punkt.info { background: var(--akzent-hell); color: var(--akzent); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 10px; padding: .7rem 1rem; background: var(--akzent); color: #fff; font-weight: 700; cursor: pointer; }
:root[data-theme="dark"] .knopf { color: #10201a; }
.knopf.zweit { background: var(--flaeche); color: var(--tinte); border: 1px solid var(--linie); }
.leise { border: 0; background: none; color: var(--leise); text-decoration: underline; cursor: pointer; padding: .3rem; }
.zeile { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.feld { display: grid; gap: .3rem; margin: 1rem 0; }
.feld label { font-weight: 700; font-size: .9rem; color: var(--leise); }
textarea, input[type=text], input[type=password] { width: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .65rem .75rem; }
textarea { min-height: 5.5rem; resize: vertical; }
.status { display: flex; gap: .4rem; }
.status button { flex: 1; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px; padding: .6rem; font-weight: 700; cursor: pointer; }
.status button[aria-pressed="true"].offen { background: var(--offen-hell); color: var(--offen); border-color: var(--offen); }
.status button[aria-pressed="true"].geloest { background: var(--geloest-hell); color: var(--geloest); border-color: var(--geloest); }
.gespeichert { font-size: .85rem; color: var(--leise); min-height: 1.2em; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .4rem; margin: .6rem 0; }
.fotos button { aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; background: var(--akzent-hell) center/cover no-repeat; cursor: pointer; position: relative; }
.fotos button .t { position: absolute; left: 0; right: 0; bottom: 0; font-size: .7rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: .5rem .3rem .2rem; text-align: left; border-radius: 0 0 8px 8px; }
.ablage { border: 2px dashed var(--linie); border-radius: 12px; padding: 1rem; text-align: center; color: var(--leise); margin: .6rem 0; }
.ablage.drueber { border-color: var(--akzent); background: var(--akzent-hell); }
.fortschritt { font-size: .9rem; color: var(--akzent); }
.leer { color: var(--leise); text-align: center; padding: 2rem 0; }
.pin { max-width: 20rem; margin: 3rem auto; display: grid; gap: .8rem; text-align: center; }
.pin input { text-align: center; font-size: 1.6rem; letter-spacing: .4em; }
.fehler { color: #b3261e; }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: calc(100% - 9rem); object-fit: contain; }
.lb-zu { position: absolute; top: calc(.6rem + env(safe-area-inset-top, 0px)); right: .6rem; }
.lb-zu, .lb-pfeil { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 999px; width: 2.6rem; height: 2.6rem; font-size: 1.4rem; cursor: pointer; }
.lb-pfeil { position: absolute; top: 45%; }
.lb-pfeil.links { left: .5rem; } .lb-pfeil.rechts { right: .5rem; }
.lb-fuss { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom, 0px)); background: rgba(0,0,0,.6); }
.lb-fuss textarea { min-height: 2.6rem; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.lb-knoepfe { display: flex; justify-content: space-between; align-items: center; color: #ccc; font-size: .8rem; margin-top: .3rem; }
.lb-knoepfe .leise { color: #ccc; }
.meldung { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--tinte); color: var(--papier);
  padding: .6rem 1rem; border-radius: 10px; max-width: calc(100% - 32px); }
.unten { position: fixed; left: 0; right: 0; bottom: 0; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--papier); border-top: 1px solid var(--linie); display: flex; gap: .5rem; justify-content: center; }
.unten .knopf { flex: 1; max-width: 22rem; }
.pfad { font-size: .85rem; color: var(--leise); margin: 0 0 .7rem; }
.pfad a { color: var(--akzent); text-decoration: none; }
.dateien { display: grid; gap: .35rem; margin: .3rem 0 .6rem; }
.datei { display: flex; align-items: center; gap: .6rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .5rem .7rem; }
.datei a { flex: 1; min-width: 0; color: var(--tinte); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei small { color: var(--leise); white-space: nowrap; }
select { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .25rem .4rem; }
