.sf-main,.sf-head{max-width:1280px;margin:0 auto;padding:12px 18px;color:#202c32;font:16px/1.45 system-ui,sans-serif}.sf-main p{margin:8px 0}.sf-tools{display:flex;gap:5px;flex-wrap:wrap}.sf-tools button{border:1px solid #adb8b9;border-radius:6px;background:white;color:#1b3036;font:600 13px system-ui;padding:7px 10px;cursor:pointer;white-space:nowrap}.sf-tools button[aria-pressed=true]{background:#163e45;color:white}.sf-main #sf-map{height:65vh;min-height:340px;max-height:760px;background:#e4eceb;border-radius:8px;isolation:isolate}.sf-key{display:flex;flex-wrap:wrap;gap:14px;font-size:13px}.sf-key span:first-child{color:#176338}.sf-key span:nth-child(2){color:#565d60}.sf-vehicle{display:flex!important;align-items:center;justify-content:center;gap:1px;white-space:nowrap}.sf-vehicle img{width:26px;height:29px;object-fit:contain;filter:drop-shadow(0 1px 1px #fff)}.sf-vehicle b{font:700 12px/17px system-ui;background:#187341;color:white;border:1.5px solid white;border-radius:4px;min-width:18px;text-align:center;padding:0 2px;box-shadow:0 1px 3px #0007}.sf-vehicle.old b{background:#62696b}.sf-vehicle.old img{filter:grayscale(.85)}.sf-popup strong{font-size:15px}.sf-popup div{margin:3px 0}.sf-main #sf-status{font-size:14px;font-variant-numeric:tabular-nums}.sf-main .leaflet-container img.leaflet-tile{max-width:none!important}

/* Bahn live: Kopf mit Titel, Linienwahl und Status in drei Zeilen. */
.sf-main .sf-overview{display:block;margin:2px 0 10px}
.sf-overview-title{display:block;font-weight:700;font-size:17px;margin:0 0 8px}
.sf-main .sf-overview #sf-status{display:block;margin:8px 0 0;font-size:13px;line-height:1.4;font-variant-numeric:tabular-nums}
.sf-main .sf-tools{margin:0 0 2px}
/* Originale Linienfarbe mit weißer Trennfuge und farbigem Status-Außenring. */
.sf-vehicle b{display:inline-flex;align-items:center;justify-content:center;background:var(--sf-line,#345)!important;color:#fff!important;border:2px solid white!important;border-radius:5px;box-shadow:0 0 0 3px #178042,0 1px 4px 3px #0003!important;min-width:20px;padding:1px 3px;line-height:1;min-height:20px}
.sf-vehicle b.sf-sign-wide{min-width:28px;padding:1px 5px}
.sf-vehicle.old b{box-shadow:0 0 0 3px #72777b,0 1px 4px 3px #0003!important}
.sf-vehicle.old img{filter:none} /* Grau kennzeichnet nur die Status-Umrandung. */
.sf-vehicle{gap:4px!important}
.sf-main .sf-key{margin-top:10px}
.sf-bottom-notes{margin:0 0 2rem}
.sf-bottom-notes p{margin:.45rem 0 .8rem}

/* Statuslegende: echte Außenringe statt ausgeschriebener Farberklärung. */
.sf-main .sf-key{align-items:center;gap:9px 20px}
.sf-main .sf-key .sf-legend-item{display:inline-flex;align-items:center;gap:8px;color:#34434b}
.sf-main .sf-key .sf-ring{display:inline-block;box-sizing:border-box;width:17px;height:17px;border:3px solid #178042;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 2px #fff;flex:0 0 auto}
.sf-main .sf-key .sf-ring-older{border-color:#72777b}

/* San Francisco: Alle Bedienelemente in derselben Zeile, Umbruch nur bei Platzmangel. */
.sf-main .sf-tools{display:flex;flex-wrap:wrap;align-items:center;gap:5px;white-space:nowrap}
.sf-main .sf-tools button{font:600 12px/1.3 system-ui;padding:7px 9px;min-height:32px;box-sizing:border-box}
.sf-main .sf-tools .sf-tools-separator{height:22px;border-left:1px solid #bac6c9;margin:0 5px}
.sf-main .sf-tools button[id^="sf-depot"],.sf-main .sf-tools #sf-cable-depot-zoom{background:#fff;color:#253b42;border-color:#aab6b9}
.sf-main .sf-tools button[id^="sf-depot"][aria-pressed="true"]{background:#e5eeed;border-color:#527a73}
.sf-main .sf-tools button:focus-visible{outline:2px solid #176b88;outline-offset:2px}
@media(max-width:670px){.sf-main .sf-tools .sf-tools-separator{display:none}}
/* Dauerhafte Beschriftung statt nur bei Hover sichtbarer Betriebshöfe. */
.sf-main .leaflet-tooltip.sf-depot-label{font:600 12px/1.3 system-ui;color:#243e45;background:#fff;border:1px solid #73868a;border-radius:5px;padding:4px 7px;box-shadow:0 1px 5px #0004;white-space:nowrap}
.sf-main .leaflet-tooltip.sf-depot-label::before{border-top-color:#fff}
.sf-main .leaflet-tooltip-bottom.sf-depot-label::before{border-bottom-color:#fff}
.sf-depot-popup strong{font-size:14px}
.sf-depot-popup p{margin:4px 0}

/* Muni-Metro-Integration: Zusatzmodule, keine Änderung historischer Symbole */
.sf-main #sf-metro-hint{font:12px/1.4 system-ui;color:#526169;margin-top:3px}
.sf-main .sf-tools button[data-line="metro"]{border-color:#657883;font-weight:700}
.sf-main .sf-tools button[data-line="J"],.sf-main .sf-tools button[data-line="K"],.sf-main .sf-tools button[data-line="L"],.sf-main .sf-tools button[data-line="M"],.sf-main .sf-tools button[data-line="N"],.sf-main .sf-tools button[data-line="T"]{min-width:30px}

/* Fahrzeugzahl direkt unter der vom gemeinsamen Seitenkopf ausgegebenen Linienübersicht. */
.sf-main .sf-overview #sf-status{margin:0 0 8px;font-size:14px;font-weight:500}
.sf-main .sf-overview #sf-metro-hint{margin:0 0 6px}
.sf-main .sf-overview .sf-tools{margin-top:7px}

/* Die Live-Fahrzeugzahl steht im gemeinsamen Seitenkopf unter der Linienübersicht. */
#sf-status.sf-header-count{display:block;font:400 13px/1.45 system-ui,sans-serif!important;letter-spacing:normal;margin:4px 0 8px!important;color:inherit;font-variant-numeric:tabular-nums}

/* Technische Meldungen folgen unmittelbar auf die Fahrzeugzahl im gemeinsamen Kopf. */
#sf-metro-hint.sf-header-hint{display:block;font:400 12px/1.4 system-ui,sans-serif!important;color:#526169;margin:0 0 8px!important}
