/* Reach application shell and map workspace. Existing data and storage are retained. */
:root { --paper:#f7f8f4; --ink:#193b34; --muted:#64736d; --line:#dbe2da; --accent:#28674e; --blue:#286f92; --orange:#c6e475; }
body { background:var(--paper); }
.masthead { height:72px; padding:0 28px; background:#143c35; color:#fff; border:0; position:sticky; top:0; }
.brand { font-size:33px; letter-spacing:-1.6px; gap:10px; font-weight:750; }
.brand img { height:42px; width:42px; }
.header-river { font-size:13px; font-weight:600; margin-left:auto; margin-right:32px; }
.header-river span { display:block; font-size:11px; color:#b4c6bb; margin-top:4px; font-weight:400; }
.connection { font-family:inherit; font-size:11px; letter-spacing:0; text-transform:none; color:#d9e5db; display:flex; align-items:center; gap:7px; }
.connection:before { content:''; width:6px; height:6px; border-radius:50%; background:#c6e475; }
.connection.is-offline { color:#f4d99a; }.connection.is-offline:before { background:currentColor; }
.bottom-nav { top:72px; width:88px; padding:16px 8px; background:#fff; color:var(--muted); border-right:1px solid var(--line); }
.bottom-nav:after { content:none; }
.bottom-nav a { flex-direction:column; gap:7px; padding:13px 2px; margin-bottom:9px; min-height:68px; border:0; border-radius:10px; font-size:10px; }
.bottom-nav a[aria-current],.bottom-nav a:hover { background:#edf2e7; color:#143c35; }
.bottom-nav a[aria-current] svg { color:#28674e; }.bottom-nav svg { width:23px; height:23px; stroke-linecap:round; stroke-linejoin:round; }
main { margin:0 0 0 88px; padding:34px 40px 70px; max-width:none; }
h1 { font-size:36px; letter-spacing:-1.2px; font-weight:720; line-height:1.15; }
h2 { font-size:22px; letter-spacing:-.6px; }
.page-heading { margin-bottom:25px; }.page-heading .lede { margin-top:9px; font-size:13px; }.page-heading .eyebrow { margin-bottom:8px; }
.eyebrow { font-family:inherit; text-transform:none; font-size:11px; font-weight:600; letter-spacing:.4px; }
.button { border-radius:8px; background:#1c503f; border-color:#1c503f; font-size:12px; gap:10px; min-height:44px; }
.button:hover { background:#28674e; }.button.secondary { background:#fff; border-color:#cdd8ce; }.button.secondary:hover { background:#eef4e8; }
input,select,textarea { border:1px solid #cbd6cd; border-radius:7px; background:#fff; color:#193b34; font-size:16px; }
.text-link { color:#28674e; }.filter.active { border-color:#28674e; }
.detail-panel,.detail-gauge,.history-panel { background:#fff; border:1px solid var(--line); border-radius:12px; }
.detail-panel { padding:24px; }.section-heading { border:0; }.section-heading h2 { font-size:20px; }
.trip-summary { background:#eaf0e3; border:0; border-radius:12px; padding:24px; }.trip-summary strong { font-size:38px; letter-spacing:-1.5px; }
.trip-summary span { font-size:10px; }.trip-summary div+div { border-color:#c7d5c1; }
.overview-layout { grid-template-columns:minmax(0,1fr) 240px; gap:26px; }
.gauge-grid { gap:16px; border:0; background:none; }.gauge-card { border:1px solid var(--line); border-radius:12px; padding:24px; }
.gauge-heading h2 { font-family:inherit; font-size:28px; letter-spacing:-.8px; }.height-reading strong { font-size:43px; }
.detail-gauge .level-name { font-family:inherit; font-size:25px; }.trip-rail { background:#eaf0e3; border:0; border-radius:12px; padding:24px; }
.trip-rail h2 { font-size:23px; }.trip-rail .route-ends { margin-top:24px; }.trip-rail .rail-numbers { margin-top:20px; }.trip-rail .eyebrow { margin-bottom:9px; }
.overview-meta { border-color:var(--line); font-size:10px; }.overview-meta span { line-height:1.5; }
.source-strip { border-color:var(--line); }.source-strip p { font-size:11px; }.source-strip .source-mark { background:#eaf0e3; }
.history-panel { padding:28px; }.history-panel .chart-summary { border-color:var(--line); }.chart-line { stroke:#28674e; }.chart-grid { stroke:#e6ebe4; }
.range-controls { background:#edf2e9; border-color:var(--line); border-radius:8px; }.range-button { border-radius:5px; }.range-button.active { background:#1c503f; color:#fff; }
.station-switcher a[aria-current] { border-color:#28674e; color:#28674e; }.detail-topline { padding-bottom:15px; }
.offline-simple { max-width:800px; }.offline-simple h1 { font-size:32px; }.download-list { background:white; border:1px solid var(--line); border-radius:12px; padding:0 22px; }.download-list li:last-child { border:0; }.download-list li { padding:22px 0; }.download-list li>span { font-size:12px; }
#toast { border-radius:10px; background:#143c35; }
/* The map and its tools stay visible while the river list scrolls independently. */
body[data-page=river] main { padding:0; }
.river-workspace { display:grid; grid-template-columns:360px minmax(0,1fr); height:calc(100dvh - 72px); min-height:540px; }
.river-workspace .map-canvas-wrap { grid-column:2; grid-row:1; position:relative; height:100%; overflow:hidden; }
#river-map { height:100%; min-height:540px; background:#eceee3; }
.river-sidebar { grid-column:1; grid-row:1; background:#fdfefa; overflow:auto; padding:24px 20px; border-right:1px solid var(--line); overscroll-behavior:contain; }
.river-sheet-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }.river-sheet-heading h1 { font-size:27px; letter-spacing:-.9px; }.river-sheet-heading .eyebrow { margin:0 0 6px; color:#6a7869; }
.download-shortcut { display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line); border-radius:50%; font-size:24px; background:#f0f4e9; }
.route-card { display:flex; justify-content:space-between; gap:12px; padding:16px; border:1px solid #d7dfcb; border-radius:10px; background:#edf3e5; }
.route-card>span:first-child { font-size:13px; line-height:2.35; font-weight:550; }.route-card>span:last-child { text-align:right; }.route-card strong { font-size:27px; letter-spacing:-1px; font-variant-numeric:tabular-nums; }.route-card small { display:block; font-size:10px; }.route-edit { display:block; font-size:10px; margin-top:8px; color:#476a48; }
.route-card .route-dot { display:inline-block; width:10px; height:10px; margin-right:9px; border-radius:50%; }.route-card .start-dot { background:#249447; }.route-card .end-dot { background:repeating-conic-gradient(#202729 0% 25%,#fff 0% 50%) 0 0 / 6px 6px; border:1px solid #202729; }
.map-conditions { margin:24px 0; }.map-conditions .section-heading { display:flex; justify-content:space-between; margin-bottom:12px; }.map-conditions h2 { font-size:15px; letter-spacing:0; }.map-conditions .text-link { font-size:11px; }
#map-conditions { display:flex; overflow:auto; gap:8px; padding-bottom:8px; scrollbar-width:thin; scroll-snap-type:x proximity; }.map-gauge { flex:0 0 105px; display:grid; gap:5px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:11px; scroll-snap-align:start; }.map-gauge>span { font-size:12px; font-weight:600; }.map-gauge strong { font-size:23px; font-variant-numeric:tabular-nums; }.map-gauge strong small { font-size:11px; font-weight:400; }.map-gauge>small { font-size:9px; color:var(--muted); }
.river-workspace #place-panel { border:0; padding:0; }.river-workspace #place-panel:empty { display:none; }.river-workspace #place-panel:not(:empty) { padding:18px; background:#f0f4ea; border:1px solid #d6e0cb; border-radius:10px; margin:0 0 24px; position:relative; }.river-workspace #place-panel h2 { font-size:23px; padding-right:20px; }.close-place { position:absolute; top:6px; right:6px; border:0; background:transparent; width:36px; height:36px; color:var(--ink); font-size:23px; }.place-detail .eyebrow { display:block; font-size:9px; margin:6px 0 10px; }
.river-places .section-heading { margin:0 0 14px; }.river-places h2 { font-size:17px; }.river-places .search-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }.river-places input { padding:12px; font-size:14px; min-height:44px; width:100%; }.river-places .filters { justify-content:space-between; gap:8px; margin:8px 0 0; }.river-places .filter { font-size:10px; }.river-places .place-list-row { gap:8px; padding:17px 0; grid-template-columns:16px minmax(0,1fr) auto; }.river-places .place-list-row strong { font-size:13px; }.river-places .place-list-row small { font-size:10px; line-height:1.4; }.river-places .place-list-row>span:last-child { font-family:inherit; font-size:18px; letter-spacing:-.5px; }.endpoint-label { margin-left:5px; font-size:9px; padding:3px 5px; }
.map-caption { position:absolute; z-index:400; top:20px; left:20px; padding:12px 16px; background:#fdfef9; box-shadow:0 2px 12px #153a341a; border-radius:7px; display:flex; align-items:center; gap:9px; font-size:12px; font-weight:600; }.map-caption>span:last-child { color:var(--muted); font-size:10px; font-weight:400; }.map-caption-dot { width:7px; height:7px; background:#28674e; border-radius:50%; }
.river-workspace .map-tools { position:absolute; right:16px; top:20px; z-index:400; display:flex; flex-direction:column; width:auto; gap:9px; }.river-workspace .map-tools .button { width:44px; height:44px; padding:11px; border:0; box-shadow:0 2px 10px #153a3420; }.map-tools svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#map-status { position:absolute; z-index:400; bottom:29px; left:12px; right:12px; width:fit-content; max-width:calc(100% - 24px); border:0; border-radius:5px; background:#fffffff0; color:#3e584c; min-height:0; padding:6px 10px; font-size:10px; pointer-events:none; }
.leaflet-top.leaflet-left { top:82px; left:auto; right:16px; }.leaflet-left .leaflet-control-zoom { margin:95px 0 0; border:0; box-shadow:0 2px 10px #153a3420; }.leaflet-touch .leaflet-bar a { width:44px; height:40px; line-height:40px; color:#193b34; }.leaflet-control-scale { margin-bottom:8px!important; }
.map-legend { margin-top:18px; border-top:1px solid var(--line); }.map-legend summary { font-size:12px; padding:14px 0; }.map-key { margin:0 0 16px; grid-template-columns:1fr 1fr; font-size:10px; color:#466258; }
@media(min-width:1700px) { .river-workspace { grid-template-columns:400px minmax(0,1fr); }.river-sidebar { padding:28px; } }
@media(max-width:1100px) { main { padding:28px; }.overview-layout { grid-template-columns:1fr; }.trip-rail { display:none; }.river-workspace { grid-template-columns:330px minmax(0,1fr); }.map-caption>span:last-child { display:none; }.planning-columns { grid-template-columns:1fr; } }
@media(max-width:700px) {
 .masthead { height:60px; padding:0 16px; }.brand { font-size:28px; gap:6px; }.brand img { width:34px; height:34px; }.header-river { display:none; }.connection { font-size:11px; max-width:none; }.bottom-nav { top:auto; bottom:0; left:0; right:0; width:100%; height:calc(64px + env(safe-area-inset-bottom)); padding:3px 8px env(safe-area-inset-bottom); border:0; border-top:1px solid var(--line); flex-direction:row; background:#fdfefb; color:var(--muted); z-index:900; }.bottom-nav a { flex:1; margin:0; padding:8px 2px; min-height:57px; gap:4px; border-radius:6px; font-size:10px; }.bottom-nav svg { width:21px; height:21px; }.bottom-nav a[aria-current] { border:0; background:#edf2e7; }
 main { margin:0; padding:24px 16px calc(92px + env(safe-area-inset-bottom)); }.page-heading { gap:15px; margin-bottom:22px; }h1,.utility-heading h1 { font-size:29px; }.page-heading .lede { font-size:12px; }.page-heading .eyebrow { font-size:10px; }.page-heading .button { font-size:11px; padding:10px 12px; }
 .river-workspace { display:flex; flex-direction:column; height:auto; min-height:0; padding-bottom:calc(70px + env(safe-area-inset-bottom)); }.river-workspace .map-canvas-wrap { height:52dvh; min-height:330px; max-height:600px; }.river-workspace #river-map { min-height:0; height:100%; }.river-sidebar { overflow:visible; border:0; padding:22px 18px; border-radius:18px 18px 0 0; margin-top:-12px; position:relative; z-index:401; }.river-sheet-heading { margin-bottom:15px; }.river-sheet-heading h1 { font-size:25px; }.river-sheet-heading .eyebrow { font-size:10px; }.map-caption { top:14px; left:12px; font-size:11px; padding:10px; max-width:calc(100% - 80px); }.map-caption>span:last-child { display:none; }.river-workspace .map-tools { top:14px; right:12px; }.leaflet-top.leaflet-left { right:12px; top:76px; }#map-status { bottom:32px; font-size:9px; }.route-card { padding:12px 15px; }.map-conditions { margin:20px 0; }.map-gauge { flex-basis:104px; }.map-key { grid-template-columns:1fr 1fr; }.river-places .place-list-row strong { font-size:14px; }
 .gauge-grid { display:grid; grid-template-columns:1fr; gap:14px; background:transparent; }.gauge-card { padding:24px 18px 18px; }.gauge-heading h2 { font-size:29px; }.height-reading strong { font-size:41px; }.overview-meta { flex-wrap:wrap; gap:8px; font-size:9px; }.overview-meta span:last-child { width:100%; }.filters { gap:22px; }.filter { font-size:12px; }.detail-panel { border-radius:10px; padding:20px 16px; }.history-panel { padding:20px 14px; }.chart-summary strong { font-size:22px; }.chart-summary .label { font-size:8px; }.trip-summary { padding:20px 15px; gap:10px; }.trip-summary strong { font-size:29px; }.trip-summary span { font-size:8px; }.trip-summary div+div { padding-left:12px; }.range-button { font-size:11px; }.download-list { padding:0 16px; }.offline-simple h1 { font-size:29px; }.download-list li { font-size:13px; gap:12px; }.download-list small { font-size:11px; }
 #toast { bottom:calc(78px + env(safe-area-inset-bottom)); font-size:12px; }
}

/* Map is a single application screen. Place tools live in an explicit sheet. */
body[data-page=river] { height:100dvh; overflow:hidden; overscroll-behavior:none; }
body[data-page=river] main { height:calc(100dvh - 72px); min-height:0; overflow:hidden; }
body[data-page=river] .river-workspace { display:block; position:relative; height:100%; min-height:0; padding:0; }
body[data-page=river] .map-canvas-wrap { width:100%; height:100%; min-height:0; max-height:none; }
body[data-page=river] #river-map { height:100%; min-height:0; }
.map-search { position:absolute; z-index:400; left:20px; top:74px; box-shadow:0 2px 12px #153a3420; }
.map-search svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
dialog.river-sidebar { position:fixed; inset:88px auto auto 108px; margin:0; width:380px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 110px); padding:0 20px 20px; background:#fdfefa; color:var(--ink); border:1px solid var(--line); border-radius:16px; box-shadow:0 12px 48px #143c3533; overflow-y:auto; overscroll-behavior:contain; }
dialog.river-sidebar:not([open]) { display:none; }
dialog.river-sidebar::backdrop { background:#143c3526; }
.sheet-top { display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:2; background:#fdfefa; padding:12px 0; margin-bottom:10px; border-bottom:1px solid var(--line); }
.sheet-top h2 { font-size:18px; }.close-sheet { border:0; border-radius:50%; background:#edf2e7; color:var(--ink); width:44px; height:44px; font-size:25px; }
dialog .river-places input { font-size:16px; }
@media(max-width:700px) {
 body[data-page=river] main { height:calc(100dvh - 124px - env(safe-area-inset-bottom)); }
 .map-search { top:64px; left:12px; padding:10px 12px; font-size:12px; }
 dialog.river-sidebar { inset:auto 0 calc(64px + env(safe-area-inset-bottom)) 0; width:100%; max-width:100%; max-height:calc(80dvh - 64px - env(safe-area-inset-bottom)); margin:0; border-radius:20px 20px 0 0; padding:0 18px 20px; }
}
.river-picker { margin:0 24px 0 0; padding:10px 12px; border:1px solid #46655d; border-radius:7px; font-size:12px; }
.river-directory { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; max-width:850px; }
.river-directory>article { display:block; padding:28px; background:white; border:1px solid var(--line); border-radius:12px; }
.river-directory span,.river-directory p { font-size:13px; color:var(--muted); }.river-directory h2 { margin:12px 0; }.river-directory b { display:block; margin-top:24px; font-size:13px; color:var(--accent); }
.black-gauge,#black-notes-form { max-width:800px; }.black-gauge .gauge-heading { margin-top:22px; }.black-history { width:100%; max-height:200px; margin-top:20px; }.black-gauge h3 { margin-top:28px; font-size:17px; }.black-gauge>.text-link { display:block; margin-top:18px; }.black-gauge .gauge-observed { font-size:11px; }
.black-access { border-bottom:1px solid var(--line); padding:22px 0; }.black-access h3 { font-size:18px; }.black-access small { display:block; font-size:12px; color:var(--muted); margin-top:7px; }.black-access p { font-size:13px; margin:12px 0; max-width:700px; }.black-access .text-link { margin-right:20px; }.black-passed { display:flex; gap:10px; align-items:center; margin-top:15px; font-size:13px; }.black-passed input { width:20px; height:20px; min-height:20px; }.black-access:last-child { border:0; }#black-notes-form textarea { margin:12px 0; }
.watershed-watch { border:1px solid var(--line); background:#eef3e7; border-radius:10px; padding:0 20px; margin:20px 0; }.watershed-watch summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0; font-size:16px; font-weight:600; cursor:pointer; }.watershed-watch summary small { display:block; margin-top:5px; color:var(--muted); font-size:11px; font-weight:400; }.watershed-watch summary>span:last-child { font-size:11px; }.watch-intro { font-size:13px; max-width:740px; }.watch-basins { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }.watch-basins article { padding:18px; background:#fff; border:1px solid var(--line); border-radius:9px; }.watch-basins h3 { font-size:16px; }.watch-rain { display:flex; align-items:baseline; gap:8px; margin:18px 0 10px; flex-wrap:wrap; }.watch-rain strong { font-size:28px; letter-spacing:-1px; }.watch-rain span,.watch-basins small { font-size:11px; color:var(--muted); }.watch-basins p { font-size:12px; }.watch-trend { border-top:1px solid var(--line); margin-top:15px; padding:12px 0; font-size:12px; }.watch-alerts h3 { font-size:16px; margin:18px 0 10px; }.watch-alerts p { font-size:12px; }.watch-alerts article { border-left:3px solid #b74313; padding:12px; background:#fff; margin:12px 0; }.watch-alerts small { font-size:11px; }.watershed-watch>.text-link { display:block; padding:16px 0; }
@media(max-width:700px) { .river-picker { margin:0 16px 0 auto; padding:8px 10px; font-size:11px; }.river-directory { grid-template-columns:1fr; }.watch-basins { grid-template-columns:1fr; }.watershed-watch { padding:0 15px; }.watershed-watch summary { font-size:15px; }.watch-basins article { padding:17px; }.watch-rain { margin:12px 0 8px; }.black-access h3 { font-size:17px; } }
#black-place-detail:not(:empty) { padding:18px; margin-bottom:22px; background:#f0f4ea; border:1px solid #d6e0cb; border-radius:10px; }
#black-place-detail h2 { font-size:23px; margin-bottom:12px; }#black-place-detail>article>small { display:block; margin-top:12px; color:var(--muted); font-size:10px; }

#black-map-panel .river-places h2 { margin-bottom:14px; }
#black-map-download strong { display:block; font-size:13px; }

/* Map controls share one sheet; the map keeps its fixed viewport. */
.map-layers-button {position:absolute;z-index:400;left:20px;top:132px;gap:8px;box-shadow:0 2px 12px #153a3420;padding:10px 14px;font-size:12px;}
.map-layers-button svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
#map-quality {position:absolute;z-index:400;bottom:64px;left:12px;margin:0;max-width:calc(100% - 24px);border-radius:5px;background:#fffffff0;color:#28463b;padding:6px 10px;font-size:10px;pointer-events:none;}
.layers-sheet fieldset {border:0;border-bottom:1px solid var(--line);padding:18px 0;margin:0;min-width:0;}
.layers-sheet legend {font-size:14px;font-weight:700;padding:0;float:left;width:100%;margin-bottom:14px;}
.layers-sheet fieldset:after {content:'';display:table;clear:both;}
.map-type-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;clear:both;}
.map-type-choice {position:relative;border:1px solid var(--line);border-radius:10px;padding:6px;display:flex;flex-direction:column;gap:6px;cursor:pointer;text-align:center;font-size:12px;}
.map-type-choice:has(input:checked) {border-color:#185f4b;box-shadow:0 0 0 1px #185f4b;background:#edf4e9;}
.map-type-choice input {position:absolute;top:10px;left:10px;accent-color:#185f4b;margin:0;}
.map-type-preview {height:54px;border-radius:6px;background:repeating-linear-gradient(155deg,#ecedde 0 9px,#d8dcca 9px 10px,#eff0e4 10px 21px);}
.map-type-preview.aerial,.map-type-preview.hybrid {background:linear-gradient(135deg,transparent 42%,#59684d 43% 49%,transparent 50%),repeating-conic-gradient(#45604a 0 23%,#6c7652 25% 48%,#475640 50% 72%,#738157 75% 98%);background-size:auto,21px 26px;}
.map-type-preview.hybrid {box-shadow:inset 0 -12px #ffffff80;}
.map-setting {display:flex;align-items:center;justify-content:space-between;gap:14px;clear:both;font-size:13px;margin:10px 0;}
.map-setting select {width:55%;min-width:0;padding:9px 10px;font-size:13px;}
.map-setting input[type=range] {width:55%;accent-color:#185f4b;padding:0;}
.map-toggle {display:flex;align-items:center;justify-content:space-between;gap:14px;clear:both;font-size:13px;margin:0;padding:11px 0;}
.map-toggle small {display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:3px;}
.map-toggle input[type=checkbox] {width:20px;height:20px;flex:0 0 20px;accent-color:#185f4b;margin:0;}
.map-toggle:has(input:disabled) {opacity:.55;}
.map-setting-note,.map-save-status {font-size:11px;color:var(--muted);line-height:1.5;margin:12px 0;clear:both;}
.layer-footer {display:flex;flex-direction:column;gap:16px;align-items:flex-start;}
.leaflet-tooltip.reach-place-label {background:#ffffffed;border:0;border-radius:4px;color:#193a32;font-size:11px;font-weight:600;box-shadow:0 1px 5px #0002;padding:4px 7px;}
.leaflet-tooltip.reach-place-label.large {font-size:15px;}
.gauge-map-marker {border:2px solid white;background:#283f83;color:white;border-radius:8px;text-align:center;line-height:24px;font-size:22px;box-shadow:0 1px 5px #0005;}
.gauge-map-detail strong {font-size:15px;}.gauge-map-detail p {font-size:24px;margin:8px 0;}.gauge-map-detail small {display:block;font-size:10px;}.gauge-map-detail a,.leaflet-popup-content a {display:block;margin-top:12px;}
.river-mile-marker {border:1px solid #ffffffd9;background:#153f34e8;border-radius:4px;color:white;font-size:10px;font-weight:600;line-height:18px;text-align:center;}
.detail-terrain {mix-blend-mode:multiply;pointer-events:none;}
.detail-contours {pointer-events:none;}
#watershed-status {position:absolute;z-index:401;bottom:102px;left:12px;max-width:calc(100% - 24px);border:1px solid #d7cce1;border-radius:6px;background:#fffefa;color:#5d446f;padding:8px 10px;font-family:inherit;font-weight:600;font-size:11px;line-height:1.4;min-height:36px;box-shadow:0 2px 8px #0001;}
#watershed-status[hidden] {display:none;}
.watershed-boundary {pointer-events:none;}
.detail-downloads {margin-top:32px;border-top:1px solid var(--line);padding-top:24px;}
.detail-downloads h2 {font-size:23px;margin:0 0 16px;}.detail-download-controls {display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.detail-download-controls label {font-size:12px;display:flex;flex-direction:column;gap:7px;min-width:0;}.detail-download-controls select {width:100%;min-width:0;font-size:13px;padding:11px;}
.download-preview {display:block;width:100%;height:120px;background:#f1f4ec;border-radius:10px;margin:12px 0;}
.download-summary {display:flex;justify-content:space-between;gap:12px;align-items:baseline;}.download-summary strong {font-size:23px;}.download-summary span {font-size:12px;color:var(--muted);}
#detail-pack-status {font-size:13px;line-height:1.5;min-height:20px;}
.detail-download-actions {display:flex;align-items:center;flex-wrap:wrap;gap:12px;}
@media(max-width:700px){.map-layers-button {left:12px;top:116px;padding:9px 12px;}#map-quality{bottom:67px;font-size:9px;}.detail-downloads .section-heading {align-items:flex-start;flex-direction:column;gap:0;}.detail-download-controls{gap:12px;}.download-summary{align-items:flex-start;flex-direction:column;gap:4px;}}
.map-type-choice input[type=radio] {width:18px;height:18px;min-height:0;padding:0;appearance:auto;left:auto;right:10px;accent-color:#185f4b;}
.detail-downloads .section-heading>.label {font-size:11px;letter-spacing:0;text-transform:none;margin-bottom:14px;}
.map-type-preview.aerial,.map-type-preview.hybrid {background:#64795b url('/maps/aerial-preview.jpg') center/cover;}
@media(max-width:700px){.map-setting select,.detail-download-controls select {font-size:16px;min-height:44px;}}

/* Watershed weather shares the fixed map, with a compact rainfall control sheet. */
.rain-map-button {position:absolute;z-index:400;left:20px;top:188px;min-height:44px;padding:10px 14px;font-size:12px;box-shadow:0 2px 12px #153a3420;}
.rain-map-panel {position:absolute;z-index:405;bottom:20px;left:20px;width:min(470px,calc(100% - 40px));padding:12px 16px;background:#fffffff5;border:1px solid #d3ddd6;border-radius:14px;box-shadow:0 4px 24px #102e3528;color:#193b34;max-height:60%;overflow:auto;}
.rain-map-panel[hidden] {display:none;}
.rain-panel-heading,.rain-panel-heading>div,.rain-reading,.rain-panel-footer {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.rain-panel-heading>strong {font-size:16px;}.rain-panel-heading>div {gap:2px;}.rain-panel-heading button,.rain-panel-footer button,.rain-timeline button {border:0;background:transparent;color:#205341;min-height:44px;padding:8px 10px;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer;}.rain-panel-heading .rain-close {font-size:25px;width:44px;padding:0;}
.rain-controls {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:4px 0 8px;}.rain-controls select {width:100%;min-width:0;min-height:44px;font-size:14px;padding:8px;}
.rain-periods {display:flex;gap:6px;margin:6px 0;}.rain-periods button {flex:1;border:1px solid #d3ddd6;border-radius:7px;background:#f5f7f3;color:#244e41;min-height:44px;font-size:13px;cursor:pointer;}.rain-periods button[aria-pressed=true] {background:#234f41;color:white;border-color:#234f41;}
.rain-timeline {display:flex;align-items:center;gap:6px;min-height:48px;}.rain-timeline input {width:100%;min-width:0;padding:0;accent-color:#205341;}.rain-timeline button {font-size:24px;min-width:40px;}.rain-timeline button:disabled {opacity:.3;}
.rain-reading {margin-top:10px;align-items:baseline;}.rain-amount {font-size:16px;}.rain-reading a {font-size:11px;white-space:nowrap;}.rain-period,.rain-issued {font-size:10px;line-height:1.5;margin:5px 0;}.rain-issued {color:#56695e;}.rain-legend {display:flex;gap:0;margin:10px 0 0;align-items:end;font-size:9px;}.rain-legend>span {flex:1;text-align:center;}.rain-legend>span:last-child {flex:0 0 18px;padding-bottom:2px;}.rain-legend i {display:block;height:7px;margin-bottom:4px;}.rain-panel-footer {font-size:11px;margin-bottom:-8px;}.rain-panel-footer label {display:flex;align-items:center;gap:7px;}.rain-panel-footer input {width:18px;height:18px;min-height:0;appearance:auto;margin:0;accent-color:#205341;}
.has-rain #map-quality,.has-rain #watershed-status,.has-rain #map-status {display:none;}.has-rain .leaflet-bottom.leaflet-left {left:auto;right:10px;bottom:25px;}.has-rain .rain-map-button {display:none;}
.weather-summary {padding:22px;border:1px solid var(--line);border-radius:12px;background:#f0f4eb;margin:18px 0 28px;}.weather-summary h2 {margin:4px 0 18px;font-size:25px;}.weather-summary-values {display:flex;gap:34px;margin-bottom:20px;}.weather-summary-values span {font-size:11px;color:var(--muted);}.weather-summary-values strong {display:block;font-size:24px;color:var(--ink);margin-bottom:6px;}.weather-summary-links {display:flex;gap:10px;flex-wrap:wrap;}.weather-summary>small {display:block;margin-top:14px;font-size:10px;color:var(--muted);}
.weather-page-controls {display:flex;align-items:end;justify-content:space-between;gap:16px;margin:24px 0;}.weather-page-controls label,.weather-hourly label {display:flex;flex-direction:column;gap:7px;font-size:12px;}.weather-page-controls select,.weather-hourly select {font-size:16px;min-height:44px;max-width:100%;}
.weather-rain-history,.weather-forecast,.weather-hourly,.weather-alerts,.weather-response {margin:28px 0 36px;}.weather-rain-history h2,.weather-forecast h2,.weather-hourly h2,.weather-alerts h2,.weather-response h2 {font-size:24px;}.weather-rain-totals,.weather-response-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}.weather-forecast-totals {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.weather-rain-totals article,.weather-forecast-totals article,.weather-response-grid article {padding:18px;background:#fff;border:1px solid var(--line);border-radius:10px;}.weather-rain-totals article>span,.weather-forecast-totals article>span {font-size:12px;}.weather-rain-totals strong,.weather-forecast-totals strong,.weather-response-grid strong {display:block;font-size:26px;margin:14px 0 8px;}.weather-rain-totals strong small {font-size:14px;}.weather-rain-totals p,.weather-response-grid p {font-size:12px;margin:6px 0 12px;}.weather-rain-totals article>small,.weather-forecast-totals article>small,.weather-response-grid small {display:block;color:var(--muted);font-size:10px;line-height:1.6;margin:6px 0;}.weather-forecast-totals strong {font-size:21px;}.weather-response-grid h3 {font-size:17px;margin:0;}.weather-response-grid a {display:inline-block;margin-top:12px;font-size:12px;}
.hourly-scroll {overflow:auto;max-height:420px;border:1px solid var(--line);border-radius:10px;overscroll-behavior:contain;background:white;}.hourly-scroll table {width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap;}.hourly-scroll th,.hourly-scroll td {padding:13px 15px;text-align:left;border-bottom:1px solid #e3e8df;}.hourly-scroll thead th {position:sticky;top:0;background:#eef2e9;z-index:1;font-weight:600;}.hourly-scroll tbody th {font-weight:500;}.weather-alerts .label {font-size:10px;}.weather-alert {border-left:3px solid #b83838;background:#fff4ef;padding:16px;margin:12px 0;border-radius:0 8px 8px 0;}.weather-alert p {font-size:13px;line-height:1.6;white-space:pre-line;}.weather-alert small,.weather-alert summary {font-size:12px;}.weather-alert details {margin-top:15px;}
@media(max-width:700px){.rain-map-button {left:12px;top:169px;}.rain-map-panel {bottom:12px;left:10px;width:calc(100% - 20px);padding:8px 12px;border-radius:12px;}.rain-controls select {font-size:16px;}.rain-amount {font-size:14px;}.rain-reading a {font-size:10px;}.rain-panel-heading>strong {font-size:15px;}.has-rain .leaflet-bottom.leaflet-left {bottom:348px;}.weather-summary {padding:18px;}.weather-summary-values {gap:20px;}.weather-summary-values strong {font-size:21px;}.weather-page-controls {align-items:stretch;flex-direction:column;}.weather-page-controls a {align-self:flex-start;}.weather-rain-totals {gap:6px;}.weather-rain-totals article {padding:11px 9px;}.weather-rain-totals strong {font-size:23px;}.weather-rain-totals article>span {font-size:11px;}.weather-forecast-totals,.weather-response-grid {grid-template-columns:1fr;}.weather-forecast-totals article {display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;padding:14px;}.weather-forecast-totals strong {margin:0;text-align:right;}.weather-forecast-totals article>small {grid-column:1/-1;margin:1px 0;}.weather-hourly .section-heading {align-items:stretch;flex-direction:column;gap:12px;}.weather-alerts .section-heading {align-items:flex-start;gap:12px;}.weather-alerts h2 {font-size:22px;}}

.black-level-0 {fill:#202b28}.black-level-1 {fill:#39b981}.black-level-2 {fill:#e5c241}.black-level-3 {fill:#e9943e}.black-level-4 {fill:#d45149}

.river-map-link {display:block;}
.river-shortcuts {display:flex;gap:10px;margin-top:20px;flex-wrap:wrap;}
.river-shortcuts .button {font-size:13px;min-height:44px;}
.map-gauge-shortcut {min-height:44px;color:var(--ink);text-decoration:none;}
.map-gauge-shortcut strong {color:var(--accent);font-size:12px;}
.map-gauge-shortcut:hover {background:#edf2e7;}
.map-gauge-shortcut:focus-visible {outline:3px solid var(--accent);outline-offset:3px;}
.detail-topline:has(a[href="#weather"]) {flex-wrap:wrap;}
.detail-topline:has(a[href="#weather"])>.label {flex-basis:100%;max-width:none;text-align:left;}

/* Keep the map clear; imagery metadata belongs in Layers. */
.picker-name {display:none}
#map-status:empty,#map-quality:empty {display:none}
#map-quality {left:auto;right:12px;bottom:24px;max-width:calc(100% - 110px);padding:4px 7px;font-size:10px;background:#ffffffe0}
.map-search {top:20px}
.map-layers-button {top:76px}
.rain-map-button {top:132px}
@media(max-width:700px){
 .picker-label {display:none}.picker-name {display:inline}
 .river-picker {margin-right:12px;max-width:155px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .map-search {top:14px}.map-layers-button {top:68px}.rain-map-button {top:122px}
 #map-quality {bottom:24px;font-size:9px}
}

/* Map actions and compact mobile navigation. */
.map-add {position:absolute;z-index:402;right:16px;bottom:58px;width:52px;height:52px;border:0;border-radius:50%;padding:13px;box-shadow:0 3px 16px #143c3538}
.map-add svg {width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
dialog.map-actions-sheet {inset:auto 16px 20px auto;width:360px}
.map-action-list {display:flex;flex-direction:column}
.map-action-list>a,.map-action-list>button {display:flex;align-items:center;gap:14px;width:100%;padding:12px 2px;min-height:49px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font-size:14px;font-weight:600;line-height:1.3;text-align:left}
.map-action-list>button {font-family:inherit;font-size:14px;font-weight:600;line-height:1.3}
.map-action-list>a:hover,.map-action-list>button:enabled:hover {background:#edf2e7}
.map-action-list span {width:26px;text-align:center;font-size:22px;font-weight:400}
.map-action-list small {margin-left:auto;font-size:10px;font-weight:400}
.map-action-list>button:disabled {color:#6b766f;opacity:.7}
.has-rain .map-add,.has-rain .route-editor {display:none}
@media(max-width:700px){
 :root {--mobile-nav-height:calc(56px + env(safe-area-inset-bottom))}
 .bottom-nav {height:var(--mobile-nav-height);padding:0 6px env(safe-area-inset-bottom);align-items:center}
 .bottom-nav a {min-height:52px;padding:5px 2px;gap:3px;justify-content:center}
 body[data-page=river] main {height:calc(100dvh - 60px - var(--mobile-nav-height))}
 dialog.river-sidebar {bottom:var(--mobile-nav-height);max-height:calc(88dvh - var(--mobile-nav-height))}
 dialog.map-actions-sheet {left:0;right:0;bottom:var(--mobile-nav-height);width:100%}
 .map-add {right:12px;bottom:54px}
}
