/* Stylesheet der Startseite (aus public/index.php ausgelagert). */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
        }

        .header h1 {
            font-size: 2.8em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        .header p {
            opacity: 0.95;
            font-size: 1.2em;
        }

        .search-card {
            background: white;
            border-radius: 16px;
            padding: 35px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
            margin-bottom: 30px;
        }

        .section-title {
            font-size: 1.3em;
            font-weight: 700;
            color: #333;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 3px solid #667eea;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 18px;
            margin-bottom: 25px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group label {
            font-weight: 600;
            margin-bottom: 8px;
            color: #444;
            font-size: 0.95em;
        }

        .form-group input,
        .form-group select {
            padding: 12px 14px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
            background: white;
        }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group input:disabled,
        .form-group select:disabled {
            background: #f5f5f5;
            cursor: not-allowed;
        }

        .button-group {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 12px;
        }

        .btn {
            padding: 14px 28px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #f0f0f0;
            color: #333;
        }

        .btn-secondary:hover:not(:disabled) {
            background: #e0e0e0;
        }

        .btn-clear {
            background: #fff;
            border: 2px solid #e0e0e0;
            color: #666;
        }

        .btn-clear:hover:not(:disabled) {
            border-color: #ff6b6b;
            color: #ff6b6b;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        .results-card {
            background: white;
            border-radius: 16px;
            padding: 35px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
            display: none;
        }

        .results-card.active {
            display: block;
        }

        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 18px;
            border-bottom: 3px solid #e0e0e0;
            flex-wrap: wrap;
            gap: 15px;
        }

        .results-count {
            font-size: 1.4em;
            font-weight: 700;
            color: #333;
        }

        .results-meta {
            display: flex;
            gap: 20px;
            font-size: 0.95em;
            color: #666;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .loading {
            text-align: center;
            padding: 60px;
            color: #667eea;
        }

        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .station-list {
            display: grid;
            gap: 18px;
            margin-bottom: 25px;
        }

        .station-card {
            border: 2px solid #e5e5e5;
            border-radius: 12px;
            padding: 24px;
            transition: all 0.3s;
            background: white;
            /* .station-list ist ein einspaltiges Grid. Ohne min-width:0 gilt fuer
               Grid-Items die automatische Mindestbreite (min-content), und die
               Spur wird von der breitesten Karte aufgezogen - alle Karten ragen
               dann aus dem Ergebnis-Rahmen heraus. */
            min-width: 0;
            /* Lange, ungetrennte Woerter (Betreiber, Adressen) sonst ueber den Rand */
            overflow-wrap: break-word;
        }

        .station-card:hover {
            border-color: #667eea;
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
            transform: translateY(-2px);
        }

        .station-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
            gap: 15px;
        }

        .station-name {
            font-weight: 700;
            font-size: 1.15em;
            color: #222;
            flex: 1;
            line-height: 1.4;
            /* Flex-Items haben min-width:auto - ohne das hier schiebt ein langer
               Betreibername die nicht umbrechende Entfernungs-Pille aus der Karte. */
            min-width: 0;
        }

        .station-distance {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.9em;
            font-weight: 700;
            white-space: nowrap;
        }

        .station-address {
            color: #666;
            margin-bottom: 14px;
            font-size: 0.95em;
            line-height: 1.5;
        }

        /* --- Aufbau einer Ergebniskarte ---------------------------------
           Die Karte ist in Bloecke geteilt, die je eine Frage beantworten:
           Was ist das? Was kann es? Komme ich hin und darf ich? Woher stammt
           die Angabe? Vorher lagen technische Werte, Zahlarten und
           Verwaltungsnummern in einem Raster nebeneinander - alles gleich
           gewichtet, nichts auf den ersten Blick zu finden. */

        /* Abzeichen in eigener Zeile statt in der Ueberschrift: bei fuenf
           Stueck brach der Betreibername sonst mitten im Wort um. */
        .badge-row {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 12px 0 0;
        }
        .badge-row .badge { margin-left: 0; }

        /* Die drei Zahlen, wegen derer man ueberhaupt hinschaut. */
        .kpi-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin: 14px 0 0;
        }
        .kpi {
            background: #f6f7fb;
            border: 1px solid #e8eaf3;
            border-radius: 10px;
            padding: 10px 12px;
            min-width: 0;
        }
        .kpi-wert {
            display: block;
            font-size: 1.2rem;
            font-weight: 700;
            color: #2d3a8c;
            line-height: 1.2;
            overflow-wrap: anywhere;
        }
        .kpi-label {
            display: block;
            font-size: 0.74rem;
            color: #6b7280;
            margin-top: 2px;
        }

        .card-block {
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid #eceef4;
        }

        .block-label {
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #8a91a6;
            margin-bottom: 7px;
        }

        /* Beschriftung und Wert als echtes Definitionspaar. Zwei Spalten,
           damit die Werte untereinander stehen und nicht wie zuvor an
           beliebiger Stelle hinter unterschiedlich langen Labels. */
        .fact-grid {
            display: grid;
            grid-template-columns: minmax(90px, max-content) 1fr;
            gap: 4px 14px;
            margin: 0;
            font-size: 0.9rem;
        }
        .fact-grid dt {
            color: #6b7280;
            font-weight: 600;
        }
        .fact-grid dt[title] {
            text-decoration: underline dotted #c8cddb;
            text-underline-offset: 3px;
            cursor: help;
        }
        .fact-grid dd {
            margin: 0;
            color: #333;
            overflow-wrap: anywhere;
        }

        /* Bild und Kartenausschnitt nebeneinander, solange Platz ist. */
        .media-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: flex-start;
            margin-top: 14px;
        }
        .media-row > * { flex: 1 1 260px; min-width: 0; margin-top: 0; }
        .media-row .station-map { max-width: none; }

        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.85em;
            font-weight: 600;
            margin-left: 5px;
        }

        .badge-dc {
            background: #ff6b6b;
            color: white;
        }

        .badge-ac {
            background: #51cf66;
            color: white;
        }

        .badge-fast {
            background: #ffd93d;
            color: #333;
        }

        /* Live-Belegung (TomTom-Overlay) */
        .badge-live-free {
            background: #2f9e44;
            color: white;
        }

        .badge-live-busy {
            background: #e03131;
            color: white;
        }

        /* Vorgemerkt: bewusst weder gruen noch rot. Der Punkt ist nicht frei,
           aber auch nicht belegt – die Farbe soll niemanden losfahren lassen. */
        .badge-live-reserved {
            background: #f08c00;
            color: white;
        }

        .badge-live-off {
            background: #868e96;
            color: white;
        }

        /* Status-Punkt als reiner CSS-Kreis (fontunabhängig, statt Emoji) */
        .live-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            margin-right: 6px;
            vertical-align: middle;
        }

        /* Map-Pin als reine CSS-Tropfenform (fontunabhängig, statt 📍-Emoji) */
        .addr-pin {
            display: inline-block;
            width: 11px;
            height: 11px;
            margin-right: 7px;
            background: #868e96;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            position: relative;
            vertical-align: -1px;
        }

        .addr-pin::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 5px;
            height: 5px;
            background: #fff;
            border-radius: 50%;
        }

        /* Steckertyp-Chips */
        .chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 12px;
        }

        .chip {
            display: inline-block;
            padding: 3px 9px;
            border-radius: 10px;
            font-size: 0.8em;
            font-weight: 600;
            background: #eef2ff;
            color: #4338ca;
            border: 1px solid #e0e7ff;
        }

        /* Registerangaben: Parkraum, Öffnungszeiten, Lage */
        .chip-info {
            background: #f1f3f5;
            color: #495057;
            border-color: #dee2e6;
        }

        .chip-parking {
            background: #fff4e6;
            color: #c2410c;
            border-color: #ffe8cc;
        }

        .chip-hours {
            background: #e7f5ff;
            color: #1971c2;
            border-color: #d0ebff;
        }

        /* Eichrecht: Public Key der Messkapsel im Register hinterlegt */
        .badge-eichrecht {
            background: #0f766e;
            color: white;
        }

        .badge-eichrecht-weak {
            background: #e9ecef;
            color: #495057;
        }

        /* Seitenfuss. Steht auf einer eigenen hellen Flaeche, weil der
           Seitenhintergrund ein violetter Verlauf ist - dunkle Linkfarben
           sind darauf nicht lesbar, helle wiederum nicht auf den Karten. */
        .site-footer {
            background: rgba(255, 255, 255, 0.94);
            border-radius: 16px;
            padding: 22px 24px;
            margin-top: 26px;
            text-align: center;
            font-size: 0.82rem;
            color: #6b7280;
        }
        .site-footer nav {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px 20px;
        }
        .site-footer a {
            color: #15803d;
            text-decoration: none;
            font-weight: 600;
        }
        .site-footer a:hover {
            color: #166534;
            text-decoration: underline;
        }
        .site-footer p {
            margin: 14px 0 0;
            font-size: 0.78rem;
            color: #6b7280;
        }

        /* Export der aktuellen Trefferliste */
        .export-row {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            align-items: center;
            font-size: 0.82rem;
        }
        .export-row a {
            color: #15803d;
            text-decoration: none;
            font-weight: 600;
            border: 1px solid #a7e9bd;
            border-radius: 6px;
            padding: 4px 10px;
            background: #f4fdf6;
        }
        .export-row a:hover { background: #e6f9ec; }

        /* Hauptmenü: genau zwei grosse Knöpfe – Rechnung prüfen und
           Routenplanung. Alles Weitere steht im Seitenfuss. Nebeneinander,
           solange Platz ist, auf dem Telefon untereinander. */
        .hauptmenue {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
            margin-top: 26px;
        }
        .hauptmenue a {
            display: block;
            padding: 26px 24px;
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.22);
            border: 1px solid rgba(255, 255, 255, 0.45);
            color: #fff;
            text-decoration: none;
            line-height: 1.35;
            text-align: center;
            transition: background 0.2s, transform 0.2s;
        }
        .hauptmenue a:hover,
        .hauptmenue a:focus-visible {
            background: rgba(255, 255, 255, 0.34);
            transform: translateY(-2px);
        }
        .hauptmenue .titel { display: block; font-weight: 700; font-size: 1.35rem; }
        .hauptmenue .nav-icon { display: block; font-size: 2.2rem; margin-bottom: 8px; }
        .hauptmenue .was {
            display: block;
            margin-top: 8px;
            font-size: 0.9rem;
            opacity: 0.92;
            overflow-wrap: anywhere;
        }

        /* Zuletzt gesuchte Orte */
        .recent-searches {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            align-items: center;
            margin-top: 8px;
        }
        .recent-label { font-size: 0.78rem; color: #6c757d; }
        .recent-chip {
            border: 1px solid #dee2e6;
            background: #f8f9fa;
            color: #495057;
            border-radius: 999px;
            padding: 3px 11px;
            font-size: 0.78rem;
            font-family: inherit;
            cursor: pointer;
        }
        .recent-chip:hover { background: #e9ecef; }

        /* Merken-Knopf am Treffer */
        .save-link {
            border: none;
            background: none;
            font-family: inherit;
            cursor: pointer;
        }
        .save-link.saved { color: #b8860b; font-weight: 600; }

        /* Ladepark: die weiteren Ladeeinrichtungen am selben Standort */
        .park-panel {
            margin: 10px 0 0 20px;
        }
        .park-toggle {
            border: 1px solid #dee2e6;
            background: #f8f9fa;
            color: #343a40;
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 0.82rem;
            cursor: pointer;
            font-family: inherit;
        }
        .park-toggle:hover { background: #f1f3f5; }
        .park-caret { color: #868e96; margin-left: 4px; }
        .park-classes {
            font-size: 0.78rem;
            color: #6c757d;
            margin-top: 4px;
        }
        .park-members {
            list-style: none;
            margin: 8px 0 0;
            padding: 0;
            border-left: 2px solid #e9ecef;
        }
        .park-members > li {
            display: block;
            padding: 7px 0 7px 12px;
            border-top: 1px solid #f1f3f5;
            font-size: 0.82rem;
            color: #495057;
        }
        .park-member-power { font-weight: 600; color: #343a40; }
        .park-member-loc { color: #6c757d; }
        .park-member-id { color: #adb5bd; font-size: 0.75rem; }

        /* Öffnungszeiten gegen die Uhr gehalten */
        .badge-open {
            background: #d3f9d8;
            color: #2b8a3e;
        }

        .badge-closed {
            background: #ffe3e3;
            color: #c92a2a;
        }

        /* Koordinaten. Stehen als Wert im Registerblock und fluchten damit mit
           den uebrigen Angaben; vorher hingen sie mit festem Einzug unter der
           Adresse und richteten sich an nichts aus. */
        .geo-pair {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .geo-pair .geo-value {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 0.8rem;
            color: #343a40;
            user-select: all;
        }
        .geo-pair .geo-copy {
            border: 1px solid #dee2e6;
            background: #f8f9fa;
            color: #495057;
            border-radius: 4px;
            padding: 1px 7px;
            font-size: 0.72rem;
            cursor: pointer;
            line-height: 1.6;
        }
        .geo-pair .geo-copy:hover { background: #e9ecef; }

        /* Warnhinweise zur Nachprüfbarkeit der Abrechnung. Bewusst nicht als
           Badge, sondern als Kasten: der Hinweis soll gelesen werden, nicht
           als Etikett neben dem Betreibernamen stehen. */
        .warn-panel {
            margin: 12px 0 0;
            border: 1px solid #ffd8a8;
            border-left: 4px solid #e8590c;
            border-radius: 6px;
            background: #fff9db;
            padding: 10px 12px;
        }
        .warn-panel.warn-info-only {
            border-color: #d0ebff;
            border-left-color: #1971c2;
            background: #f8fbff;
        }
        .warn-panel h4 { margin: 0 0 8px; font-size: 0.95rem; color: #7f3a00; }
        .warn-panel.warn-info-only h4 { color: #1864ab; }
        .warn-item { display: flex; gap: 8px; margin: 6px 0; font-size: 0.86rem; line-height: 1.45; }
        .warn-item .warn-sign { flex: 0 0 auto; }
        .warn-item strong { display: block; color: #212529; }
        /* Zuverlaessigkeits-Hinweis aus der eigenen Messreihe - optisch wie eine
           Warnung, aber eigenstaendig, weil es keine Abrechnungs-Warnung ist. */
        .reliability-note { display: flex; gap: 8px; align-items: baseline; margin: 8px 0 0;
            font-size: 0.86rem; line-height: 1.45; color: #7f3a00; }
        .reliability-note .warn-sign { flex: 0 0 auto; }
        .warn-foot {
            margin: 9px 0 0;
            font-size: 0.78rem;
            color: #6c757d;
            border-top: 1px solid rgba(0,0,0,.08);
            padding-top: 7px;
        }

        /* Ladepunkte mit Zustand und Preis (Betreiberangabe, NAP). Eine Zeile je
           Ladepunkt, damit erkennbar ist, WELCHER frei oder belegt ist. */
        .lp-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.86rem; }
        .lp {
            display: grid;
            grid-template-columns: minmax(96px, auto) 1fr auto;
            gap: 2px 12px;
            align-items: baseline;
            padding: 6px 0;
            border-top: 1px solid #eef0f3;
        }
        .lp:first-child { border-top: 0; }
        .lp-state { font-weight: 600; white-space: nowrap; }
        .lp-dot {
            display: inline-block; width: 9px; height: 9px; border-radius: 50%;
            margin-right: 6px; background: #adb5bd; vertical-align: 1px;
        }
        .lp-free .lp-dot { background: #2f9e44; }
        .lp-free .lp-state { color: #2b8a3e; }
        .lp-busy .lp-dot { background: #e03131; }
        .lp-busy .lp-state { color: #c92a2a; }
        .lp-reserved .lp-dot { background: #f08c00; }
        .lp-reserved .lp-state { color: #d9480f; }
        .lp-off .lp-dot { background: #495057; }
        .lp-off .lp-state { color: #495057; }
        .lp-unknown .lp-state { color: #868e96; font-weight: 500; }
        .lp-name small { color: #6b7280; }
        .lp-price { font-weight: 600; white-space: nowrap; text-align: right; }
        .lp-evse { grid-column: 2 / -1; font-size: 0.74rem; color: #868e96; overflow-wrap: anywhere; }
        @media (max-width: 520px) {
            .lp { grid-template-columns: auto 1fr; }
            .lp-price { grid-column: 2; text-align: left; }
        }

        /* Bewertung (Empfehlung): Zahl, Note, Gründe, aufklappbar die Faktoren. */
        .rating { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; background: #f8f9fa; border-left: 4px solid #adb5bd; }
        .rating-top { border-left-color: #2f9e44; background: #f0fdf4; }
        .rating-good { border-left-color: #74b816; background: #f7fee7; }
        .rating-ok { border-left-color: #f59f00; background: #fffbeb; }
        .rating-poor { border-left-color: #e03131; background: #fff5f5; }
        .rating-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
        .rating-score { font-size: 1.15rem; font-weight: 700; color: #1f2937; }
        .rating-score small { font-size: 0.75rem; font-weight: 500; color: #6b7280; margin-left: 1px; }
        .rating-grade { font-weight: 600; font-size: 0.86rem; color: #374151; }
        .rating-reasons { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.8rem; }
        .rating-pro { color: #2b8a3e; }
        .rating-con { color: #c92a2a; }
        .rating-details { margin-top: 6px; font-size: 0.8rem; }
        .rating-details summary { cursor: pointer; color: #15803d; font-weight: 600; }
        .rating-factor { display: grid; grid-template-columns: 110px 1fr 30px 40px; gap: 8px; align-items: center; margin-top: 4px; }
        .rating-factor.unknown { opacity: 0.6; }
        .rating-bar { height: 7px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
        .rating-bar span { display: block; height: 100%; background: #40c057; }
        .rating-factor-val, .rating-factor-w { text-align: right; color: #495057; }
        .rating-note { margin: 6px 0 0; color: #6b7280; }
        .rating-mini { font-weight: 700; font-size: 0.78rem; padding: 1px 6px; border-radius: 6px; background: #e9ecef; border-left: 0; }
        .rating-mini.rating-top { background: #d3f9d8; color: #2b8a3e; }
        .rating-mini.rating-good { background: #e9fac8; color: #5c940d; }
        .rating-mini.rating-ok { background: #fff3bf; color: #e67700; }
        .rating-mini.rating-poor { background: #ffe3e3; color: #c92a2a; }

        /* Im Park je Ladeeinrichtung eine Kopfzeile, darunter ihre Ladepunkte. */
        .park-member-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
        .park-member-price { font-weight: 600; color: #1f2937; }
        .park-members .lp-list { margin-left: 4px; }

        /* Kartenpopup: Ladepunkte der Ladeeinrichtung */
        .popup-wrap { font-size: 13px; line-height: 1.45; }
        .popup-title { font-weight: 600; font-size: 14px; }
        .popup-addr { color: #666; margin-bottom: 6px; }
        .popup-sub { color: #666; margin: 6px 0 4px; }
        .popup-lp { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
        .popup-lp li { border-top: 1px solid #e9ecef; padding: 6px 0; }
        .popup-lp-head { display: flex; justify-content: space-between; gap: 8px; }
        .popup-kw { color: #1971c2; font-weight: 600; }
        .popup-conn { color: #495057; }
        .popup-evse { font-family: ui-monospace, monospace; font-size: 11px; color: #666; }
        .popup-dupe { color: #c92a2a; font-family: inherit; }
        .popup-key { display: inline-block; font-size: 11px; margin-top: 3px; }
        .popup-key.ok { color: #0f766e; }
        .popup-key.weak { color: #868e96; }
        .popup-empty { color: #666; font-style: italic; }

        .badge-neu {
            background: #7048e8;
            color: white;
        }

        .badge-wartung {
            background: #fab005;
            color: #333;
        }

        /* Schlüsseldetails unter der Karte */
        .key-panel {
            margin-top: 12px;
            padding: 12px 14px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            background: #f8f9fa;
            font-size: 0.86em;
            color: #495057;
        }

        .key-panel h4 {
            margin: 0 0 8px;
            font-size: 1em;
            color: #212529;
        }

        .key-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: baseline;
            padding: 4px 0;
            border-top: 1px dashed #dee2e6;
        }

        .key-row:first-of-type {
            border-top: none;
        }

        .key-fingerprint {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 0.95em;
            color: #212529;
            word-break: break-all;
        }

        /* Zertifiziert-Status hinter jedem Public Key */
        .key-cert {
            padding: 1px 8px;
            border-radius: 999px;
            font-size: 0.9em;
            font-weight: 600;
            white-space: nowrap;
        }
        .cert-yes { background: #e6f4ea; color: #1e7e34; }
        .cert-no  { background: #f1f3f5; color: #868e96; }

        /* Kurzmarker direkt an der EVSE-ID, wenn sie mehrfach vergeben ist */
        .key-dup {
            padding: 1px 6px;
            border-radius: 999px;
            background: #fff4e5;
            color: #8a4b08;
            font-size: 0.9em;
            white-space: nowrap;
        }

        /* Warnung: derselbe Public Key steht noch an anderen Ladepunkten */
        .key-shared {
            flex-basis: 100%;
            margin-top: 2px;
            padding: 4px 8px;
            border-radius: 5px;
            background: #fff4e5;
            color: #8a4b08;
        }

        .key-links a {
            color: #0f766e;
            font-weight: 600;
            text-decoration: none;
            margin-right: 10px;
        }

        .key-links a:hover {
            text-decoration: underline;
        }

        .key-toggle {
            background: none;
            border: none;
            color: #0f766e;
            font-weight: 600;
            font-size: 0.86em;
            cursor: pointer;
            padding: 6px 0 0;
        }

        /* Google-Maps-Routenlink */
        .station-actions {
            margin-top: 14px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .route-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 16px;
            border-radius: 8px;
            background: #16a34a;
            color: #fff;
            font-size: 0.9em;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.15s ease;
        }

        .route-link:hover {
            background: #15803d;
        }

        /* Zweitrangig neben "Route": die Stoerungsmeldung ist der seltenere Fall
           und soll den Haupthandlungsweg nicht ueberstrahlen. Muss nach
           .route-link stehen - beide sind einfache Klassen, es gewinnt also die
           spaetere Regel. */
        .report-link {
            background: #fff;
            color: #b45309;
            border: 1px solid #fcd34d;
        }

        .report-link:hover {
            background: #fffbeb;
            color: #92400e;
        }

        .route-pin {
            display: inline-block;
            width: 10px;
            height: 10px;
            background: #fff;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            position: relative;
            flex-shrink: 0;
        }

        .route-pin::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 4px;
            height: 4px;
            background: #16a34a;
            border-radius: 50%;
        }

        /* Live-Filter Hinweis-Box */
        .live-filter-note {
            background: #f1f8f4;
            border: 1px solid #cde7d6;
            border-left: 4px solid #2f9e44;
            color: #2b6b3d;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.9em;
            margin-bottom: 14px;
        }

        /* Ausfall der Live-Belegung. Bewusst gedeckt und nicht rot: die
           Stammdaten stimmen weiterhin, es fehlt nur eine Zusatzangabe. Ein
           Alarmton waere hier unangemessen. */
        .live-offline-note {
            background: #fdf6ec;
            border: 1px solid #f0dcc0;
            border-left: 4px solid #d98324;
            color: #7a4f16;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.9em;
            margin-bottom: 14px;
        }

        /* Checkbox-Filter */
        .checkbox-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px 14px;
            padding: 6px 0;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            white-space: nowrap;
        }

        /* Bezahlung-Gruppe breiter, damit lange Labels + 6 Optionen Platz haben */
        .form-group-wide {
            grid-column: span 2;
        }

        .form-group-wide .checkbox-group {
            grid-template-columns: repeat(3, 1fr);
        }

        .checkbox-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .filter-hint {
            display: block;
            color: #868e96;
            font-size: 0.78em;
            margin-top: 2px;
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 25px;
            flex-wrap: wrap;
        }

        .pagination-btn {
            padding: 10px 18px;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            font-size: 0.95em;
        }

        .pagination-btn:hover:not(:disabled) {
            border-color: #667eea;
            color: #667eea;
            transform: translateY(-1px);
        }

        .pagination-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        .pagination-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
        }

        .pagination-info {
            padding: 10px 18px;
            color: #666;
            font-weight: 600;
        }

        .counting-indicator {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: #fff3cd;
            border-radius: 6px;
            font-size: 0.85em;
            color: #856404;
            margin-left: 10px;
        }

        .counting-indicator .spinner-tiny {
            border: 2px solid rgba(133, 100, 4, 0.3);
            border-top: 2px solid #856404;
            border-radius: 50%;
            width: 14px;
            height: 14px;
            animation: spin 1s linear infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .counting-indicator.counting {
            animation: pulse 2s ease-in-out infinite;
        }

        .error {
            background: #fee;
            border: 2px solid #fcc;
            border-radius: 12px;
            padding: 20px;
            color: #c00;
            margin-bottom: 25px;
            font-weight: 500;
        }

        /* Kein Konto zu haben ist kein Fehler.
           Rot mit Kreuz liest sich wie "etwas ist kaputt" oder "Sie haben
           etwas falsch gemacht" – dabei fehlt nur ein Schritt, der nichts
           kostet. Derselbe Kasten, ruhige Farben, mittig, und die
           Registrierung als Link statt als Nebensatz. */
        .error.hinweis {
            background: #f8fafc;
            border-color: #e2e8f0;
            color: #334155;
            text-align: center;
            padding: 28px 20px;
        }

        .error.hinweis a {
            color: #16a34a;
            font-weight: 600;
        }

        .error.hinweis .hinweis-zeile {
            margin-top: 6px;
            font-weight: 400;
            color: #64748b;
        }

        .empty {
            text-align: center;
            padding: 60px;
            color: #999;
            font-size: 1.1em;
        }

        .filter-toggle {
            /* Nach oben deutlich mehr Luft: darüber steht seit der Umgestaltung
               das eingerahmte Ortsfeld, und ohne Abstand klebte der Knopf an
               dessen Rand, als gehörte er noch dazu. */
            margin: 28px 0 20px;
        }

        /* Der Knopf oeffnet weitere Filter - Leistung, Stecker, Zahlung,
           Eichrecht, Oeffnungszeiten. Als blasse Schaltflaeche in
           Grau war das der unauffaelligste Teil des Formulars und wurde
           entsprechend selten gefunden. */
        .toggle-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            background: #eef0fd;
            border: 2px solid #c7cdf7;
            padding: 15px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-family: inherit;
            font-weight: 700;
            font-size: 1.02rem;
            color: #3b4494;
            transition: background 0.2s, border-color 0.2s;
        }

        .toggle-btn .toggle-hint {
            margin-left: auto;
            font-weight: 500;
            font-size: 0.82rem;
            color: #6b7280;
        }

        .toggle-btn .toggle-caret {
            font-size: 0.8em;
            transition: transform 0.2s;
        }

        .toggle-btn:hover {
            background: #e3e7fc;
            border-color: #667eea;
        }

        .toggle-btn:focus-visible {
            outline: 3px solid rgba(102, 126, 234, 0.4);
            outline-offset: 2px;
        }

        .toggle-btn.active {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .toggle-btn.active .toggle-hint { color: rgba(255, 255, 255, 0.85); }
        .toggle-btn.active .toggle-caret { transform: rotate(180deg); }

        @media (max-width: 560px) {
            .toggle-btn { font-size: 0.95rem; padding: 13px 15px; }
            .toggle-btn .toggle-hint { display: none; }
        }

        .filters-advanced {
            display: none;
            animation: slideDown 0.3s ease-out;
        }

        .filters-advanced.active {
            display: block;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Ortssuche.
           Der uebliche Einstieg ist ein Ortsname, nicht ein Koordinatenpaar –
           entsprechend hebt sich das Feld vom Rest des Formulars ab. Es zieht
           sich aber bewusst NICHT ueber die volle Breite: ein Eingabefeld, das
           auf einem breiten Bildschirm 1300 Pixel misst, sieht nach einem
           Textabsatz aus, nicht nach einem Ortsnamen. */
        .place-search {
            /* Steht jetzt als erster Block im Formular, direkt unter der
               Ueberschrift – der Abstand liegt deshalb unten statt oben. */
            margin: 4px 0 24px;
            padding: 18px 20px;
            background: #f4f7ff;
            border: 1px solid #dbe4ff;
            border-radius: 12px;
        }

        .place-search label {
            display: block;
            font-weight: 700;
            font-size: 1.08rem;
            margin-bottom: 3px;
            color: #1f2937;
        }

        .place-search .place-hint {
            display: block;
            font-size: 0.85rem;
            color: #6b7280;
            margin-bottom: 10px;
        }

        .place-row {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: stretch;
        }

        .place-row input {
            /* Waechst mit, endet aber bei einer Breite, in der ein Ortsname
               noch wie ein Ortsname aussieht. */
            flex: 1 1 260px;
            max-width: 460px;
            min-width: 0;
            padding: 14px 16px;
            font-size: 1.08rem;
            border: 2px solid #c7d2fe;
            border-radius: 10px;
        }

        .place-row input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
        }

        .place-row .btn {
            flex: 0 0 auto;
            width: auto;
        }

        .place-status {
            margin-top: 8px;
            font-size: 0.9em;
            min-height: 1.2em;
            color: #666;
        }

        .place-status.error {
            color: #b91c1c;
        }

        .place-status.ok {
            color: #15803d;
        }

        /* Uebernommen, aber mit Vorbehalt - weder Fehler noch Entwarnung. */
        .place-status.warn {
            color: #b45309;
        }

        /* Kartenausschnitt in den Ergebnissen */
        .station-map {
            position: relative;
            height: 120px;
            /* Bewusst begrenzt: ein kleiner Ausschnitt genuegt, und jede zusaetzliche
               Breite kostet eine weitere Spalte Kartenkacheln pro Ergebnis. */
            max-width: 420px;
            margin-top: 14px;
            border-radius: 8px;
            overflow: hidden;
            background: #e8eaed;
            border: 1px solid #e5e5e5;
        }

        .station-map-inner {
            position: absolute;
            top: 0;
            left: 0;
        }

        .station-map-inner img {
            position: absolute;
            width: 256px;
            height: 256px;
            display: block;
        }

        .station-map-dot {
            position: absolute;
            width: 16px;
            height: 16px;
            margin: -8px 0 0 -8px;
            border-radius: 50%;
            background: #ea4335;
            border: 3px solid white;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
            pointer-events: none;
        }

        .station-map-attrib {
            position: absolute;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.75);
            font-size: 10px;
            line-height: 1.4;
            padding: 1px 5px;
            border-top-left-radius: 4px;
            color: #333;
        }

        .station-map-attrib a {
            color: #333;
        }

        /* Foto der Ladestation */
        .station-photo {
            margin-top: 14px;
        }

        .station-photo img {
            display: block;
            width: 100%;
            max-width: 420px;
            height: auto;
            border-radius: 8px;
            border: 1px solid #e5e5e5;
        }

        /* Mehrere Bilder je Saeule: waagerechter Streifen statt Stapel, damit
           die Trefferliste nicht in die Laenge waechst. */
        .photo-strip {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .photo-strip figure {
            margin: 0;
            flex: 0 0 auto;
            width: 190px;
        }

        .photo-strip img {
            width: 190px;
            height: 130px;
            object-fit: cover;
            max-width: none;
        }

        .photo-strip figcaption {
            font-size: 0.75em;
            color: #666;
            margin-top: 4px;
            line-height: 1.4;
        }

        .photo-strip .cp {
            color: #1d4ed8;
            font-weight: 600;
        }

        /* --- Upload-Dialog ------------------------------------------------- */
        .up-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 1200;
        }

        .up-overlay.active { display: flex; }

        .up-dialog {
            background: #fff;
            border-radius: 14px;
            width: min(560px, 100%);
            max-height: 90vh;
            overflow-y: auto;
            padding: 22px 24px 24px;
        }

        .up-dialog h3 { font-size: 1.15em; margin-bottom: 4px; }
        .up-station { color: #666; font-size: 0.88em; margin-bottom: 14px; }

        /* Die Anleitung steht bewusst im Dialog: hier entscheidet sich, wie das
           Foto gemacht wird, nicht auf einer Hilfeseite, die niemand aufruft. */
        .up-howto {
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            border-radius: 10px;
            padding: 13px 16px;
            font-size: 0.87em;
            line-height: 1.55;
        }

        .up-howto ol { margin: 0; padding-left: 19px; }
        .up-howto li { margin: 4px 0; }
        .up-howto .dont { color: #b45309; }

        .up-field { display: block; margin-top: 14px; }
        .up-field > span { display: block; font-size: 0.85em; color: #555; margin-bottom: 5px; }
        .up-field select,
        .up-field input[type=text],
        .up-field input[type=file] {
            width: 100%;
            padding: 9px 11px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            font: inherit;
            background: #fff;
        }

        .up-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
        .up-actions .photo-btn.primary {
            background: #16a34a;
            border-color: #16a34a;
            color: #fff;
        }
        .up-actions .photo-btn.primary:hover { background: #15803d; color: #fff; }

        .up-preview { margin-top: 12px; }
        .up-preview img {
            max-width: 100%;
            max-height: 220px;
            border-radius: 8px;
            border: 1px solid #e5e5e5;
        }

        .photo-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
        }

        .photo-btn {
            padding: 6px 12px;
            font-size: 0.85em;
            font-weight: 600;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            color: #444;
        }

        .photo-btn:hover {
            border-color: #667eea;
            color: #667eea;
        }

        .photo-btn[disabled] {
            opacity: 0.6;
            cursor: default;
        }

        .photo-msg {
            font-size: 0.85em;
            margin-top: 6px;
            color: #666;
        }

        .photo-msg.error {
            color: #b91c1c;
        }

        .photo-credit {
            font-size: 0.78em;
            color: #777;
            margin-top: 4px;
            max-width: 420px;
        }

        .photo-credit a {
            color: #667eea;
        }

        /* Der kleine Ausschnitt ist anklickbar und oeffnet die grosse Karte */
        .station-map {
            cursor: zoom-in;
        }

        .station-map:focus-visible {
            outline: 3px solid #667eea;
            outline-offset: 2px;
        }

        .station-map-zoom {
            position: absolute;
            left: 6px;
            bottom: 6px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 4px;
            padding: 2px 7px;
            font-size: 11px;
            font-weight: 600;
            color: #333;
            pointer-events: none;
        }

        /* --- Vollbild-Karte ------------------------------------------------ */
        .map-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .map-overlay.active {
            display: flex;
        }

        .map-dialog {
            background: white;
            border-radius: 12px;
            width: min(900px, 100%);
            height: min(80vh, 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
        }

        .map-dialog-head {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 14px 16px;
            border-bottom: 1px solid #e5e5e5;
        }

        .map-dialog-title {
            flex: 1;
            min-width: 0;
            font-weight: 700;
            line-height: 1.35;
        }

        .map-dialog-sub {
            font-weight: 400;
            font-size: 0.88em;
            color: #666;
        }

        .map-dialog-close {
            flex: 0 0 auto;
            border: none;
            background: #f1f1f1;
            border-radius: 6px;
            width: 34px;
            height: 34px;
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
            color: #333;
        }

        .map-dialog-close:hover {
            background: #e0e0e0;
        }

        .map-dialog-body {
            flex: 1;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }

        #bigMap {
            width: 100%;
            flex: 1;
            min-height: 0;
        }

        /* Panorama (Mapy.com) unter der Karte */
        .mapy-pano {
            position: relative;
            flex: 0 0 auto;
            border-top: 1px solid #e5e5e5;
            background: #000;
        }
        .mapy-pano img {
            display: block;
            width: 100%;
            max-height: 220px;
            object-fit: cover;
        }
        .mapy-pano-cap {
            position: absolute;
            right: 6px;
            bottom: 6px;
            font-size: 10px;
            color: #fff;
            background: rgba(0,0,0,.55);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .map-dialog-foot {
            padding: 10px 16px;
            border-top: 1px solid #e5e5e5;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        /* Betreiber-Kontakt: ehrlicher Weg, eine Säule zu erreichen */
        .station-contact {
            flex: 0 0 auto;
            border-top: 1px solid #e5e5e5;
            background: #f8f9fa;
            padding: 12px 16px;
            font-size: 13px;
            max-height: 220px;
            overflow-y: auto;
        }
        .station-contact h3 {
            font-size: 14px;
            margin: 0 0 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .sc-row { display: flex; gap: 8px; margin: 4px 0; align-items: baseline; flex-wrap: wrap; }
        .sc-label { color: #666; min-width: 108px; flex: 0 0 auto; }
        .sc-value { color: #212529; font-weight: 600; }
        .sc-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
        /* Die Pruefung je Ladepunkt, direkt neben der EVSE-ID. Sie sieht
           bewusst wie ein Link aus und nicht wie der Kopieren-Knopf daneben:
           der eine bleibt auf der Seite, der andere fuehrt weg. */
        .sc-check {
            font-size: 12px;
            white-space: nowrap;
            text-decoration: none;
            color: #15803d;
            font-weight: 600;
        }
        .sc-check:hover { text-decoration: underline; }

        /* Das Eichrecht-Abzeichen ist jetzt ein Link. Es soll trotzdem
           aussehen wie die uebrigen Abzeichen - nur der Zeiger verraet, dass
           es eines ist, das weiterfuehrt. */
        .badge-kabel { background: #ffe3e3; color: #c92a2a; }
        .badge-meldung { background: #fff4e6; color: #b45309; }
        .badge-behoben { background: #e6fcf5; color: #0b7285; }
        a.badge { text-decoration: none; cursor: pointer; }
        a.badge:hover { filter: brightness(0.94); }

        .sc-copy {
            border: 1px solid #ced4da;
            background: #fff;
            border-radius: 4px;
            padding: 1px 7px;
            font-size: 11px;
            cursor: pointer;
            color: #495057;
        }
        .sc-copy:hover { background: #e9ecef; }
        .sc-copy.done { border-color: #2f9e44; color: #2f9e44; }
        .sc-hint {
            margin: 8px 0 0;
            color: #555;
            line-height: 1.45;
            border-left: 3px solid #ced4da;
            padding-left: 10px;
        }
        .sc-actions { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
        .sc-actions a {
            color: #1971c2;
            text-decoration: none;
            border: 1px solid #a5d8ff;
            border-radius: 6px;
            padding: 5px 10px;
            font-size: 12px;
        }
        .sc-actions a:hover { background: #e7f5ff; }
        .sc-evse-list { margin: 2px 0 0; }
        .sc-evse-item { display: flex; gap: 8px; align-items: baseline; margin: 3px 0; flex-wrap: wrap; }

        @media (max-width: 768px) {
            .map-overlay {
                padding: 0;
            }

            .map-dialog {
                width: 100%;
                height: 100%;
                border-radius: 0;
            }
        }

        @media (max-width: 768px) {
            .header h1 {
                font-size: 2em;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .form-group-wide {
                grid-column: auto;
            }

            .form-group-wide .checkbox-group {
                grid-template-columns: 1fr;
            }

            .button-group {
                grid-template-columns: 1fr;
            }

            .results-header {
                flex-direction: column;
                align-items: flex-start;
            }

            /* Zwei Kacheln nebeneinander statt drei: bei 360px Breite blieben
               je Kachel sonst 95px, und "stärkster Ladepunkt" braucht drei
               Zeilen dafür. */
            .kpi-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .place-search {
                padding: 14px;
            }

            .place-row input {
                max-width: none;
                font-size: 1rem;
            }

            /* 35px Innenabstand je Seite kosten auf einem 320px-Geraet mehr als
               ein Fuenftel der Breite - die Karten wurden dadurch sehr schmal. */
            .search-card,
            .results-card {
                padding: 18px;
            }

            .station-card {
                padding: 16px;
            }
        }

        /* Sehr schmale Geraete (z.B. iPhone SE, 320px) */
        @media (max-width: 380px) {
            body {
                padding: 10px;
            }

            .search-card,
            .results-card {
                padding: 14px;
            }

            .station-header {
                flex-wrap: wrap;
            }

            /* Unter 380px reicht es fuer eine Kachel je Zeile, und die
               Beschriftung neben dem Wert statt darunter. */
            .kpi-row {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .kpi {
                display: flex;
                align-items: baseline;
                gap: 8px;
                padding: 8px 10px;
            }

            .kpi-wert { font-size: 1.05rem; }
            .kpi-label { margin-top: 0; }

            /* Zweispaltige Faktenpaare werden hier zu Bloecken: 90px fuer die
               Beschriftung lassen fuer den Wert zu wenig uebrig. */
            .fact-grid {
                grid-template-columns: 1fr;
                gap: 0 0;
            }

            .fact-grid dt { margin-top: 8px; }
            .fact-grid dt:first-child { margin-top: 0; }
        }
