:root {
  --vf-red: #e60000;
  --vf-red-dark: #b30000;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f5f7;
  /* Als Home-Bildschirm-App (iPad standalone) unter die Statusleiste rücken. */
  --topbar-h: env(safe-area-inset-top, 0px);
  --tabbar-h: 46px;
}

/* Statusleisten-Bereich über den Tabs in Vodafone-Weiß statt Seiten-Grau. */
.tabs::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0px); background: #fff; z-index: 25;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}

/* ---- Panel-Umschalter (Hamburger, nur mobil in der Route-Ansicht) ---- */
.panel-toggle {
  display: none; margin-left: auto; align-self: center;
  background: none; border: none; color: var(--muted); cursor: pointer;
  width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center;
}
.panel-toggle:hover { color: var(--ink); }
.panel-toggle:active { background: rgba(0,0,0,.06); }
/* Der Hamburger steuert nur das Route-Panel – in anderen Ansichten ausblenden. */
body.on-stats .panel-toggle,
body.mode-work .panel-toggle { display: none; }

/* Work-Ansicht: nur die Karte, keine Sidebar. */
body.mode-work #panel { display: none; }

/* ---- Tabs (wechseln die ganze Ansicht) ---- */
.tabs {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; height: var(--tabbar-h); z-index: 25;
  display: flex; align-items: stretch; gap: 2px;
  padding: 0 12px; background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tab {
  appearance: none; background: none; border: none;
  padding: 0 16px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; position: relative;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--vf-red); border-bottom-color: var(--vf-red); }
.tab:focus-visible {
  outline: none; color: var(--vf-red);
  box-shadow: inset 0 0 0 2px rgba(230,0,0,.25); border-radius: 8px;
}

/* ---- Ansichten (Route / Statistik / …) ---- */
.views {
  position: fixed; top: calc(var(--topbar-h) + var(--tabbar-h));
  left: 0; right: 0; bottom: 0;
}
.view { position: absolute; inset: 0; }
.view[hidden] { display: none; }

/* Vollflächige Ansicht (z.B. Statistik) */
.stats-view {
  width: 100%; height: 100%; overflow-y: auto;
  display: flex; align-items: flex-start; justify-content: center;
  background: var(--bg);
}
.tab-placeholder {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 40px 28px; color: var(--muted);
}
.tab-placeholder .tp-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fdeaea; color: var(--vf-red); margin-bottom: 8px;
}
.tab-placeholder h3 { margin: 0; font-size: 19px; color: var(--ink); }
.tab-placeholder p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 300px; }

/* Statistik: Stat-Kacheln je Ausgang-Typ */
.stats-inner { width: 100%; max-width: 780px; padding: 28px 24px 48px; }
.stats-head { margin-bottom: 20px; }
.stats-head h2 { margin: 0 0 4px; font-size: 22px; }
.stats-sub { margin: 0; color: var(--muted); font-size: 14px; }
.stats-sub strong { color: var(--ink); font-weight: 700; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px;
}
.stat-card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px;
}
.stat-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.stat-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px;
}
.stat-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.stat-value { font-size: 34px; font-weight: 800; line-height: 1.05; margin: 6px 0 12px; color: var(--ink); }
.stat-bar { height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 3px; transition: width .3s ease; }

/* ---- Layout (Route-Ansicht: Panel + Karte) ---- */
.layout {
  position: absolute; inset: 0;
  display: flex;
}
.panel {
  width: 380px; flex: 0 0 380px; height: 100%;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto;
}
.map-wrap { flex: 1; position: relative; min-width: 0; }
#map { width: 100%; height: 100%; }

/* ---- Karten-Steuerung (nur Work-Ansicht): Standort · Zoom-Joystick · Drehen ---- */
.map-controls {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 20; display: none; align-items: center; gap: 10px;
}
body.mode-work .map-controls { display: flex; }
.map-ctrl {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  background: rgba(38, 42, 51, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px; color: #fff; cursor: pointer; padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; transition: transform .08s ease, background .15s ease;
}
.map-ctrl:active { transform: scale(.93); }
.map-ctrl svg { width: 24px; height: 24px; display: block; }
/* Zoom-Joystick: vertikaler Hebel, Auslenkung bestimmt die Zoom-Geschwindigkeit. */
.map-ctrl.joystick {
  flex-direction: column; width: 48px; height: 132px;
  position: relative; cursor: ns-resize; touch-action: none;
  justify-content: space-between; padding: 9px 0;
}
.joy-hint {
  width: 18px; height: 18px; color: rgba(255, 255, 255, .65);
  user-select: none; pointer-events: none; z-index: 1;
}
.joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  transform: translate(-50%, -50%);
  transition: transform .14s cubic-bezier(.2,.8,.3,1);
  touch-action: none;
}
.map-ctrl.joystick:active { transform: none; } /* nicht das ganze Pad skalieren */
.map-ctrl.joystick.dragging { background: rgba(38, 42, 51, .72); }
.map-ctrl.joystick.dragging .joy-knob {
  transition: none; background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 0 0 4px rgba(230, 0, 0, .35);
}
.map-ctrl.active { background: rgba(230, 0, 0, .72); border-color: #fca5a5; }

/* "Mein Standort"-Punkt */
.my-location-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: #1a73e8; border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, .25), 0 1px 4px rgba(0, 0, 0, .4);
}

/* ---- Formular ---- */
.addr-form { padding: 18px 18px 10px; border-bottom: 1px solid var(--line); }
.panel-h {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--muted); margin: 0 0 14px;
}
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; padding: 11px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none; border-color: var(--vf-red);
  box-shadow: 0 0 0 3px rgba(230,0,0,.12);
}
.hint { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* ---- Straßen-Vorschläge (Autocomplete) ---- */
.input-wrap { position: relative; }
.suggest {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); overflow: hidden; max-height: 280px; overflow-y: auto;
}
.suggest.open { display: block; }
.suggest-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; cursor: pointer; border-bottom: 1px solid #f3f4f6;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.active { background: #fdeaea; }
.suggest-item svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--vf-red); }
.suggest-item .s-main { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item .s-sec { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; padding-left: 8px; }

.btn-primary {
  width: 100%; padding: 12px 16px; font-size: 15px; font-weight: 700;
  color: #fff; background: var(--vf-red); border: none; border-radius: 10px;
  cursor: pointer; transition: background .15s, transform .08s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--vf-red-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status { margin-top: 10px; font-size: 13px; min-height: 18px; color: var(--muted); }
.status.err { color: var(--vf-red); font-weight: 600; }
.status.ok { color: #157347; font-weight: 600; }

/* ---- Route-Planung ---- */
.route-box { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.route-point {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
}
.route-point + .route-point { border-top: 1px dashed var(--line); }
.rp-dot {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.rp-dot.start { background: #16a34a; }
.rp-dot.end { background: #2563eb; }
.rp-info { flex: 1; min-width: 0; }
.rp-info strong { display: block; font-size: 13.5px; }
.rp-coords {
  display: block; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.route-point.set .rp-coords { color: #157347; font-weight: 600; }
.route-point.end.set .rp-coords { color: #1d4ed8; }
.rp-btn {
  flex: 0 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s;
}
.rp-btn.icon { padding: 6px 8px; }
.rp-btn:hover { border-color: var(--vf-red); }
.rp-btn.armed { background: var(--vf-red); color: #fff; border-color: var(--vf-red); }

/* Toggle: Routing über Nadeln (Luftlinie) oder über Straßen */
.route-mode {
  display: flex; margin-top: 14px; padding: 3px;
  background: #f1f2f4; border-radius: 10px; gap: 3px;
}
.rmode {
  flex: 1; appearance: none; border: none; background: none; cursor: pointer;
  padding: 8px 6px; font-size: 13px; font-weight: 700; color: var(--muted);
  border-radius: 8px; transition: background .15s, color .15s, box-shadow .15s;
}
.rmode:hover { color: var(--ink); }
.rmode.active {
  background: #fff; color: var(--vf-red);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.route-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.route-calc { flex: 1; }
.route-calc:disabled { opacity: .55; cursor: default; }

.route-result { margin-top: 12px; }
.rr-progress { font-size: 13px; color: var(--muted); }
.rr-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  text-align: center;
}
.rr-stats > div {
  background: #f8f9fb; border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px;
}
.rr-stats strong { display: block; font-size: 16px; color: var(--vf-red); }
.rr-stats span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.rr-legend {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.rr-legend i { flex: 1; height: 6px; border-radius: 3px; }
.rr-note { margin-top: 8px; font-size: 12px; color: #b45309; }
.rr-area-note { margin-top: 8px; font-size: 12px; color: var(--vf-red); font-weight: 600; }
.route-nav {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: #fff; border: 1px solid var(--vf-red); color: var(--vf-red);
  border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .12s, color .12s;
}
.route-nav:hover { background: var(--vf-red); color: #fff; }
.route-hint { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* ---- Bereichsauswahl (Polygon) ---- */
.area-box { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.area-hint { margin: 0 0 12px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.area-actions { display: flex; align-items: center; gap: 10px; }
.btn-secondary {
  flex: 1; padding: 10px 14px; font-size: 14px; font-weight: 700;
  color: var(--vf-red); background: #fff; border: 1px solid var(--vf-red);
  border-radius: 10px; cursor: pointer; transition: background .12s, color .12s, transform .08s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-secondary svg { flex: 0 0 auto; }
.btn-secondary:hover { background: #fdeaea; }
.btn-secondary:active { transform: scale(.98); }
.btn-secondary:disabled { opacity: .55; cursor: default; }
.btn-secondary.armed { background: var(--vf-red); color: #fff; }
.area-status { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 1px; }
.area-status.active { color: var(--vf-red); font-weight: 700; }

/* Start/Ziel-Marker auf der Karte */
.vf-route-pin { position: relative; width: 36px; height: 46px; transform: translateY(-6px); cursor: grab; }
.vf-route-pin:active { cursor: grabbing; }
.vf-route-pin svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.vf-route-pin .rp-label {
  position: absolute; top: 5px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 13px; font-weight: 800; line-height: 26px; pointer-events: none;
}

/* ---- Liste ---- */
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px;
}
.list-head .panel-h { margin: 0; }
.list-head-actions { display: flex; align-items: center; gap: 2px; }
.count {
  display: inline-block; background: var(--vf-red); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  margin-left: 4px; vertical-align: middle;
}
.btn-ghost {
  background: none; border: none; color: var(--muted); font-size: 12.5px;
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.btn-ghost:hover { color: var(--vf-red); background: #fdeaea; }

.addr-list { padding: 0 12px 24px; }
.street-group { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.street-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fafafa; cursor: pointer;
  user-select: none;
}
.street-head:hover { background: #f3f4f6; }
.street-caret {
  flex: 0 0 auto; color: var(--muted); font-size: 18px; line-height: 1;
  width: 14px; text-align: center; transform: rotate(90deg);
  transition: transform .18s ease;
}
.street-group.collapsed .street-caret { transform: rotate(0deg); }
.street-group.collapsed .num-chips,
.street-group.collapsed .extend-row { display: none; }
.street-name { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; }
.street-name .city { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.street-count { font-size: 12px; color: var(--muted); }
.street-del {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 4px; border-radius: 6px;
}
.street-del:hover { color: var(--vf-red); background: #fdeaea; }
.street-add {
  background: none; border: 1px solid var(--line); color: var(--vf-red); cursor: pointer;
  width: 24px; height: 24px; border-radius: 7px; font-size: 18px; font-weight: 700;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, transform .12s;
}
.street-add:hover { background: #fdeaea; border-color: var(--vf-red); }
.street-add.open { background: var(--vf-red); color: #fff; border-color: var(--vf-red); transform: rotate(45deg); }

/* Aufklappbares Feld zum Nachtragen von Hausnummern */
.extend-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px 12px; border-top: 1px dashed var(--line); background: #fafafa;
}
.extend-input {
  flex: 1; min-width: 140px; padding: 9px 11px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.extend-input:focus {
  outline: none; border-color: var(--vf-red); box-shadow: 0 0 0 3px rgba(230,0,0,.12);
}
.extend-add {
  padding: 9px 14px; font-size: 14px; font-weight: 700; color: #fff;
  background: var(--vf-red); border: none; border-radius: 9px; cursor: pointer;
  white-space: nowrap; transition: background .12s;
}
.extend-add:hover { background: var(--vf-red-dark); }
.extend-add:disabled { opacity: .6; cursor: default; }
.extend-status { flex-basis: 100%; font-size: 12.5px; color: var(--muted); min-height: 1px; }
.extend-status.err { color: var(--vf-red); font-weight: 600; }

.num-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 6px 4px 11px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--vf-red); }
.chip.imprecise { border-style: dashed; color: #b45309; }
.chip.imprecise::before { content: "≈"; font-weight: 700; }
.chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: #f1f1f1;
  color: var(--muted); font-size: 13px;
}
.chip-x:hover { background: var(--vf-red); color: #fff; }

.empty { padding: 24px 18px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---- Karten-Pin ---- */
.vf-pin {
  position: relative; cursor: pointer;
  width: 30px; height: 40px; transform: translateY(-4px);
}
.vf-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.vf-pin .num {
  position: absolute; top: 4px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 11px; font-weight: 800; line-height: 22px;
  pointer-events: none;
}
.vf-pin.imprecise svg path { fill: #f59e0b; }
/* Pin außerhalb des ausgewählten Bereichs – abgeblendet, nicht für die Route. */
.vf-pin { transition: opacity .2s, filter .2s; }
.vf-pin.dimmed { opacity: .3; filter: grayscale(1); }
/* Badge: Anzahl erfasster Ausgänge (Work-Modus). Farbe = zuletzt erfasster Ausgang. */
.vf-pin .vf-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #111; color: #fff; font-size: 10.5px; font-weight: 800;
  line-height: 17px; text-align: center; box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}

/* Ecken-Punkt beim Zeichnen des Auswahl-Polygons */
.vf-vertex {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--vf-red); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
  transform: translateY(50%);   /* Mittelpunkt auf die Ecke legen */
  pointer-events: none;         /* Karten-Klicks nicht abfangen */
}

/* ---- Work-Panel (Ausgänge je Haus) ---- */
.work-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 90%;
  z-index: 18; background: #fff; border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transform: translateX(14px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .18s ease, opacity .18s ease, visibility .18s ease;
}
.work-panel.open {
  transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto;
}

.wp-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.wp-title { flex: 1; min-width: 0; }
.wp-title strong { display: block; font-size: 15px; line-height: 1.25; }
.wp-city { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.wp-close {
  flex: 0 0 auto; background: none; border: none; color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer; padding: 5px 7px; border-radius: 8px;
}
.wp-close:hover { color: var(--vf-red); background: #fdeaea; }

.wp-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.wp-section-h {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 6px;
}
.wp-section-h .wp-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.wp-list-h { margin-top: 20px; }

.wp-outcomes { display: flex; flex-direction: column; gap: 6px; }
.wp-out {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink);
  transition: border-color .12s, background .12s, transform .06s;
}
.wp-out:hover { border-color: var(--vf-red); background: #fdfafa; }
.wp-out:active { transform: scale(.99); }
.wp-out-label { flex: 1; text-align: left; }
.wp-dot {
  flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.05);
}
.wp-out-count {
  flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.wp-list { display: flex; flex-direction: column; gap: 6px; }
.wp-empty { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 6px 2px; }
.wp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa;
}
.wp-item-info { flex: 1; min-width: 0; }
.wp-item-info strong { display: block; font-size: 13.5px; }
.wp-time { display: block; font-size: 11.5px; color: var(--muted); }
.wp-del {
  flex: 0 0 auto; background: none; border: none; color: var(--muted);
  font-size: 14px; cursor: pointer; padding: 4px 7px; border-radius: 6px;
}
.wp-del:hover { color: var(--vf-red); background: #fdeaea; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #222; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Mobile ---- */
@media (max-width: 780px) {
  .panel-toggle { display: flex; }
  .panel {
    position: absolute; z-index: 20; width: 100%; flex-basis: 100%;
    max-height: calc(100% - 0px); box-shadow: 0 8px 24px rgba(0,0,0,.15);
    transition: transform .25s ease;
  }
  .panel.hidden { transform: translateY(-100%); }
  .map-wrap { position: absolute; inset: 0; }
  .work-panel { width: 100%; max-width: 100%; border-left: none; }
}
