#station-workspace{--sm-bg:#fff;--sm-ink:#102b44;--sm-muted:#506475;--sm-border:#c7d7e3;--sm-accent:#08698b;color:var(--sm-ink);background:var(--sm-bg);max-width:1440px;margin:20px auto 32px;padding:20px;border:1px solid var(--sm-border);border-radius:16px;text-align:left;font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 8px 30px #102b440a}
body.xionia-dark #station-workspace{--sm-bg:#132b40;--sm-ink:#ecf5fc;--sm-muted:#b4c8d9;--sm-border:#385165;--sm-accent:#81dafa}
#station-workspace *{box-sizing:border-box}
#station-workspace button,#station-workspace select,#station-workspace input{font:inherit;color:var(--sm-ink);background:var(--sm-bg);border:1px solid var(--sm-border);border-radius:8px;min-height:44px;padding:8px 12px;margin:0}
#station-workspace button{cursor:pointer;font-weight:600;white-space:normal}
#station-workspace button:hover{border-color:var(--sm-accent)}
#station-workspace button:disabled{opacity:.6;cursor:wait}
#station-workspace :focus-visible{outline:3px solid #e49a09;outline-offset:3px}
#station-workspace select,#station-workspace input[type=search]{width:100%}
#station-workspace .sm-toolbar{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
#station-workspace .sm-toolbar>label{display:grid;gap:5px;font-size:14px;font-weight:600;min-width:190px;flex:1}
#station-workspace .sm-toolbar .sm-search{flex:1.3}
#station-workspace .sm-toolbar .sm-check{display:flex;align-items:center;gap:9px;font-weight:400;min-width:200px;max-width:230px;min-height:44px}
#station-workspace input[type=checkbox]{min-height:20px;width:20px;height:20px;flex-shrink:0;accent-color:#08698b}
#station-workspace .sm-meta{display:flex;gap:12px;justify-content:space-between;align-items:baseline;font-size:14px;color:var(--sm-muted);flex-wrap:wrap;margin:16px 0 10px}
#station-workspace .sm-meta p{margin:0}
#sm-map{height:560px;min-height:360px;max-height:75vh;position:relative;isolation:isolate;z-index:0;border:1px solid var(--sm-border);border-radius:10px;background:#e7edf0;font-family:inherit}
#station-workspace .sm-map-loading{padding:30px;color:#304c60}
#station-workspace .sm-map-footer{display:flex;gap:16px;align-items:center;justify-content:space-between;margin:12px 0;flex-wrap:wrap}
#sm-legend{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:14px}
#sm-legend span{display:inline-flex;align-items:center;gap:5px}
#sm-legend i{width:14px;height:14px;display:inline-block;border-radius:50%;border:1px solid #0003}
#station-workspace .sm-marker{border:0;background:none}
#station-workspace .sm-marker-pill{background:var(--marker-color,#176b91);color:#fff;border:2px solid white;border-radius:9px;display:flex;gap:2px;align-items:center;justify-content:center;width:100%;min-width:0;height:100%;padding:2px 4px;font-size:13px;line-height:1;font-weight:750;font-variant-numeric:tabular-nums;box-shadow:0 2px 5px #1238;white-space:nowrap}
#station-workspace .sm-marker-pill.sm-delayed{border:2px dashed #ffce4b;background:#53636e}
#station-workspace .sm-marker-pill small{font-size:10px;font-weight:500}
#station-workspace .sm-marker-empty{background:#647680}
#station-workspace .leaflet-tooltip{font:14px/1.4 system-ui;color:#132b40}
#station-workspace .leaflet-popup-content-wrapper{background:var(--sm-bg);color:var(--sm-ink);border:1px solid var(--sm-border);border-radius:12px}
#station-workspace .leaflet-popup-tip{background:var(--sm-bg)}
#station-workspace .leaflet-popup-content{min-width:240px;margin:18px;font:14px/1.5 system-ui}
#station-workspace .sm-popup h3{font-size:18px;line-height:1.3;margin:0 0 4px;color:var(--sm-ink)}
#station-workspace .sm-popup p{margin:6px 0;color:var(--sm-muted)}
#station-workspace .sm-popup dl{display:grid;grid-template-columns:1fr auto;gap:6px 15px;margin:14px 0}
#station-workspace .sm-popup dt,#station-workspace .sm-popup dd{margin:0}
#station-workspace .sm-popup dd{font-weight:650;font-variant-numeric:tabular-nums}
#station-workspace .sm-popup a{color:var(--sm-accent);text-decoration:underline}
#station-workspace .sm-help,#station-workspace .sm-sources{border-top:1px solid var(--sm-border);padding:14px 0;margin-top:12px}
#station-workspace summary{cursor:pointer;font-weight:600}
#station-workspace .sm-help p{font-size:14px;color:var(--sm-muted);max-width:1000px;margin:10px 0}
#station-workspace .sm-table-wrap{max-width:100%;overflow:auto;margin-top:14px;border:1px solid var(--sm-border);border-radius:10px}
#station-workspace .sm-table{border-collapse:collapse;border:0;margin:0;width:100%;font-size:14px;background:var(--sm-bg);color:var(--sm-ink)}
#station-workspace .sm-table caption{text-align:left;font-size:16px;font-weight:600;padding:14px;color:var(--sm-ink)}
#station-workspace .sm-table th,#station-workspace .sm-table td{padding:12px 10px;border:0;border-bottom:1px solid var(--sm-border);text-align:right;white-space:nowrap;background:transparent;color:inherit;font-variant-numeric:tabular-nums}
#station-workspace .sm-table th{font-size:14px;font-weight:600}
#station-workspace .sm-table th:first-child,#station-workspace .sm-table td:first-child{text-align:left}
#station-workspace .sm-table td button{font-size:14px;padding:4px 6px;text-align:left;border-color:transparent;background:none;color:var(--sm-accent);white-space:normal;min-width:130px}
#station-workspace .sm-table small{display:block;color:var(--sm-muted);font-size:12px}
#station-workspace .sm-source-row{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--sm-border);font-size:14px}
#station-workspace .sm-source-row a{color:var(--sm-accent);text-decoration:underline}
#station-workspace .sm-source-row span{color:var(--sm-muted)}
#station-workspace [hidden]{display:none!important}
@media(max-width:680px){#station-workspace{padding:12px;margin:12px 0;border-radius:10px}#station-workspace .sm-toolbar{gap:10px}#station-workspace .sm-toolbar>label{min-width:calc(50% - 10px)}#station-workspace .sm-toolbar .sm-check{max-width:none;min-width:65%}#sm-map{height:480px;max-height:68vh}#station-workspace .sm-map-footer>button{font-size:14px}#sm-legend{gap:8px;font-size:13px}}
@media(prefers-reduced-motion:reduce){#station-workspace *{scroll-behavior:auto!important}}

/* Station map v4: sorting and source attribution. */
#station-workspace .sm-sortbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:14px 0 0;padding:14px;background:color-mix(in srgb,var(--sm-accent) 5%,var(--sm-bg));border:1px solid var(--sm-border);border-radius:10px}
#station-workspace .sm-sortbar label{display:grid;gap:5px;font-size:14px;font-weight:600;flex:0 1 225px;min-width:0}
#station-workspace .sm-sortbar p{flex:1 1 240px;margin:0 0 4px;font-size:13px;color:var(--sm-muted)}
#station-workspace .sm-table th button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px;border-color:transparent;background:transparent;color:inherit;font-size:14px;white-space:nowrap}
#station-workspace .sm-table th button:hover{border-color:var(--sm-accent)}
#station-workspace .sm-table th[aria-sort=ascending],#station-workspace .sm-table th[aria-sort=descending]{color:var(--sm-accent);background:color-mix(in srgb,var(--sm-accent) 8%,var(--sm-bg))}
#station-workspace .sm-sort-arrow{font-size:16px}
#station-workspace .sm-source-badge{display:inline-flex;align-items:center;font:700 11px/1.4 system-ui,sans-serif;letter-spacing:.02em;padding:3px 7px;border:1px solid var(--sm-border);border-radius:20px;white-space:nowrap;vertical-align:middle}
#station-workspace .sm-source-noa{background:#e4f0fa;color:#164f7a;border-color:#b5d3e9}
#station-workspace .sm-source-private{background:#e8f4ed;color:#235d3a;border-color:#badbc7}
body.xionia-dark #station-workspace .sm-source-noa{background:#163d5b;color:#bbdffd;border-color:#406780}
body.xionia-dark #station-workspace .sm-source-private{background:#173e30;color:#c0ecd0;border-color:#426a52}
#station-workspace .sm-provider-key{font-size:13px;color:var(--sm-muted);margin:8px 0 12px;max-width:1000px}
#station-workspace .sm-source-row{justify-content:flex-start;align-items:baseline;column-gap:10px;row-gap:5px}
#station-workspace .sm-source-row .sm-source-description{flex-basis:100%;font-size:13px}
#station-workspace .sm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:680px){#station-workspace .sm-sortbar{padding:10px;gap:10px}#station-workspace .sm-sortbar label{flex:1 1 160px}#station-workspace .sm-sortbar p{flex-basis:100%}#station-workspace .sm-source-row a{overflow-wrap:anywhere}#station-workspace .sm-toolbar>label{min-width:0;flex-basis:100%}}

/* Map20: compact two-value markers and popups sized for the visible map. */
#station-workspace .sm-marker-pill.sm-marker-dual{width:100%;height:100%;padding:0;display:grid;grid-template-rows:1fr 1fr;gap:0;overflow:hidden;border-radius:8px;font-size:13px}
#station-workspace .sm-marker-temp,#station-workspace .sm-marker-rain{display:flex;align-items:center;justify-content:center;gap:3px;width:100%;height:100%;min-width:0}
#station-workspace .sm-marker-rain{background:var(--rain-color,#50616e);border-top:1px solid #ffffff70;font-size:12px}
#station-workspace .sm-marker-dual small{font-size:10px}
#station-workspace .sm-marker-rain>span{font-size:10px}
#station-workspace .sm-combined-key{flex-basis:100%;display:flex;flex-wrap:wrap;font-weight:650}
#station-workspace .sm-combined-key small{font-weight:400;color:var(--sm-muted);font-size:12px}
#station-workspace .sm-map-popup .leaflet-popup-content-wrapper{position:relative;padding:1px}
#station-workspace .sm-map-popup .leaflet-popup-content{min-width:0;margin:48px 12px 12px;max-width:calc(100vw - 88px);font:13px/1.4 system-ui;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#station-workspace .sm-map-popup .leaflet-popup-scrolled{border:0;padding-right:5px}
#station-workspace .sm-map-popup .leaflet-popup-close-button{position:absolute;top:2px;right:3px;width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid var(--sm-border);border-radius:9px;background:var(--sm-bg);color:var(--sm-ink);font:30px/1 system-ui;text-decoration:none;z-index:2;touch-action:manipulation}
#station-workspace .sm-map-popup .leaflet-popup-close-button:hover{background:var(--sm-border);color:var(--sm-ink)}
#station-workspace .sm-popup-caption{position:absolute;top:16px;left:13px;right:52px;font:600 12px/1.3 system-ui;color:var(--sm-muted);pointer-events:none}
#station-workspace .sm-map-popup h3{font-size:16px;margin:0 0 5px;overflow-wrap:anywhere}
#station-workspace .sm-popup-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0 6px}
#station-workspace .sm-popup-summary>div{padding:8px 6px;border:1px solid var(--sm-border);border-radius:8px;background:color-mix(in srgb,var(--sm-accent) 5%,var(--sm-bg))}
#station-workspace .sm-popup-summary small{display:block;color:var(--sm-muted);font-size:11px}
#station-workspace .sm-popup-summary strong{display:block;font:750 19px/1.3 system-ui;font-variant-numeric:tabular-nums;white-space:nowrap}
#station-workspace .sm-popup-extremes{font-size:12px}
#station-workspace .sm-popup-more{margin:5px 0;border-top:1px solid var(--sm-border)}
#station-workspace .sm-popup-more>summary{padding:10px 0;min-height:40px;color:var(--sm-accent);font-size:13px}
#station-workspace .sm-map-popup dl{gap:5px 10px;margin:8px 0;font-size:13px}
#station-workspace .sm-map-popup dd{text-align:right}
#station-workspace .sm-popup-source{display:inline-flex;align-items:center;min-height:40px;font-size:12px}
#station-workspace .sm-cluster-values{display:block;font-size:12px;font-weight:500;margin-top:3px}
#station-workspace .sm-map-popup [data-sm-station]{width:100%;text-align:left;font-size:13px;padding:8px}
@media(max-width:680px){#station-workspace .sm-map-popup .sm-source-badge{font-size:10px;padding:2px 5px}#sm-map{height:480px;min-height:220px;max-height:68svh}}

/* Leaflet panes have zero width; retain the explicit icon dimensions. */
#station-workspace .leaflet-marker-icon.sm-marker{max-width:none}


#station-workspace .sm-priority-note{flex-basis:100%;color:var(--sm-muted);font-size:12px;}
