*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1f2937;background:#e2e8f0}button,input,select{font:inherit}.workspace{display:grid;grid-template-rows:34px minmax(0,1fr) 155px;width:100vw;height:100vh}.editor-row{display:grid;grid-template-columns:540px minmax(0,1fr) 390px;min-width:0;min-height:0}.map-panel{display:grid;grid-template-rows:minmax(0,1fr) 38px;position:relative;min-width:0;min-height:0;background:#dbeafe}#map{position:relative;width:100%;height:100%;min-height:0}.sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;border-left:1px solid #cbd5e1;background:#fff}.sidebar-header{padding:18px 20px;border-bottom:1px solid #e2e8f0}.sidebar-header h1{margin:0;font-size:23px}.sidebar-header p{margin:4px 0 0;color:#64748b}.sidebar-content{display:grid;grid-template-rows:minmax(150px,1fr) auto;flex:1;min-height:0;overflow:hidden}.properties-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain}.properties{padding:18px 20px;overflow:visible}.properties h2{margin:0 0 16px}.properties h3{margin:22px 0 10px;font-size:16px}.field{display:grid;gap:6px;margin-bottom:14px}.field>span{font-size:13px;font-weight:700;color:#475569}.field input,.field select{width:100%;min-height:40px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:7px;background:#fff}.field input[readonly]{background:#f1f5f9;color:#64748b;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}button{min-height:40px;padding:8px 12px;border:1px solid #94a3b8;border-radius:7px;background:#f8fafc;color:#0f172a;cursor:pointer}button:hover{background:#e2e8f0}button.primary{width:100%;border-color:#2563eb;background:#2563eb;color:#fff}button.primary:hover{background:#1d4ed8}.info-box,.success-box,.warning-box{margin:12px 0;padding:11px 12px;border-radius:8px;line-height:1.4;font-size:14px}.info-box{background:#eff6ff;color:#1e3a8a}.success-box{background:#ecfdf5;color:#065f46}.warning-box{background:#fff7ed;color:#9a3412}.empty-state{color:#64748b}.status-panel{padding:12px 20px 15px;border-top:1px solid #e2e8f0;background:#f8fafc;font-size:13px}#status-text{margin-top:4px;color:#475569}.debug-panel{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;border-top:2px solid #334155;background:#0f172a;color:#e2e8f0}.debug-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:9px 14px;border-bottom:1px solid #334155}.debug-header div{display:flex;align-items:baseline;gap:12px}.debug-header span{color:#94a3b8;font-size:12px}.debug-header button{min-height:30px;padding:4px 9px;border-color:#64748b;background:#1e293b;color:#e2e8f0;font-size:12px}#debug-output{min-height:0;padding:12px 14px 20px;overflow:auto;tab-size:2;font:12px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.leaflet-pm-toolbar .leaflet-buttons-control-button{width:30px;min-height:30px;padding:0;border:0;border-radius:0}@media(max-width:900px){html,body{overflow:auto}.workspace{grid-template-rows:auto 320px;height:auto;min-height:100vh}.editor-row{grid-template-columns:1fr;grid-template-rows:60vh auto}.sidebar{min-height:50vh;border-left:0;border-top:1px solid #cbd5e1}}
.event-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
}

.event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #334155;
}

.event-header button {
    min-height: 30px;
    padding: 4px 8px;
    border-color: #64748b;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
}

#event-output {
    min-height: 0;
    margin: 0;
    padding: 10px 12px 18px;
    overflow: auto;
    white-space: pre-wrap;
    font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 1150px) {
    .editor-row {
        grid-template-columns: 220px minmax(0, 1fr) 350px;
    }
}

@media (max-width: 900px) {
    .editor-row {
        grid-template-columns: 1fr;
        grid-template-rows: 220px 60vh auto;
    }

    .event-panel {
        border-right: 0;
        border-bottom: 1px solid #334155;
    }
}

.debug-json {
    margin: 0;
    white-space: pre-wrap;
    font: inherit;
}

.debug-route {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

.debug-route-title {
    margin-bottom: 7px;
    color: #93c5fd;
    font-weight: 700;
}

.debug-coordinates {
    margin-top: 8px;
}

.debug-coordinates summary {
    width: fit-content;
    padding: 4px 7px;
    border: 1px solid #475569;
    border-radius: 5px;
    background: #1e293b;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
}

.debug-coordinates[open] summary {
    margin-bottom: 8px;
}

.leaflet-tooltip,
.leaflet-pane .leaflet-tooltip,
.leaflet-pm-tooltip {
    pointer-events: none !important;
}

.leaflet-pane .leaflet-interactive[stroke="#e67e22"] {
    pointer-events: none;
}

.route-direction-indicator-wrapper {
    background: transparent;
    border: 0;
    pointer-events: none;
}

.route-direction-indicator {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    color: #e67e22;
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
    pointer-events: none;
    text-shadow:
        -2px -2px 0 #ffffff,
         2px -2px 0 #ffffff,
        -2px  2px 0 #ffffff,
         2px  2px 0 #ffffff;
}

.event-panel #debug-output {
    min-height: 0;
    overflow: auto;
    padding: 10px 12px 18px;
}

.debug-panel #event-output {
    min-height: 0;
    margin: 0;
    padding: 12px 14px 20px;
    overflow: auto;
    white-space: pre-wrap;
    font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Einheitlicher Cursor in allen Karten-Bearbeitungsmodi. */
#map,
#map *,
.leaflet-container,
.leaflet-container.crosshair-cursor-enabled,
.leaflet-marker-icon,
.leaflet-interactive,
.leaflet-pm-icon-marker,
.leaflet-pm-draggable {
    cursor: crosshair !important;
}

.route-action-tooltip,
.point-action-tooltip,
.point-delete-tooltip,
.point-connect-tooltip,
.route-delete-tooltip {
    border: 1px solid #334155;
    border-radius: 6px;
    background: rgba(15, 23, 42, .96);
    color: #f8fafc;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    font: 600 12px/1.2 system-ui, sans-serif;
    white-space: nowrap;
    pointer-events: none !important;
}

.point-delete-tooltip {
    border-color: #dc2626;
}

.point-connect-tooltip {
    border-color: #e67e22;
}

.route-delete-tooltip {
    border-color: #dc2626;
}

.route-overlap-tooltip {
    border-color: #dc2626;
    background: rgba(127, 29, 29, .97);
    color: #ffffff;
}

.leaflet-pm-toolbar a.revier-local-edit-active,
.leaflet-pm-toolbar button.revier-local-edit-active,
a.revier-local-edit-active,
button.revier-local-edit-active {
    background-color: #dbeafe !important;
    box-shadow: inset 0 0 0 2px #2563eb;
}

/* Auswahl einer Strecke aktiviert die Bearbeitung automatisch. */
.leaflet-pm-toolbar .leaflet-pm-icon-edit,
.leaflet-pm-icon-edit {
    display: none !important;
}

.revier-edit-marker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}

.revier-edit-marker {
    display: block;
    box-sizing: border-box;
    border-radius: 50%;
    background: #ffffff;
    cursor: crosshair;
}

.revier-main-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: #e67e22;
}

.revier-main-marker-inner {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
}

.revier-midpoint-marker {
    width: 9px;
    height: 9px;
    border: 2px solid #e67e22;
    background: rgba(255, 255, 255, .9);
}

.revier-edit-marker-wrapper,
.revier-edit-marker-wrapper * {
    touch-action: none;
    user-select: none;
}


.combobox {
    position: relative;
    width: 100%;
}

.combobox-input {
    width: 100%;
    background-color: #ffffff;
}

.combobox-menu {
    position: absolute;
    z-index: 1400;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}

.combobox-menu[hidden] {
    display: none;
}

.combobox-option {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.combobox-option:last-of-type {
    border-bottom: 0;
}

.combobox-option:hover,
.combobox-option:focus {
    background: #e0f2fe;
    outline: none;
}

.combobox-option[hidden] {
    display: none;
}

.combobox-empty {
    padding: 9px 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.combobox-empty[hidden] {
    display: none;
}


.leaflet-pm-toolbar .leaflet-pm-icon-edit,
.leaflet-pm-toolbar a.leaflet-pm-icon-edit,
.leaflet-pm-toolbar button.leaflet-pm-icon-edit {
    display: none !important;
}

.route-direction-preview-wrapper {
    z-index: 900 !important;
}

.route-direction-preview-wrapper .route-direction-indicator {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, .95));
    transform-origin: 50% 50%;
}


.route-direction-indicator.orange {
    color: #e67e22;
}

.route-direction-indicator.black {
    color: #111827;
    font-size: 22px;
    text-shadow:
        -2px -2px 0 #ffffff,
         2px -2px 0 #ffffff,
        -2px  2px 0 #ffffff,
         2px  2px 0 #ffffff;
}

.route-direction-preview-wrapper .route-direction-indicator {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, .95));
}

.map-display-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border-top: 1px solid #94a3b8;
    background: rgba(248, 250, 252, .98);
    color: #334155;
    font-size: 12px;
    white-space: nowrap;
}

.map-display-toolbar-title {
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.map-display-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.map-display-toggle input {
    margin: 0;
}

.map-display-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
}

.map-display-symbol.orange {
    color: #e67e22;
}

.map-display-symbol.black {
    color: #111827;
}


.route-drawing-direction-wrapper,
.route-drawing-direction-wrapper * {
    pointer-events: none !important;
}

.route-drawing-direction-wrapper .route-direction-indicator,
.route-direction-indicator.black {
    color: #000000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: drop-shadow(0 1px 1px rgba(255,255,255,.95));
}

.route-internal-label-wrapper {
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.route-internal-label-rotator {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: center center;
    overflow: visible;
    pointer-events: none;
}

.route-internal-label {
    display: inline-block;
    transform: translateY(calc(-100% - 9px));
    max-width: 220px;
    padding: 2px 6px;
    border: 1px solid rgba(51,65,85,.45);
    border-radius: 4px;
    background: rgba(255,255,255,.92);
    color: #111827;
    box-shadow: 0 1px 4px rgba(15,23,42,.18);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.map-display-symbol.label {
    width: 20px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}


#reverse-route-direction {
    width: 100%;
    margin: 2px 0 4px;
    border-color: #64748b;
    background: #f8fafc;
    font-weight: 700;
}

#reverse-route-direction:hover {
    background: #e2e8f0;
}


.junction-marker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}

.junction-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
    box-shadow:
        0 0 0 2px #991b1b,
        0 2px 7px rgba(15,23,42,.35);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    pointer-events: auto;
}


.junction-marker-wrapper[style*="pointer-events: none"] .junction-marker {
    pointer-events: none !important;
}

.field textarea {
    width: 100%;
    padding: 8px 10px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    font: inherit;
}


.junction-marker-selected .junction-marker {
    width: 32px;
    height: 32px;
    border-color: #fef3c7;
    box-shadow:
        0 0 0 2px #f59e0b,
        0 3px 9px rgba(15,23,42,.45);
}


.debug-group {
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 2px solid #cbd5e1;
}

.debug-group .debug-group {
    margin: 8px 0 0 10px;
    padding: 0 0 0 10px;
    border-bottom: 0;
    border-left: 3px solid #94a3b8;
}

.debug-group-title {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 8px;
    padding: 7px 9px;
    border-radius: 5px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.debug-marker {
    border-left-color: #dc2626;
}


/* neu_2.65: flacher Eventlog für mehr Höhe in Karte und Seitenleiste */
.debug-panel {
    min-height: 0;
}

.debug-header {
    padding-top: 5px;
    padding-bottom: 5px;
}

.debug-panel #event-output {
    padding-top: 7px;
    padding-bottom: 10px;
    font-size: 10px;
    line-height: 1.35;
}


/* neu_2.67: Kreuzung beim Ziehen markieren, ohne setIcon() auszulösen */
.junction-marker-dragging .junction-marker {
    box-shadow:
        0 0 0 2px rgba(245,158,11,.45),
        0 4px 12px rgba(15,23,42,.28);
}


/* Automatischer Marker für Fahrgebietwechsel */
.fgw-marker-wrapper {
    background: transparent;
    border: 0;
    pointer-events: none;
}

.fgw-marker {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    box-shadow:
        0 0 0 2px #1d4ed8,
        0 4px 10px rgba(15,23,42,.28);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    user-select: none;
}

.fgw-marker-offset .fgw-marker {
    transform: translate(32px,-5px);
}


.checkbox-field{display:flex;align-items:center;gap:9px;margin:8px 0 12px;font-size:13px;font-weight:700;color:#475569}
.checkbox-field input{width:18px;height:18px;margin:0}
.harbor-marker-wrapper{background:transparent;border:0}
.harbor-marker{display:grid;place-items:center;width:32px;height:32px;border:2px solid #fff;border-radius:50%;background:#16a34a;color:#fff;box-shadow:0 0 0 2px #15803d,0 4px 10px rgba(15,23,42,.28);font-size:10px;font-weight:900;line-height:1;user-select:none}
.harbor-marker-selected .harbor-marker,.harbor-marker-dragging .harbor-marker{box-shadow:0 0 0 2px rgba(245,158,11,.48),0 4px 12px rgba(15,23,42,.3)}
.harbor-control button.harbor-control-button{display:grid;place-items:center;width:30px;min-height:30px;padding:0;border:0;border-radius:0;background:#fff;color:#15803d;font-size:11px;font-weight:900}
.harbor-control button.harbor-control-button:hover,.harbor-control button.harbor-control-active{background:#dcfce7;color:#166534}


/* Gemeinsames Werkzeug für manuell angelegte Marker */
.harbor-control {
    display: none !important;
}

.manual-marker-control {
    position: relative;
    margin-top: 10px;
}

.manual-marker-main-button {
    display: grid;
    place-items: center;
    width: 30px;
    min-height: 30px;
    padding: 0;
    border: 2px solid rgba(0,0,0,.2);
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.manual-marker-main-button:hover,
.manual-marker-main-button.manual-marker-control-active {
    background: #dbeafe;
}

.manual-marker-menu {
    position: absolute;
    z-index: 1500;
    top: 0;
    left: 38px;
    width: 180px;
    padding: 5px;
    border: 1px solid #94a3b8;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15,23,42,.24);
}

.manual-marker-menu[hidden] {
    display: none;
}

.manual-marker-menu-item {
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 36px;
    padding: 5px 8px;
    border: 0;
    border-radius: 5px;
    background: #ffffff;
    text-align: left;
}

.manual-marker-menu-item:hover {
    background: #eff6ff;
}

.manual-marker-menu-symbol {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    font-size: 10px;
    font-weight: 900;
}


/* neu_2.71: gemeinsamer Markerbutton sichtbar in der linken Kartenleiste */
.manual-marker-control.leaflet-control {
    display: block !important;
    margin-top: 10px;
    clear: both;
}

.manual-marker-main-button {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 1px 5px rgba(0,0,0,.35);
}

.manual-marker-main-button::before {
    content: "M";
    font-size: 14px;
    font-weight: 900;
}

.manual-marker-main-button {
    font-size: 0 !important;
}


/* Sackgassen wie in V43: lila und gestrichelt */
.leaflet-pane svg path[stroke="#7e22ce"] {
    pointer-events: none !important;
}


/* Kreuzung ohne Zahl im Kern; Zähler als eigener Ballon darüber */
.junction-marker {
    color: transparent;
}

.junction-count-badge-wrapper {
    background: transparent;
    border: 0;
    pointer-events: none !important;
}

.junction-count-badge {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #991b1b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15,23,42,.35);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.undo-route-merge-button {
    width: 100%;
    margin: 12px 0 4px;
    border-color: #b45309;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

.undo-route-merge-button:hover {
    background: #ffedd5;
}


/* neu_2.74: Kreuzung bleibt oberhalb der Strecken-Bearbeitungspunkte greifbar */
.leaflet-junctionMarkerPane {
    pointer-events: auto !important;
}

.leaflet-junctionMarkerPane .junction-marker-wrapper,
.leaflet-junctionMarkerPane .junction-marker {
    pointer-events: auto !important;
    cursor: move !important;
}

.leaflet-junctionBadgePane,
.leaflet-junctionBadgePane * {
    pointer-events: none !important;
}

.route-undo-section {
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #fff7ed;
}

.route-undo-section > strong {
    display: block;
    margin-bottom: 7px;
    color: #9a3412;
    font-size: 13px;
}

.route-undo-section .undo-route-merge-button {
    margin: 0;
}

.route-merge-section {
    margin-top: 18px;
    padding-top: 2px;
    border-top: 1px solid #e2e8f0;
}


/* neu_2.75: HH bleibt nach Typwechsel frei greifbar */
.harbor-marker-wrapper,
.harbor-marker-wrapper .harbor-marker {
    pointer-events: auto !important;
    cursor: move !important;
}


/* neu_2.76: Beim Linienzeichnen übernimmt die Karte den Klick auf HH. */
.harbor-marker-wrapper[style*="pointer-events: none"],
.harbor-marker-wrapper[style*="pointer-events: none"] .harbor-marker {
    pointer-events: none !important;
}


/* Vorankündigung */
.advance-warning-marker-wrapper {
    background: transparent;
    border: 0;
    pointer-events: auto;
}

.advance-warning-marker {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    box-shadow:
        0 0 0 2px #b45309,
        0 4px 10px rgba(15,23,42,.28);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    cursor: move;
    user-select: none;
}

.advance-warning-marker-selected .advance-warning-marker {
    box-shadow:
        0 0 0 2px rgba(37,99,235,.5),
        0 4px 12px rgba(15,23,42,.3);
}

.leaflet-deadEndPane {
    pointer-events: none !important;
}


#va-resolved-direction {
    background: #f8fafc;
    font-weight: 800;
}

#va-apply-distance {
    width: 100%;
    margin-bottom: 8px;
}

.va-navi-main{display:flex;flex-direction:column;justify-content:center;gap:12px;padding:18px}
.va-navi-row{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:14px;min-height:72px;padding:8px 12px;border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font-size:22px;font-weight:800}
.va-navi-arrow{font-size:48px;line-height:1;text-align:center}
#va-start-placement:disabled{opacity:.5;cursor:not-allowed}


/* neu_2.80: VA-Navi innerhalb des normalen Displayaufbaus */
.va-navi-main {
    justify-content: flex-start;
    padding-top: 12px;
}

.va-navi-row {
    min-height: 62px;
}

.va-navi-text {
    min-width: 0;
}

.va-navi-distance {
    display: block;
    margin-top: 3px;
    color: #fbbf24;
    font-size: 15px;
    font-weight: 800;
}

.va-navi-distance[hidden] {
    display: none;
}


/* neu_2.81: Entfernungsanzeige am VA-Fangpunkt */
.route-placement-preview-label-wrapper {
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.route-placement-preview-label {
    display: inline-block;
    min-width: max-content;
    padding: 8px 12px;
    border: 2px solid #b45309;
    border-radius: 7px;
    background: rgba(255,247,237,.97);
    color: #7c2d12;
    box-shadow: 0 3px 10px rgba(15,23,42,.25);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

/* Kompakte VA-Darstellung innerhalb der vorhandenen Navi-Fläche */
.va-navi-main-compact {
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 8px 12px;
    overflow: hidden;
}

.va-navi-row-compact {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    min-height: 0;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}

.va-navi-arrow-box {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
}

.va-navi-arrow-svg {
    display: block;
    width: 40px;
    height: 40px;
    overflow: visible;
    fill: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.va-navi-label {
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.12;
    text-overflow: ellipsis;
}

.va-navi-row-compact .va-navi-distance {
    margin-top: 1px;
    color: #fbbf24;
    font-size: 13px;
    line-height: 1.1;
}


/* neu_2.82: einheitliche deutliche Markerauswahl */
.harbor-marker-selected .harbor-marker,
.advance-warning-marker-selected .advance-warning-marker,
.junction-marker-selected .junction-marker {
    width: 32px;
    height: 32px;
    border-color: #fef3c7;
    box-shadow:
        0 0 0 2px #f59e0b,
        0 4px 12px rgba(15,23,42,.38);
}

/* Zuverlässige Entfernungsanzeige während der VA-Platzierung */
.route-placement-preview-tooltip {
    padding: 5px 8px;
    border: 2px solid #b45309;
    border-radius: 7px;
    background: rgba(255,247,237,.98);
    color: #7c2d12;
    box-shadow: 0 3px 10px rgba(15,23,42,.25);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.route-placement-preview-tooltip::before {
    border-right-color: #b45309 !important;
}


/* neu_2.83: Auswahl ohne Austausch des Leaflet-Marker-DOMs */
.leaflet-marker-icon.harbor-marker-selected .harbor-marker,
.leaflet-marker-icon.advance-warning-marker-selected .advance-warning-marker,
.leaflet-marker-icon.junction-marker-selected .junction-marker {
    width: 32px;
    height: 32px;
    border-color: #fef3c7;
    box-shadow:
        0 0 0 2px #f59e0b,
        0 4px 12px rgba(15,23,42,.38);
}


.route-point-spacing-section {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.route-point-spacing-section h3 {
    margin: 0 0 10px;
}


/* neu_2.86: eigenständige Entfernungsanzeigen */
.route-placement-distance-label-wrapper,
.drawing-distance-label-wrapper {
    background: transparent;
    border: 0;
}

.route-placement-distance-label,
.drawing-distance-label {
    display: inline-block;
    min-width: max-content;
    padding: 6px 9px;
    border: 2px solid #b45309;
    border-radius: 7px;
    background: rgba(255,247,237,.98);
    color: #7c2d12;
    box-shadow: 0 3px 10px rgba(15,23,42,.28);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
    pointer-events: none;
}

.drawing-distance-label span {
    font-weight: 700;
}




/* neu_2.90: Entfernung beim Verschieben eines VA */
.advance-warning-drag-distance-wrapper {
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.advance-warning-drag-distance {
    display: inline-block;
    min-width: max-content;
    padding: 8px 12px;
    border: 2px solid #b45309;
    border-radius: 7px;
    background: rgba(255,247,237,.98);
    color: #7c2d12;
    box-shadow: 0 3px 10px rgba(15,23,42,.25);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}


/* neu_2.92: temporäre Streckenentfernungsmessung */
.route-distance-control.leaflet-control {
    margin-top: 10px;
    clear: both;
}

.route-distance-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #ffffff;
    color: #0f766e;
    box-shadow: 0 1px 5px rgba(0,0,0,.35);
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.route-distance-button:hover,
.route-distance-control-active .route-distance-button {
    background: #ccfbf1;
    box-shadow:
        inset 0 0 0 2px #0f766e,
        0 1px 5px rgba(0,0,0,.35);
}

.route-distance-point-wrapper {
    background: transparent;
    border: 0;
}

.route-distance-point {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #0f766e;
    color: #ffffff;
    box-shadow:
        0 0 0 2px #115e59,
        0 3px 10px rgba(15,23,42,.35);
    font-size: 13px;
    font-weight: 900;
}

.route-distance-result-wrapper {
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.route-distance-result {
    display: inline-block;
    min-width: max-content;
    padding: 8px 12px;
    border: 2px solid #0f766e;
    border-radius: 8px;
    background: rgba(240,253,250,.98);
    color: #134e4a;
    box-shadow: 0 4px 14px rgba(15,23,42,.28);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}


/* neu_2.93: exakte Markerzentrierung */
.junction-marker,
.harbor-marker,
.advance-warning-marker,
.fgw-marker {
    box-sizing: border-box;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    aspect-ratio: 1 / 1;
    flex: 0 0 32px;
    border-radius: 50% !important;
}

.junction-marker-wrapper,
.harbor-marker-wrapper,
.advance-warning-marker-wrapper,
.fgw-marker-wrapper {
    box-sizing: border-box;
    width: 32px !important;
    height: 32px !important;
}

.fgw-marker-offset .fgw-marker {
    transform: none;
}

/* VA-Richtungssymbole */
.va-symbol-direction {
    margin: -4px 0 14px;
    padding: 9px;
    border: 1px solid #d8dee7;
    border-radius: 7px;
    background: #f8fafc;
}

.va-symbol-direction > strong {
    display: block;
    margin-bottom: 7px;
    color: #475569;
    font-size: 12px;
}

.va-symbol-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.va-symbol-choice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.va-symbol-choice input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.va-symbol-choice img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.va-navi-symbols {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
}

.va-navi-symbols img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}


/* neu_2.94: VA-Navi – Symbole links, Pfeil mittig, Text rechts */
.va-navi-row-compact {
    grid-template-columns: 34px 54px minmax(0,1fr);
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.92);
}

.va-navi-symbol-column {
    display: grid;
    place-items: center;
    align-self: stretch;
}

.va-navi-symbol-column .va-navi-symbols {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
}

.va-navi-symbol-column .va-navi-symbols img {
    width: 24px;
    height: 24px;
}

.va-navi-direction-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.va-navi-direction-column .va-navi-arrow-box {
    width: 48px;
    height: 42px;
}

.va-navi-direction-column .va-navi-arrow-svg {
    width: 40px;
    height: 40px;
    fill: #111827;
    filter: none;
}

.va-navi-direction-column .va-navi-distance {
    margin: 0;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.va-navi-row-compact .va-navi-text {
    display: flex;
    align-items: center;
    min-height: 52px;
}

.va-navi-row-compact .va-navi-label {
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.12;
}

/* Messpunktnummer liegt auch bei Kreuzungen sichtbar über dem Marker */
.route-distance-point-wrapper {
    z-index: 1800 !important;
    pointer-events: none !important;
}

.route-distance-point {
    position: relative;
    z-index: 2;
}


/* neu_2.95: kompakte Zusatzinformationen – Navigation erhält mehr Platz */
.navi-topbar-compact {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 14px;
    min-height: 34px;
    padding: 4px 10px;
}

.navi-compact-value {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #111827;
    white-space: nowrap;
}

.navi-compact-value img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.navi-compact-value strong,
.navi-compact-time {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.navi-compact-time {
    justify-self: end;
}

.navi-status-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 5px 12px;
    border-top: 1px solid rgba(15,23,42,.18);
    background: rgba(255,255,255,.96);
}

.navi-status-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.navi-status-item > img {
    width: 31px;
    height: 23px;
    object-fit: contain;
}

.navi-signal {
    display: inline-flex;
    align-items: end;
    gap: 3px;
    width: 31px;
    height: 22px;
}

.navi-signal i {
    display: block;
    width: 7px;
    border-radius: 2px 2px 0 0;
    background: currentColor;
}

.navi-signal i:nth-child(1) {
    height: 7px;
}

.navi-signal i:nth-child(2) {
    height: 14px;
}

.navi-signal i:nth-child(3) {
    height: 21px;
}

.navi-signal-good {
    color: #16a34a;
}

.navi-signal-warning {
    color: #f59e0b;
}

.navi-signal-bad {
    color: #dc2626;
}

/* Alte große Wertefläche entfällt vollständig */
.va-navi-main-compact {
    flex: 1 1 auto;
    min-height: 0;
}

/* Eigenes Leaflet-Pane garantiert Vordergrund für Messung */
.leaflet-routeDistancePane {
    z-index: 980 !important;
    pointer-events: none !important;
}

.leaflet-routeDistancePane .route-distance-result-wrapper,
.leaflet-routeDistancePane .route-distance-point-wrapper {
    pointer-events: none !important;
}


/* neu_2.96: Kopf- und Fußzeile ohne Überlagerungen */
.navi-screen-compact .navi-topbar-compact {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto;
    gap: 7px;
}

.navi-screen-compact .navi-compact-value {
    gap: 3px;
    overflow: hidden;
}

.navi-screen-compact .navi-compact-value img {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.navi-screen-compact .navi-compact-value strong,
.navi-screen-compact .navi-compact-time {
    overflow: hidden;
    color: #111827;
    font-size: 11px;
    text-overflow: clip;
}

.navi-screen-compact .va-navi-main-compact {
    box-sizing: border-box;
    align-content: center;
    gap: 5px;
    padding: 6px 7px;
}

.navi-screen-compact .va-navi-row-compact {
    box-sizing: border-box;
    grid-template-columns: 30px 50px minmax(0,1fr);
    gap: 5px;
    padding: 4px 6px;
}

.navi-screen-compact .va-navi-label {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.navi-screen-compact .va-navi-symbol-column .va-navi-symbols img {
    width: 21px;
    height: 21px;
}

.navi-screen-compact .va-navi-direction-column .va-navi-arrow-box {
    width: 44px;
    height: 36px;
}

.navi-screen-compact .va-navi-direction-column .va-navi-arrow-svg {
    width: 35px;
    height: 35px;
}

/* Entfernungslabel wird über Messpunktnummern gezeichnet */
.route-distance-result-wrapper {
    z-index: 2600 !important;
}

.route-distance-result {
    position: relative;
    z-index: 2600;
    background: #f0fdfa;
}


/* neu_2.97: VA-Hinweise links, Zusatzangebote unter der Bezeichnung */
.navi-screen-compact .va-navi-main-compact {
    display: grid;
    align-content: stretch;
    gap: 5px;
    padding: 6px 9px;
}

.navi-screen-compact .va-navi-row-compact {
    grid-template-columns: 38px 58px minmax(0,1fr);
    min-height: 0;
    gap: 7px;
    padding: 4px 8px;
}

.navi-screen-compact .va-navi-symbol-column {
    min-width: 0;
}

.navi-screen-compact .va-navi-warning-symbols {
    flex-direction: column;
    gap: 3px;
}

.navi-screen-compact .va-navi-warning-symbols img {
    width: 25px;
    height: 25px;
}

.navi-screen-compact .va-navi-direction-column .va-navi-arrow-box {
    width: 52px;
    height: 38px;
}

.navi-screen-compact .va-navi-direction-column .va-navi-arrow-svg {
    width: 39px;
    height: 39px;
}

.navi-screen-compact .va-navi-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    gap: 3px;
}

.navi-screen-compact .va-navi-label {
    width: 100%;
    font-size: 18px;
    line-height: 1.05;
    -webkit-line-clamp: 2;
}

.va-navi-services {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 23px;
}

.va-navi-services img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.va-service-symbol-direction {
    margin-top: -8px;
    background: #f1f5f9;
}

.va-warning-symbol-direction strong::after {
    content: " – links neben dem Pfeil";
    color: #64748b;
    font-weight: 600;
}

.va-service-symbol-direction strong::after {
    content: " – unter dem Namen";
    color: #64748b;
    font-weight: 600;
}


/* neu_2.98: POI-Grundfunktionen */
.poi-marker-wrapper {
    display: grid;
    place-items: center;
    width: 32px !important;
    height: 32px !important;
    border: 0;
    background: transparent;
}

.poi-marker {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #334155;
    color: #ffffff;
    box-shadow:
        0 0 0 2px #0f172a,
        0 3px 9px rgba(15,23,42,.35);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.poi-marker-selected .poi-marker {
    border-color: #fef3c7;
    box-shadow:
        0 0 0 3px #f59e0b,
        0 4px 12px rgba(15,23,42,.4);
}

.poi-category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 14px;
}

.poi-category-choice,
.poi-option {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.poi-category-choice input,
.poi-option input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.poi-category-symbol {
    display: grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    border-radius: 5px;
    background: #e2e8f0;
    color: #111827;
    font-size: 11px;
    font-weight: 900;
}


.poi-option + .poi-option {
    margin-top: 7px;
}

.revier-check-panel{position:absolute;top:12px;right:12px;z-index:1200;width:min(430px,calc(100% - 24px));max-height:calc(100% - 66px);display:grid;grid-template-rows:auto auto minmax(0,1fr);border:1px solid #94a3b8;border-radius:10px;background:rgba(255,255,255,.97);box-shadow:0 12px 30px rgba(15,23,42,.22);overflow:hidden}.revier-check-panel.hidden{display:none}.revier-check-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.revier-check-header>div{display:grid;gap:2px}.revier-check-header strong{font-size:16px}.revier-check-header span{font-size:12px;color:#64748b}.revier-check-header button{min-width:34px;min-height:32px;padding:0;font-size:22px;line-height:1}.revier-check-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border-bottom:1px solid #e2e8f0}.revier-check-actions button,.revier-check-actions select{min-height:36px;width:100%}.revier-check-results{min-height:80px;overflow:auto;padding:8px}.revier-check-empty{padding:22px 14px;text-align:center;color:#475569}.revier-check-item{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;width:100%;min-height:0;margin:0 0 7px;padding:9px;text-align:left;border:1px solid #cbd5e1;border-radius:8px;background:#fff}.revier-check-item:hover{background:#f8fafc}.revier-check-number{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-size:12px;font-weight:800;color:#fff}.revier-check-item.error .revier-check-number{background:#dc2626}.revier-check-item.warning .revier-check-number{background:#d97706}.revier-check-item.info .revier-check-number{background:#2563eb}.revier-check-text{display:grid;gap:3px}.revier-check-text strong{font-size:13px}.revier-check-text span{font-size:12px;color:#64748b;line-height:1.35}.revier-check-marker-wrapper{background:transparent;border:0}.revier-check-marker{display:grid;place-items:center;width:26px;height:26px;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 7px rgba(15,23,42,.45);font-size:12px;font-weight:800;color:#fff}.revier-check-marker.error{background:#dc2626}.revier-check-marker.warning{background:#d97706}.revier-check-marker.info{background:#2563eb}

.revier-check-marker-wrapper,
.revier-check-marker{
 pointer-events:none!important;
 user-select:none;
}

.leaflet-revierCheck-pane path,
.leaflet-revierCheck-pane .leaflet-marker-icon{
 pointer-events:none!important;
}

.route-closed-section{
 margin-top:16px;
 padding-top:12px;
 border-top:1px solid #d9dee5;
}

.poi-route-selection-active{
 cursor:crosshair!important;
}
.poi-route-selection-active .leaflet-interactive{
 cursor:crosshair!important;
}

/* neu_2.117: Kartenwerkzeuge optisch vereinheitlichen */
.leaflet-top.leaflet-left
.leaflet-control:not(.manual-marker-control)
> button,
.leaflet-top.leaflet-left
.manual-marker-control
> .manual-marker-main-button{
 width:34px;
 height:34px;
 min-width:34px;
 min-height:34px;
 padding:0;
 border:0;
 border-radius:0;
 font:600 15px/34px system-ui,sans-serif;
 text-align:center;
 background:#fff;
 color:#1f2937;
}
.leaflet-top.leaflet-left
.leaflet-control:not(.manual-marker-control)
> button:hover,
.leaflet-top.leaflet-left
.manual-marker-control
> .manual-marker-main-button:hover{
 background:#f3f4f6;
}

.manual-marker-menu .manual-marker-menu-item{
 width:100%!important;
 min-width:0!important;
 height:auto!important;
 min-height:36px!important;
 padding:5px 8px!important;
 border-radius:5px!important;
 font:inherit!important;
 line-height:1.25!important;
 text-align:left!important;
}
.route-distance-control-active button,
.manual-marker-control-active{
 background:#dbeafe!important;
 box-shadow:inset 3px 0 0 #2563eb;
}
