
:root{color-scheme:dark;--bg:#0f172a;--panel:#111827;--line:#334155;--muted:#94a3b8;--text:#e5e7eb;--red:#ef4444;--orange:#f59e0b;--yellow:#facc15;--gold:#c99b2c;--silver:#aeb7c2;--bronze:#9a6036}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;overflow:hidden}#map{height:100%;width:100%}.leaflet-control-attribution{font-size:9px}.leaflet-div-icon{background:transparent;border:0}
.top-shell{position:absolute;z-index:1100;top:12px;left:50%;transform:translateX(-50%);width:min(1250px,calc(100% - 24px));background:rgba(15,23,42,.96);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 30px #0008;backdrop-filter:blur(8px);overflow:hidden}.head{display:flex;align-items:center;gap:12px;padding:12px 15px 8px}.brand-icon{width:52px;height:52px;border-radius:10px;object-fit:cover;box-shadow:0 2px 10px #0006}.heading{min-width:0;flex:1}.title{font-size:27px;line-height:1;font-weight:950;letter-spacing:-.02em}.today-weather{display:none;margin-top:5px;font-size:12px;line-height:1.25;color:#f8fafc;font-weight:500}.today-weather.show{display:block}.today-weather .label{color:#94a3b8;font-weight:400}.subtitle{font-size:12px;color:#cbd5e1;margin-top:5px;line-height:1.35}.version{font-size:11px;color:var(--muted);white-space:nowrap}
.filters{display:flex;gap:7px;align-items:end;flex-wrap:wrap;padding:6px 11px 10px;border-top:1px solid rgba(51,65,85,.55)}.filters[hidden]{display:none!important}.filter-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:31px;padding:5px 10px;border-radius:8px;border:1px solid #475569;background:#1e293b;color:#f8fafc;font-size:11px;font-weight:850;cursor:pointer;white-space:nowrap}.filter-toggle:hover{background:#334155}.filter-toggle.active{border-color:#60a5fa;background:#1e3a5f}.filter-toggle .chev{display:inline-block;transition:transform .15s ease}.filter-toggle[aria-expanded="true"] .chev{transform:rotate(180deg)}.filter{display:flex;flex-direction:column;gap:3px}.filter label{font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8}.filter select{height:31px;min-width:122px;max-width:230px;background:#111827;color:#fff;border:1px solid #475569;border-radius:8px;padding:5px 8px;font-size:11px}.filter.period select{min-width:225px}.state{margin-left:auto;align-self:center;font-size:10px;color:var(--muted);max-width:360px;text-align:right;line-height:1.3}
.fi-marker{position:relative;width:168px;display:flex;flex-direction:column;align-items:center;filter:drop-shadow(0 5px 8px rgba(0,0,0,.62));cursor:pointer}.fi-marker.medal{width:250px}.fi-marker.gold{width:270px}.fi-bars{height:220px;width:98px;display:flex;align-items:flex-end;justify-content:center;gap:7px;position:relative;margin-bottom:1px}.fi-marker.medal .fi-bars{height:275px;width:122px;gap:9px}.fi-marker.gold .fi-bars{height:305px}.fi-bar{width:24px;min-height:5px;border-radius:7px 7px 0 0;display:flex;align-items:flex-end;justify-content:center;padding-bottom:7px;font-weight:950;font-size:12px;line-height:1;box-shadow:0 0 12px rgba(0,0,0,.42);border:1px solid rgba(255,255,255,.24);border-bottom:0}.fi-marker.medal .fi-bar{width:30px}.fi-marker.gold .fi-bar{width:32px}.fi-bar.red{background:linear-gradient(to top,#991b1b,#ef4444);color:#fff}.fi-bar.orange{background:linear-gradient(to top,#b45309,#f59e0b);color:#111827}.fi-bar.yellow{background:linear-gradient(to top,#ca8a04,#fde047);color:#111827}.fi-bar small{display:none;writing-mode:vertical-rl;transform:rotate(180deg);font-size:12px;line-height:1;color:inherit}.fi-bar.show-label small{display:block}
.fi-card{width:168px;background:rgba(72,72,72,.98);border:1px solid #777;border-radius:10px;overflow:hidden;color:#f8fafc}.fi-marker.medal .fi-card{width:250px}.fi-marker.gold .fi-card{width:270px}.fi-card.medal-gold{background:var(--gold);border-color:#f8d56c;color:#17130a;box-shadow:0 0 0 2px rgba(251,191,36,.25)}.fi-card.medal-silver{background:var(--silver);border-color:#e5e7eb;color:#111827;box-shadow:0 0 0 2px rgba(203,213,225,.22)}.fi-card.medal-bronze{background:var(--bronze);border-color:#d49a69;color:#fff;box-shadow:0 0 0 2px rgba(205,127,50,.25)}
.fi-name-row{display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 7px 5px;font-weight:950;font-size:12px;line-height:1.1;background:rgba(0,0,0,.13)}.fi-marker.medal .fi-name-row{font-size:17px;padding:10px 10px 7px;gap:9px}.fi-marker.gold .fi-name-row{font-size:19px}.fi-name{display:inline-block;max-width:122px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fi-marker.medal .fi-name{max-width:185px}.fi-marker.gold .fi-name{max-width:200px}.fi-medal,.fi-place{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;font-weight:950}.fi-medal{width:24px;height:24px;border-radius:50%;font-size:11px;border:2px solid currentColor;box-shadow:inset 1px 1px 0 rgba(255,255,255,.24),inset -1px -1px 0 rgba(0,0,0,.24);opacity:.9}.fi-marker.gold .fi-medal{width:28px;height:28px;font-size:12px}.medal-gold .fi-medal{color:#6d4e05}.medal-silver .fi-medal{color:#56606b}.medal-bronze .fi-medal{color:#4c250f}.fi-place{font-size:10px;min-width:24px;color:#e2e8f0}
.fi-current,.fi-today-line{display:flex;align-items:center;gap:5px;padding:5px 8px;border-top:1px solid rgba(255,255,255,.16);font-size:9px;font-weight:800;white-space:nowrap;overflow:hidden}.fi-current{border-bottom:1px solid rgba(255,255,255,.10)}.fi-today-line{border-bottom:1px solid rgba(255,255,255,.12)}.fi-marker.medal .fi-current,.fi-marker.medal .fi-today-line{padding:7px 11px;font-size:11px}.fi-current-dot{width:12px;height:12px;border-radius:50%;border:1px solid rgba(255,255,255,.65);flex:0 0 auto;background:#64748b}.fi-current-dot.yellow{background:var(--yellow)}.fi-current-dot.orange{background:var(--orange)}.fi-current-dot.red{background:var(--red)}.fi-current-arrow{font-size:15px;line-height:1;display:inline-block;transform-origin:50% 50%;flex:0 0 auto}.fi-marker.medal .fi-current-arrow{font-size:18px}.fi-current-text{overflow:hidden;text-overflow:ellipsis}
.fi-days{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:7px 8px}.fi-marker.medal .fi-days{gap:6px;padding:9px 11px}.fi-day{aspect-ratio:1/1;border-radius:4px;background:#475569;border:1px solid rgba(255,255,255,.22);display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:9px;font-weight:950;color:#fff;text-shadow:0 1px 2px #000;line-height:1.05}.fi-day-hours{font-size:7px;font-weight:800;margin-top:2px}.fi-marker.medal .fi-day{font-size:12px}.fi-marker.medal .fi-day-hours{font-size:9px}.fi-day.yellow{background:var(--yellow);color:#111827;text-shadow:none}.fi-day.orange{background:var(--orange);color:#111827;text-shadow:none}.fi-day.red{background:var(--red);color:#fff}
.fi-links{padding:3px 8px 8px;border-top:1px solid rgba(255,255,255,.13);font-size:8px;line-height:1.25}.fi-marker.medal .fi-links{padding:5px 11px 10px;font-size:10px}.fi-link-head{font-weight:950;text-transform:uppercase;letter-spacing:.04em;opacity:.72;margin:5px 0 3px}.fi-link-list{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scrollbar-width:none}.fi-link-list::-webkit-scrollbar{display:none}.fi-link-pill{display:inline-flex;align-items:center;max-width:100%;white-space:nowrap;border:1px solid rgba(255,255,255,.34);border-radius:5px;padding:2px 5px;flex:0 0 auto;background:rgba(0,0,0,.08)}.fi-link-pill a{color:inherit;text-decoration:none;white-space:nowrap}.medal-gold .fi-link-pill,.medal-silver .fi-link-pill{border-color:rgba(17,24,39,.28)}.medal-gold .fi-link-pill a,.medal-silver .fi-link-pill a{color:#111827}.fi-bestline{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400;margin-top:2px}.fi-empty{opacity:.55}.fi-zero .fi-bar{opacity:.24}.fi-zero .fi-card{opacity:.88}
.legend{position:absolute;z-index:1000;left:12px;bottom:18px;width:min(490px,calc(100% - 24px));background:rgba(15,23,42,.95);border:1px solid var(--line);border-radius:10px;padding:8px 10px;box-shadow:0 3px 15px #0006;font-size:10px;line-height:1.45}.legend summary{cursor:pointer;font-weight:900;color:#e2e8f0}.legend-body{padding-top:6px;color:#cbd5e1}.legend-row{margin:4px 0}.legend-bars{display:inline-flex;gap:3px;vertical-align:middle;margin-right:6px}.legend-bars span{display:inline-block;width:8px;border-radius:3px 3px 0 0}.legend-bars .r{height:26px;background:var(--red)}.legend-bars .o{height:18px;background:var(--orange)}.legend-bars .y{height:12px;background:var(--yellow)}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#111827;color:#e5e7eb}.leaflet-popup-content{margin:12px 14px;min-width:260px}.pop-title{font-size:16px;font-weight:900;margin-bottom:7px}.pop-note{margin-top:7px;color:#94a3b8;font-size:10px}
@media(max-width:760px){.top-shell{top:7px;width:calc(100% - 14px)}.head{padding:8px 9px 6px;gap:8px}.brand-icon{width:41px;height:41px}.title{font-size:21px}.today-weather{font-size:10px;margin-top:4px}.subtitle{font-size:10px}.version{display:none}.filter-toggle{height:29px;padding:4px 8px;font-size:10px}.filters{padding:5px 7px 8px;gap:5px}.filter select{height:29px;min-width:96px;max-width:44vw;font-size:10px}.filter.period select{min-width:210px}.state{width:100%;max-width:none;text-align:left;margin-left:0}.legend{left:7px;bottom:7px;width:calc(100% - 14px)}.fi-marker{width:154px}.fi-marker.medal{width:218px}.fi-marker.gold{width:232px}.fi-card,.fi-marker .fi-card{width:154px}.fi-marker.medal .fi-card{width:218px}.fi-marker.gold .fi-card{width:232px}.fi-bars{height:175px;width:82px;gap:5px}.fi-marker.medal .fi-bars{height:225px}.fi-marker.gold .fi-bars{height:250px}.fi-bar{width:20px}.fi-marker.medal .fi-bar{width:25px}.fi-name{max-width:108px}.fi-marker.medal .fi-name{max-width:155px}.fi-marker.gold .fi-name{max-width:166px}.fi-name-row{font-size:11px}.fi-marker.medal .fi-name-row{font-size:15px}}

/* V039 merge: aktueller Meldewert, Admin-Livewerte und Karten-Popup */
:root{--blue:#93c5fd;--fi-yellow-light:#facc15;--fi-orange-light:#fb923c;--fi-red-light:#ef4444;--fi-yellow-solid:#facc15;--fi-orange-solid:#fb923c;--fi-red-solid:#ef4444}
.fi-name-row{justify-content:flex-start}.fi-name{flex:1 1 auto}.fi-current-status{margin-left:auto;width:28px;height:28px;border-radius:50%;border:2px solid rgba(255,255,255,.80);box-shadow:0 1px 5px rgba(0,0,0,.45),inset 0 0 0 1px rgba(0,0,0,.20);background:#64748b;flex:0 0 auto}.fi-marker.medal .fi-current-status{width:34px;height:34px;border-width:2px}.fi-marker.gold .fi-current-status{width:38px;height:38px}.fi-current-status.yellow{background:var(--yellow)}.fi-current-status.orange{background:var(--orange)}.fi-current-status.red{background:var(--red)}
.fi-live-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid rgba(255,255,255,.16);border-bottom:1px solid rgba(255,255,255,.12);background:#2d2d2d}.fi-live-value{text-align:center;padding:6px 3px;min-height:42px;border-right:1px solid rgba(255,255,255,.14);display:flex;flex-direction:column;justify-content:center;background:#2d2d2d;color:#f8fafc}.fi-live-value:last-child{border-right:0}.fi-live-value small{font-size:8px;opacity:.76}.fi-live-value b{display:flex;align-items:center;justify-content:center;gap:2px;font-size:12px;line-height:1.1;margin-top:2px}.fi-marker.medal .fi-live-value{min-height:49px;padding:7px 4px}.fi-marker.medal .fi-live-value small{font-size:9px}.fi-marker.medal .fi-live-value b{font-size:14px}.fi-live-value.inst-field-yellow{background:var(--fi-yellow-solid);color:#111827}.fi-live-value.inst-field-orange{background:var(--fi-orange-solid);color:#111827}.fi-live-value.inst-field-red{background:var(--fi-red-solid);color:#fff}.wind-dir-arrow{display:inline-flex;width:19px;height:19px;align-items:center;justify-content:center;vertical-align:middle;flex:0 0 auto}.wind-dir-arrow svg{width:17px;height:17px;display:block;transform-origin:50% 50%}
.fi-days{grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:0;border-top:1px solid rgba(255,255,255,.15)}.fi-marker.medal .fi-days{gap:0;padding:0}.fi-day{aspect-ratio:auto;height:54px;border-radius:0;border:0;border-right:1px solid rgba(255,255,255,.16);background:#050505}.fi-day:last-child{border-right:0}.fi-marker.medal .fi-day{height:64px}.fi-day-arrow{width:12px;height:12px;display:block;margin:3px 0 2px}.fi-day-arrow svg{width:12px;height:12px;display:block;transform-origin:50% 50%}.fi-marker.medal .fi-day-arrow,.fi-marker.medal .fi-day-arrow svg{width:15px;height:15px}.fi-day-hours{margin-top:0}.fi-day.today{position:relative;z-index:2;box-shadow:inset 0 0 0 1px rgba(255,255,255,.58)}
/* Vollstaendiges Revier-/Stations-Popup aus karte.html */
.leaflet-popup-content{width:min(540px,78vw)!important;max-height:min(72vh,760px);overflow-y:auto;overflow-x:hidden;padding-right:3px}.pop h3{margin:0 0 7px;font-size:17px}.pop h4{margin:12px 0 4px;font-size:13px;color:var(--blue)}.station-stack{display:flex;flex-direction:column;gap:10px;margin-top:10px}.station-block{border:1px solid #334155;border-radius:10px;overflow:hidden;background:#0b1220}.station-block.primary{border-color:#60a5fa}.station-head{display:flex;align-items:flex-start;gap:8px;padding:8px 9px;background:#172033;border-bottom:1px solid #334155}.station-head-main{min-width:0;flex:1}.station-name{font-weight:900;font-size:13px;color:#f8fafc}.station-source{font-size:10px;color:#94a3b8;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.station-source a{color:#93c5fd;text-decoration:none}.primary-badge{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;background:#1d4ed8;color:#fff;border-radius:99px;padding:3px 6px;white-space:nowrap}.station-values{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #263348}.station-value{text-align:center;padding:7px 4px;border-right:1px solid #263348;background:#2d2d2d;color:#f8fafc}.station-value:last-child{border-right:0}.station-value small{display:block;color:inherit;opacity:.72;font-size:9px}.station-value b{display:flex;align-items:center;justify-content:center;gap:2px;margin-top:2px;font-size:13px;color:inherit}.station-value.inst-field-yellow{background:var(--fi-yellow-solid);color:#111827}.station-value.inst-field-orange{background:var(--fi-orange-solid);color:#111827}.station-value.inst-field-red{background:var(--fi-red-solid);color:#fff}.station-message-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:8px 9px;border-bottom:1px solid #263348}.message-box{background:#111827;border:1px solid #334155;border-radius:7px;padding:6px 7px}.message-box small{display:block;color:#94a3b8;font-size:9px;margin-bottom:3px}.level-badge{display:inline-block;border-radius:99px;padding:2px 7px;font-size:10px;font-weight:900;color:#111827}.level-none{background:#cbd5e1}.level-light-yellow{background:var(--fi-yellow-light)}.level-light-orange{background:var(--fi-orange-light)}.level-light-red{background:var(--fi-red-light)}.level-solid-yellow{background:var(--fi-yellow-solid)}.level-solid-orange{background:var(--fi-orange-solid)}.level-solid-red{background:var(--fi-red-solid)}.window-info{padding:0 9px 7px;color:#94a3b8;font-size:9px}.station-chart-title{display:flex;justify-content:space-between;gap:10px;padding:7px 9px 3px;color:#cbd5e1;font-size:10px;font-weight:800}.chart-key{font-weight:500;color:#94a3b8}.station-chart-wrap{position:relative;height:178px;margin:0 8px 8px;background:#171717;border:1px solid #383838;border-radius:7px;overflow:hidden}.station-no-chart{margin:0 8px 8px;padding:12px 8px;background:#111827;border:1px dashed #334155;border-radius:7px;color:#94a3b8;font-size:10px;text-align:center}.station-no-current{padding:8px 9px;color:#fca5a5;font-size:10px;border-bottom:1px solid #263348}.message-source{margin-top:4px;color:#cbd5e1;font-size:9px;line-height:1.35}.region-summary{border:1px solid #475569;border-radius:10px;overflow:hidden;background:#0b1220;margin-bottom:12px}.region-summary-head{padding:8px 9px;background:#172033;border-bottom:1px solid #334155}.region-summary-title{font-size:11px;font-weight:900;color:#e2e8f0}.region-summary-source{margin-top:2px;color:#94a3b8;font-size:9px}.region-values{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #263348}.region-value{text-align:center;padding:8px 4px;border-right:1px solid #263348;background:#2d2d2d;color:#f8fafc}.region-value:last-child{border-right:0}.region-value small{display:block;font-size:9px;opacity:.72}.region-value b{display:flex;align-items:center;justify-content:center;gap:2px;margin-top:2px;font-size:14px}.region-value.inst-field-yellow{background:var(--fi-yellow-solid);color:#111827}.region-value.inst-field-orange{background:var(--fi-orange-solid);color:#111827}.region-value.inst-field-red{background:var(--fi-red-solid);color:#fff}.station-contrib-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:7px 9px;border-bottom:1px solid #263348;background:#0b1220}.station-contrib{background:#111827;border:1px solid #334155;border-radius:7px;padding:5px 6px}.station-contrib small{display:block;color:#94a3b8;font-size:9px;margin-bottom:3px}.contrib-none{color:#64748b;font-size:10px}.station-rank{font-size:9px;color:#94a3b8;margin-left:5px}.webcam-list{margin-top:12px;padding-top:10px;border-top:1px solid #334155}.webcam-list h4{margin:0 0 6px!important;color:#e2e8f0!important}.webcam-links{display:flex;flex-wrap:wrap;gap:6px}.webcam-link{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border-radius:7px;border:1px solid #475569;background:#172033;color:#bfdbfe;text-decoration:none;font-size:10px}.webcam-link:hover{background:#1e293b;border-color:#60a5fa}
@media(max-width:760px){.leaflet-popup-content{width:min(88vw,520px)!important;max-height:70vh}.station-chart-wrap{height:160px}.station-message-grid{grid-template-columns:1fr}.fi-current-status{width:26px;height:26px}.fi-marker.medal .fi-current-status{width:31px;height:31px}.fi-marker.gold .fi-current-status{width:34px;height:34px}}

/* V040: Revierkaestchen auf allen Bildschirmgroessen kompakter */
.fi-marker{width:150px}
.fi-marker.medal{width:205px}
.fi-marker.gold{width:215px}
.fi-card,.fi-marker .fi-card{width:150px;border-radius:8px}
.fi-marker.medal .fi-card{width:205px}
.fi-marker.gold .fi-card{width:215px}
.fi-card *{font-weight:400!important}
.fi-card .fi-name{font-weight:800!important}
.fi-name-row{gap:4px;padding:4px 5px 3px;font-size:10px;line-height:1.05}
.fi-marker.medal .fi-name-row{gap:5px;padding:5px 6px 4px;font-size:12px}
.fi-marker.gold .fi-name-row{font-size:13px}
.fi-name{max-width:103px}
.fi-marker.medal .fi-name{max-width:145px}
.fi-marker.gold .fi-name{max-width:153px}
.fi-place{font-size:8px;min-width:17px}
.fi-medal{width:19px;height:19px;font-size:8px;border-width:1px}
.fi-marker.gold .fi-medal{width:21px;height:21px;font-size:9px}
.fi-current-status{width:20px;height:20px;border-width:1.5px}
.fi-marker.medal .fi-current-status{width:22px;height:22px;border-width:1.5px}
.fi-marker.gold .fi-current-status{width:24px;height:24px}
.fi-live-value{padding:3px 2px;min-height:33px}
.fi-live-value small{font-size:7px}
.fi-live-value b{font-size:9px;line-height:1.05;margin-top:1px}
.fi-marker.medal .fi-live-value{min-height:36px;padding:3px 2px}
.fi-marker.medal .fi-live-value small{font-size:7.5px}
.fi-marker.medal .fi-live-value b{font-size:10px}
.wind-dir-arrow{width:15px;height:15px}
.wind-dir-arrow svg{width:13px;height:13px}
.fi-day{height:41px;font-size:8px;line-height:1}
.fi-marker.medal .fi-day{height:45px;font-size:9px}
.fi-day-hours{font-size:6.5px;margin-top:0}
.fi-marker.medal .fi-day-hours{font-size:7.5px}
.fi-day-arrow{width:10px;height:10px;margin:2px 0 1px}
.fi-day-arrow svg{width:10px;height:10px}
.fi-marker.medal .fi-day-arrow,.fi-marker.medal .fi-day-arrow svg{width:11px;height:11px}
.fi-bar{font-weight:400;font-size:9px}
.fi-bar small{font-size:9px}
@media(max-width:760px){
  .fi-marker{width:146px}.fi-marker.medal{width:198px}.fi-marker.gold{width:208px}
  .fi-card,.fi-marker .fi-card{width:146px}.fi-marker.medal .fi-card{width:198px}.fi-marker.gold .fi-card{width:208px}
  .fi-name{max-width:100px}.fi-marker.medal .fi-name{max-width:138px}.fi-marker.gold .fi-name{max-width:146px}
  .fi-current-status{width:19px;height:19px}.fi-marker.medal .fi-current-status{width:21px;height:21px}.fi-marker.gold .fi-current-status{width:23px;height:23px}
}


/* V053: Tageskaestchen als 100%-Windverteilung */
.fi-day{position:relative;overflow:hidden;background:#050505!important}
.fi-day-bg{position:absolute;inset:0;display:flex;flex-direction:column-reverse;z-index:0;background:#050505}
.fi-day-seg{display:block;width:100%;flex:0 0 auto}
.fi-day-seg.red{background:var(--red)}
.fi-day-seg.orange{background:var(--orange)}
.fi-day-seg.yellow{background:var(--yellow)}
.fi-day-seg.green{background:var(--green)}
.fi-day-seg.none{background:#050505}
.fi-day-content{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.95)}
.fi-day.today{box-shadow:none}
.fi-day.today .fi-day-content{box-shadow:inset 0 0 0 1px rgba(255,255,255,.72)}


/* V053 click-only detail window */
.fi-name-row,.fi-day{cursor:pointer}
.fi-detail-date{font-size:11px;color:#94a3b8;margin:-3px 0 8px}
.fi-score-detail{border:1px solid #334155;border-radius:10px;overflow:hidden;background:#0b1220;margin-bottom:10px}
.fi-score-detail h4,.fi-weather-detail h4,.fi-link-detail h4{margin:0!important;padding:8px 9px;background:#172033;border-bottom:1px solid #334155;color:#e2e8f0!important;font-size:11px}
.fi-score-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.fi-score-cell{padding:7px 5px;text-align:center;border-right:1px solid #263348;background:#111827}
.fi-score-cell:last-child{border-right:0}.fi-score-cell small{display:block;color:#94a3b8;font-size:8px}.fi-score-cell b{display:block;margin-top:2px;font-size:12px;color:#f8fafc}.fi-score-cell.green b{color:#86efac}.fi-score-cell.yellow b{color:#fde047}.fi-score-cell.orange b{color:#fdba74}.fi-score-cell.red b{color:#fca5a5}
.fi-score-foot{padding:6px 9px;border-top:1px solid #263348;color:#cbd5e1;font-size:9px}
.fi-weather-detail,.fi-link-detail{border:1px solid #334155;border-radius:10px;overflow:hidden;background:#0b1220;margin-bottom:10px}
.fi-weather-parts{display:grid;grid-template-columns:1fr 1fr}.fi-weather-part{padding:8px 9px;border-right:1px solid #263348;min-height:76px}.fi-weather-part:last-child{border-right:0}.fi-weather-part small{display:block;color:#94a3b8;font-size:9px;margin-bottom:3px}.fi-weather-part b{font-size:11px;color:#f8fafc}.fi-weather-part div{font-size:9px;color:#cbd5e1;margin-top:3px;line-height:1.3}
.fi-link-detail-body{padding:8px 9px;display:flex;flex-direction:column;gap:7px}.fi-detail-link-row{display:flex;flex-wrap:wrap;gap:5px}.fi-detail-link-head{font-size:9px;color:#94a3b8;font-weight:800;text-transform:uppercase;letter-spacing:.03em;width:100%}.fi-detail-link{display:inline-flex;padding:4px 7px;border:1px solid #475569;border-radius:7px;background:#172033;color:#bfdbfe;text-decoration:none;font-size:10px}
.fi-admin-detail-head{margin:12px 0 6px;padding-top:9px;border-top:1px solid #475569;color:#cbd5e1;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
@media(max-width:560px){.fi-score-grid{grid-template-columns:repeat(2,1fr)}.fi-score-cell{border-bottom:1px solid #263348}.fi-weather-parts{grid-template-columns:1fr}.fi-weather-part{border-right:0;border-bottom:1px solid #263348}.fi-weather-part:last-child{border-bottom:0}}


/* V053: Tagesklick exklusiv auf Tageskaestchen; bessere Lesbarkeit der Tageswerte */
.fi-day-content{font-weight:950!important}
.fi-day-full .fi-day-content{color:#111827!important;text-shadow:0 1px 0 rgba(255,255,255,.62)!important}
.fi-day-partial .fi-day-content{color:#f8fafc!important;text-shadow:0 1px 2px rgba(0,0,0,.98)!important}
.fi-day-partial .fi-day-hours{color:#111827!important;text-shadow:0 1px 0 rgba(255,255,255,.58)!important}
.fi-day-no-score .fi-day-content{color:#f8fafc!important;text-shadow:0 1px 2px rgba(0,0,0,.95)!important}
.fi-day-label{font-size:10px;font-weight:950!important;line-height:1}
.fi-day-hours{font-size:8.5px!important;font-weight:950!important;line-height:1}
.fi-day-arrow{width:13px!important;height:13px!important;margin:2px 0 1px!important;color:inherit!important}
.fi-day-arrow svg{width:13px!important;height:13px!important}
.fi-marker.medal .fi-day-label{font-size:11px}
.fi-marker.medal .fi-day-hours{font-size:9.5px!important}
.fi-marker.medal .fi-day-arrow,.fi-marker.medal .fi-day-arrow svg{width:14px!important;height:14px!important}


/* ===== V062 ===== */
/* Revierkaestchen: letzte 10 Tage, 5 je Zeile, 2 Zeilen */
.fi-days{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.fi-day{border-right:1px solid rgba(255,255,255,.16)}
.fi-day:nth-child(5n){border-right:0}
.fi-day:nth-child(-n+5){border-bottom:1px solid rgba(255,255,255,.16)}
/* Score-Saeulen hoechstens so hoch wie das Revierkaestchen (Werte = FI_CARD_H in karte-ui.js) */
.fi-bars,.fi-marker .fi-bars{height:112px!important}
.fi-marker.medal .fi-bars{height:124px!important}
.fi-marker.gold .fi-bars{height:126px!important}
.fi-bar{min-height:4px}
/* Karte als eigener Stapelkontext: Marker (z-index bis 200000) liegen nie ueber dem Revier-Vollbild */
#map{isolation:isolate}

/* V068: 5 Tage in einer Zeile, Tageskreis statt Farbflaeche, Wochentag links oben */
.fi-days.fi-days-dial{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:0!important;padding:0!important}
.fi-day.fi-day-dialbox{height:auto!important;aspect-ratio:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:2px 2px 3px;background:#3a3a3a!important;border-bottom:0!important}
.fi-day.fi-day-dialbox:nth-child(5n){border-right:0}
.fi-day-dialbox .fi-day-label{display:block;text-align:left;font-size:8.5px;line-height:1;padding:1px 0 2px 1px;color:#f8fafc;text-shadow:0 1px 2px rgba(0,0,0,.9)}
.fi-day-dialbox .fi-day-dial{display:block;width:100%;padding:0 1px}
.fi-day-dialbox .fi-day-dial svg{display:block;width:100%;height:auto;aspect-ratio:1/1}
.fi-marker.medal .fi-day-dialbox{padding:3px 3px 4px}
.fi-marker.medal .fi-day-dialbox .fi-day-label{font-size:10px}
.fi-day-dialbox.today{box-shadow:inset 0 0 0 1px rgba(255,255,255,.72)}
.fi-day-dialbox.fi-day-dim .fi-day-dial{opacity:.28}
.fi-day-dialbox.fi-day-blank .fi-day-dial{opacity:.35}
.fi-bars,.fi-marker .fi-bars{height:70px!important}
.fi-marker.medal .fi-bars{height:87px!important}
.fi-marker.gold .fi-bars{height:91px!important}
/* V069: Ladeanzeige */
.fi-loading{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1200;display:flex;align-items:center;gap:10px;padding:11px 18px;border-radius:999px;background:rgba(15,23,42,.92);border:1px solid rgba(148,163,184,.35);color:#f8fafc;font:600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.45);transition:opacity .25s;pointer-events:none}
.fi-loading.is-hidden{opacity:0}
.fi-loading-spin{width:16px;height:16px;border-radius:50%;border:2.5px solid rgba(255,255,255,.25);border-top-color:#38bdf8;animation:fi-spin .8s linear infinite}
@keyframes fi-spin{to{transform:rotate(360deg)}}
body.region-open .fi-loading{display:none}
/* V069: Kreis fuellt das Tageskaestchen, Wochentag klein und nicht fett links oben in der Ecke */
.fi-day.fi-day-dialbox{position:relative;padding:1px!important}
.fi-day-dialbox .fi-day-label{position:absolute;left:2px;top:1px;z-index:2;padding:0;font-size:7px!important;font-weight:400!important;line-height:1;color:#f1f5f9;text-shadow:0 0 2px #000,0 0 2px #000}
.fi-marker.medal .fi-day-dialbox .fi-day-label{font-size:8px!important}
.fi-day-dialbox .fi-day-dial{padding:0}
.fi-bars,.fi-marker .fi-bars{height:60px!important}
.fi-marker.medal .fi-bars{height:75px!important}
.fi-marker.gold .fi-bars{height:79px!important}
/* V070: alle Revierkaestchen 10 % groesser (normal 165, Medaille 226, Gold 237 px) */
.fi-marker,.fi-card,.fi-marker .fi-card{width:165px!important}
.fi-marker.medal,.fi-marker.medal .fi-card{width:226px!important}
.fi-marker.gold,.fi-marker.gold .fi-card{width:237px!important}
.fi-name-row{font-size:12px}
.fi-marker.medal .fi-name-row{font-size:13px}
.fi-marker.gold .fi-name-row{font-size:14px}
.fi-marker.medal .fi-name{max-width:160px}
.fi-marker.gold .fi-name{max-width:168px}
.fi-bars,.fi-marker .fi-bars{height:63px!important}
.fi-marker.medal .fi-bars{height:79px!important}
.fi-marker.gold .fi-bars{height:83px!important}
/* V071: flachere Titelleiste, kleinerer Alarm-Kreis */
.fi-name-row,.fi-marker.medal .fi-name-row,.fi-marker.gold .fi-name-row{padding:2px 5px 2px 6px!important;gap:4px!important;min-height:0!important;line-height:1.05!important}
.fi-current-status{width:14px!important;height:14px!important;border-width:1.5px!important}
.fi-marker.medal .fi-current-status{width:16px!important;height:16px!important}
.fi-marker.gold .fi-current-status{width:17px!important;height:17px!important}
.fi-marker.medal .fi-medal{width:16px!important;height:16px!important;font-size:8px!important}
.fi-marker.gold .fi-medal{width:17px!important;height:17px!important}
.fi-bars,.fi-marker .fi-bars{height:54px!important}
.fi-marker.medal .fi-bars{height:68px!important}
.fi-marker.gold .fi-bars{height:71px!important}
/* V072: Verbindungslinie zum echten Ort, wenn ein Kaestchen ausgewichen ist */
.fi-leader{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;z-index:-1}
.fi-leader line{stroke:rgba(248,250,252,.75);stroke-width:1.3}
.fi-leader circle{fill:#f8fafc;stroke:#0f172a;stroke-width:1.5}

/* V084: Ranking in der Titelleiste (ersetzt die Wetter-Zeile) */
.top-ranking{display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none;padding:2px 0}
.top-ranking::-webkit-scrollbar{display:none}
.top-ranking .rk-head{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#94a3b8;margin-right:2px;white-space:nowrap}
.top-ranking .rk-empty{font-size:12px;color:#94a3b8;white-space:nowrap}
.top-ranking .rk-item{display:inline-flex;align-items:center;gap:6px;height:34px;padding:4px 10px 4px 4px;border-radius:999px;border:1px solid #475569;background:#1e293b;color:#f8fafc;font:inherit;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.top-ranking .rk-item:hover{border-color:#94a3b8;background:#273449}
.top-ranking .rk-pos{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#334155;font-size:12px;font-weight:900}
.top-ranking .rk-name{font-size:14px;font-weight:800;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.top-ranking .rk-score{font-size:12px;font-weight:700;color:#cbd5e1}
.top-ranking .rk-gold{border-color:#eab308;background:linear-gradient(135deg,#3b2f0a,#1e293b)}
.top-ranking .rk-gold .rk-pos{background:#facc15;color:#1f2937}
.top-ranking .rk-silver{border-color:#cbd5e1}
.top-ranking .rk-silver .rk-pos{background:#e2e8f0;color:#1f2937}
.top-ranking .rk-bronze{border-color:#c2733b}
.top-ranking .rk-bronze .rk-pos{background:#d97706;color:#1f2937}
@media(max-width:1100px){.top-ranking .rk-item:nth-of-type(n+4){display:none}.top-ranking .rk-name{max-width:120px}}
@media(max-width:760px){.head{flex-wrap:wrap}.top-ranking{order:5;flex:1 0 100%;gap:5px}.top-ranking .rk-head{display:none}.top-ranking .rk-item{height:30px;padding:3px 8px 3px 3px}.top-ranking .rk-pos{width:22px;height:22px;font-size:11px}.top-ranking .rk-name{font-size:12.5px;max-width:110px}.top-ranking .rk-score{font-size:11px}}
/* V084: Ranking als eigene Zeile unter Titel/Untertitel, ueber die ganze Breite */
.head{flex-wrap:wrap}
.top-ranking{order:5;flex:1 0 100%;padding:0 0 2px 0}
@media(max-width:1100px){.top-ranking .rk-item:nth-of-type(n+4){display:inline-flex}}

/* V085: Filter der Auswertung "Beste Reviere" */
.best-filters{display:contents}
.best-filter select,.best-dates input{width:100%}
.best-dates{display:flex;gap:6px}
.best-dates input{min-width:0;height:31px;border-radius:8px;border:1px solid #475569;background:#0f172a;color:#f8fafc;padding:3px 6px;font:inherit;font-size:12px;color-scheme:dark}
.best-info{grid-column:1/-1;font-size:12px;line-height:1.35;color:#cbd5e1}
.best-info:empty{display:none}
.best-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}
.best-btn{display:inline-flex;align-items:center;height:30px;padding:4px 12px;border-radius:8px;border:1px solid #475569;background:#1e293b;color:#f8fafc;font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}
.best-btn:hover{border-color:#94a3b8}
.best-link{color:#7dd3fc}

/* V086: Ranking statt Alarmstand-Kreis rechts im Titel der Kästchen */
.fi-name-row{justify-content:flex-start}
.fi-rank{margin-left:auto;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:17px;padding:0 5px;border-radius:9px;
  font-size:12px;font-weight:950;line-height:1;letter-spacing:-.02em;color:#f8fafc;background:#0f172a;border:1.5px solid rgba(255,255,255,.85);box-shadow:0 1px 4px rgba(0,0,0,.45);font-variant-numeric:tabular-nums}
.fi-marker.medal .fi-rank{min-width:24px;height:20px;font-size:14px;border-radius:10px;border-width:2px}
.fi-marker.gold .fi-rank{min-width:26px;height:22px;font-size:15px;border-radius:11px}
.fi-rank-gold{background:linear-gradient(180deg,#fde68a,#d97706);color:#3b2400;border-color:#fff7d6}
.fi-rank-silver{background:linear-gradient(180deg,#f1f5f9,#94a3b8);color:#1e293b;border-color:#fff}
.fi-rank-bronze{background:linear-gradient(180deg,#fdba74,#9a3412);color:#2a1205;border-color:#ffe4cc}
.fi-rank-none{background:#334155;color:#cbd5e1;border-color:rgba(255,255,255,.45);box-shadow:none}
@media(max-width:760px){.fi-rank{min-width:19px;height:15px;font-size:10.5px;padding:0 4px}.fi-marker.medal .fi-rank{min-width:21px;height:17px;font-size:12px}.fi-marker.gold .fi-rank{min-width:22px;height:18px;font-size:13px}}

/* V087: KI-Wetterlage heute/morgen/uebermorgen im Kopf (nur bei offenem Filter) */
.wx-strip{order:6;flex:1 0 100%;width:100%;margin-top:6px;padding-top:6px;border-top:1px solid rgba(51,65,85,.55);font-size:12px;line-height:1.3;color:#e2e8f0}
.wx-strip[hidden]{display:none}
.wx-title{font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#94a3b8;margin-bottom:4px}
.wx-days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.wx-day{background:rgba(15,23,42,.55);border:1px solid rgba(71,85,105,.6);border-radius:9px;padding:5px 8px;min-width:0}
.wx-d{font-weight:900;font-size:12.5px;margin-bottom:2px}
.wx-d span{font-weight:600;color:#94a3b8;font-size:11px}
.wx-part{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wx-p{display:inline-block;min-width:44px;color:#7dd3fc;font-weight:800}
@media(max-width:760px){.wx-strip{font-size:11px}.wx-days{grid-template-columns:1fr;gap:4px}.wx-day{padding:4px 7px}.wx-part{white-space:normal}}
.best-filters [hidden]{display:none!important}

/* V091: Knopf "Stationen" neben "Filter" */
.stations-btn{text-decoration:none;margin-left:-6px;color:#7dd3fc}
.stations-btn[hidden]{display:none}

/* V092: Web-Version neben der Programmversion anzeigen (zeigt, ob die neuen Dateien geladen sind) */
#version::after{content:" · Web V121";opacity:.8}
/* V118: Saeulen ueber den Kaestchen entfallen; Statistik als 4 schmale Balken unter dem Titel; 7 Tageskreise */
.fi-bars{display:none!important}
.fi-sstrip{display:grid;gap:2px;padding:3px 6px 4px;border-top:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.16)}
.fi-sbar{display:flex;align-items:center;gap:4px;height:7px}
.fi-sbar-track{flex:1 1 auto;height:5px;border-radius:3px;background:rgba(255,255,255,.10);overflow:hidden}
.fi-sbar-fill{display:block;height:100%;border-radius:3px}
.fi-sbar-fill.green{background:var(--green,#22c55e)}.fi-sbar-fill.yellow{background:var(--yellow,#facc15)}.fi-sbar-fill.orange{background:var(--orange,#fb923c)}.fi-sbar-fill.red{background:var(--red,#ef4444)}
.fi-sbar b{flex:0 0 22px;text-align:right;font-size:7.5px;line-height:1;font-weight:700!important;font-variant-numeric:tabular-nums}
.fi-marker.medal .fi-sstrip{gap:2px;padding:4px 7px 5px}.fi-marker.medal .fi-sbar{height:8px}.fi-marker.medal .fi-sbar-track{height:6px}.fi-marker.medal .fi-sbar b{font-size:9px;flex-basis:26px}
.medal-gold .fi-sstrip,.medal-silver .fi-sstrip{background:rgba(0,0,0,.08)}.medal-gold .fi-sbar-track,.medal-silver .fi-sbar-track{background:rgba(0,0,0,.14)}
.fi-zero .fi-sstrip{opacity:.6}
.fi-days.fi-days-dial{grid-template-columns:repeat(7,minmax(0,1fr))!important}
.fi-day.fi-day-dialbox:nth-child(5n){border-right:1px solid rgba(255,255,255,.16)}.fi-day.fi-day-dialbox:last-child{border-right:0}
.fi-day-dialbox .fi-day-label{font-size:6px!important}.fi-marker.medal .fi-day-dialbox .fi-day-label{font-size:7px!important}
/* Revier-Vollbild: Statistik ueber den Kreisen */
.rv-stats{margin:0 0 10px}.rv-stats:empty{display:none}
.rv-stats-head{font-size:12px;color:#94a3b8;margin:0 0 5px}
.fi-sstrip.fi-sstrip-big{max-width:560px;gap:4px;padding:8px 10px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(15,23,42,.6)}
.fi-sstrip-big .fi-sbar{height:12px}.fi-sstrip-big .fi-sbar-track{height:9px;border-radius:5px}.fi-sstrip-big .fi-sbar-fill{border-radius:5px}.fi-sstrip-big .fi-sbar b{font-size:12px;flex-basis:44px}
.fi-sstrip-big .fi-sbar b::after{content:" h";font-weight:400}
.fi-sstrip-big .fi-sbar b.nil::after{content:""}.fi-sstrip-big .fi-sbar i{flex:0 0 52px;font-style:normal;font-size:11px;color:#cbd5e1}
/* V118: Zeitreise-Leiste links unten */
.fi-hist{position:absolute;z-index:1001;left:10px;bottom:10px;width:min(560px,calc(100vw - 20px));background:rgba(24,24,24,.94);border:1px solid #3a3a3a;border-radius:9px;box-shadow:0 3px 15px #0006;padding:7px 8px 6px;color:#f1f5f9;font-size:11px;color-scheme:dark}
.fi-hist.is-past{border-color:#e0a800}
.fi-hist-row{display:flex;align-items:center;gap:5px;margin-bottom:5px;flex-wrap:wrap}
.fi-hist button{height:28px;min-width:28px;background:#2b2b2b;border:1px solid #666;border-radius:6px;color:#fff;font-size:14px;line-height:1;cursor:pointer;padding:0 6px}
.fi-hist button:disabled{opacity:.35;cursor:default}
.fi-hist .fi-hist-today{min-width:44px;font-size:11px}
.fi-hist input[type=range]{flex:1 1 120px;accent-color:#e0a800;min-width:80px}
.fi-hist input[type=date],.fi-hist select{height:26px;background:#2b2b2b;border:1px solid #666;border-radius:6px;color:#fff;font-size:11px;padding:0 5px}
.fi-hist select{max-width:150px}
.fi-hist-info{color:#aaa;font-size:10px;white-space:nowrap}
.fi-hist-legend{color:#bbb;font-size:9.5px;line-height:1.5}
.fi-hist-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 2px 0 4px;vertical-align:-1px;border:1px solid #555}
.fi-hist-legend i.g{background:#22c55e}.fi-hist-legend i.y{background:#facc15}.fi-hist-legend i.o{background:#fb923c}.fi-hist-legend i.r{background:#ef4444}.fi-hist-legend i.c{background:#4b5b73}.fi-hist-legend i.n{background:#05080f}
@media(max-width:640px){.fi-hist{padding:6px}.fi-hist-legend{display:none}.fi-hist select{max-width:120px}}
/* V119: Kaestchen-Balken sehr schmal, ohne Abstand und ohne Zahlen (Werte im geoeffneten Revier) */
.fi-sstrip:not(.fi-sstrip-big){gap:0;padding:2px 6px 3px}
.fi-sstrip:not(.fi-sstrip-big) .fi-sbar{height:3px}
.fi-sstrip:not(.fi-sstrip-big) .fi-sbar-track{height:3px;border-radius:0}
.fi-sstrip:not(.fi-sstrip-big) .fi-sbar-fill{border-radius:0}
.fi-marker.medal .fi-sstrip:not(.fi-sstrip-big){gap:0;padding:3px 7px 4px}.fi-marker.medal .fi-sstrip:not(.fi-sstrip-big) .fi-sbar,.fi-marker.medal .fi-sstrip:not(.fi-sstrip-big) .fi-sbar-track{height:4px}
