/* Voltdoc Grundstil. Systemschrift statt Google Fonts (kein Datentransfer an Dritte). */
:root {
  --brand: #0a7a55;
  --brand-ink: #ffffff;
  --brand-soft: #e3f3ec;
  --bg: #f6f7f5;
  --surface: #ffffff;
  --ink: #15201b;
  --muted: #5b6b63;
  --line: #dfe5e1;
  --danger: #b42318;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #3fd39d; --brand-ink: #062a1d; --brand-soft: #143328;
    --bg: #0f1513; --surface: #18201d; --ink: #eef3f0; --muted: #a3b2ab; --line: #2a3530;
    --danger: #ff8a80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #3fd39d; --brand-ink: #062a1d; --brand-soft: #143328;
  --bg: #0f1513; --surface: #18201d; --ink: #eef3f0; --muted: #a3b2ab; --line: #2a3530;
  --danger: #ff8a80; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
button, input, textarea { font: inherit; color: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 20px; letter-spacing: -0.01em; color: inherit; text-decoration: none; }
a.ghost, a.primary { text-decoration: none; }

/* Startseite */
.wrap.wide { max-width: 960px; }
.lp-hero { text-align: center; max-width: 620px; margin: 24px auto 40px; }
.lp-hero h1 { font-size: clamp(32px, 7vw, 48px); }
.lp-hero p { font-size: 19px; }
.badge { display: inline-block; font-size: 14px; font-weight: 650; color: var(--brand); background: var(--brand-soft); padding: 4px 12px; border-radius: 99px; }
.lp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }
.lp-item h2, .lp-free h2 { font-size: 20px; margin: 12px 0 6px; }
.lp-item p, .lp-free p { color: var(--muted); margin: 0; }
.lp-free h2 { margin-top: 0; }
.lp-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.lp-trust { text-align: center; margin: 40px auto 8px; max-width: 520px; }
.lp-trust p { color: var(--muted); margin: 0 0 20px; }

.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; flex: 1; }
.hero h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 16px 0 8px; }
.hero p { color: var(--muted); margin: 0 0 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.empty { text-align: center; }
.empty-icon { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty h2 { font-size: 20px; margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 20px; }

.primary, .ghost {
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer;
  font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary { background: var(--brand); color: var(--brand-ink); }
.primary:disabled { opacity: .55; cursor: not-allowed; }
.ghost { background: transparent; color: var(--brand); min-height: 44px; padding: 0 12px; }
.ghost:hover { background: var(--brand-soft); }
.empty .primary { width: 100%; }
.soon { font-size: 13px; font-weight: 600; background: rgba(255,255,255,.25); padding: 2px 8px; border-radius: 99px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 15px; }
.foot a { color: inherit; }
.foot .linkish { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* Bottom Sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 10; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  max-width: 560px; margin: 0 auto; max-height: 92dvh; overflow: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .2s ease-out;
}
.sheet.open { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
.grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }
.sheet h2 { font-size: 22px; margin: 0 0 6px; }
.hint { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field textarea, .field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg);
  padding: 12px 14px; min-height: 48px; font-size: 17px;
}
.field textarea { resize: vertical; }
.field textarea:focus, .field input:focus { border-color: var(--brand); outline: none; }
.details { margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.details ul { margin: 0; padding-left: 20px; word-break: break-word; }
.error { color: var(--danger); font-weight: 600; margin: 0 0 12px; }
.actions { display: flex; gap: 12px; justify-content: flex-end; }
.actions .primary { flex: 1; }
.done { text-align: center; padding: 8px 0; }
.done p { color: var(--muted); }
.done .primary { width: 100%; }
.check { width: 64px; height: 64px; margin: 8px auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 32px; font-weight: 800; }
[hidden] { display: none !important; }

/* Rechtstexte */
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 19px; margin: 28px 0 6px; }
.legal a { color: var(--brand); }
.legal { max-width: 720px; }

/* ---------- App ---------- */
.topnav { display: flex; gap: 0; align-items: center; }
.topnav .ghost { white-space: nowrap; padding: 0 10px; font-size: 16px; }
.capture-actions .primary, .capture-actions .ghost, .toolbar a { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.break { word-break: break-all; }
.wide { width: 100%; }
.stack { display: grid; gap: 8px; margin-top: 16px; }
.hero.tight h1 { margin-top: 4px; }
.hero.tight { margin-bottom: 16px; }
.hero.tight p { margin-bottom: 0; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); text-decoration: none; font-weight: 600; }
.card + .card, .card + .stack, .vlist + .stack, form.card + div, div + .card { margin-top: 16px; }
.card h2 { font-size: 20px; margin: 0 0 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sec-head h2 { margin: 0; }
.cover { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 8px; background: var(--line); }

.vlist { display: grid; gap: 12px; }
.vcard { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.vcard:hover { border-color: var(--brand); }
.vcard img, .vcard .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.vcard .ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 26px; }
.vcard div { display: flex; flex-direction: column; min-width: 0; }
.vcard strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.facts span { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 14px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar .primary { flex: 1 1 140px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 3px solid var(--brand-soft); padding-left: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 16px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); }
.timeline a, .timeline li > div { display: flex; flex-direction: column; padding: 8px 0 12px; color: inherit; text-decoration: none; }
.timeline a:hover strong { color: var(--brand); }
.tl-date { font-size: 13px; font-weight: 650; color: var(--brand); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.row-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.between { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hist summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; list-style: none; }
.hist summary::-webkit-details-marker { display: none; }
.hist summary h2 { margin: 0; }
.hist[open] summary { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px 14px; min-height: 48px; font: inherit; color: inherit; }
.field input.filled { border-color: var(--brand); background: var(--brand-soft); }
.chips { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-size: 15px; }
.chips input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 650; }
.chips input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.checkline { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-bottom: 12px; }
.checkline input { width: 22px; height: 22px; accent-color: var(--brand); }

.capture { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.capture-title { margin: 0 0 12px; font-weight: 600; }
.capture-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.capture-actions label { flex: 1 1 130px; }
.capture-status { margin: 12px 0 0; }
.capture-preview { margin-top: 12px; }
.capture-preview img { max-width: 100%; max-height: 220px; border-radius: 12px; display: block; }
.doc { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 72px; padding: 8px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.docs { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 12px; }
.docs li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.docs img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; display: block; }
.linkish { font: inherit; font-size: 14px; color: var(--brand); background: none; border: 0; padding: 4px 0; text-decoration: underline; cursor: pointer; min-height: 32px; }

.danger { min-height: 48px; margin-top: 16px; border-radius: 14px; border: 1.5px solid var(--danger); background: transparent; color: var(--danger); font-weight: 650; cursor: pointer; }
.google { min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fine { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.fine a { color: inherit; }
.code-input { letter-spacing: .3em; font-size: 24px !important; text-align: center; font-weight: 700; }
.code-big { font-size: 34px; font-weight: 800; letter-spacing: .12em; margin: 0 0 8px; }
.qr { width: 220px; max-width: 70vw; margin: 8px auto; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.card form .ghost.wide, form .ghost.wide { margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
#view:focus { outline: none; }

/* Freiwillige Angaben eingeklappt, damit Formulare kurz bleiben */
.more { margin: 4px 0 16px; border-top: 1px solid var(--line); }
.more > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--brand); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--brand-soft); font-weight: 700; }
.more[open] > summary::before { content: "–"; }
.more > summary em { font-style: normal; font-weight: 400; color: var(--muted); }

/* Speichern bleibt im Daumenbereich sichtbar */
form.card > .actions { position: sticky; bottom: 0; z-index: 5; margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* Tippen fühlt sich direkt an */
button, .primary, .ghost, .chips label, .more > summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:active, .primary:active, .chips label:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { button:active, .primary:active, .chips label:active { transform: none; } }
