/* FloodSafe Nepal v25 — simple public UI layer */
:root{--fs-radius:18px;--fs-shadow:0 8px 28px rgba(14,50,58,.10)}
html{scroll-behavior:auto}body{font-size:16px}.app{max-width:1180px;margin:auto;padding-bottom:92px}.card,.hero{border-radius:var(--fs-radius)!important;box-shadow:var(--fs-shadow)}
.top{position:sticky;top:0;z-index:40;backdrop-filter:blur(14px);background:rgba(244,250,252,.94);padding-top:max(10px,env(safe-area-inset-top))}.brand h1{font-size:clamp(20px,4vw,28px)}.brand small{font-size:12px}.pillBtn,.action,.mapTools button{min-height:44px;font-weight:800}
.hero{padding:18px!important}.heroTop{gap:8px;flex-wrap:wrap;min-height:44px}.hero h2{min-height:68px}.hero p{min-height:44px}.rainTiming{min-height:58px}.temp{font-size:clamp(40px,10vw,68px)!important}.weatherGrid{gap:8px}.weatherGrid>div{min-height:74px}
.actions{position:sticky;top:74px;z-index:30;background:rgba(244,250,252,.92);backdrop-filter:blur(10px);padding:8px 0}.actions .action{font-size:15px}
.mapCard{order:-1;margin-top:12px}.mapHead{gap:8px}.mapHead .head{margin-bottom:4px}.mapHead h3{font-size:20px}.mapTools{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.mapTools button{padding:8px!important;font-size:12px!important;white-space:normal}.mapCanvas{position:relative;border-radius:16px;overflow:hidden}.mapCanvas,#riverMapGL{min-height:clamp(430px,68vh,760px)!important}
#fsMapSimpleStatus{position:absolute;left:10px;top:10px;z-index:8;width:min(420px,calc(100% - 70px));background:rgba(3,27,34,.90);color:white;padding:10px 12px;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.25);backdrop-filter:blur(10px);font:700 12px/1.4 system-ui,sans-serif}.fs-live-title{font-size:15px;margin-bottom:3px}.fs-live-legend{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px;font-size:11px}.fs-live-legend span{white-space:nowrap}.fs-simple-popup{font:600 14px/1.5 system-ui,sans-serif;min-width:220px}.fs-popup-title{font-size:17px;font-weight:900;margin-bottom:4px}.fs-popup-state{display:inline-block;font-size:15px;font-weight:900;margin:3px 0 7px}.fs-popup-age{font-size:12px;opacity:.7;margin:2px 0 8px}.fs-simple-popup a{display:inline-block;margin-top:5px;font-weight:800}
.dashboard{gap:12px!important}.card{padding:16px!important}.head{gap:10px}.head h3{font-size:18px;line-height:1.25}.muted,.fresh{font-size:13px;line-height:1.45}.levelRow{gap:8px}.stat{min-width:0}.stat b{font-size:22px}.stat small{font-size:11px}
#nationalRivers{max-height:none}.stationBox{max-height:480px;overflow:auto}.district-grid,.districtGrid{gap:8px!important}.district-card,.districtCard{min-height:64px!important;padding:10px!important;border-radius:13px!important}
.bottom{height:72px;padding-bottom:max(5px,env(safe-area-inset-bottom));box-shadow:0 -8px 28px rgba(14,50,58,.10)}.bottom a{font-size:12px}.bottom a span{font-size:22px}
.maplibregl-popup-content{border-radius:15px!important;padding:14px!important;max-height:min(65vh,500px);overflow:auto}.maplibregl-popup-close-button{font-size:24px;padding:3px 8px}
@media(max-width:680px){body{font-size:15px}.app{padding-left:10px!important;padding-right:10px!important}.top{margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px}.actions{top:68px}.dashboard{display:block!important}.dashboard>.card{margin-bottom:12px}.mapTools{grid-template-columns:repeat(2,minmax(0,1fr))}.mapCanvas,#riverMapGL{min-height:58vh!important}.mapHead .muted{display:none}.card{padding:14px!important}.hero{padding:15px!important}.levelRow{grid-template-columns:repeat(3,minmax(0,1fr))!important}.stationBox{max-height:390px}.bottom{left:0;right:0;bottom:0;border-radius:18px 18px 0 0!important}}
@media(max-width:390px){#fsMapSimpleStatus{width:calc(100% - 60px);padding:8px 9px}.fs-live-legend{gap:5px;font-size:10px}.mapTools button{font-size:11px!important}.brand small{display:none}}

/* Do not let sticky header/actions cover map controls at any viewport size. */
.top,.actions{position:static!important}
/* Keep content and all navigation items reachable on narrow screens. */
@media(max-width:680px){.top,.actions{position:static!important}.bottom{left:0!important;right:0!important;transform:none!important;width:100%!important}.brand h1{font-size:21px}.actions .action{padding:11px;font-size:14px}html{scroll-padding-bottom:90px}}

.noFreshData{padding:14px;border:1px solid #d4dee6;border-radius:14px;background:#f3f6f9;color:#334155}.noFreshData strong{display:block;font-size:17px}.noFreshData p{margin:7px 0 0;font-size:13px;line-height:1.5}.lastKnownData{margin-top:12px;padding:12px;border:1px solid #d4dee6;border-radius:12px}.lastKnownData summary{cursor:pointer;font-weight:750;color:#526778}.card,.head,.dashboard,.newsList,.newsFreshBox,.newsItem{min-width:0;max-width:100%}.newsItem h4,.newsItem .meta,.lastKnownData{overflow-wrap:anywhere;white-space:normal}

#outsideNotice[hidden],#mapHint{display:none!important}
/* Keep the map closed even before the interactive script starts. */
.fsMapClosed .mapCanvas,.fsMapClosed .mapTools{display:none!important}
