:root {
  --bg: #f4efe6;
  --flaeche: #fffdf8;
  --flaeche-2: #efe7d8;
  --rand: #dcd0bb;
  --text: #2b241d;
  --text-2: #6b5d4e;
  --akzent: #8a4b2a;
  --akzent-hell: #f3e2d4;
  --ok: #3f7a4a;
  --warn: #a8641b;
  --gefahr: #a33a2c;
  --schatten: 0 1px 2px rgba(60, 40, 20, .08), 0 4px 14px rgba(60, 40, 20, .06);
  --radius: 8px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-titel: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1915; --flaeche: #26211b; --flaeche-2: #302920; --rand: #463c30;
    --text: #efe6d8; --text-2: #b3a48f; --akzent: #d99062; --akzent-hell: #3d2a1d;
    --ok: #7fbf8a; --warn: #e0a55a; --gefahr: #e27b6c;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--schrift); }
body.ohne-scroll { overflow: hidden; }
.hidden { display: none !important; }
a { color: var(--akzent); }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: normal; margin: 0 0 .6em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; color: var(--text-2); }
code { background: var(--flaeche-2); padding: 0 4px; border-radius: 3px; }
.klein { font-size: .85em; color: var(--text-2); }
.spacer { flex: 1; }
.leer { color: var(--text-2); padding: 2rem 0; }
.warnung { color: var(--warn); margin-left: .5em; }
.erfolg { color: var(--ok); font-weight: 600; }

/* ---------- Formularelemente ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--rand); border-radius: 6px; background: var(--flaeche);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
label { display: block; font-size: .85rem; color: var(--text-2); }
label > input, label > select, label > textarea { margin-top: 3px; font-size: .95rem; color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: .3em; padding: 6px 12px; border: 1px solid var(--rand);
  border-radius: 6px; background: var(--flaeche); cursor: pointer; text-decoration: none; color: var(--text);
  white-space: nowrap; font-size: .9rem; line-height: 1.3;
}
.btn:hover { background: var(--flaeche-2); }
.btn:disabled, .btn.disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--flaeche-2); }
.btn.danger { color: var(--gefahr); }
.link { display: inline; color: var(--akzent); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 340px; background: var(--flaeche); padding: 28px; border-radius: var(--radius); box-shadow: var(--schatten); display: grid; gap: 14px; }
.login-box h1 { font-size: 1.6rem; text-align: center; }
.fehler { color: var(--gefahr); min-height: 1.2em; margin: 0; }

/* ---------- Kopfleiste ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 8px 20px; background: var(--flaeche); border-bottom: 1px solid var(--rand);
}
.logo { font-family: var(--schrift-titel); font-size: 1.2rem; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--text-2); }
.topbar nav a:hover { background: var(--flaeche-2); }
.topbar nav a.aktiv { background: var(--akzent-hell); color: var(--akzent); }
.benutzer { color: var(--text-2); font-size: .9rem; }
main { padding: 20px; max-width: 1700px; margin: 0 auto; }

/* ---------- Liste ---------- */
.werkzeugleiste { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.werkzeugleiste input[type=search] { flex: 1 1 320px; }
.werkzeugleiste select { width: auto; }
.anzahl { color: var(--text-2); font-size: .9rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.karte {
  display: flex; flex-direction: column; background: var(--flaeche); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--schatten); text-decoration: none; color: inherit; transition: transform .12s;
}
.karte:hover { transform: translateY(-2px); }
.karte-bild { aspect-ratio: 3 / 2; background: var(--flaeche-2); display: grid; place-items: center; overflow: hidden; }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; }
.karte-bild span { color: var(--text-2); font-size: .85rem; }
.karte-text { padding: 10px 12px 12px; display: grid; gap: 3px; }
.karte-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.karte-zeile { color: var(--text-2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typ { color: var(--akzent); }
.badge { justify-self: start; margin-top: 4px; font-size: .75rem; padding: 1px 8px; border-radius: 10px; background: var(--flaeche-2); color: var(--text-2); }
.badge.teil { background: #f5e3c4; color: #7a4d12; }
.badge.voll { background: #d8ebd9; color: #2f5f37; }
@media (prefers-color-scheme: dark) {
  .badge.teil { background: #4a3719; color: #f0c98a; }
  .badge.voll { background: #203a25; color: #9fd6a8; }
}

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.ki { background: #e6def5; color: #4e3a7a; }
@media (prefers-color-scheme: dark) { .badge.ki { background: #352a4d; color: #c9b8f0; } }
.btn.aktiv { background: var(--akzent-hell); border-color: var(--akzent); color: var(--akzent); }

/* Auswahlmodus für Stapelverarbeitung */
.auswahlleiste {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 16px; padding: 10px 14px;
  background: var(--akzent-hell); border-radius: var(--radius);
}
.raster.auswahl .karte { cursor: pointer; position: relative; outline: 2px solid transparent; }
.raster.auswahl .karte::after {
  content: ''; position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 5px;
  background: rgba(255, 255, 255, .9); border: 2px solid var(--rand);
}
.raster.auswahl .karte.gewaehlt { outline-color: var(--akzent); }
.raster.auswahl .karte.gewaehlt::after { content: '✓'; background: var(--akzent); border-color: var(--akzent); color: #fff; text-align: center; line-height: 20px; font-weight: 700; }
.stapel-info { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 12px 16px; margin-bottom: 16px; display: grid; gap: 6px; }
.stapel-info .fortschritt { margin: 0; }
.stapel-info .btn { justify-self: start; }
.stapel-info.fertig { border-left: 4px solid var(--ok); }

/* KI im Editor */
.ki-banner {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  background: #eee8f8; color: #3d2f63; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px;
}
@media (prefers-color-scheme: dark) { .ki-banner { background: #2d2440; color: #d9ccf5; } }
.modal { position: fixed; inset: 0; z-index: 150; background: rgba(20, 15, 10, .55); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); width: min(760px, 100%); max-height: 90vh; overflow: auto; padding: 20px; display: grid; gap: 12px; }
.modal-box h3 { margin: 0; color: var(--text); }
.ki-hinweis { background: var(--bg); padding: 8px 12px; border-radius: 6px; margin: 0; font-size: .9rem; }
.ki-zeilen { display: grid; gap: 14px; }
.ki-zeile { display: grid; gap: 4px; }
.ki-alt { font-size: .82rem; color: var(--text-2); white-space: pre-wrap; }
.modal-knoepfe { display: flex; gap: 8px; align-items: center; position: sticky; bottom: -20px; background: var(--flaeche); padding: 10px 0 0; }

/* ---------- Editor ---------- */
.editor-kopf {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  position: sticky; top: 49px; z-index: 5; background: var(--bg); padding: 6px 0;
}
.editor-kopf h2 { margin: 0; font-size: 1.35rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { color: var(--text-2); font-size: .9rem; }
.speicherstatus { font-size: .85rem; color: var(--text-2); }
.speicherstatus.ok { color: var(--ok); }
.speicherstatus.offen { color: var(--warn); }
.speicherstatus.fehler { color: var(--gefahr); }

.editor { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.kopfdaten { background: var(--flaeche); padding: 16px; border-radius: var(--radius); box-shadow: var(--schatten); position: sticky; top: 106px; }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.felder .breit { grid-column: 1 / -1; }

.seite {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr); gap: 16px;
  background: var(--flaeche); padding: 14px; border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 16px;
}
.seite-bild { display: flex; flex-direction: column; gap: 8px; }
.seite-bild img { width: 100%; max-height: 560px; object-fit: contain; background: var(--flaeche-2); border-radius: 4px; cursor: zoom-in; }
.kein-bild { aspect-ratio: 3/2; display: grid; place-items: center; background: var(--flaeche-2); color: var(--text-2); border-radius: 4px; }
.bild-werkzeuge { display: flex; gap: 6px; flex-wrap: wrap; }
.seite-text { display: flex; flex-direction: column; gap: 10px; }
.seite-kopf { display: flex; align-items: center; gap: 6px; }
.seite-kopf select { width: auto; }
.seite-kopf .nr { font-family: var(--schrift-titel); font-size: 1.2rem; color: var(--text-2); }
.seite-text textarea[data-feld=transkription] { font-family: Georgia, serif; font-size: 1rem; line-height: 1.55; min-height: 220px; }

.dateiname { font-size: .82rem; color: var(--text-2); margin-top: -4px; }
.dateiname span { font-family: ui-monospace, Consolas, monospace; color: var(--text); user-select: all; }

/* Leseansicht (ohne Bearbeitungsrecht) */
.lesefeld span { display: block; font-size: .8rem; color: var(--text-2); }
.lesefeld div { white-space: pre-wrap; }
.lesetext { white-space: pre-wrap; font-family: Georgia, serif; font-size: 1.02rem; line-height: 1.6; background: var(--bg); padding: 12px 14px; border-radius: 6px; }
.seite-kopf strong { font-weight: 600; }
.checkbox { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text); font-size: .9rem; }
.checkbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); }
select.recht, select.recht-neu { width: auto; }
select.recht { font-weight: 600; color: var(--ok); }
select.recht.lesen { color: var(--text-2); font-weight: normal; }
.nur-lesen #lb-transkription, .nur-lesen #lb-beschreibung { background: var(--bg); }

.dropzone {
  border: 2px dashed var(--rand); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-2); background: var(--flaeche);
}
.dropzone p { margin: .3em 0; }
.dropzone select { width: auto; }
.dropzone.ueber { border-color: var(--akzent); background: var(--akzent-hell); }
.dropzone.laedt { opacity: .6; pointer-events: none; }

/* ---------- Vollbild ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 1fr 440px; background: #14110e; }
.lb-bild { position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.lb-bild.zieht { cursor: grabbing; }
.lb-bild img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; max-width: none; }
.lb-panel { background: var(--flaeche); display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow: auto; }
.lb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lb-kopf strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-nav { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.lb-werkzeuge { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hinweis { font-size: .78rem; color: var(--text-2); }
.lb-panel label:has(#lb-transkription) { flex: 1; display: flex; flex-direction: column; }
#lb-transkription { flex: 1; min-height: 240px; font-family: Georgia, serif; font-size: 1.02rem; line-height: 1.6; }

/* ---------- Import / Einstellungen ---------- */
.schmal { max-width: 860px; margin: 0 auto; }
.import-optionen { display: flex; gap: 16px; margin: 16px 0; }
.import-optionen label { width: 220px; }
.gruppen { max-height: 360px; overflow: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: 10px 10px 10px 42px; font-size: .88rem; }
.fortschritt { height: 8px; background: var(--flaeche-2); border-radius: 4px; overflow: hidden; margin: 12px 0; }
.fortschritt div { height: 100%; width: 0; background: var(--akzent); transition: width .3s; }
.block { background: var(--flaeche); padding: 18px; border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 18px; }
.formular { display: grid; gap: 10px; max-width: 360px; }
.formular.zeile { display: flex; max-width: none; margin-top: 12px; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rand); }
.tabelle th { font-size: .82rem; color: var(--text-2); font-weight: normal; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 6px; box-shadow: var(--schatten);
}
.toast.fehler { background: var(--gefahr); color: #fff; }

/* ---------- Navigation, Chips, Reiter ---------- */
.hauptnav .ico { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 12px; }
.chips:empty { display: none; }
.chip { border: 1px solid var(--akzent); background: var(--akzent-hell); color: var(--akzent); border-radius: 16px; padding: 3px 12px; cursor: pointer; font-size: .88rem; }
.tabs { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; background: var(--flaeche); }
.tabs > * { padding: 6px 14px; border: 0; background: none; color: var(--text-2); text-decoration: none; cursor: pointer; font: inherit; font-size: .9rem; }
.tabs > * + * { border-left: 1px solid var(--rand); }
.tabs > .aktiv { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
h3.abstand { margin-top: 1.2em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
label.inline select { width: auto; margin: 0; }

/* ---------- Ansicht ---------- */
.ansicht-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ansicht-raster { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.karussell {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  background: #1c1814; border-radius: var(--radius); aspect-ratio: 4 / 3; max-height: 78vh;
}
.karussell::-webkit-scrollbar { display: none; }
.folie { flex: 0 0 100%; scroll-snap-align: center; margin: 0; display: grid; place-items: center; padding: 10px; }
.folie img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; box-shadow: 0 4px 20px rgba(0, 0, 0, .4); }
.folien-nav { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.folien-nav button { border: 2px solid transparent; background: var(--flaeche); border-radius: 6px; padding: 4px; cursor: pointer; display: grid; gap: 2px; font-size: .75rem; color: var(--text-2); }
.folien-nav button.aktiv { border-color: var(--akzent); color: var(--akzent); }
.folien-nav img { height: 56px; width: auto; display: block; }
.ansicht-info { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 20px; display: grid; gap: 12px; }
.ansicht-info h2 { margin: 0; font-size: 1.45rem; }
.ansicht-info h3 { margin: 6px 0 0; }
.ansicht-meta { margin: 0; color: var(--text-2); }
.ansicht-daten { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.ansicht-daten dt { color: var(--text-2); font-size: .85rem; padding-top: 2px; }
.ansicht-daten dd { margin: 0; }
.adresse { white-space: pre-wrap; font-size: .88rem; color: var(--text-2); }
.beschreibung { margin: 0; font-size: .92rem; color: var(--text-2); }

/* ---------- Zeitleiste ---------- */
.histogramm {
  display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 10px 10px 24px; margin-bottom: 20px;
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); position: sticky; top: 49px; z-index: 4;
}
.histogramm { justify-content: center; }
.balken { flex: 1; min-width: 4px; max-width: 36px; height: 100%; border: 0; background: none; padding: 0; cursor: pointer; position: relative; display: flex; align-items: flex-end; }
.balken:disabled { cursor: default; }
.balken-saeule { display: block; width: 100%; background: var(--akzent); border-radius: 2px 2px 0 0; opacity: .8; }
.balken:hover .balken-saeule { opacity: 1; }
.balken-jahr { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--text-2); padding-top: 4px; }
.jahr { margin-bottom: 26px; scroll-margin-top: 210px; }
.jahr h3 { color: var(--text); font-size: 1.3rem; border-bottom: 1px solid var(--rand); padding-bottom: 4px; }
.mini-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mini-karte { display: flex; gap: 10px; background: var(--flaeche); border-radius: 6px; box-shadow: var(--schatten); overflow: hidden; text-decoration: none; color: inherit; }
.mini-karte:hover { outline: 2px solid var(--akzent-hell); }
.mini-bild { flex: 0 0 96px; height: 72px; background: var(--flaeche-2); }
.mini-bild img { width: 100%; height: 100%; object-fit: cover; }
.mini-text { display: grid; align-content: center; gap: 1px; padding: 4px 8px 4px 0; min-width: 0; font-size: .88rem; }
.mini-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Landkarte ---------- */
#landkarte { height: 62vh; min-height: 360px; border-radius: var(--radius); box-shadow: var(--schatten); z-index: 0; }
#karte-liste { margin-top: 18px; }
.legende { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-2); }
.legende i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-left: 6px; }

/* ---------- Personen & Orte ---------- */
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); }
.stamm-tabelle td { vertical-align: middle; }
.stamm-tabelle input { padding: 4px 7px; }
.stamm-tabelle input[data-f="name"] { min-width: 170px; }
.stamm-tabelle input[data-f="region"] { min-width: 150px; }
.stamm-tabelle input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.stamm-tabelle .varianten { cursor: pointer; font-size: .85rem; color: var(--text-2); max-width: 320px; }
.stamm-tabelle .varianten:hover { color: var(--akzent); }
.koord { white-space: nowrap; }
.koord input { width: 92px; }
.tabelle .zahl { text-align: right; }
.vorschlag h4 { margin: 16px 0 6px; }
.vorschlag .tabelle-rahmen { box-shadow: none; border: 1px solid var(--rand); max-height: 420px; overflow: auto; }
.vorschlag input:not([type]) , .vorschlag .vs-name, .vorschlag .vs-region { padding: 4px 7px; min-width: 180px; }
.vorschlag input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.fehler-info { border-left: 4px solid var(--gefahr); }
.fortschritt.unbestimmt div { width: 30% !important; animation: laufen 1.4s ease-in-out infinite; }
@keyframes laufen { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1100px) {
  .ansicht-raster { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .kopfdaten { position: static; }
  .seite { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main { padding: 12px 16px; }
  .topbar { gap: 8px; padding: 8px 16px; }
  .benutzer { display: none; }
  /* Tab-Leiste unten */
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .topbar .hauptnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 0; justify-content: space-around;
    background: var(--flaeche); border-top: 1px solid var(--rand); padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  }
  .hauptnav a { display: grid; justify-items: center; gap: 1px; padding: 4px 2px; font-size: .68rem; flex: 1; text-align: center; border-radius: 0; }
  .hauptnav a.aktiv { background: none; }
  .hauptnav .ico { display: block; font-size: 1.25rem; line-height: 1.2; }
  .hauptnav .nur-desktop { display: none; }
  .hauptnav a[data-nav="personen"] { font-size: 0; }
  .hauptnav a[data-nav="personen"]::after { content: 'Personen'; font-size: .68rem; }
  .hauptnav a[data-nav="personen"] .ico { font-size: 1.25rem; }
  .topbar .logo { flex: 1; }
  .karussell { aspect-ratio: 5 / 4; max-height: 62vh; border-radius: 0; margin: 0 -16px; }
  .folie { padding: 6px; }
  .ansicht-info { padding: 14px 16px; }
  .histogramm { top: 0; height: 110px; }
  .jahr { scroll-margin-top: 130px; }
  .mini-raster { grid-template-columns: 1fr; }
  #landkarte { height: 55vh; }
  .werkzeugleiste .legende { display: none; }
  .editor-kopf { position: static; }
  .editor-kopf h2 { max-width: 100%; flex-basis: 100%; order: -1; }
  .felder { grid-template-columns: 1fr; }
  .raster { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; }
  .formular.zeile { flex-direction: column; }
  .import-optionen { flex-direction: column; }
}
