/* RIP Cabo / Explore. An original cream + coastal-green map shell. */
:root{--rip-ink:#183d32;--rip-muted:#52675d;--rip-paper:#fffdf7;--rip-line:#d5ddd2;--rip-green:#204e3e;--rip-soft:#e7eddf;--rip-shadow:0 3px 18px #153b2826;--dock-bottom:calc(24px + env(safe-area-inset-bottom));color-scheme:light}
body{font-family:'Segoe UI',Arial,sans-serif;color:var(--rip-ink)}button,input,select,textarea{font-family:inherit}button,a,input,select,summary{touch-action:manipulation}button{font-size:14px;min-height:44px;color:var(--rip-ink);transition:background-color .16s,box-shadow .16s}button:active{filter:brightness(.92)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #9b4b16;outline-offset:3px;box-shadow:0 0 0 5px var(--rip-paper)}
body.map-mode{height:100dvh}body.map-mode #map{inset:0;height:100dvh;background:#dce8dd}.map-top{display:none}#explore-header{position:fixed;z-index:710;top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;padding:0;border:0;background:none;display:block;max-width:520px;margin:0 auto}.search-pill{display:flex;align-items:center;gap:10px;height:56px;padding:6px 6px 6px 16px;background:var(--rip-paper);border:1px solid #f5f3eb;border-radius:30px;box-shadow:var(--rip-shadow)}.rip-mark{display:grid;line-height:1;font-size:22px;font-weight:850;letter-spacing:-1px;padding-right:12px;border-right:1px solid var(--rip-line);color:var(--rip-green)}.rip-mark span{font-size:8px;letter-spacing:2px;margin-top:3px}.search-icon{display:flex;color:var(--rip-muted)}#map-search{width:100%;min-width:0;border:0;background:transparent;font-size:16px;outline-offset:0;min-height:44px;color:var(--rip-ink)}#map-search::placeholder{color:var(--rip-muted)}#explore-menu{flex:0 0 44px;padding:0;display:grid;place-items:center;border-radius:50%;background:var(--rip-soft)}.map-chips{display:flex;gap:8px;margin-top:10px}.map-chips button{display:flex;gap:7px;align-items:center;background:var(--rip-paper);padding:0 14px;border-radius:24px;box-shadow:0 2px 8px #153b2820;border:1px solid #d3dccf;font-size:13px;white-space:nowrap}.map-chips button[aria-pressed=true]{background:var(--rip-green);color:var(--rip-paper);border-color:var(--rip-green)}#layers-chip{margin-left:auto;padding:0 12px}#map-search-results{margin-top:8px;background:var(--rip-paper);border-radius:20px;padding:8px;box-shadow:var(--rip-shadow);max-height:45dvh;overflow:auto}#map-search-results button{display:block;width:100%;text-align:left;background:transparent;border-radius:12px;border-bottom:1px solid var(--rip-line);font-size:16px;font-weight:500}#map-search-results p{padding:8px;margin:0;font-size:14px}
#drawer-scrim{position:fixed;inset:0;z-index:715;background:#17372b38;border-radius:0;width:100%;height:100%;padding:0}#explore-drawer{position:fixed;z-index:720;left:12px;right:12px;top:calc(132px + env(safe-area-inset-top));bottom:calc(24px + env(safe-area-inset-bottom));max-width:480px;margin:0 auto;background:var(--rip-paper);border:1px solid #fff;border-radius:24px;padding:16px 20px;box-shadow:0 10px 40px #153b2840;overflow:auto;overscroll-behavior:contain}.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-16px;padding:4px 0;background:var(--rip-paper);z-index:2}.drawer-heading h2{margin:0;font-size:21px;letter-spacing:-.5px}#drawer-close{font-size:26px;min-width:44px;padding:0;border-radius:50%;background:var(--rip-soft)}#explore-drawer .eyebrow{font-size:10px;color:var(--rip-muted);letter-spacing:.12em;margin:14px 0}.layer-switch{display:flex;align-items:center;justify-content:space-between;min-height:64px;border-bottom:1px solid var(--rip-line);font-size:16px}.layer-switch small{display:block;font-size:12px;font-weight:400;color:var(--rip-muted);margin-top:4px}.layer-switch input{width:44px;height:24px;accent-color:var(--rip-green);cursor:pointer}#water-options{margin:18px 0}#water-mode{margin:6px 0 0;border:1px solid #8eaa94;background:var(--rip-paper);color:var(--rip-ink)}#explore-drawer h3{font-size:15px;margin:20px 0 10px}#incident-public-controls{position:static;width:100%;max-height:none;box-shadow:none;border-radius:0;padding:0;background:transparent;gap:8px}#incident-public-controls label{font-size:13px}#incident-public-controls select{background:var(--rip-paper);border-color:#8eaa94;color:var(--rip-ink)}#incident-public-controls button{background:var(--rip-soft);color:var(--rip-ink);font-size:13px}#incident-public-status,#incident-timeline-note{font-size:12px;line-height:1.5;color:var(--rip-muted)}#map-method{border-top:1px solid var(--rip-line);margin-top:20px}#map-legend{position:static;background:none;border:0;padding:0;font-size:12px;line-height:1.6;color:var(--rip-muted)}#map-legend h2{font-size:13px;color:var(--rip-ink)}#map-legend ul{grid-template-columns:1fr;gap:8px;margin:12px 0}#map-legend li{gap:8px}#map-legend p{margin:8px 0}#explore-links{display:grid;gap:0}#explore-links a,#explore-catalog,#open-wells{display:flex;align-items:center;min-height:52px;width:100%;padding:10px 0;text-align:left;text-decoration:none;color:var(--rip-ink);background:none;box-shadow:none;border:0;border-bottom:1px solid var(--rip-line);border-radius:0;font-size:16px;font-weight:600}#explore-catalog{justify-content:space-between}.drawer-footnote{font-size:12px;line-height:1.7;color:var(--rip-muted)}
body.map-mode .sheet{bottom:var(--dock-bottom);width:calc(100% - 24px);max-width:520px;border:1px solid #fff;background:var(--rip-paper);border-radius:24px;max-height:calc(100dvh - 156px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0 18px 10px;box-shadow:var(--rip-shadow);scroll-padding-top:60px}#sheet-toggle{touch-action:none;background:var(--rip-paper)!important;position:sticky;top:0;z-index:3;padding:8px 0 4px!important;font-size:16px!important;min-height:44px;color:var(--rip-ink)!important}.handle{width:30px;height:3px;margin:0 auto 6px;background:#adb9aa}#sheet-title{font-weight:650;letter-spacing:-.2px}#compact-legend{display:flex;justify-content:center;gap:14px;font-size:11px;color:var(--rip-muted);padding:2px 0 0;height:18px}#compact-legend span{display:flex;align-items:center;gap:4px}#compact-legend i{width:7px;height:7px;border-radius:50%;border:1px solid #183d3233}#compact-legend .blue{background:#078dd4}#compact-legend .red{background:#cf4054}#compact-legend .yellow{background:#f0bc39}#compact-legend .gray{background:#8a9da5}.sheet.expanded #compact-legend{display:none}#water-map-caption{display:none}#sheet-body{padding:12px 0 8px}#close-sheet{background:var(--rip-soft);color:var(--rip-ink);position:static;width:100%;border-radius:12px;margin-bottom:8px}#sheet-summary{line-height:1.55!important;font-size:14px!important}.sheet .report{background:none;padding:0}.sheet .report small{line-height:1.6}.sheet .report p{font-size:16px}#colonia-metrics{border:0;border-radius:14px;background:var(--rip-soft);padding:14px;margin:18px 0}#colonia-metrics dl{display:grid;grid-template-columns:1fr 1fr;gap:8px}#colonia-metrics dt,#colonia-metrics dd{font-size:12px;margin:0}#colonia-metrics h2{font-size:15px}#sheet-list{background:var(--rip-soft);color:var(--rip-ink);width:100%;margin-top:12px}#source{display:inline-flex;align-items:center;min-height:44px}.map-note{line-height:1.6}#colonia-history{max-height:14em}
body.map-mode .map-actions{right:16px;left:16px;bottom:calc(var(--dock-bottom) + 90px);display:flex;flex-direction:row;justify-content:space-between;align-items:center;pointer-events:none;z-index:610}.map-actions button{pointer-events:auto}#locate{width:44px!important;height:44px!important;min-height:44px!important;display:grid;place-items:center;background:var(--rip-paper)!important;color:var(--rip-ink)!important;box-shadow:var(--rip-shadow)!important}#open-incident{display:flex;gap:8px;align-items:center;padding:0 18px;height:48px;background:var(--rip-green);color:#fffdf7;border-radius:28px;box-shadow:0 4px 14px #173c3240;font-size:14px}#open-wells{pointer-events:auto}.leaflet-top.leaflet-right{top:calc(144px + env(safe-area-inset-top));right:16px}.leaflet-control-zoom{margin:0!important;border:0!important;border-radius:24px!important;overflow:hidden;box-shadow:var(--rip-shadow)!important}.leaflet-control-zoom a{background:var(--rip-paper)!important;color:var(--rip-ink)!important;width:44px!important;height:44px!important;line-height:44px!important;font-size:22px!important}.leaflet-control-attribution{margin:0!important;padding:2px 8px!important;background:#fffdf7eb!important;font-size:10px!important;max-width:100vw}.leaflet-bottom.leaflet-left{bottom:0;z-index:650}.map-pin{height:36px;width:36px;border-width:3px;box-shadow:0 3px 8px #153b2844}.map-marker-wrapper{display:grid!important;place-items:center}.map-pin svg{width:19px;height:19px;fill:none;stroke:white;stroke-width:1.8}.incident-public-pin{border-radius:50% 50% 50% 12%;background:#9b4b16;font-size:22px;box-shadow:0 3px 9px #63301940}.incident-history-pin{border-radius:50%!important}.water-hidden [data-water-colonia],.water-hidden [data-colonia]{display:none!important}.incidents-hidden .incident-public-pin,.water-timeline .incident-public-pin{display:none!important}
#timeline-dock{position:fixed;z-index:610;bottom:calc(var(--dock-bottom) + 88px);left:12px;right:12px;max-width:520px;margin:auto;padding:10px 14px 8px;background:var(--rip-paper);border-radius:20px;box-shadow:var(--rip-shadow)}.timeline-top{display:flex;align-items:center;gap:8px;justify-content:space-between}.timeline-top strong{font-size:13px}.time-window{display:flex;gap:0;background:var(--rip-soft);border-radius:22px;padding:2px}.time-window button{min-width:44px;padding:0 6px;min-height:44px;border-radius:22px;font-size:12px;background:none}.time-window button[aria-pressed=true]{background:var(--rip-green);color:white}#timeline-now{min-height:44px;padding:0 10px;background:none;text-decoration:underline;font-size:12px}#timeline-dock #controls{display:grid;grid-template-columns:44px 1fr;gap:0 10px}#timeline-dock #play{width:44px;padding:0;overflow:hidden;white-space:nowrap;font-size:0;background:var(--rip-soft);border-radius:50%}#timeline-dock #play::after{content:'▶';font-size:16px}#timeline-dock #play[aria-pressed=true]::after{content:'Ⅱ'}#timeline-dock #hour{min-width:0;width:100%;min-height:44px;accent-color:var(--rip-green)}#timeline-dock #hour-label{grid-column:2;font-size:11px;font-weight:600;color:var(--rip-ink)}#timeline-dock p{font-size:10px;color:var(--rip-muted);margin:7px 0 0}body.water-timeline .map-actions{bottom:calc(var(--dock-bottom) + 242px)}#local-preview-badge{position:fixed;z-index:705;bottom:0;right:4px;background:var(--rip-green);color:white;padding:3px 6px;font-size:8px;letter-spacing:.05em;pointer-events:none}
#map-message:not(:empty){top:calc(140px + env(safe-area-inset-top));left:12px;right:70px;max-width:440px;border-radius:18px;background:var(--rip-paper);color:var(--rip-ink);font-size:13px;line-height:1.5;z-index:730}#connection-status:not([hidden]){top:calc(136px + env(safe-area-inset-top));z-index:740;line-height:1.5}body.drawer-open .map-actions,body.drawer-open .leaflet-control-zoom{visibility:hidden}body:not(.map-mode) :is(#explore-header,#explore-drawer,#drawer-scrim,#timeline-dock,#local-preview-badge){display:none!important}body:not(.map-mode){background:var(--rip-paper)}body:not(.map-mode) #dashboard{padding-top:60px}.keyboard-open :is(.map-actions,#timeline-dock,.sheet){visibility:hidden}body.incident-picking :is(#explore-header,#timeline-dock){visibility:hidden}
#incident-public-dialog,#incident-dialog,#incident-group-dialog,#wells-dialog{background:var(--rip-paper);color:var(--rip-ink);border-radius:26px 26px 0 0;width:min(100%,560px);max-width:100%;max-height:calc(100dvh - 72px - env(safe-area-inset-top));margin:auto auto 0;padding:20px 24px max(24px,env(safe-area-inset-bottom));box-shadow:0 -8px 40px #153b2833}dialog::backdrop{background:#17372b66!important}#incident-public-close,#incident-close,#incident-group-close,#wells-close{border:0;background:var(--rip-soft);color:var(--rip-ink);border-radius:24px;font-size:13px;padding:10px 16px}#incident-public-title{font-size:24px;letter-spacing:-.6px;margin-top:18px}#incident-public-description{font-size:18px;line-height:1.5}#incident-public-dialog p{font-size:13px;line-height:1.6}#incident-public-dialog #incident-public-description{font-size:18px}#incident-public-photo{width:100%;max-height:30dvh;object-fit:contain;background:var(--rip-soft);border-radius:16px}#incident-confirm,#incident-absent{background:var(--rip-green);color:white;margin:4px 4px 4px 0}#incident-absent{background:var(--rip-soft);color:var(--rip-ink)}.incident-more{border-top:1px solid var(--rip-line);margin-top:16px;font-size:13px}.incident-more summary{padding:12px 0;min-height:44px;font-weight:650}#incident-form input,#incident-form select,#incident-form textarea{border:1px solid #8eaa94;border-radius:10px}#incident-submit{background:var(--rip-green);color:white}#incident-location-picker{background:var(--rip-paper);border-color:var(--rip-green);bottom:max(12px,env(safe-area-inset-bottom))}
@media(min-width:700px){#explore-header{right:auto;width:420px;margin:0;left:24px;top:24px}#explore-drawer{left:24px;right:auto;width:420px;top:144px}body.map-mode .sheet{left:24px;transform:none;width:420px}#timeline-dock{left:24px;right:auto;width:420px}.map-actions{max-width:420px}.leaflet-top.leaflet-right{top:24px;right:24px}#incident-public-dialog,#incident-dialog,#incident-group-dialog,#wells-dialog{margin:auto;border-radius:26px;max-height:88dvh}}
@media(max-height:650px){#explore-header{top:calc(8px + env(safe-area-inset-top))}.search-pill{height:50px}.map-chips{margin-top:6px}.leaflet-top.leaflet-right{top:126px}#explore-drawer{top:118px;bottom:18px}body.map-mode .sheet{max-height:calc(100dvh - 136px);bottom:20px}body.water-timeline .map-actions{bottom:calc(var(--dock-bottom) + 222px)}#timeline-dock{padding:6px 12px}#timeline-dock p{margin:2px 0 0}.timeline-top strong{font-size:12px}.time-window button{min-height:44px}#timeline-dock #hour-label{font-size:10px}}
#explore-header .rip-mark span{display:block!important;color:var(--rip-green);font-size:8px;letter-spacing:2px}#explore-header .map-chips span{display:inline;color:inherit;font-size:13px;letter-spacing:0}#explore-header .search-icon{display:flex;color:var(--rip-muted)}
body.map-mode:has(.sheet.expanded) .map-actions{visibility:hidden}
body.water-timeline:has(.sheet.expanded) #timeline-dock{bottom:var(--dock-bottom)}
body.map-mode.water-timeline .sheet.expanded{bottom:calc(var(--dock-bottom) + var(--timeline-height,150px) + 12px);max-height:calc(100dvh - 150px - var(--dock-bottom) - var(--timeline-height,150px) - env(safe-area-inset-top))}
@media(orientation:landscape) and (min-width:700px) and (max-height:500px){
 body.map-mode.water-timeline .sheet.expanded,body.map-mode .sheet.expanded{left:auto;right:16px;transform:none;top:16px;bottom:24px;width:calc(50% - 30px);max-height:calc(100dvh - 40px)}
 body.water-timeline #timeline-dock{bottom:24px;width:calc(50% - 36px)}
 body.water-timeline .map-actions{left:auto;right:16px;max-width:calc(50% - 30px);bottom:114px}
 body:has(.sheet.expanded) .leaflet-control-zoom{visibility:hidden}
 #explore-drawer{top:126px}
}
body.map-mode.keyboard-in-sheet .sheet.expanded{bottom:calc(var(--keyboard-gap,0px) + 12px);max-height:calc(var(--visual-height,100dvh) - 24px);z-index:750}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
/* Persistent potholes share the principal incident layer and native controls. */
.incident-public-pin.incident-pothole{border:4px solid #995e00;background:#fffdf7;color:#153347;font-weight:800;border-radius:50%}.incident-public-pin.incident-pothole-red{border-color:#b52828}.incident-public-pin.incident-pothole-green{border-color:#13753b}.incident-public-pin.incident-pothole-gray{border-color:#627483}
#map-potholes-layer{width:100%;min-height:48px;background:var(--rip-soft);border-radius:12px}
/* Friendly water details: one decision first, technical explanation on demand. */
#sheet-summary .water-state{display:block;font-size:22px;line-height:1.2;letter-spacing:-.4px;border-left:6px solid #8a9da5;padding-left:12px;margin:4px 0 12px}
#sheet-summary[data-color=blue] .water-state{border-color:#078dd4}#sheet-summary[data-color=red] .water-state{border-color:#cf4054}#sheet-summary[data-color=yellow] .water-state{border-color:#b78400}
#sheet-summary .water-counts{display:block;font-weight:600;margin-bottom:8px}#sheet-summary small{display:block;margin:4px 0;font-size:12px;color:var(--rip-muted)}
.sheet:has(.water-state) .report :is(label[for=catalog-search],#catalog-search,#catalog-help,#catalog-status,#catalog-results,label[for=colonia],#colonia){display:none}
.sheet .report>.actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sheet .report>.actions button{min-height:60px;font-size:16px;font-weight:650;border-radius:14px;margin:0;padding:8px}
.sheet #yes{background:var(--rip-green);color:var(--rip-paper)}.sheet #no{background:var(--rip-paper);border:2px solid #8b3847;color:#782a39}
#since{background:var(--rip-soft);border-radius:16px;padding:12px;margin-top:14px;scroll-margin:60px}#since #send-water,#cancel-water{display:block;width:100%;min-height:48px;margin:8px 0;padding:8px;border-radius:12px}#cancel-water{background:var(--rip-paper);border:1px solid #8eaa94}#colonia-metrics summary{min-height:44px;padding:12px 0;font-weight:650;cursor:pointer}#colonia-metrics p{font-size:13px;line-height:1.55}
body.map-mode:has(.sheet.expanded) .leaflet-control-zoom{visibility:hidden}
.map-camera-marker{background:none;border:none}.camera-pin-label{display:flex;align-items:center;justify-content:center;gap:6px;width:100px;min-height:44px;border:3px solid var(--rip-paper);border-radius:24px;background:#183d32;color:#fffdf7;box-shadow:0 2px 12px #153b2866;font-size:13px;font-weight:700}.map-camera-marker:focus-visible{outline:3px solid #9b4b16;outline-offset:4px}
#map-camera-layer{width:100%;margin:14px 0 0;background:var(--rip-green);color:var(--rip-paper);border-radius:12px}
#map-camera-dialog{background:var(--rip-paper);color:var(--rip-ink);border:0;border-radius:24px;width:min(480px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 32px);padding:20px;box-sizing:border-box;overflow:auto;line-height:1.6}#map-camera-dialog h2{font-size:24px;line-height:1.2}#map-camera-dialog .eyebrow{font-size:11px;margin-top:20px}#map-camera-close{width:100%;background:var(--rip-soft);border-radius:12px}#map-camera-dialog .camera-continue{display:flex;min-height:52px;align-items:center;justify-content:center;background:var(--rip-green);color:var(--rip-paper);text-align:center;border-radius:14px;padding:8px;font-weight:650;text-decoration:none}
