/* Aufmaß – Oberfläche (Designvorschlag 27.10.2026) */
:root {
  --grund: #F4F5F7;
  --flaeche: #FFFFFF;
  --flaeche-2: #F8F9FB;
  --linie: #E1E4EA;
  --linie-stark: #D5DAE2;
  --text: #14171C;
  --text-2: #3B4350;
  --text-3: #5A6270;
  --akzent: #1E56C8;
  --akzent-dunkel: #163F94;
  --akzent-hell: #E8EEFB;
  --rail: #14171C;
  --rail-hover: #232833;
  --rail-aktiv: #2B3342;
  --rail-text: #A9B1BE;
  --ok-bg: #E7F5EC; --ok-fg: #14532D; --ok-punkt: #15803D;
  --info-bg: #E8EEFB; --info-fg: #163F94; --info-punkt: #1E56C8;
  --warn-bg: #FDF1E3; --warn-fg: #7A3A00; --warn-punkt: #B45309;
  --fehler-bg: #FDECEC; --fehler-fg: #8A1C1C;
  --radius: 12px;
  --schrift: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--schrift); color: var(--text); background: var(--grund); font-size: 15px; line-height: 1.45; }
a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.unsichtbar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Grundlayout ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.rail { flex: 1 1 92px; background: var(--rail); padding: 16px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.rail-gruppe { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: #fff; margin-bottom: 18px; }
.logo img { display: block; }
.logo-gross { width: 64px; height: 64px; border: 1px solid var(--linie); }
.rail-punkt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 68px; min-height: 58px; border-radius: 10px; color: var(--rail-text); text-decoration: none; font-size: 11px; font-weight: 500; text-align: center; }
.rail-punkt:hover { background: var(--rail-hover); color: #fff; }
.rail-punkt.aktiv { background: var(--rail-aktiv); color: #fff; }
.rail-version { font-size: 11px; color: var(--rail-text); }
.inhalt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }

.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.marke { display: flex; align-items: baseline; gap: 10px; }
.marke b { font-size: 17px; letter-spacing: -0.01em; }
.marke span { font-size: 13px; color: var(--text-3); }
.kopf-rechts { display: flex; align-items: center; gap: 8px; position: relative; }
.brotkrumen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.brotkrumen a { color: var(--text-3); text-decoration: none; }
.brotkrumen a:hover { color: var(--text); }
.brotkrumen .trenner { color: #9AA3B1; }
.brotkrumen b { font-weight: 600; }

.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--akzent-hell); color: var(--akzent); font-weight: 600; font-size: 14px; cursor: pointer; }
.menue { position: absolute; right: 0; top: 48px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 10px 30px rgba(20,23,28,.12); min-width: 220px; padding: 6px; z-index: 50; }
.menue .menue-name { padding: 8px 12px 10px; border-bottom: 1px solid var(--linie); margin-bottom: 6px; font-size: 13px; color: var(--text-3); }
.menue .menue-name b { display: block; color: var(--text); font-size: 14px; }
.menue button, .menue a { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; color: var(--text); text-decoration: none; cursor: pointer; font-size: 14px; }
.menue button:hover, .menue a:hover { background: var(--grund); }

.seite { padding: 32px; max-width: 1400px; width: 100%; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 720px) {
  .rail-gruppe { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .logo { margin-bottom: 0; }
  .kopf, .seite, .projektkopf { padding-left: 16px !important; padding-right: 16px !important; }
}

/* ---------- Bausteine ---------- */
h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 20px; font-weight: 600; }
.unterzeile { margin: 6px 0 0; color: var(--text-3); }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zeile.zwischen { justify-content: space-between; }
/* Einleitungstext links, Hauptknopf rechts – auf allen Seiten gleich (ab 0.13.1) */
.zeile.zwischen > p.unterzeile { flex: 1 1 420px; max-width: 900px; }
.zeile.zwischen > .knopf { flex: none; }
.zeile.unten { align-items: flex-end; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf:hover { background: #F0F2F5; color: var(--text); }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover { background: var(--akzent-dunkel); color: #fff; }
.knopf.gefahr { color: #A11D1D; }
.knopf.klein { height: 32px; padding: 0 10px; font-size: 13px; }
.knopf:disabled { opacity: .55; cursor: not-allowed; }
.symbolknopf { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.symbolknopf:hover { background: #E9ECF1; }
.symbolknopf.klein { width: 32px; height: 32px; }

.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: #9AA3B1; }
.chip.an { background: var(--text); border-color: var(--text); color: #fff; }
.chip small { font-size: 12px; opacity: .75; }

.suche { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 8px; background: var(--flaeche); color: var(--text-3); width: 280px; max-width: 100%; }
.suche input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; color: var(--text); font-size: 14px; }

.etikett { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #F0F2F5; color: var(--text-2); font-size: 12px; }
.mono { font-family: var(--mono); }
.nummer { font-family: var(--mono); font-size: 13px; padding: 4px 8px; border-radius: 6px; background: #F0F2F5; color: var(--text-2); }
.beta { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #EDE7FB; color: #5B34B8; }
.zaehler { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #FDEBD3; color: #8A3D00; }

.status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }
.status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status.info { background: var(--info-bg); color: var(--info-fg); }
.status.warn { background: var(--warn-bg); color: var(--warn-fg); }
.status.neutral { background: #F0F2F5; color: var(--text-2); }

.hinweis { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.hinweis.fehler { background: var(--fehler-bg); color: var(--fehler-fg); }
.hinweis.info { background: var(--info-bg); color: var(--info-fg); }
.leer { padding: 48px 24px; text-align: center; color: var(--text-3); background: var(--flaeche); border: 1px dashed var(--linie-stark); border-radius: var(--radius); }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.feld input, .feld select, .feld textarea { height: 40px; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 0 10px; font-size: 14px; color: var(--text); background: #fff; width: 100%; font-weight: 400; }
.feld textarea { height: auto; padding: 10px; resize: vertical; }
.feld input::placeholder, .feld textarea::placeholder { color: #7A828F; }
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .raster2 { grid-template-columns: 1fr; } }
.haken { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.haken input { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(20,23,28,.25); color: var(--text); }
dialog::backdrop { background: rgba(20,23,28,.4); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 20px; }
dialog .aktionen { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Projektkacheln ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.kachel { text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; font: inherit; }
.kachel:hover { border-color: #9DB4E6; box-shadow: 0 6px 20px rgba(20,23,28,.08); color: var(--text); }
.kachel-bild { position: relative; height: 156px; background: #EEF1F5; border-bottom: 1px solid var(--linie); overflow: hidden; }
.kachel-bild img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.kachel-bild svg { width: 100%; height: 100%; }
.kachel-ordner { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.95); border: 1px solid var(--linie); font-size: 12px; font-weight: 500; color: var(--text-2); max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel-stern { position: absolute; right: 12px; top: 12px; display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.95); border: 0; color: #9AA3B1; cursor: pointer; }
.kachel-stern.an { color: #B45309; }
.kachel-schloss { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(244,245,247,.6); }
.kachel-schloss span { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid var(--linie-stark); color: var(--text-2); }
.kachel-text { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.kachel-text h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.daten { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.daten dt { color: var(--text-3); }
.daten dd { margin: 0; }
.fortschritt { height: 6px; border-radius: 3px; background: #E9ECF1; overflow: hidden; }
.fortschritt div { height: 6px; background: var(--akzent); }
.kachel-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.kachel-fuss .zeile { justify-content: space-between; font-size: 12.5px; color: var(--text-2); }

/* ---------- Projektkopf + Reiter ---------- */
.projektkopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: 22px 32px 0; }
.projektkopf h1 { font-size: 26px; }
.reiter { display: flex; overflow-x: auto; margin-top: 14px; }
.reiter a, .reiter span { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 4px; margin-right: 22px; color: var(--text-3); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a:hover { color: var(--text); }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); }
.reiter span { color: #9AA3B1; cursor: default; }

/* ---------- Pläne ---------- */
.zweispaltig { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.seitenleiste { flex: 1 1 240px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; }
.seitenleiste-titel { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.seitenleiste-titel h2, .klein-titel { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ordner { text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 500; font-size: 14px; text-align: left; cursor: pointer; }
.ordner:hover { background: #E9ECF1; }
.ordner.an { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.ordner span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordner small { font-size: 12px; color: var(--text-3); }
.hauptspalte { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }

.planraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.plan { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.plan:hover { border-color: #9DB4E6; box-shadow: 0 6px 20px rgba(20,23,28,.08); }
.plan-kopf { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.plan-kopf b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-bild { display: block; height: 150px; background: var(--flaeche-2); border-top: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; }
.plan-bild img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.plan-bild svg { width: 100%; height: 100%; }
.plan-bild .format { display: flex; height: 100%; align-items: center; justify-content: center; font-family: var(--mono); color: var(--text-3); }
.plan-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.plan-zahlen { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.plan-zahlen span { display: inline-flex; align-items: center; gap: 6px; }
.ablage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 300px; padding: 24px; border: 2px dashed #B9C6E4; border-radius: var(--radius); background: #F8FAFE; text-decoration: none; color: var(--akzent); text-align: center; }
.ablage:hover { background: #F0F4FD; }
.ablage b { font-size: 15px; }
.ablage small { font-size: 13px; color: var(--text-3); }

/* ---------- Upload ---------- */
.ablagezone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; border: 2px dashed #B9C6E4; border-radius: 14px; background: #F8FAFE; text-align: center; }
.ablagezone.drueber { background: var(--akzent-hell); border-color: var(--akzent); }
.ablagezone .kreis { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent); }
.warteschlange { display: flex; flex-direction: column; gap: 12px; }
.datei { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.datei.fehler { border-color: #F1C9A0; }
.datei.fertig { border-color: #A7D7B5; }
.datei-kopf { display: flex; gap: 12px; align-items: center; }
.datei-typ { display: inline-flex; width: 64px; height: 44px; align-items: center; justify-content: center; border-radius: 6px; background: #F0F2F5; color: var(--text-3); font: 500 12px var(--mono); flex: none; }
.datei-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.datei-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei-name small { font-size: 12.5px; color: var(--text-3); }
.datei-meldung { font-size: 12.5px; }
.datei-meldung.ok { color: var(--ok-fg); }
.datei-meldung.warn { color: var(--warn-fg); }

/* ---------- Tabellen ---------- */
.tabelle-box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; }
td { padding: 10px 14px; border-top: 1px solid #EEF0F3; vertical-align: middle; }
td select { height: 34px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 6px; background: #fff; }

/* ---------- Login ---------- */
.login-seite { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login-karte { width: 100%; max-width: 420px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-karte .logo { margin: 0; }

/* Kachel als Ganzes klickbar, ohne verschachtelte Links/Knöpfe */
.kachel { position: relative; }
.kachel-text h3 a, .kachel-text h3 button { color: inherit; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.strecken::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kachel-stern { z-index: 2; }

/* Vorschaubild in der Upload-Warteschlange */
.datei-vorschau { width: 112px; height: 58px; object-fit: contain; border: 1px solid var(--linie); border-radius: 6px; background: #fff; flex: none; }

/* ---------- Plan öffnen: Viewer + Aufmaß (Schritt 2) ---------- */
.planseite { display: flex; flex-direction: column; height: calc(100vh - 69px); min-height: 520px; }
.planleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.planleiste-name { font-size: 15px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planleiste .abstand { flex: 1; }
.planleiste .symbolknopf { font-size: 20px; font-weight: 500; border: 1px solid var(--linie-stark); background: var(--flaeche); }
.klein-auswahl { height: 32px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 6px; background: #fff; font-size: 13px; }
.planbereich { flex: 1; min-height: 0; display: flex; }
.viewer { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: #E9ECF1; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.viewer.zieht { cursor: grabbing; }
.viewer canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.v-grund { box-shadow: 0 2px 12px rgba(20,23,28,.15); image-rendering: auto; }
.v-overlay { pointer-events: none; }
.v-laden { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.95); box-shadow: 0 2px 10px rgba(20,23,28,.15); color: var(--text-2); font-size: 13px; pointer-events: none; }   /* ab 0.16.7: kleiner Hinweis statt Text mitten im Plan */

.aufmass { flex: 0 0 420px; max-width: 100%; display: flex; flex-direction: column; background: var(--flaeche); border-left: 1px solid var(--linie); min-height: 0; }
.aufmass-kopf { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--linie); }
.aufmass h2 { font-size: 18px; }
.speicherstand { font-size: 12.5px; color: var(--ok-fg); }
.speicherstand.offen { color: var(--warn-fg); font-weight: 600; }
.zusammenfassung { font-size: 13.5px; color: var(--text-2); }
.text-ok { color: var(--ok-fg); }
.text-warn { color: var(--warn-fg); }
.chip.klein { height: 30px; padding: 0 10px; font-size: 13px; }
.positionen { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 12px; }
.block-titel { margin: 12px 16px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.position { padding: 8px 16px 10px; border-top: 1px solid #F0F2F5; }
.position.gewaehlt { background: #FFF6EE; box-shadow: inset 3px 0 0 #D9480F; }
.position-haupt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.kuerzel { flex: none; min-width: 46px; padding: 2px 6px; border-radius: 6px; background: var(--akzent-hell); color: var(--akzent-dunkel); font: 600 12.5px var(--mono); text-align: center; }
.position.gewaehlt .kuerzel { background: #D9480F; color: #fff; }
.position-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.position-text b { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.position-text small { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.position-zahlen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0 56px; font-size: 12.5px; color: var(--text-2); }
.status.klein { padding: 2px 8px; font-size: 12px; border-radius: 999px; }
.status.klein::before { width: 6px; height: 6px; }
.erklaerung { font-size: 12.5px; }
.erklaerung summary { cursor: pointer; color: var(--blau, #1F5FD1); font-weight: 600; width: fit-content; }
.erklaerung dl { display: grid; grid-template-columns: minmax(80px, 38%) 1fr; gap: 6px 10px; margin: 8px 0 4px; padding: 10px; background: var(--flaeche-2, #F5F7FA); border-radius: 8px; }
.erklaerung dt { font-weight: 600; justify-self: start; }
.erklaerung dd { margin: 0; color: var(--text-2, #3D4450); }
.erweitert { border-top: 1px solid var(--linie); padding: 10px 16px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.erweitert summary { cursor: pointer; color: var(--text-3); }
.erweitert[open] { gap: 10px; }
.erweitert .feld { margin: 8px 0; }
.klein-hinweis { margin: 0; font-size: 12px; color: var(--text-3); }

@media (max-width: 900px) {
  .planseite { height: auto; }
  .planbereich { flex-direction: column; }
  .viewer { flex: none; height: 62vh; }
  .aufmass { flex: none; border-left: 0; border-top: 1px solid var(--linie); }
  .positionen { overflow: visible; }
}
.position-zahlen .symbolknopf { margin-left: auto; }

/* ---------- Symbolerkennung (Version 0.3.0) ---------- */
.symbolstatus { font-size: 13px; color: var(--info-fg); background: var(--info-bg); border-radius: 8px; padding: 8px 10px; }
.viewer.waehlt { cursor: crosshair; }
.kuerzel.symbol { display: inline-flex; align-items: center; gap: 5px; font-family: var(--schrift); font-size: 12px; }
.farbpunkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(20,23,28,.35); flex: none; }
dialog:has(form.breit) { width: min(760px, calc(100vw - 32px)); }
.vorschlaege { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.vorschlag { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--linie); border-radius: 10px; }
.vorschlag > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--akzent); flex: none; }
.vorschlag-bild { flex: none; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--linie); border-radius: 8px; cursor: pointer; font-size: 11px; color: var(--text-3); }
.vorschlag-bild img { max-width: 76px; max-height: 76px; }
.vorschlag-felder { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vorschlag-felder small { color: var(--text-3); }
.vorschlag-felder input:not([type=checkbox]) { height: 34px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 8px; font-size: 13px; width: 100%; }
.symbol-vorschau { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
.legende-bild { display: block; cursor: pointer; }
.legende-bild img { max-width: 100%; height: auto; max-height: 120px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.ohne-treffer { border-top: 1px dashed var(--linie-stark); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ohne-treffer summary { cursor: pointer; font-size: 13px; color: var(--text-3); padding: 4px 0; }
.ohne-treffer[open] { gap: 8px; }

/* ---------- Verschiebbare Dialoge, Bezeichnung in der Liste (Version 0.4.1) ---------- */
.dialog-griff { cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; padding-right: 8px; }
.dialog-griff::after { content: "⠿"; float: right; color: var(--text-3); font-size: 16px; }
dialog.frei { position: fixed; top: 90px; left: 110px; right: auto; bottom: auto; margin: 0; max-height: calc(100vh - 110px); overflow: auto; z-index: 100; box-shadow: 0 16px 48px rgba(20,23,28,.3); border: 1px solid var(--linie-stark); }
dialog.frei .vorschlaege { max-height: calc(100vh - 380px); min-height: 160px; }
.position-haupt { display: flex; gap: 10px; align-items: flex-start; }
.position-marke { background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.bez-eingabe { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; font: 500 13.5px var(--schrift); color: var(--text); }
.bez-eingabe:hover { border-color: var(--linie-stark); background: #fff; }
.bez-eingabe:focus { border-color: var(--akzent); background: #fff; outline: none; box-shadow: 0 0 0 2px var(--akzent-hell); }
.bez-eingabe::placeholder { color: var(--warn-fg); }

/* ---------- Von Hand zählen (Version 0.5.0) ---------- */
.planbereich { position: relative; }
.viewer.zaehlt { cursor: crosshair; }
.zaehlleiste { position: absolute; left: 12px; top: 12px; z-index: 5; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 8px 10px; background: #fff; border: 1px solid #D9480F; border-radius: 10px; box-shadow: 0 6px 20px rgba(20,23,28,.18); font-size: 13px; }
.zaehlleiste #zaehltext { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.zaehlleiste small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.hand-info { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #FFF0E6; color: #B23C0B; font-size: 11.5px; font-weight: 600; }

/* ---------- Farbe ignorieren (Version 0.5.1) ---------- */
.farbpunkt.alle-farben { background: conic-gradient(#e03131, #f59f00, #2fb344, #15aabf, #1c7ed6, #ae3ec9, #e03131); }
.klein-haken { font-size: 13px; gap: 8px; }
.klein-haken small, .haken small { color: var(--text-3); font-size: 12px; }

/* ---------- Bedienung in der Aufmaß-Liste (Version 0.5.2) ---------- */
.position-zahlen .bearbeiten-knopf { margin-left: auto; }
.farbe-schalter { cursor: pointer; white-space: nowrap; }
.farbe-schalter input { width: 16px; height: 16px; }

/* ---------- Längen messen (Version 0.6.0) ---------- */
.knopf.warnung { border-color: var(--warn-fg); color: var(--warn-fg); }
.zaehlleiste #zaehltext span { color: var(--text-2); font-size: 12.5px; }
/* Leiste nur über dem Plan, nicht über der Aufmaß-Spalte (420 px) */
@media (min-width: 901px) { .zaehlleiste { max-width: calc(100% - 420px - 24px); } }

/* ---------- Aufgaben und Mängel (Version 0.7.0) ---------- */
.seitenreiter { display: flex; border-bottom: 1px solid var(--linie); background: var(--flaeche); flex: none; }
.seitenreiter button { flex: 1; height: 44px; border: 0; background: none; font: 600 14px var(--schrift); color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seitenreiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); }
.aufmass:not([data-reiter="aufmass"]) .nur-aufmass { display: none !important; }
.aufmass:not([data-reiter="aufgaben"]) .nur-aufgaben { display: none !important; }
.aufmass:not([data-reiter="raeume"]) .nur-raeume { display: none !important; }
.aufgaben-seite { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.aufgaben-seite .aufgaben-liste { flex: 1; min-height: 0; overflow-y: auto; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.aufgabe-zeile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid #F0F2F5; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.aufgabe-zeile:first-child { border-top: 0; }
.aufgabe-zeile:hover { background: #F7F8FA; }
.aufgabe-zeile.fertig .aufgabe-text b { color: var(--text-3); text-decoration: line-through; }
.aufgabe-bild { display: block; flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #F0F2F5; border: 1px solid var(--linie); }
.aufgabe-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aufgabe-text b { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.aufgabe-text small { font-size: 12px; color: var(--text-3); }
.art-marke { flex: none; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; color: #fff; background: var(--art); }
.text-fehler { color: var(--fehler-fg); font-weight: 600; }
.etikett.warnung { background: var(--fehler-bg); color: var(--fehler-fg); }
.filterleiste { gap: 8px; }
.aufgaben-gruppe { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.aufgaben-gruppe h2 { font-size: 16px; }
dialog:has(form.aufgabe-dialog) { width: min(560px, calc(100vw - 32px)); }
.segment { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.segment button { height: 36px; padding: 0 14px; border: 0; border-left: 1px solid var(--linie-stark); background: #fff; font: 500 13.5px var(--schrift); color: var(--text-2); cursor: pointer; }
.segment button:first-child { border-left: 0; }
.segment button:disabled { cursor: not-allowed; opacity: .5; }
.segment button.an { font-weight: 600; }
.segment button.an.warn { background: var(--warn-bg); color: var(--warn-fg); }
.segment button.an.info { background: var(--info-bg); color: var(--info-fg); }
.segment button.an.ok { background: var(--ok-bg); color: var(--ok-fg); }
.segment button.an.neutral { background: #E9ECF1; color: var(--text); }
.foto-raster { display: flex; flex-wrap: wrap; gap: 8px; }
.foto { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); background: #F0F2F5; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.neu { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--akzent); border-style: dashed; border-color: var(--akzent); background: #fff; cursor: pointer; }
.foto-weg { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20,23,28,.65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.verlauf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; font-size: 13px; }
.verlauf li { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 6px; background: #F7F8FA; }
.verlauf small { font-size: 11.5px; color: var(--text-3); }
.kommentar-zeile { display: flex; gap: 8px; margin-top: 8px; }
.kommentar-zeile input { flex: 1; height: 32px; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 0 10px; font-size: 14px; }
.viewer.zaehlt.pinmodus { cursor: crosshair; }
.viewer.grenze, .viewer.grenze.zieht { cursor: crosshair; }   /* Raumgrenzen: Fadenkreuz statt Hand (ab 0.14.3) */

/* ---------- 0.8.0: DWG-Import ---------- */
.dwg-marke {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 4px;
  background: #1E56C8;
  color: #fff;
  line-height: 1.3;
}
.plan-text [data-dwg-umwandeln] { align-self: flex-start; }

/* ---------- 0.9.0: Ablauf, Ablage, Fahrplan ---------- */
.phase-marke { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); font-size: 13px; font-weight: 600; text-decoration: none; }
.ablauf-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ablauf-schritte li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie); }
.ablauf-schritte li > span:last-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ablauf-schritte li small { color: var(--text-3); font-size: 12.5px; }
.ablauf-schritte li .knopf { align-self: flex-start; min-height: 30px; height: auto; font-size: 12.5px; padding: 4px 10px; white-space: normal; text-align: left; max-width: 100%; }
.ablauf-schritte li.aktuell { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.ablauf-schritte li.erledigt { background: var(--flaeche-2); }
.schritt-nr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #E9ECF1; color: var(--text-2); font-weight: 700; font-size: 13px; }
.aktuell .schritt-nr { background: var(--akzent); color: #fff; }
.erledigt .schritt-nr { background: var(--ok-punkt); color: #fff; }
.schritt-nr.klein { width: 22px; height: 22px; font-size: 12px; margin-right: 8px; vertical-align: 2px; }
.ablauf-raster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ablauf-spalte { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); background: #EDEFF3; }
.ablauf-spalte.aktuell { background: var(--akzent-hell); }
.ablauf-spalte h2 { font-size: 15px; display: flex; align-items: center; }
.modul-zeile { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.modul-karte { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-decoration: none; }
.modul-karte:hover { border-color: var(--akzent); color: var(--text); }
.modul-karte.stand-geplant, .modul-karte.stand-klaeren, .modul-karte.stand-fremd { border-style: dashed; }
.modul-karte b { font-size: 14.5px; }
.modul-kurz { font-size: 13px; color: var(--text-2); }
.modul-karte small { font-size: 12px; color: var(--text-3); }
.modul-karte .modul-stimmen { color: var(--akzent-dunkel); font-weight: 500; }
.modul-seite { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.modul-raster { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.ablauf-liste { margin: 8px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.etikett.vorschlag { background: var(--warn-bg); color: var(--warn-fg); }
.rm-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rm-liste li { padding: 10px 12px; border-radius: 8px; background: var(--flaeche-2); border: 1px solid var(--linie); }
.rm-liste small { color: var(--text-3); }
.modul-seite textarea { width: 100%; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.ablage-baum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ablage-baum > li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); }
.ablage-baum > li.aktiv { border-color: var(--akzent); }
.ablage-baum small { color: var(--text-3); font-size: 12.5px; }
.ablage-kopf { display: flex; align-items: center; gap: 8px; }
.ablage-unter { list-style: none; margin: 6px 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ablage-unter li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ablage-unter li.vorlage { color: var(--text-3); }
.reihenfolge { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.reihenfolge li > * { vertical-align: middle; }
.reihenfolge li { padding: 4px 0; }
.reihenfolge li { display: list-item; }
.reihenfolge li > span:first-child { margin-right: 10px; }
.reihenfolge li.erledigt > span:first-child { color: var(--text-3); }
.reihenfolge li > span.zeile { display: inline-flex; }
@media (max-width: 1400px) {
  .ablauf-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ablauf-schritte { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ablauf-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ablauf-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ablauf-raster, .ablauf-schritte, .modul-raster { grid-template-columns: 1fr; }
}
.etikett.ruht { background: #F0F2F5; color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(90,98,112,.5); }

/* ---------- 0.10.0: Rollen, Rechte, Firmendaten ---------- */
.rollen-gruppe { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; }
.rollen-gruppe legend { font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 0 4px; }
.etikett.extern { background: var(--warn-bg); color: var(--warn-fg); }
.rechte-tabelle th { vertical-align: bottom; text-transform: none; letter-spacing: 0; font-size: 12px; }
.rechte-tabelle th.gruppe { text-align: center; border-bottom: 1px solid var(--linie); text-transform: uppercase; letter-spacing: .04em; }
.rechte-tabelle th span { display: inline-block; max-width: 110px; white-space: normal; line-height: 1.25; }
.rechte-tabelle td.mitte, .rechte-tabelle th:not(:first-child) { text-align: center; }
.rechte-tabelle input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.rechte-tabelle tr.zwischenzeile td { background: var(--flaeche-2); font-weight: 600; font-size: 13px; color: var(--text-2); }
.rechte-tabelle td small { color: var(--text-3); }
.firmen-logo { height: 30px; width: auto; max-width: 140px; object-fit: contain; margin-right: 10px; vertical-align: middle; }
.logo-vorschau { width: 240px; height: 110px; border: 1px dashed var(--linie-stark); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--text-3); }
.logo-vorschau img { max-width: 220px; max-height: 96px; object-fit: contain; }
.marke:has(img) { align-items: center; }

/* ---------- 0.10.1: Produktname LOTWERK by G3-CAD ---------- */
.produkt { letter-spacing: .04em; }
.hersteller { font-size: 12px; color: var(--text-3); font-weight: 500; }
.marke .kunde { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--linie-stark); font-size: 13px; color: var(--text-2); }
.marke .kunde .firmen-logo { margin-right: 0; }

/* ---------- LOTWERK-Logo (Variante 2, 28.10.2026) ---------- */
.wortmarke { height: 20px; width: auto; display: block; }
.marke:has(.wortmarke) { align-items: center; }
.marke-zeile { display: flex; align-items: center; gap: 10px; }

/* ---------- Roadmap auf "Meine Projekte" (vorübergehend, 28.10.2026) ---------- */
.roadmap { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.roadmap > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.roadmap > summary::-webkit-details-marker { display: none; }
.roadmap > summary::before { content: "▸"; color: var(--text-3); margin-right: -4px; }
.roadmap[open] > summary::before { content: "▾"; }
.roadmap-titel { font-size: 20px; font-weight: 600; flex: 1; }
.roadmap-phase { display: flex; flex-direction: column; gap: 10px; }
.roadmap-phase h2 { font-size: 16px; }
.roadmap .reihenfolge li.jetzt { background: #F6E7E7; border-radius: 8px; font-weight: 600; }
.status.arbeit, .etikett.roadmap-arbeit { background: #8B0000; color: #fff; }
.modul-karte.stand-arbeit { border: 2px solid #8B0000; }

/* ---------- PDF-Bericht (ab 0.11.0) ---------- */
.bericht-inhalt { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bericht-inhalt legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 6px; }
.bericht-unter { margin-left: 30px; max-width: 240px; }

/* ---------- Beteiligte Firmen & Mängelanzeige (ab 0.12.0) ---------- */
.firmen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.firma-karte { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.firma-karte h2 { font-size: 17px; }
.firma-karte small { color: var(--text-3); }
.firma-karte.inaktiv, tr.inaktiv { opacity: .6; }
.firma-daten { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.firma-daten dt { color: var(--text-3); }
.firma-daten dd { margin: 0; overflow-wrap: anywhere; }
.anzeige-eintrag { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--linie); }
.anzeige-eintrag:last-child { border-bottom: 0; }
.anzeige-eintrag small { display: block; color: var(--text-3); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--grund); border-radius: 4px; padding: 1px 5px; }
.segment button.an:not(.warn):not(.info):not(.ok) { background: var(--akzent-hell); color: var(--akzent); }
.hinweis.ok { background: var(--ok-bg); color: var(--ok-fg); }
/* Anschrift in Einzelfeldern (ab 0.12.1): Straße breit, Hausnummer schmal; PLZ schmal, Ort breit */
.anschrift-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.anschrift-raster > :nth-child(1), .anschrift-raster > :nth-child(4) { grid-column: span 3; }
.anschrift-raster > :nth-child(2), .anschrift-raster > :nth-child(3) { grid-column: span 1; }
/* Aufklappbare Erklärung in Dialogen (ab 0.12.1) */
.erklaerung { font-size: 13px; color: var(--text-2); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 12px; margin-top: -6px; }
.erklaerung summary { cursor: pointer; font-weight: 600; color: var(--akzent); }
.erklaerung p { margin: 8px 0 0; }

/* ---------- Leistungsverzeichnis (ab 0.13.0) ---------- */
.lv-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.lv-karte { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lv-karte h2 { font-size: 17px; }
.lv-karte h2 a { color: var(--text); text-decoration: none; }
.lv-tabelle td { vertical-align: top; }
.lv-tabelle .rechts, .tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-tabelle tr.lv-pos { cursor: pointer; }
.lv-tabelle tr.lv-pos:hover, .lv-tabelle tr.lv-pos:focus { background: var(--grund); outline: none; }
.lv-tabelle tr.lv-titel td { background: #EEF0F3; font-weight: 600; }
.lv-tabelle tr.lv-titel.ebene1 td { background: #DDE1E7; }
.lv-tabelle small { color: var(--text-3); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.lv-text { white-space: pre-wrap; font-size: 13.5px; }
.lv-langtext { max-height: 260px; overflow: auto; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; background: var(--grund); }
.status.fehler { background: var(--fehler-bg); color: var(--fehler-fg); }
.vorschlag-liste { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; }
.vorschlag-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; border-bottom: 1px dashed var(--linie); padding-bottom: 8px; }
@media (max-width: 720px) { .vorschlag-zeile { grid-template-columns: 1fr; } }

/* DWG-Bauteile: Legende aus dem Papierbereich, Löschen (ab Version 0.13.2) */
.dwg-legende { display: flex; gap: 8px; align-items: flex-start; }
.dwg-legende .status { flex: none; padding: 3px 8px; font-size: 12px; }
.dwg-legende small { line-height: 1.4; }
.dwg-legende-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dwg-legende-liste small { display: block; color: var(--text-3); }
.dwg-laenge { justify-content: space-between; flex-wrap: nowrap; align-items: flex-start; }
.dwg-laenge .haken { flex: 1; min-width: 0; align-items: flex-start; }
.dwg-laenge .knopf { flex: none; }
.dwg-geloescht { padding: 4px 0; border-bottom: 1px solid var(--linie); font-size: 13px; }

/* Räume und Raumbuch (ab Version 0.14.0) */
.raeume-seite { display: flex; flex-direction: column; min-height: 0; }
.raeume-liste { display: flex; flex-direction: column; padding: 4px 8px 16px; overflow: auto; }
.raum { border-bottom: 1px solid var(--linie); }
.raum.offen { background: var(--flaeche-2, #F5F7FA); border-radius: 8px; }
.raum-kopf { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.raum-kopf:hover { background: var(--flaeche-2, #F5F7FA); }
.raum-nr { font-weight: 700; min-width: 64px; font-variant-numeric: tabular-nums; }
.raum-farbe { flex: none; width: 10px; height: 10px; border-radius: 3px; align-self: center; background: var(--raumfarbe); border: 2px solid var(--raumfarbe); }
.raum-grenze { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--linie, #E2E6EC); }
.raum-grenze small { color: var(--text-3); font-weight: 400; }
.raum-farbe.ohne { background: transparent; border-style: dashed; opacity: 0.7; }
.raum-name { flex: 1; min-width: 0; }
.raum-kopf small { color: var(--text-3); white-space: nowrap; }
.raum-inhalt { padding: 0 8px 10px 80px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.raum-inhalt ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.raum-inhalt li { display: flex; justify-content: space-between; gap: 12px; }
.ohne-raum .raum-name { color: var(--text-3); font-style: italic; }
.raum-vorschlaege { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.raum-vorschlag { gap: 6px; flex-wrap: nowrap; }
.raum-vorschlag input:not([type=checkbox]) { height: 32px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 8px; font-size: 13px; }
.raum-vorschlag input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.raumbuch-plan { display: flex; flex-direction: column; gap: 8px; }
.raumbuch-plan > h2 { margin: 8px 0 0; font-size: 17px; }
.raumbuch-karte { padding: 0; }
.raumbuch-karte > summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.raumbuch-karte > summary::-webkit-details-marker { display: none; }
.raumbuch-karte > summary .raum-nr { min-width: 80px; }
.raumbuch-karte > summary small { color: var(--text-3); }
.raumbuch-inhalt { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 0 16px 16px; font-size: 13px; }
.raumbuch-inhalt h3 { margin: 0 0 6px; font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.raumbuch-inhalt table { width: 100%; border-collapse: collapse; }
.raumbuch-inhalt td { padding: 3px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.raumbuch-inhalt td.zahl { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.raumbuch-filter { gap: 8px; }

/* Räume aus anderem Plan übernehmen (ab 0.14.5) */
.raum-vorschlag-box { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.raum-quellen { display: flex; flex-direction: column; gap: 6px; }
.uebernahme { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; font-size: 13px; }
.uebernahme h3 { margin: 0; font-size: 14px; }
.pruefliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pruefliste li { display: flex; gap: 6px; align-items: baseline; }
.pruefliste li > span { width: 16px; font-weight: 700; flex: none; }
.pruefliste li.ok > span { color: var(--ok, #1E7B45); }
.pruefliste li.warn > span { color: var(--warn, #B23C0B); }
.pruefliste li.offen > span { color: var(--text-3); }
.ue-liste { display: flex; flex-direction: column; max-height: 340px; overflow: auto; border: 1px solid var(--linie, #E2E6EC); border-radius: 8px; }
.ue-raum { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--linie, #E2E6EC); cursor: pointer; }
.ue-raum:hover { background: var(--flaeche-2, #F5F7FA); }
.ue-raum small { color: var(--text-3); white-space: nowrap; }
.ue-raum.gedimmt { opacity: 0.6; }

/* Schreibvorlagen und Dokumentverlauf (ab 0.14.6) */
.vorlagen-liste { display: flex; flex-direction: column; gap: 14px; }
.vorlagen-gruppe h3 { margin: 0 0 6px; font-size: 14px; }
.vorlage-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--linie, #E2E6EC); border-radius: 8px; margin-bottom: 6px; }
.vorlage-zeile small { color: var(--text-3); }
.vorlage-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.tabelle.dokumente td { vertical-align: top; }
.tabelle.dokumente td:nth-child(3) { min-width: 260px; }
.tabelle.dokumente td:nth-child(2) { min-width: 120px; }
.dok-aktionen { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; max-width: 230px; }
.tabelle.dokumente small { color: var(--text-3); }

/* Bautagebuch (ab 0.15.0) */
.raster3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
@media (max-width: 640px) { .raster3 { grid-template-columns: 1fr 1fr; } .raster3 > :last-child { grid-column: 1 / -1; } }
.wetter-wahl { gap: 6px; flex-wrap: wrap; }
.chip-haken { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--linie, #E2E6EC); border-radius: 999px; cursor: pointer; font-size: 13px; background: var(--flaeche); }
.chip-haken:has(input:checked) { border-color: var(--blau, #1F5FD1); background: #EAF1FD; color: #123E8F; }
.chip-haken input { margin: 0; }
.tabelle.personal input { width: 100%; min-width: 60px; }
.tabelle.personal td:first-child { width: 60%; }
.tabelle.personal tfoot td { font-weight: 600; }
.bautagebuch-form textarea { resize: vertical; }
.bautagebuch-fotos figure { margin: 0; width: 180px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.bautagebuch-fotos img { width: 180px; height: 135px; object-fit: cover; border-radius: 6px; border: 1px solid var(--linie, #E2E6EC); }
.bautagebuch-fotos input { width: 100%; font-size: 12px; }
.bautagebuch-fotos [data-fotoweg] { position: absolute; top: 4px; right: 4px; }
.bautagebuch-fotos figcaption { font-size: 12px; color: var(--text-3); }
.tabelle.bautagebuch td { vertical-align: top; }
.tabelle.bautagebuch td:nth-child(6) { min-width: 260px; }

/* Mitarbeiter ohne Zugang, eigenes Personal im Bautagebuch (ab 0.15.1) */
.tabelle.personal.eigene td:first-child { width: 36px; }
.tabelle.personal.eigene td:nth-child(2) { width: auto; }
.tabelle.personal.eigene td:last-child { width: 110px; }
.gedimmt-zeile td { color: var(--text-3); }

/* ab Version 0.15.2: Suche in Plänen und Dokumenten */
.kopf-suche input { height: 36px; width: 220px; max-width: 40vw; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 8px; background: var(--flaeche); color: var(--text); font-size: 14px; }
.such-zeile { margin-bottom: 8px; }
.suche.gross { width: 560px; height: 44px; }
.suche.gross input { font-size: 15px; }
.such-gruppe { margin-top: 16px; }
.such-gruppe h3 { font-size: 16px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.such-gruppe h3 small { font-weight: 400; color: var(--text-2); }
.such-treffer { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.such-karte { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); text-decoration: none; }
.such-karte:hover { border-color: var(--akzent); box-shadow: 0 2px 8px rgba(0,0,0,.08); color: var(--text); }
.such-karte canvas { width: 100%; height: auto; max-width: 360px; border: 1px solid var(--linie); border-radius: 4px; background: #fff; }
.such-karte small { color: var(--text-2); font-size: 12px; }
.such-text { font-size: 13px; word-break: break-word; }
.such-text mark, mark { background: #FFE8CC; color: inherit; padding: 0 2px; border-radius: 2px; }

/* ab Version 0.15.3: Rückmeldungen (Pilotphase) */
.meldung-knopf { margin-right: 10px; }
.meldungen-liste { display: flex; flex-direction: column; gap: 12px; }
.meldung-karte { display: flex; flex-direction: column; gap: 8px; }
.meldung-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.meldung-bild { max-width: 360px; max-height: 220px; border: 1px solid var(--linie); border-radius: 6px; }
.meldung-danke { position: fixed; right: 20px; bottom: 20px; z-index: 1000; max-width: 380px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* ab Version 0.15.5: Symbolbild in der Positionsliste und in der Projektlegende */
.pos-bild { flex: 0 0 auto; width: 48px; height: 40px; object-fit: contain; background: #fff; border: 1px solid var(--linie); border-radius: 6px; }
.pos-bild.leer { display: inline-block; background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f1f3f5 4px, #f1f3f5 8px); }
.legende-symbol { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 96px; height: 56px; cursor: pointer;
  background: #fff; border: 1px solid var(--linie); border-radius: 6px; overflow: hidden; }
.legende-symbol img { max-width: 94px; max-height: 54px; object-fit: contain; }

/* ab Version 0.15.9: Bauteilarten, die nicht zum Raum gehören */
.raum-inhalt li { align-items: center; }
.raum-inhalt li > span { flex: 1; min-width: 0; }
.raum-inhalt .raum-aus { padding: 2px 8px; font-size: 12px; min-height: 0; }
.raum-ausschluesse { border-top: 1px dashed var(--linie); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.raum-ausschluesse small { color: var(--text-leise, #6b7280); }

/* ab Version 0.15.12: Hinweiszeile oben in der Seitenleiste, in allen Reitern sichtbar */
.symbolstatus-oben { margin: 8px 16px 0; }

/* ab Version 0.16: Texterkennung im Hintergrund */
.ocrstatus { margin: 6px 16px 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-leise, #6b7280);
  background: #f6f7f9; border-radius: 8px; padding: 6px 10px; }
.ocrstatus span { flex: 1; }

/* ===================================================================
   0.16.1: Mobile Oberfläche Handy und Tablet (Schritt 1)
   Desktop (> 900 px, Maus) bleibt unverändert.
   =================================================================== */

/* ---------- Touch-Geräte: Bedienflächen mind. 40–48 px (auch mit Handschuhen) ---------- */
@media (pointer: coarse) {
  .knopf { height: auto; min-height: 44px; }
  .knopf.klein { height: auto; min-height: 40px; padding: 0 12px; font-size: 14px; }
  .symbolknopf, .symbolknopf.klein { width: 44px; height: 44px; }
  .chip, .chip.klein { height: 40px; }
  .seitenreiter button { height: 48px; }
  .segment button { height: 44px; }
  .feld input, .feld select { height: 44px; font-size: 16px; }   /* 16 px: iOS zoomt sonst beim Antippen */
  .feld textarea, .suche input, .kommentar-zeile input { font-size: 16px; }
  .klein-auswahl { height: 40px; font-size: 15px; }
  .haken input, .vorschlag > input[type=checkbox] { width: 22px; height: 22px; }
  .haken, .klein-haken { min-height: 40px; }
  .menue button, .menue a { padding: 13px 12px; }
}

/* ---------- Tablet quer: schmalere Seitenleiste ---------- */
@media (min-width: 901px) and (max-width: 1280px) {
  .aufmass { flex-basis: 360px; }
  .zaehlleiste { max-width: calc(100% - 360px - 24px); }
}

/* ---------- Handy: Navigation als Leiste unten ---------- */
@media (max-width: 720px) {
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex: none; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 0;
    flex-direction: row; justify-content: center; border-top: 1px solid #2B3342; }
  .rail .rail-gruppe:first-child { flex: 1; flex-direction: row; flex-wrap: nowrap; justify-content: space-around; gap: 2px; }
  .rail .rail-gruppe:last-child, .rail .logo { display: none; }
  .rail-punkt { flex: 1; width: auto; min-width: 0; max-width: 96px; min-height: 52px; }
  .inhalt { flex-basis: 100%; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .kopf { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 10px; gap: 8px; }
  .kopf .hersteller { display: none; }
  .kopf { flex-wrap: nowrap; }
  #kopfLinks { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .kopf-rechts { flex: none; gap: 6px; }
  .kopf .wortmarke { max-height: 22px; width: auto; }
  .brotkrumen { flex-wrap: nowrap; min-width: 0; }
  .brotkrumen > :not(:last-child) { display: none; }   /* nur die aktuelle Seite – „← Pläne“ bzw. die Navigation unten führen zurück */
  .brotkrumen > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .meldung-knopf { padding: 0 10px; font-size: 13px; }
  .brotkrumen { font-size: 13px; }
  h1 { font-size: 24px; }
  /* Dialoge als Blatt von unten */
  dialog, dialog:has(form.breit), dialog:has(form.aufgabe-dialog) { width: 100vw !important; max-width: 100vw; margin: auto 0 0 !important;
    left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; border-radius: 18px 18px 0 0; max-height: 92dvh; overflow: auto; }
  dialog form { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  dialog .aktionen { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 4px; margin-bottom: -4px; }
  dialog .aktionen .knopf { flex: 1; }
  /* nicht modale Fenster (Plan bleibt bedienbar): nur halbe Höhe */
  dialog.frei { max-height: 55dvh; }
  dialog.frei .vorschlaege { max-height: none; }
  .dialog-griff::after { content: none; }
}

/* ---------- Planansicht Handy und Tablet hochkant: Plan bildschirmfüllend, Liste als Unterblatt ---------- */
@media (max-width: 900px) {
  .planseite { height: calc(100dvh - var(--kopf-h, 60px) - var(--tab-h, 0px)); min-height: 420px; }
  .planleiste { flex-wrap: nowrap; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
  .planleiste::-webkit-scrollbar { display: none; }
  .planleiste > * { flex: none; }
  .planleiste-name { max-width: 42vw; }
  .planleiste .abstand { flex: 1 0 8px; }
  .planbereich { flex-direction: row; position: relative; }
  .viewer { flex: 1 1 auto; height: auto; }
  /* Plan endet über dem Unterblatt, damit „Einpassen“ den sichtbaren Teil nutzt (bei vollem Blatt bleibt er dahinter) */
  .planbereich:not(.blatt-ist-voll) .viewer { margin-bottom: var(--blatt-h, 0px); }

  .aufmass { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; flex: none; max-width: none; border-left: 0; border-top: 0;
    border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(20,23,28,.16); overflow-y: auto; overscroll-behavior: contain; }
  .aufmass.blatt-halb { height: 48%; }
  .aufmass.blatt-voll { height: calc(100% - 8px); }
  .aufmass.blatt-klein { height: auto; max-height: 45%; overflow: hidden; }
  .aufmass.blatt-klein > :not(.blatt-griff):not(.seitenreiter):not(#symbolstatus):not(#ocrstatus) { display: none !important; }
  .aufmass.blatt-klein #symbolstatus, .aufmass.blatt-klein #ocrstatus { margin-bottom: 10px; }
  .aufmass > * { flex-shrink: 0; }
  .positionen { overflow: visible; flex: none; }
  .aufgaben-seite .aufgaben-liste { overflow: visible; }
  .raeume-liste { overflow: visible; }

  .blatt-griff { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; align-items: center; width: 100%; height: 26px; flex: none;
    border: 0; background: var(--flaeche); cursor: grab; touch-action: none; border-radius: 18px 18px 0 0; }
  .blatt-griff span { width: 44px; height: 5px; border-radius: 3px; background: var(--linie-stark); }
  .aufmass .seitenreiter { position: sticky; top: 26px; z-index: 2; }

  /* Werkzeugleiste in Daumenreichweite, schwebt über dem Unterblatt */
  .mobil-werkzeuge { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--blatt-h, 0px) + 10px); z-index: 7;
    display: flex; gap: 4px; padding: 5px; border-radius: 18px; background: var(--rail); box-shadow: 0 8px 24px rgba(20,23,28,.3); max-width: calc(100% - 16px); }
  .mobil-werkzeug { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 68px; min-height: 52px; padding: 0 8px;
    border: 0; border-radius: 14px; background: transparent; color: #E3E6EB; font: 600 11px var(--schrift); cursor: pointer; }
  .mobil-werkzeug:hover, .mobil-werkzeug:active { background: var(--rail-aktiv); color: #fff; }
  .mobil-werkzeug:disabled { opacity: .45; cursor: default; background: transparent; }
  .mobil-werkzeug.offen { background: var(--akzent); color: #fff; }
  .planbereich.blatt-ist-voll .mobil-werkzeuge, .planbereich.modus-aktiv .mobil-werkzeuge { display: none; }

  /* Zähl-, Mess- und Zeichenleiste unten über dem Blatt statt oben links */
  .zaehlleiste { top: auto; left: 8px; right: 8px; bottom: calc(var(--blatt-h, 0px) + 10px); max-width: none; padding: 10px 12px; font-size: 14px; }
  .zaehlleiste .knopf { min-height: 44px; }
  .zaehlleiste #zaehlFertig { margin-left: auto; }
}
@media (min-width: 901px) { .mobil-werkzeuge, .blatt-griff { display: none; } }

/* Als App vom Startbildschirm geöffnet (ohne Browserleiste) */
@media (display-mode: standalone) {
  .kopf { padding-top: max(14px, env(safe-area-inset-top)); }
}

/* ---------- 0.16.2: Hinweis „Als App installieren“ ---------- */
.app-hinweis { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tab-h, 0px) + 8px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; background: var(--flaeche);
  border: 1px solid var(--linie-stark); border-radius: 14px; box-shadow: 0 10px 30px rgba(20,23,28,.22); font-size: 14px; line-height: 1.4; }
.app-hinweis img { flex: none; border-radius: 10px; border: 1px solid var(--linie); }
.app-hinweis-text { flex: 1 1 200px; min-width: 0; }
.app-hinweis-knoepfe { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 721px) { .app-hinweis { left: auto; right: 16px; max-width: 460px; } }

/* ===================================================================
   0.16.3: Handy-Ansicht „LOTWERK Mobil“ (html.handy) nach der Designvorschau
   Farbe Lot-Orange #C2410C (Kontrast zu Weiß 5,2:1), große Bedienflächen, Navigation unten
   =================================================================== */
html.handy {
  --akzent: #C2410C; --akzent-dunkel: #9A3412; --akzent-hell: #FDECE3;
  --grund: #F3F2EF; --linie: #E2E0DA; --linie-stark: #D9D6CF; --text-3: #5B616B;
  --info-bg: #FDECE3; --info-fg: #9A3412; --info-punkt: #C2410C;
}
html.handy .rail { display: none !important; }
html.handy { scroll-padding-bottom: calc(var(--tab-h, 76px) + 16px); scroll-padding-top: 8px; }
html.handy .inhalt { flex-basis: 100%; padding-bottom: calc(var(--tab-h, 76px)); }
html.handy .kopf { padding: max(10px, env(safe-area-inset-top)) 16px 10px; flex-wrap: nowrap; gap: 8px; }
html.handy #kopfLinks { flex: 1 1 auto; min-width: 0; overflow: hidden; }
html.handy .kopf .hersteller { display: none; }
html.handy .marke { min-width: 0; flex-wrap: nowrap; }
html.handy .marke .kunde { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.handy .kopf .wortmarke { max-height: 22px; width: auto; }
html.handy .brotkrumen { flex-wrap: nowrap; min-width: 0; }
html.handy .brotkrumen > :not(:last-child) { display: none; }
html.handy .brotkrumen > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html.handy .meldung-knopf { padding: 0 10px; font-size: 13px; }
html.handy .seite { padding: 16px; }
html.handy dialog { width: 100vw !important; max-width: 100vw; margin: auto 0 0 !important; left: 0 !important; right: 0 !important;
  top: auto !important; bottom: 0 !important; border-radius: 18px 18px 0 0; max-height: 92dvh; overflow: auto; }
html.handy dialog.frei { max-height: 55dvh; }
html.handy .app-hinweis { bottom: calc(var(--tab-h, 76px) + 8px); }

/* Navigation unten */
.handy-tabs { display: none; }
html.handy .handy-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: #fff;
  border-top: 1px solid var(--linie); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.handy-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
  font-size: 11px; font-weight: 600; color: var(--text-3); text-decoration: none; border-radius: 10px; }
.handy-tab:hover { color: var(--text); }
.handy-tab-punkt { display: flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; }
.handy-tab.an { color: var(--akzent); }
.handy-tab.an .handy-tab-punkt { background: var(--akzent-hell); }
@media (min-width: 721px) { html.handy .handy-tabs { padding-left: max(4px, calc(50% - 360px)); padding-right: max(4px, calc(50% - 360px)); } }

/* Seiten der Handy-Ansicht */
.h-seite { padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.h-kopf { display: flex; align-items: center; gap: 6px; }
.h-kopf h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.h-ib { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--text); flex: none; margin-left: -10px; }
.h-ib:hover { background: #E7E5E0; color: var(--text); }
.h-unter { margin: -10px 0 0; color: var(--text-3); font-size: 14px; }
.h-titel { font-size: 17px; display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.h-titel small { font-size: 13px; color: var(--text-3); font-weight: 500; }

.h-weiter { background: #16191D; color: #fff; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.h-weiter-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.h-weiter-titel { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #F4A97F; }
.h-weiter h2 { font-size: 19px; line-height: 1.3; color: #fff; }
.h-weiter-unter { margin: 2px 0 0; color: #C9CDD3; font-size: 14px; }
.h-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: #2A2F36; color: #fff; font-size: 12px; font-weight: 600; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 14px; font-size: 16px; font-weight: 600; text-decoration: none; }
.h-btn-pri { background: var(--akzent); color: #fff; }
.h-btn-pri:hover { background: var(--akzent-dunkel); color: #fff; }

.h-feld { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 14px; background: #fff; border: 1px solid var(--linie); color: var(--text-3); }
.h-feld input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--text); }
.h-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.h-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linie-stark); background: #fff; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; }
.h-chip small { opacity: .7; font-size: 12px; }
.h-chip.an { background: #16191D; border-color: #16191D; color: #fff; }

.h-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.h-zeile { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 12px 12px 14px; background: #fff; border: 1px solid var(--linie); border-radius: 16px; color: var(--text); text-decoration: none; }
.h-zeile:hover { border-color: var(--linie-stark); color: var(--text); }
.h-zeile.gesperrt { background: #F7F6F3; }
.h-zeile.gesperrt b { color: var(--text-2); }
.h-ini { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.h-vorschau { width: 64px; height: 48px; border-radius: 8px; background: #F3F2EF; border: 1px solid var(--linie); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-size: 11px; font-weight: 600; color: var(--text-3); }
.h-vorschau img { width: 100%; height: 100%; object-fit: cover; }
.h-zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-zeile-text b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-zeile-text small { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-chevron { color: #8A8F98; flex: none; display: flex; }
.h-fav { color: #B45309; display: flex; }
.h-leer { padding: 28px 16px; text-align: center; color: var(--text-3); background: #fff; border: 1px dashed var(--linie-stark); border-radius: 16px; }

.h-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .h-kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.h-kachel { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 108px; background: #fff; border: 1px solid var(--linie); border-radius: 16px; color: var(--text); text-decoration: none; }
.h-kachel:hover { border-color: var(--akzent); color: var(--text); }
.h-kachel-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--akzent-hell); color: var(--akzent-dunkel); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.h-kachel b { font-size: 15px; }
.h-kachel small { font-size: 12.5px; color: var(--text-3); }

/* Planansicht in der Handy-Ansicht: Unterblatt und Werkzeugleiste auch auf dem Tablet quer */
html.handy .planseite { height: calc(100dvh - var(--kopf-h, 60px) - var(--tab-h, 0px)); }
html.handy .mobil-werkzeug.offen { background: var(--akzent); }

/* ---------- 0.16.4: Handy = ansehen, prüfen, von Hand korrigieren; Auswerten am PC/Tablet ---------- */
.handy-auswerten-hinweis { display: none; }
html.handy-klein .handy-auswerten-hinweis { display: block; }
html.handy-klein #neuAuslesen, html.handy-klein #hinzufuegen, html.handy-klein #dwgBauteile,
html.handy-klein #legendeSymbole, html.handy-klein #symboleFinden, html.handy-klein #symbolMarkieren,
html.handy-klein #projektLegende, html.handy-klein #bereichMarkieren, html.handy-klein #massstab,
html.handy-klein .aufmass details.erweitert,
html.handy-klein #raeumeLesen, html.handy-klein #raumNeu, html.handy-klein #raumGrenzen, html.handy-klein #raumUebernahme,
html.handy-klein [data-messen], html.handy-klein [data-einheit], html.handy-klein .farbe-schalter,
html.handy-klein .bearbeiten-knopf { display: none !important; }
html.handy-klein .zeile:has(> #legendeSymbole), html.handy-klein .zeile:has(> #dwgBauteile) { display: none; }
html.handy-klein .bez-eingabe { pointer-events: none; }   /* Bezeichnung nur lesen – Ändern am PC */
html.handy-klein .position [data-zaehlen] { min-height: 44px; padding: 0 16px; }

/* ---------- 0.16.5: Unterseiten der Handy-Ansicht (Mängel, Mangel erfassen, Bautagebuch, Suche, Raumbuch) ---------- */
.h-kopf-unter { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-lbl { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); display: block; }
.h-lbl small { font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.h-karte { background: #fff; border: 1px solid var(--linie); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.h-btn-sek { background: #fff; border: 1px solid var(--linie-stark); color: var(--text); }
.h-btn-sek:hover { background: #F7F6F3; color: var(--text); }
.h-btn:disabled { opacity: .6; }
button.h-btn { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
button.h-btn.h-btn-sek { border: 1px solid var(--linie-stark); }
.h-rot { color: #B91C1C !important; font-weight: 600; }
.h-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h, 76px) + 16px); z-index: 70; background: #16191D; color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(20,23,28,.3); }

/* Mängel-Liste */
.h-aufgabe { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.h-foto { width: 56px; height: 56px; border-radius: 12px; background: #F3F2EF; border: 1px solid var(--linie); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: #8A8F98; }
.h-foto img { width: 100%; height: 100%; object-fit: cover; }
.h-art { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.h-status { flex: none; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }

/* Formulare */
.h-formular { padding-bottom: 96px; }
.h-block { display: flex; flex-direction: column; }
.h-eingabe { width: 100%; min-height: 52px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--linie); background: #fff; font: 16px var(--schrift); color: var(--text); resize: vertical; }
.h-eingabe:focus, .h-feld:focus-within { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.h-eingabe:disabled { background: #F7F6F3; color: var(--text-2); }
.h-auswahl select, .h-feld input[type=date], .h-feld input[type=time], .h-feld input[type=number] { flex: 1; min-width: 0; border: 0; background: transparent; font: 16px var(--schrift); color: var(--text); height: 50px; outline: none; }
.h-feld-text { font-size: 14px; color: var(--text-3); flex: none; }
.h-ort { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #FFF7F2; border: 1px solid #F6CDB4; color: #9A3412; text-decoration: none; }
.h-ort:hover { color: #9A3412; }
.h-ort span { display: flex; flex-direction: column; gap: 2px; }
.h-ort small { color: var(--text-2); font-size: 13px; }
.h-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.h-foto-neu { width: 96px; height: 96px; border-radius: 14px; border: 2px dashed var(--akzent); background: #FFF7F2; color: var(--akzent-dunkel); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.h-foto-galerie { border-style: solid; border-width: 1px; border-color: var(--linie-stark); background: #fff; color: var(--text-2); }
.h-foto-vorschau { position: relative; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; border: 1px solid var(--linie); background: #F3F2EF; display: block; }
.h-foto-vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-foto-vorschau button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(22,25,29,.72); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.h-leiste-unten { position: fixed; left: 0; right: 0; bottom: var(--tab-h, 76px); z-index: 30; padding: 12px 16px; background: linear-gradient(rgba(243,242,239,0), var(--grund) 35%); }
.h-leiste-unten .h-btn { max-width: 728px; margin: 0 auto; }
/* ab 0.16.8: der durchsichtige Verlauf über dem Knopf darf keine Tipps abfangen (Dringlichkeit „Hoch“ war darunter nicht antippbar) */
.h-leiste-unten { pointer-events: none; }
.h-leiste-unten .h-btn { pointer-events: auto; }
html.handy .h-formular { scroll-padding-bottom: 120px; }
html.handy:has(.h-formular) { scroll-padding-bottom: calc(var(--tab-h, 76px) + 96px); }

/* Bautagebuch */
.h-zeile-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h-wetter { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 10px; }
.h-wetter-knopf { flex-direction: column; height: 72px; border-radius: 16px; justify-content: center; gap: 4px; padding: 0 6px; }
.h-wetter-knopf span { font-size: 12.5px; }
.h-zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.h-zwei > .h-feld { min-width: 0; padding: 0 10px; gap: 6px; }
.h-leute, .h-chips-umbruch { display: flex; flex-wrap: wrap; gap: 8px; }
.h-chips-umbruch { margin-bottom: 10px; overflow: visible; }
.h-leute .h-chip, .h-chips-umbruch .h-chip { height: auto; min-height: 44px; white-space: normal; text-align: left; }
.h-chip:disabled { opacity: .7; cursor: default; }
.h-person { flex-direction: row; align-items: center; padding: 8px 8px 8px 8px; margin-bottom: 8px; }
.h-person .h-eingabe { flex: 1; min-height: 48px; border: 0; padding: 8px 6px; }
.h-stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.h-stepper .mono { min-width: 28px; text-align: center; font-size: 20px; font-weight: 600; }
.h-rund { width: 48px; height: 48px; border-radius: 14px; border: 0; background: #F3F2EF; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.h-rund.dunkel { background: #16191D; color: #fff; }
.h-mehr { background: #fff; border: 1px solid var(--linie); border-radius: 16px; padding: 4px 14px; }
.h-mehr summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.h-mehr[open] { padding-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }

/* Suche */
.h-suchfeld { border: 2px solid #16191D; }
.h-suchfeld input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--text); }
.h-treffer { align-items: flex-start; }
.h-treffer-text { font-size: 14px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.h-treffer .h-zeile-text b { white-space: normal; }

/* Raumbuch */
.h-raum { background: #fff; border: 1px solid var(--linie); border-radius: 16px; }
.h-raum summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px 10px 14px; cursor: pointer; }
.h-raum summary::-webkit-details-marker { display: none; }
.h-raum[open] { padding-bottom: 14px; }
.h-raum[open] .h-auf { transform: rotate(90deg); }
.h-raum > :not(summary) { margin-left: 14px; margin-right: 14px; }
.h-raum-nr { flex: none; min-width: 56px; padding: 6px 8px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 600; font-size: 13px; text-align: center; }
.h-bauteile { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--linie); }
.h-bauteile li { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; border-bottom: 1px solid #EFEDE8; font-size: 15px; }
.h-bauteile li span { flex: 1; min-width: 0; }
.h-bauteile li small { color: var(--text-3); min-width: 34px; }

/* ---------- 0.16.6: Dringlichkeit ---------- */
.dringlich-marke { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.dringlich-marke.hoch { background: #FEE2E2; color: #991B1B; }
.dringlich-marke.niedrig { background: #F0F2F5; color: var(--text-3); }
.h-dringend { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #B91C1C; border-radius: 6px; padding: 2px 7px; margin-bottom: 2px; }
.h-segment { display: flex; gap: 6px; background: #E7E5E0; border-radius: 14px; padding: 4px; }
.h-seg { flex: 1; min-height: 48px; border: 0; border-radius: 11px; background: transparent; font: 600 15px var(--schrift); color: var(--text-2); cursor: pointer; }
.h-seg.an { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(22,25,29,.15); }
.h-seg.hoch.an { background: #B91C1C; color: #fff; }

/* ---------- 0.16.7: Prüfung vor dem Kundentest, Kundenfarbe ---------- */
.haken input, .klein-haken input { flex: none; }   /* Haken nicht zusammendrücken (Handy, Firma → Texterkennung) */
.app-hinweis.im-fluss { position: static; margin: 16px auto 0; max-width: 460px; width: calc(100% - 32px); box-shadow: none; }
.farbwahl { gap: 8px; }
.farb-feld { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #fff; background: var(--f); box-shadow: 0 0 0 1px var(--linie-stark); cursor: pointer; }
.farb-feld.an { box-shadow: 0 0 0 3px var(--text); }
.farb-feld:disabled { cursor: default; opacity: .6; }
.farb-vorschau { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--flaeche-2); border: 1px solid var(--linie); }

/* ---------- 0.16.9: Einführungsvideo ---------- */
.einfuehrung-video { width: 100%; max-height: 62vh; border-radius: 10px; background: #16191D; display: block; }

/* ===== 0.16.10: LV-Positionen je Legendensymbol ===== */
.lvzu-treffer { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; margin-top: 6px; }
.lvzu-treffer-zeile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: inherit; font: inherit; cursor: pointer; }
.lvzu-treffer-zeile:hover:not(:disabled), .lvzu-treffer-zeile:focus-visible { border-color: var(--akzent, #C2410C); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--akzent, #C2410C) 25%, transparent); }
.lvzu-treffer-zeile:disabled { opacity: .65; cursor: default; }
.lvzu-tabelle td { vertical-align: middle; }
.lv-knopf.hat { border-color: var(--akzent, #C2410C); color: var(--akzent-dunkel, var(--akzent)); font-weight: 600; }
@media (pointer: coarse) { .lvzu-treffer-zeile { min-height: 44px; } }

/* ===== 0.16.11: Zählprüfung ===== */
.zp-kopf { display: flex; flex-wrap: wrap; gap: 8px; }
.zp-zahl { padding: 6px 10px; border-radius: 8px; font-size: 13px; background: var(--flaeche-2); border: 1px solid var(--linie); }
.zp-zahl b { font-size: 16px; margin-right: 2px; }
.zp-zahl.fehler { background: var(--fehler-bg); color: var(--fehler-fg); border-color: transparent; }
.zp-zahl.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.zp-zahl.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.zp-liste { max-height: min(56vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.zp-gruppe h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2, #5B6472); margin: 4px 0 6px; }
.zp-gruppe h3 small { text-transform: none; letter-spacing: 0; }
.zp-befund { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
.zp-befund + .zp-befund { margin-top: 6px; }
.zp-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.zp-knoepfe { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.zp-knoepfe:empty { display: none; }
.zp-regeln { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.zp-regeln li { margin: 2px 0; }
dialog.frei:has(form.zp-fenster) { width: min(660px, calc(100vw - 32px)); }

/* ===== 0.16.13: Mehrmengenliste ===== */
.mm-kopf { display: flex; flex-wrap: wrap; gap: 8px; }
.zp-zahl.info { background: var(--info-bg); color: var(--info-fg); border-color: transparent; }
.mm-tabelle input.mm-ep { width: 96px; text-align: right; }
.mm-tabelle input.mm-bem { width: 220px; }
.mm-tabelle tfoot td { border-top: 2px solid var(--linie-stark); }

/* ===== 0.17.0: Baustellenabwicklung ===== */
.schnittstelle-marke { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: #EEF2F7; color: #334155; font-weight: 600; border: 1px dashed #94A3B8; }
.segment a.segment-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-left: 1px solid var(--linie-stark); background: #fff; font: 500 13.5px var(--schrift); color: var(--text-2); text-decoration: none; }
.segment a.segment-link:first-child { border-left: 0; }
.segment a.segment-link.an { font-weight: 600; background: var(--akzent-hell); color: var(--akzent); }
.segment a.segment-link:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td, tr.klickbar:focus-visible td { background: var(--akzent-hell); }
tr.klickbar:focus-visible { outline: none; }
.unterschrift-feld { display: block; width: 100%; height: 160px; border: 1px solid var(--linie-stark); border-radius: 8px; background: #fff;
  touch-action: none; cursor: crosshair; background-image: linear-gradient(transparent calc(100% - 34px), #CBD2DC calc(100% - 34px), #CBD2DC calc(100% - 33px), transparent calc(100% - 33px)); }
.ma-tabelle td { vertical-align: top; }
.ma-artikel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.ma-artikel input { min-width: 0; }
.ab-aufmass { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); font-size: 13px; }
.zp-zahl.neutral { background: #F0F2F5; color: var(--text-2); border-color: transparent; }
/* Baufortschritt je Raum */
.fs-marke { display: inline-flex; margin-left: 8px; vertical-align: 1px; }
.fs-feld { flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.fs-zeile, .fs-gesamt { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.fs-gesamt { padding: 10px 14px; }
.fs-balken { display: inline-flex; width: min(320px, 100%); height: 10px; border-radius: 999px; overflow: hidden; background: #E9ECF1; }
.fs-balken i { display: block; height: 100%; }
.fs-offen { background: #E2E6EC; }
.fs-begonnen { background: #BFD3F5; }
.fs-rohinstallation { background: #7FA6EA; }
.fs-feininstallation { background: #3B74D8; }
.fs-fertig { background: #4CAF73; }
.fs-geprueft { background: var(--ok-punkt); }
.fs-chips { margin-bottom: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { .segment a.segment-link { height: 44px; } }

/* ===== 0.17.1: Planansicht am PC – die Seite selbst scrollt nicht mehr =====
   Unsichtbare Beschriftungen (.unsichtbar, position: absolute) in den scrollbaren Listen hatten keinen positionierten Vorfahren
   und ragten beim Scrollen der Liste unter die Seite hinaus → die ganze Seite wurde länger und zeigte einen grauen Balken. */
@media (min-width: 901px) {
  .planseite { position: relative; overflow: hidden; }
  .aufmass, .positionen, .aufgaben-seite .aufgaben-liste, .raeume-liste { position: relative; }
  .positionen, .aufgaben-seite .aufgaben-liste, .raeume-liste { overscroll-behavior: contain; }
}

/* ===== 0.18.0: Kunden verwalten ===== */
.kunde-knoepfe { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; }
.kunde-zugang { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0; font-size: 14px; }
.kunde-zugang dt { color: var(--text-3); }
.kunde-zugang dd { margin: 0; user-select: all; }
