* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:#f4f1ec; color:#1a1a1a; padding:12px; max-width:560px; margin:0 auto;
    min-height:100vh;
  }
  header {
    display:flex; align-items:center; justify-content:space-between;
    padding:8px 4px 16px;
  }
  header .title { font-size:20px; font-weight:700; color:#5a1a1a; display:flex; align-items:center; gap:8px; }
  header .title img { width:32px; height:32px; border-radius:50%; }
  header .badge { font-size:13px; color:#7a6a5a; }

  .notice {
    background:#fff8e1; border:1px solid #f0e0a0; color:#6a5010;
    padding:10px 12px; border-radius:10px; font-size:13px; line-height:1.4;
    margin-bottom:12px;
  }
  .notice.hidden { display:none; }

  .tabs { display:flex; gap:8px; margin-bottom:12px; }
  .tab {
    flex:1; padding:14px; border-radius:12px; border:none; cursor:pointer;
    font-size:16px; font-weight:600; background:#fff; color:#5a1a1a;
    box-shadow:0 1px 3px rgba(0,0,0,0.06);
  }
  .tab.active { background:#3a4a5a; color:#fff; }

  .card {
    background:#fff; border-radius:14px; padding:16px;
    box-shadow:0 2px 8px rgba(0,0,0,0.06); margin-bottom:12px;
  }

  video, #preview {
    width:100%; border-radius:12px; background:#000;
    aspect-ratio:4/3; object-fit:cover; display:block;
  }
  #preview { display:none; }

  .btn {
    width:100%; padding:16px; border-radius:12px; border:none;
    font-size:17px; font-weight:700; cursor:pointer; margin-top:10px;
    background:#3a4a5a; color:#fff;
  }
  .btn:active { transform:scale(0.98); }
  .btn.secondary { background:#fff; color:#3a4a5a; border:1.5px solid #3a4a5a; }
  .btn.small { padding:12px; font-size:15px; margin-top:8px; }
  .btn.hidden { display:none; }

  .status-safe   { color:#1e7a3a; font-weight:700; }
  .status-unsure { color:#2f5f7a; font-weight:700; }
  .status-none   { color:#b03030; font-weight:700; }
.status-manual { color:#2f5f7a; font-weight:700; }
.status-safe::before,.status-unsure::before,.status-none::before{display:inline-flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;margin-right:.5em;border-radius:50%;color:#fff;font-size:.95em;font-weight:800;vertical-align:middle;line-height:1}
.status-safe::before{content:'\2713';background:#1e7a3a}
.status-unsure::before{content:'!';background:#2f5f7a}
.status-none::before{content:'\2717';background:#b03030}

  .rohtext { color:#666; font-size:14px; margin:6px 0 12px; word-break:break-word; }
  .street-name { font-size:24px; font-weight:800; color:#1a1a1a; margin:4px 0 2px; }
  .street-info { color:#666; font-size:15px; margin-bottom:12px; }

  .hausnr-row { display:flex; align-items:center; gap:10px; margin:12px 0; }
  .hausnr-row label { font-weight:600; font-size:15px; }
  .hausnr-row input {
    flex:1; padding:12px; font-size:20px; font-weight:700;
    border:1.5px solid #ccc; border-radius:10px; text-align:center;
    max-width:120px;
  }
  .hint { font-size:13px; color:#7a6a5a; margin-top:4px; }

  .zone {
    padding:14px; border-radius:12px; margin:14px 0;
    font-size:16px; font-weight:700;
  }
  .zone.herbede { background:#d4f4dd; color:#1e5a2a; }
  .zone.other   { background:#ffe0b2; color:#7a4500; }
  .zone .sub    { font-weight:400; font-size:14px; margin-top:3px; opacity:0.8; }

  .search-input {
    width:100%; padding:14px; font-size:17px; border:2px solid #3a4a5a;
    border-radius:10px; margin-bottom:10px;
  }
  .suggestion {
    padding:12px; border-radius:10px; border:1px solid #e0dcd4;
    background:#faf8f5; margin-bottom:8px; cursor:pointer;
  }
  .suggestion:active { background:#f0ece4; }
  .suggestion .sname { font-size:16px; font-weight:600; }
  .suggestion .sinfo { font-size:13px; margin-top:4px; }
  .pill {
    display:inline-block; padding:3px 9px; border-radius:20px;
    font-size:12px; font-weight:700; margin-left:6px;
  }
  .pill.green  { background:#d4f4dd; color:#1e5a2a; }
  .pill.orange { background:#ffe0b2; color:#7a4500; }

  .fahrt-item {
    background:#fff; border-radius:14px; padding:16px; margin-bottom:12px;
    box-shadow:0 2px 8px rgba(0,0,0,0.06); position:relative;
  }
  .fahrt-nr {
    position:absolute; top:16px; left:16px;
    width:34px; height:34px; border-radius:50%;
    background:#3a4a5a; color:#fff; font-weight:800;
    display:flex; align-items:center; justify-content:center; font-size:15px;
  }
  .fahrt-body { margin-left:46px; }
  .fahrt-street { font-size:19px; font-weight:800; }
  .fahrt-info { font-size:14px; color:#666; margin-top:2px; }
  .fahrt-actions { display:flex; gap:8px; margin-top:14px; }
  .fahrt-actions .btn { margin-top:0; }
  .move-col { display:flex; flex-direction:column; gap:4px; position:absolute; top:14px; right:14px; }
  .move-btn {
    width:38px; height:34px; border-radius:8px; border:1px solid #ddd;
    background:#faf8f5; font-size:14px; cursor:pointer;
  }
  .move-btn:disabled { opacity:0.3; }
  .empty { text-align:center; color:#888; padding:30px 16px; font-size:15px; }

  .msg-item {
    padding:14px; border-radius:12px; background:#fff8e1;
    border-left:4px solid #b8860b; margin-bottom:10px;
  }
  .msg-item .time { font-size:12px; color:#888; }
  .msg-item .text { font-size:16px; font-weight:600; margin-top:4px; }
[hidden]{display:none!important}
.badge{background:none;border:1px solid #c9bfb0;border-radius:20px;padding:6px 12px;cursor:pointer}
.fahrt-item.done{opacity:.55}.fahrt-item.done .fahrt-street{text-decoration:line-through}
textarea.search-input{font-size:13px;word-break:break-all}
.hint.err{color:#b03030}.sig{font-weight:700;margin-bottom:12px}.sig.ok{color:#1e7a3a}.sig.err{color:#b03030}
html,body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
input,textarea{-webkit-user-select:text;user-select:text}
body{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
header{padding-top:max(10px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between}
.tabs{position:fixed;left:0;right:0;bottom:0;margin:0;display:flex;gap:6px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d9d2c8;z-index:10}
.tabs .tab{flex:1}
#hits{max-height:52vh;overflow-y:auto}
.hd{font-size:12px;color:#666;margin:10px 0 4px}
.badge{background:#5a1a1a;color:#fff;border:0;border-radius:20px;padding:7px 14px;font-size:13px}
.hn-warn{background:#fdeeee;color:#9b2020;border:1px solid #e3b4b4;border-radius:10px;padding:10px;font-weight:600;margin:8px 0}
.hn-alt{display:flex;gap:8px;margin-top:8px}.hausnr-row input.rot{border-color:#b03030!important;background:#fdeeee}

.camwrap{position:relative;overflow:hidden;border-radius:10px}
.frame{position:absolute;left:8%;top:30%;width:84%;height:40%;background:transparent!important;border:3px solid #fff;border-radius:10px;box-shadow:0 0 0 999px rgba(0,0,0,.35);pointer-events:none}
.frame span{position:absolute;top:-26px;left:0;color:#fff;background:rgba(0,0,0,.6);padding:3px 10px;border-radius:6px;font-size:12px;font-weight:600}
.scanrow{display:flex;gap:8px}
.scanrow .btn{flex:1;margin-top:10px}
.frame.rot{border-color:#e05050}.frame.gelb{border-color:#e0b030}.frame.gruen{border-color:#3fae6a}
.btn2{background:#2f6f62}
/* Pfeile (▲▼) liegen rechts in eigener Spalte: Text und Buttons der offenen Fahrten halten Abstand */
#liste .fahrt-body{margin-right:48px}
#liste .fahrt-actions{margin-right:42px}

/* ---- Fahrtenliste: Zettel mit Gruppenbalken, Kürzel, Warnung (Stand 31.10.2026) ---- */
#warn{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;background:var(--rot,#E74C3C);color:#fff;font-weight:800;font-size:17px;line-height:1.3;text-align:center;padding:14px 12px;border-radius:12px;margin-bottom:12px;box-shadow:0 3px 10px rgba(0,0,0,.28)}
.fz{display:flex;background:#fff;border-radius:14px;margin-bottom:12px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden;--c:#8a8378;--t:#fff}
.fz.rot{box-shadow:0 0 0 2px var(--c),0 2px 8px rgba(0,0,0,.12)}
.fz-bar{flex:0 0 48px;background:var(--c);display:flex;align-items:center;justify-content:center}
.fz-bar span{width:34px;height:34px;border-radius:50%;background:#fff;color:var(--c);font-weight:800;font-size:17px;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.fz.gelb .fz-bar span{color:#2b2200}
.fz-main{flex:1;min-width:0;padding:12px}
.fz-top{display:flex;align-items:flex-start;gap:10px}
.fz .fz-nr{position:static;flex:0 0 34px;background:#1f2f4a}
.fz-txt{flex:1;min-width:0}
.fz-street{font-size:19px;font-weight:800;line-height:1.2;word-break:break-word}
.fz-info{font-size:14px;color:#555;margin-top:3px}
.fz .move-col{position:static;flex:0 0 auto;gap:6px}
.fz .move-btn{width:44px;height:40px;font-size:16px}
.fz-act{display:flex;gap:8px;margin-top:10px}
.fz-act .btn{margin-top:0;flex:1;padding:13px 6px;font-size:16px}
.fz-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 8px;margin-top:10px;padding-top:8px;border-top:1px solid #ece7de;font-size:13px;color:#444}
.fz-route{font-weight:600;flex:1 1 130px;min-width:0}
.fz-pill{background:var(--c);color:var(--t);border-radius:20px;padding:5px 12px;font-weight:800;font-size:14px;text-align:center}
.fz.rest .fz-pill{background:#e6e1d8;color:#333}
.fz.rest{border-left:0}
.dlg{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:20px}
.dlgbox{background:#fff;border-radius:16px;padding:22px 18px 16px;width:100%;max-width:360px;box-shadow:0 8px 30px rgba(0,0,0,.35)}
#dlgtxt{font-size:19px;line-height:1.45;text-align:center;margin-bottom:6px}
.dlgbtn{display:flex;gap:10px}.dlgbtn .btn{flex:1;font-size:19px;padding:16px}

/* ---- Feinschliff: schmale Handys, Hausnummer bleibt in der Zeile ---- */
.fz-bar{flex:0 0 42px}
.fz-bar span{width:30px;height:30px;font-size:15px}
.fz-main{padding:10px}
.fz-top{gap:8px}
.fz .fz-nr{flex:0 0 30px;width:30px;height:30px;font-size:15px}
.fz .move-btn{width:40px}
.fz-street{font-size:clamp(16px,4.9vw,19px)}

/* v51: Tab-Beschriftung bleibt einzeilig, auch bei "Erledigt (12)" auf schmalen Handys */
.tabs .tab{white-space:nowrap;padding-left:4px;padding-right:4px;font-size:clamp(14px,4.3vw,17px)}
