/* cotedo Compass – Oberfläche
   Mobil zuerst (iPhone, Tablet, Desktop). Farben nach cotedo-Brandbook 2026.
   Strenge CSP: keine Inline-Styles, alles hier. */

:root {
  color-scheme: light dark;
  --orange: #F07E13;
  --orange-hell: #FDEBDA;
  --blau: #577EB0;
  --blau-hell: #E4ECF6;
  --dunkel: #4B5760;

  --bg: #F3F4F6;
  --card: #FFFFFF;
  --text: #15191C;
  --muted: #69747C;
  --line: #E3E6E9;
  --field: #F6F7F8;
  --field-line: #D5DADE;
  --ok: #1F7A4A;
  --ok-hell: #E2F3EA;
  --err: #B3261E;
  --err-hell: #FBE7E6;
  --warn-hell: #FFF4E5;
  --schatten: 0 1px 2px rgba(20, 25, 28, .06), 0 2px 8px rgba(20, 25, 28, .05);
  --schatten-hoch: 0 8px 32px rgba(20, 25, 28, .18);
  --radius: 14px;
  --radius-klein: 10px;
  --appbar: 56px;
  --tabbar: 60px;
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  --sicher-oben: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1F22;
    --card: #262B2F;
    --text: #ECEFF1;
    --muted: #A3ADB4;
    --line: #353C41;
    --field: #1F2427;
    --field-line: #434B51;
    --orange-hell: #3C2A1A;
    --blau-hell: #22303F;
    --ok: #6FCF97;
    --ok-hell: #1E3328;
    --err: #FF8A80;
    --err-hell: #3A2120;
    --warn-hell: #3A2E1E;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

/* ---------- Kopfleiste ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--sicher-oben);
}
.appbar-in {
  max-width: 1080px; margin: 0 auto;
  height: var(--appbar);
  display: flex; align-items: center; gap: 8px;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
}
.zurueck {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: -6px; border-radius: 50%;
  color: var(--text);
}
.zurueck:hover { background: var(--field); text-decoration: none; }
.zurueck svg { width: 24px; height: 24px; }
.titel { flex: 1; min-width: 0; }
.titel .app { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); line-height: 1.1; }
.titel h1 { font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; gap: 4px; }
.topnav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px;
}
.topnav a:hover { background: var(--field); text-decoration: none; }
.topnav a.aktiv { color: var(--text); background: var(--field); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blau); color: #fff; font: 600 13px/1 inherit; letter-spacing: .02em;
  flex: none;
}
.logo { flex: none; display: flex; align-items: center; margin-left: 4px; }
.logo img { height: 22px; width: auto; display: block; }
.logo .weiss { display: none; }
@media (prefers-color-scheme: dark) {
  .logo .farbig { display: none; }
  .logo .weiss { display: block; }
}

/* Kontomenü */
.konto {
  position: fixed; z-index: 40;
  top: calc(var(--sicher-oben) + var(--appbar) - 4px); right: 12px;
  width: min(300px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--schatten-hoch); padding: 14px;
}
.konto .name { font-weight: 600; }
.konto .mail { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.konto .rolle { margin-top: 6px; }
.konto hr { border: 0; border-top: 1px solid var(--line); margin: 12px -14px; }
.konto a { display: block; padding: 6px 0; font-weight: 500; }

/* ---------- Seiteninhalt ---------- */
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) calc(32px + var(--sicher-unten)) max(16px, env(safe-area-inset-left));
}
body.mit-tabbar .wrap { padding-bottom: calc(var(--tabbar) + 88px + var(--sicher-unten)); }
.schmal { max-width: 720px; margin: 0 auto; }
.stapel > * + * { margin-top: 16px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 16px;
}
.card > h2, .abschnitt-titel {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin-bottom: 10px;
}
.abschnitt-titel { margin: 24px 4px 8px; }
.card-hint, .hint { color: var(--muted); font-size: 14px; }
.card-hint + * { margin-top: 12px; }

/* ---------- Suche ---------- */
.suchfeld {
  position: relative;
}
.suchfeld svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.suchfeld input {
  width: 100%; height: 50px; padding: 0 16px 0 44px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 17px;
  box-shadow: var(--schatten); -webkit-appearance: none; appearance: none;
}
.suchfeld input:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px var(--blau-hell); }
.liste-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 4px 8px; min-height: 24px; }
.liste-kopf .hint { font-size: 13px; }

/* ---------- Listen (Zeilen) ---------- */
.liste {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden;
}
.liste:empty { display: none; }
.zeile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-height: 60px;
  color: var(--text); background: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer;
}
.zeile + .zeile { border-top: 1px solid var(--line); }
a.zeile:hover, button.zeile:hover { background: var(--field); text-decoration: none; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .t1, .zeile .t2 { display: block; }
.zeile .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .t2 { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .chips { margin-top: 6px; }
.zeile .rechts { flex: none; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.zeile .pfeil { width: 18px; height: 18px; color: var(--muted); flex: none; }
.symbol {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blau-hell); color: var(--blau); font-weight: 700; font-size: 14px;
}
.symbol svg { width: 22px; height: 22px; }
.symbol.orange { background: var(--orange-hell); color: var(--orange); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.4;
  background: var(--field); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.blau { background: var(--blau-hell); color: var(--blau); border-color: transparent; }
.chip.orange { background: var(--orange-hell); color: #B85C05; border-color: transparent; }
.chip.ok { background: var(--ok-hell); color: var(--ok); border-color: transparent; }
.chip.err { background: var(--err-hell); color: var(--err); border-color: transparent; }
@media (prefers-color-scheme: dark) { .chip.orange { color: var(--orange); } }

/* Leerer Zustand */
.leer { text-align: center; padding: 48px 24px; color: var(--muted); }
.leer svg { width: 48px; height: 48px; color: var(--line); margin-bottom: 12px; }
.leer .gross { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* ---------- Detailkopf (Betrieb) ---------- */
.kopfkarte { padding: 20px 16px; }
.kopfkarte h2 { font-size: 22px; line-height: 1.25; text-transform: none; letter-spacing: -.01em; color: var(--text); margin: 0 0 4px; font-weight: 700; }
.kopfkarte .adresse { color: var(--muted); }
.kopfkarte .chips { margin-top: 12px; }
.aktionen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.aktion {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border-radius: var(--radius-klein);
  background: var(--field); color: var(--blau); font-size: 13px; font-weight: 500; border: 0; cursor: pointer; font-family: inherit;
}
.aktion:hover { text-decoration: none; background: var(--blau-hell); }
.aktion svg { width: 22px; height: 22px; }
.aktion[aria-disabled="true"] { color: var(--muted); opacity: .55; pointer-events: none; }

/* Eigenschaften (nur gefüllte) */
.eigenschaften { margin: 0; }
.eigenschaften > div { padding: 10px 0; }
.eigenschaften > div + div { border-top: 1px solid var(--line); }
.eigenschaften dt { font-size: 13px; color: var(--muted); }
.eigenschaften dd { margin: 2px 0 0; overflow-wrap: anywhere; }

/* Hinweisbanner */
.banner { border-radius: var(--radius-klein); padding: 12px 14px; font-size: 15px; background: var(--warn-hell); }
.banner.err { background: var(--err-hell); color: var(--err); }
.banner.ok { background: var(--ok-hell); color: var(--ok); }

/* Aufklappbare Abschnitte */
details.klapp { background: var(--card); border-radius: var(--radius); box-shadow: var(--schatten); }
details.klapp > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
}
details.klapp > summary::-webkit-details-marker { display: none; }
details.klapp > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
details.klapp[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.klapp > .klapp-inhalt { padding: 0 16px 16px; }

details.mehr { margin-top: 4px; }
details.mehr > summary {
  list-style: none; cursor: pointer; color: var(--blau); font-weight: 500; padding: 10px 0; display: inline-flex; align-items: center; gap: 6px;
}
details.mehr > summary::-webkit-details-marker { display: none; }
details.mehr > summary::before { content: "+"; font-size: 18px; line-height: 1; width: 16px; text-align: center; }
details.mehr[open] > summary::before { content: "−"; }

/* Verlauf */
.zeitleiste { list-style: none; margin: 0; padding: 0; }
.zeitleiste li { position: relative; padding: 0 0 14px 20px; font-size: 14px; }
.zeitleiste li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--blau); }
.zeitleiste li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.zeitleiste li:last-child::after { display: none; }
.zeitleiste .wann { color: var(--muted); font-size: 13px; }

/* ---------- Formulare ---------- */
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--orange); }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border-radius: var(--radius-klein); border: 1px solid var(--field-line);
  background: var(--field); color: var(--text);
  font: inherit; font-size: 16px; /* 16px verhindert Zoom auf dem iPhone */
  -webkit-appearance: none; appearance: none;
}
.fld select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.fld textarea { min-height: 96px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px var(--blau-hell); background: var(--card); }
.fld input:disabled { color: var(--muted); }
.fld .hinweis { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.reihe { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 480px) { .reihe.zwei { grid-template-columns: 1fr 1fr; } .reihe.plz { grid-template-columns: 120px 1fr; } }

/* Auswahl-Chips (Checkbox/Radio) */
.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl label { position: relative; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wahl span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--field-line); background: var(--field);
  font-size: 15px; font-weight: 500; cursor: pointer; user-select: none;
}
.wahl input:checked + span { background: var(--blau); border-color: var(--blau); color: #fff; }
.wahl input:focus-visible + span { outline: 2px solid var(--blau); outline-offset: 2px; }

/* Segmentschalter (z. B. Rechte) */
.segment { display: inline-flex; background: var(--field); border: 1px solid var(--field-line); border-radius: 10px; padding: 2px; }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.segment input:checked + span { background: var(--card); color: var(--text); box-shadow: var(--schatten); }
.segment input:focus-visible + span { outline: 2px solid var(--blau); }

.rechte-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.rechte-zeile + .rechte-zeile { border-top: 1px solid var(--line); }
.rechte-zeile .name { flex: 1 1 160px; font-size: 15px; }

/* Schalter */
.schalter { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.schalter input { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--field-line); position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; }
.schalter input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.schalter input:checked { background: var(--ok); }
.schalter input:checked::after { transform: translateX(16px); }

/* Meldungen */
.meldung { display: none; border-radius: var(--radius-klein); padding: 10px 14px; font-size: 15px; margin: 4px 0 12px; }
.meldung.on { display: block; }
.meldung.err { background: var(--err-hell); color: var(--err); }
.meldung.ok-meldung { background: var(--ok-hell); color: var(--ok); }
.meldung a { font-weight: 600; }

/* ---------- Knöpfe ---------- */
.btn, .btn-primary, .btn-ghost, .btn-text {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; border: 0;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { filter: brightness(.95); text-decoration: none; }
.btn-ghost { background: var(--field); color: var(--blau); border: 1px solid var(--field-line); }
.btn-ghost:hover { background: var(--blau-hell); text-decoration: none; }
.btn-text { background: none; color: var(--blau); padding: 0 8px; min-height: 40px; }
.btn-gefahr { color: var(--err); }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .5; cursor: default; }
.voll { width: 100%; }
.btn-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-reihe > * { flex: 1 1 auto; }
button svg, a svg { width: 20px; height: 20px; flex: none; }

/* Schwebender Hauptknopf */
.fab {
  position: fixed; z-index: 15;
  right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + var(--sicher-unten));
  height: 56px; padding: 0 22px 0 18px; border-radius: 28px;
  background: var(--orange); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(240, 126, 19, .4);
}
.fab svg { width: 22px; height: 22px; }
body.mit-tabbar .fab { bottom: calc(var(--tabbar) + 16px + var(--sicher-unten)); }

/* ---------- Untere Menüleiste (mobil) ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + var(--sicher-unten)); padding-bottom: var(--sicher-unten);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar:empty { display: none; }
.tabbar a {
  flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 500;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.aktiv { color: var(--orange); }

/* ---------- Dialoge (unten aufgehendes Blatt auf dem Handy) ---------- */
dialog.blatt {
  border: 0; padding: 0; margin: 0; color: var(--text); background: var(--card);
  width: 100%; max-width: 100%; max-height: calc(100dvh - 24px);
  position: fixed; inset: auto 0 0 0;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--schatten-hoch);
  display: flex; flex-direction: column;
  overflow: hidden;
}
dialog.blatt:not([open]) { display: none; }
dialog.blatt::backdrop { background: rgba(15, 18, 20, .45); }
dialog.blatt[open] { animation: hoch .22s ease-out; }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.blatt-kopf {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 8px 10px 20px; border-bottom: 1px solid var(--line); flex: none;
}
.blatt-kopf::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line);
}
.blatt-kopf h2 { flex: 1; font-size: 18px; padding-top: 6px; }
.schliessen {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--field); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 6px;
}
.schliessen svg { width: 18px; height: 18px; }
.blatt-inhalt { padding: 16px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; overscroll-behavior: contain; }
.blatt-fuss {
  padding: 12px 20px calc(12px + var(--sicher-unten)); border-top: 1px solid var(--line); flex: none;
  display: flex; gap: 8px; background: var(--card);
}
.blatt-fuss > * { flex: 1; }
.blatt-fuss .btn-text { flex: 0 0 auto; }

@media (min-width: 720px) {
  dialog.blatt {
    inset: 0; margin: auto; width: 560px; max-height: min(86vh, 820px); height: fit-content;
    border-radius: 20px;
  }
  dialog.blatt[open] { animation: auf .18s ease-out; }
  @keyframes auf { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
  .blatt-kopf::before { display: none; }
  .blatt-kopf h2, .schliessen { padding-top: 0; margin-top: 0; }
  .blatt-fuss { padding-bottom: 16px; justify-content: flex-end; }
  .blatt-fuss > * { flex: 0 0 auto; }
}

/* Dublettenhinweis im Dialog */
.dubletten { border: 1px solid #F3C08E; background: var(--warn-hell); border-radius: var(--radius-klein); padding: 12px; margin-bottom: 14px; }
.dubletten > p { font-weight: 600; margin-bottom: 8px; }
.dubletten .liste { box-shadow: none; border: 1px solid var(--line); }

/* Kennzahlen (Import) */
.zahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zahlen > div { background: var(--field); border-radius: var(--radius-klein); padding: 12px; }
.zahlen .z { font-size: 24px; font-weight: 700; line-height: 1.1; }
.zahlen .l { font-size: 13px; color: var(--muted); }
@media (min-width: 600px) { .zahlen { grid-template-columns: repeat(4, 1fr); } }
.liste-text { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.liste-text li { margin: 4px 0; }

/* Datei-Auswahl */
.datei {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  border: 2px dashed var(--field-line); border-radius: var(--radius); padding: 28px 16px; cursor: pointer; color: var(--muted);
}
.datei:hover { border-color: var(--blau); color: var(--blau); }
.datei svg { width: 32px; height: 32px; }
.datei input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* Ladeanzeige */
.laden { display: flex; justify-content: center; padding: 40px; }
.laden::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: dreh .8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* Startseite / einfache Seiten */
.einfach { min-height: 100dvh; display: flex; flex-direction: column; }
.einfach .wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.start-karte { width: 100%; max-width: 420px; text-align: center; padding: 32px 24px; }
.start-karte .marke { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.start-karte h1 { font-size: 28px; margin: 6px 0 10px; }
.start-karte .card-hint { margin-bottom: 24px; }
.start-karte .btn-primary { width: 100%; }
.start-karte .hint { margin-top: 16px; font-size: 13px; }
.start-logo { height: 32px; margin: 0 auto 20px; display: block; }
.text-seite h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 18px 0 6px; }
.text-seite p, .text-seite li { font-size: 15px; }
.text-seite p + p { margin-top: 8px; }
.fuss { text-align: center; font-size: 13px; color: var(--muted); padding: 16px 16px calc(16px + var(--sicher-unten)); }
.fuss a { color: var(--muted); text-decoration: underline; }

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 768px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  body.mit-tabbar .wrap { padding-bottom: 96px; }
  body.mit-tabbar .fab { bottom: 24px; }
  .fab { right: max(24px, calc((100vw - 1080px) / 2 + 16px)); bottom: 24px; }
  .wrap { padding-top: 24px; }
  .titel h1 { font-size: 20px; }
  .logo img { height: 26px; }
  .zwei-spalten { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .zwei-spalten > * + * { margin-top: 0; }
  .zwei-spalten > .stapel > * + * { margin-top: 16px; }
  .kopfkarte { padding: 24px; }
  .kopfkarte h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Ergänzungen */
.zeile .rechts svg { width: 18px; height: 18px; }
.btn-reihe .fld { margin: 0; flex: 1 1 180px; }
#statusListe + .btn-reihe { margin-top: 14px; }
.text-seite { width: 100%; }
.text-seite h1 { font-size: 24px; margin-bottom: 8px; }
.abgleich-karte h3 { font-size: 17px; }
.abgleich-karte .hint { margin: 2px 0 12px; }
.abgleich-karte .btn-reihe { flex-direction: column; }
.abgleich-karte .btn-ghost { justify-content: flex-start; text-align: left; height: auto; padding: 10px 14px; font-weight: 500; }
.liste + .fld, .liste + .banner, .liste + .meldung { margin-top: 12px; }
#beispiele h3 { font-size: 15px; margin-top: 16px; }
#vorschau .btn-primary { margin-top: 16px; }

/* Ausfüllhilfe (KI-Recherche) */
.btn-ki { width: 100%; margin: 2px 0 14px; }
.btn-ki:disabled { opacity: .45; }
.recherche { border: 1px solid var(--blau-hell); background: color-mix(in srgb, var(--blau-hell) 45%, var(--card)); border-radius: var(--radius-klein); padding: 12px; margin-bottom: 14px; }
.recherche > * + * { margin-top: 10px; }
.recherche-lauf { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.kreisel { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blau); animation: dreh .8s linear infinite; }
.recherche-titel { font-weight: 600; }
.recherche-liste { background: var(--card); border-radius: var(--radius-klein); border: 1px solid var(--line); }
.recherche-zeile { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.recherche-zeile + .recherche-zeile { border-top: 1px solid var(--line); }
.recherche-zeile input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blau); }
.recherche-text { display: flex; flex-direction: column; min-width: 0; }
.recherche-text .k { font-size: 12px; color: var(--muted); }
.recherche-text .v { overflow-wrap: anywhere; }
.recherche .meldung { margin: 0; }
