/* FloodNote design system (one consolidated sheet)
   Type scale (px):   11.5 tag/meta · 13 secondary · 14.5 body · 16 emphasis · 19 headline · 24 title
   Space scale (px):  4 · 8 · 12 · 16 · 24 · 32   (vertical rhythm: 8 inside a block, 16 between blocks, 24-32 between sections)
   Color: one calm dark base; the flood scale is the only loud color. */
:root {
  --bg: #0A0E15;
  --sheet: rgba(15, 20, 30, .95);
  --mod: rgba(255, 255, 255, .055);
  --mod-2: rgba(255, 255, 255, .09);
  --hair: rgba(255, 255, 255, .08);
  --text: #F6F8FB;
  --text-2: rgba(246, 248, 251, .76);
  --text-3: rgba(246, 248, 251, .56);
  --link: #8CC3FF;
  --ok: #4CC38A;
  --t-meta: 11.5px; --t-sec: 13px; --t-body: 14.5px; --t-em: 16px; --t-head: 19px; --t-title: 24px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --panel-w: 392px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-body)/1.5 var(--font); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0; }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; background: #0B111C; }
.maplibregl-ctrl-attrib { background: rgba(10, 14, 21, .75) !important; color: var(--text-3) !important; font-size: 10.5px; }
.maplibregl-ctrl-attrib a { color: var(--text-2) !important; }
.maplibregl-ctrl-group { background: var(--sheet) !important; border: 0 !important; box-shadow: 0 6px 24px rgba(0, 0, 0, .4) !important; border-radius: 12px !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 38px !important; height: 38px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--hair) !important; }
.maplibregl-ctrl-icon { filter: invert(1) opacity(.85); }
.maplibregl-popup-content { background: #fff; color: #10151E; border-radius: 10px; padding: 8px 11px; box-shadow: 0 6px 24px rgba(0,0,0,.4); font: 500 var(--t-sec)/1.4 var(--font); max-width: 240px; }
.maplibregl-popup-tip { border-top-color: #fff !important; border-bottom-color: #fff !important; }
.pop b { display: block; font-weight: 700; }
.pin { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: #fff; color: #10151E; font: 700 12px/1 var(--font); box-shadow: 0 2px 10px rgba(0, 0, 0, .45); cursor: pointer; white-space: nowrap; transition: transform .12s; border: 0; }
.pin i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.pin i.est { background: transparent; border: 2px dashed var(--c); }
.pin.est { background: #fff; color: #3A4352; outline: 1.5px dashed #6B7686; outline-offset: -4px; }
.pin:hover, .pin.on { transform: scale(1.06); background: #10151E; color: #fff; }
.mapkey { position: fixed; z-index: 4; left: calc(var(--panel-w) + 32px); bottom: 28px; width: 300px; padding: var(--s3) var(--s4); border-radius: 14px; background: rgba(15, 20, 30, .92); backdrop-filter: blur(12px); color: var(--text-2); font-size: var(--t-sec); line-height: 1.45; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.mapkey .keytoggle { display: none; background: none; border: 0; color: var(--text); font: 600 var(--t-sec) var(--font); padding: var(--s3) var(--s4); cursor: pointer; }
.mapkey .keybody > div { display: flex; align-items: center; gap: var(--s2); }
.mapkey .keybody > div + div { margin-top: 2px; }
.mapkey .keybody i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.mapkey .kd { display: block !important; margin-top: var(--s2) !important; font-size: var(--t-meta); color: var(--text-3); }

/* ---------- panel / sheet ---------- */
#panel { position: fixed; z-index: 5; left: 16px; top: 16px; bottom: 16px; width: var(--panel-w); background: var(--sheet); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); display: flex; flex-direction: column; overflow: hidden; }
#panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 380px; background: var(--mood, none); pointer-events: none; }
#panel > * { position: relative; }
.grab { display: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5) var(--s1); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--text); }
.brand svg { width: 22px; height: 22px; }
.brand:hover { text-decoration: none; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 0; background: var(--mod); color: var(--text-2); font-size: var(--t-meta); font-weight: 600; cursor: pointer; white-space: nowrap; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: beat 2.4s infinite; }
.live.warn i { background: #EBC453; animation: none; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); } 70% { box-shadow: 0 0 0 6px rgba(76, 195, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); } }
.topnote { margin: 0 var(--s5) var(--s3); font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.topnote a { color: var(--text-2); }
.stale { margin: 0 var(--s5) var(--s3); padding: var(--s2) var(--s3); border-radius: 10px; background: rgba(235,196,83,.14); color: #F3D37A; font-size: var(--t-sec); line-height: 1.4; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--s1) var(--s5) var(--s5); scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.loading { padding: 48px 0; text-align: center; color: var(--text-2); }
.spin { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--mod-2); border-top-color: var(--text); margin: 0 auto var(--s3); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- source tags ---------- */
.tag { display: inline-flex; align-items: center; margin: 0 2px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-3); font-size: 10.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; text-decoration: none; vertical-align: 1px; }
a.tag:hover { background: rgba(255,255,255,.14); color: var(--text); text-decoration: none; }
.tags { margin-top: var(--s2); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tags .tag { margin: 0; }

/* ---------- home ---------- */
.search { position: relative; }
.search > svg { position: absolute; left: 16px; top: 15px; width: 16px; height: 16px; color: #10151E; pointer-events: none; }
.search input { width: 100%; height: 46px; border-radius: 999px; border: 0; background: #fff; color: #10151E; padding: 0 16px 0 42px; font-size: 16px; -webkit-appearance: none; appearance: none; font-weight: 500; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.search input::placeholder { color: #6A7280; }
.search input:focus { outline: 3px solid rgba(140, 195, 255, .55); outline-offset: 0; }
.results { list-style: none; margin: var(--s2) 0 0; padding: 4px; border-radius: 16px; background: #fff; color: #10151E; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.results:empty { display: none; }
.results button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border: 0; background: none; border-radius: 12px; text-align: left; cursor: pointer; min-height: 48px; color: #10151E; }
.results button:hover, .results button:focus-visible { background: #F1F3F6; }
.results .t { font-weight: 650; font-size: var(--t-body); }
.results .s { color: #5D6676; font-size: 12px; }
.seg { display: flex; gap: 6px; margin-top: var(--s4); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 999px; border: 0; background: var(--mod); color: var(--text-2); font-size: var(--t-sec); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { background: var(--mod-2); color: var(--text); }
.seg button[aria-pressed="true"] { background: #fff; color: #10151E; }
.seg i { width: 7px; height: 7px; border-radius: 50%; }
.summary { margin-top: var(--s4); font-size: var(--t-body); line-height: 1.55; color: var(--text-2); }
.summary b { display: block; color: var(--text); font-weight: 650; font-size: var(--t-em); line-height: 1.4; margin-bottom: var(--s1); }
.callout { margin-top: var(--s4); width: 100%; display: flex; gap: var(--s3); align-items: center; text-align: left; padding: var(--s3) var(--s4); border-radius: 14px; border: 0; cursor: pointer; background: var(--mod); }
.callout:hover { background: var(--mod-2); }
.callout .k { display: block; font-size: var(--t-meta); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.callout .m { font-size: var(--t-body); font-weight: 600; margin-top: 2px; line-height: 1.4; }
.callout .dotbig { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.hdr { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin: var(--s6) 0 var(--s2); }
.hdr h2 { margin: 0; font-size: var(--t-em); font-weight: 700; letter-spacing: -.01em; }
.hdr span, .hdr button { font-size: var(--t-meta); color: var(--text-3); background: none; border: 0; cursor: pointer; padding: 0; text-align: right; }
.hdr button { color: var(--link); font-weight: 600; }
.places { display: grid; gap: var(--s2); }
.place { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: 14px; border: 0; cursor: pointer; text-align: left; background: var(--mod); position: relative; overflow: hidden; width: 100%; }
.place::before { content: ""; position: absolute; inset: 0; background: var(--mood, none); opacity: .6; }
.place > * { position: relative; }
.place .nm { font-size: var(--t-em); font-weight: 650; }
.place .sb { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li + li .row { border-top: 1px solid var(--hair); border-radius: 0; }
.row { width: calc(100% + 16px); margin: 0 -8px; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s2); border: 0; background: none; border-radius: 12px; text-align: left; cursor: pointer; }
.row:hover, .row:focus-visible, .row.on { background: var(--mod); border-radius: 12px; }
.cdot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cdot.maybe { background: transparent; border: 2px dashed var(--c); }
.row .main { flex: 1; min-width: 0; }
.row .t { display: block; font-size: var(--t-body); font-weight: 650; }
.row .s { display: block; font-size: var(--t-sec); color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.row .s2 { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.empty { color: var(--text-3); font-size: var(--t-sec); padding: var(--s2) 0; line-height: 1.5; }
.legend { margin-top: var(--s5); padding: var(--s3) var(--s4); border-radius: 14px; background: var(--mod); display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.legend > div { display: flex; align-items: center; gap: var(--s2); }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.legend b { width: 8px; text-align: center; color: var(--text); }

/* ---------- city ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--mod-2); color: var(--text); font-size: var(--t-sec); font-weight: 650; }
.back svg { width: 18px; height: 18px; }
.back:hover { background: rgba(255,255,255,.15); text-decoration: none; }
/* Floating 'All places' button on the map (city pages) */
.mapback { position: fixed; z-index: 6; left: calc(var(--panel-w) + 32px); top: 16px; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px 0 10px; border-radius: 999px; background: #fff; color: #10151E; font-size: var(--t-body); font-weight: 650; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.mapback:hover { background: #E9EDF3; text-decoration: none; }
.mapback[hidden] { display: none; }
.chero { text-align: center; padding: var(--s2) 0 var(--s5); position: relative; }
.chero .star { position: absolute; right: 0; top: -32px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--mod); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.chero .star svg { width: 16px; height: 16px; }
.chero .star[aria-pressed="true"] { color: #EBC453; }
.chero h1 { margin: 0; font-size: var(--t-title); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.chero .near { font-size: 12.5px; color: var(--text-3); margin-top: var(--s1); }
.chero .when { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s5); font-size: var(--t-sec); font-weight: 650; color: var(--text); padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.07); }
.chero .when .sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chero .head { font-size: var(--t-head); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; margin: var(--s3) auto 0; max-width: 320px; }
.chero .tags { margin-top: var(--s3); }
.chero .hl { font-size: var(--t-sec); color: var(--text-2); margin: var(--s3) auto 0; max-width: 320px; line-height: 1.55; }
.chero .hl + .hl { margin-top: var(--s2); }
.mod { margin-top: var(--s4); border-radius: var(--r); background: var(--mod); padding: var(--s4); }
.mod-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--t-meta); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding-bottom: var(--s3); border-bottom: 1px solid var(--hair); margin-bottom: var(--s3); }
.mod-h span { display: inline-flex; align-items: center; gap: 6px; }
.mod p.lead { font-size: var(--t-body); color: var(--text); line-height: 1.5; margin-bottom: var(--s3); }
.mod .note { margin-top: var(--s3); font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }
.mod .note span { display: inline-flex; align-items: center; gap: 6px; }
.mod .note .fl { width: 2px; height: 11px; background: #fff; display: inline-block; }
.mod .note .drop { width: 11px; height: 14px; }
.mod .readout { margin-top: var(--s3); font-size: var(--t-sec); color: var(--text-2); line-height: 1.5; min-height: 20px; }
.mod .readout b { color: var(--text); }
.mod.alert { background: rgba(236, 76, 85, .18); }
.mod.alert .mod-h { color: #FFC2C6; border-color: rgba(255, 194, 198, .18); }
.mod.alert p { font-size: var(--t-sec); line-height: 1.5; }
.mod.alert p + p { margin-top: var(--s2); }
.mod.alert .area { color: #FFD5D8; }
.mod.alert .tags { justify-content: flex-start; margin-top: var(--s3); }
.mod.alert button.more { margin-top: var(--s2); background: none; border: 0; color: #FFD5D8; font-weight: 700; font-size: var(--t-sec); padding: 0; cursor: pointer; }
.otheralerts { margin-top: var(--s3); font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.45; }
.mod.quote p { font-size: var(--t-sec); line-height: 1.55; color: var(--text-2); }
.mod.quote p b { color: var(--text); }
.mod.quote .qi { color: var(--text-3); font-size: 12.5px; }
.mod.quote blockquote { margin: var(--s3) 0; padding: 0 0 0 var(--s3); border-left: 2px solid rgba(255,255,255,.3); font-size: var(--t-body); line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.hours { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; padding: 0 6px; }
.hours::-webkit-scrollbar { display: none; }
.hr { flex: 0 0 46px; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: 6px 0; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.hr:hover, .hr[aria-pressed="true"] { background: var(--mod-2); }
.hr .h { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.hr .h.now { color: var(--text); font-weight: 700; }
.drop { width: 16px; height: 20px; }
.d3 { display: grid; grid-template-columns: 92px 1fr 128px; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--hair); }
.d3:first-child { border-top: 0; padding-top: 0; }
.d3 .dn { font-size: var(--t-body); font-weight: 600; line-height: 1.3; }
.d3 .dn small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-top: 2px; }
.d3 .hi { font-size: var(--t-sec); font-weight: 600; text-align: right; line-height: 1.3; white-space: nowrap; }
.d3 .hi small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.track { position: relative; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.track .rng { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.track .fl { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #fff; opacity: .9; border-radius: 1px; }
.track .rng.est { -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 9px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 9px); }
.chartbox { position: relative; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart text { font-family: var(--font); }
.clegend { display: flex; flex-wrap: wrap; gap: 4px var(--s3); margin-top: var(--s2); font-size: 11.5px; color: var(--text-3); }
.clegend i { display: inline-block; width: 14px; border-top: 2px solid; vertical-align: middle; margin-right: 5px; }
.defn { margin-top: var(--s3) !important; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s3); }
.fact .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.fact .v { font-size: var(--t-body); font-weight: 600; margin-top: 2px; line-height: 1.35; }
.fact .v small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); margin-top: 1px; }
.linkrow { margin-top: var(--s3); width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); background: none; border: 0; border-top: 1px solid var(--hair); padding: var(--s3) 0 0; color: var(--link); font-weight: 600; font-size: var(--t-sec); cursor: pointer; text-align: left; }
.btn { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); padding: 0 var(--s4); border-radius: 999px; border: 0; background: var(--mod-2); font-size: var(--t-body); font-weight: 650; cursor: pointer; color: var(--text); }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.btn.primary { background: #fff; color: #10151E; }
.btn.primary:hover { background: #E9EDF3; }
.btn.wide { width: 100%; margin-top: var(--s5); }
.k1 { color: #F3D37A; } .k2 { color: #FFAE6E; } .k3 { color: #FF8C92; } .k4 { color: #FF8FBC; }

/* ---------- disclaimer ---------- */
.disclaimer { margin-top: var(--s6); padding: var(--s4); border-radius: 14px; background: rgba(255,255,255,.035); font-size: 12px; line-height: 1.6; color: var(--text-3); }
.disclaimer b { color: var(--text-2); }
.disclaimer .links { margin-top: var(--s2); }
.disclaimer button { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }

/* ---------- dialog ---------- */
dialog { width: min(500px, calc(100% - 24px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: 22px; background: #141A25; color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(4, 7, 12, .6); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) var(--s2) var(--s5); position: sticky; top: 0; background: #141A25; z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.icon-btn { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; border: 0; background: var(--mod-2); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn svg { width: 16px; height: 16px; }
#dlgBody { padding: var(--s2) var(--s5) var(--s5); font-size: var(--t-sec); color: var(--text-2); line-height: 1.55; }
#dlgBody p + p, #dlgBody p + .dl, #dlgBody p + div { margin-top: var(--s3); }
.dl { margin: var(--s3) 0 0; }
.dl > div { padding: var(--s3) 0; border-top: 1px solid var(--hair); }
.dl > div:first-child { border-top: 0; padding-top: 0; }
.dl dt { color: var(--text); font-weight: 650; font-size: var(--t-sec); }
.dl dd { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; }
.dlg-disc { margin-top: var(--s4) !important; padding-top: var(--s3); border-top: 1px solid var(--hair); font-size: 11.5px; color: var(--text-3); }
.sharegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: var(--s4) 0; }
.shareopt { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 12px; background: var(--mod-2); color: var(--text); font-weight: 650; font-size: var(--t-sec); }
.shareopt:hover { background: rgba(255, 255, 255, .15); text-decoration: none; }
.copyrow { display: flex; gap: var(--s2); }
.copyrow input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 0; background: var(--mod-2); color: var(--text); padding: 0 var(--s4); font-size: 16px; }
.msg { max-width: 520px; margin: 80px auto; padding: 0 20px; overflow: auto; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 90vh; height: 90dvh; border-radius: 22px 22px 0 0; transform: translateY(calc(100% - min(var(--peek, 360px), 55dvh))); transition: transform .34s cubic-bezier(.2, .8, .2, 1); }
  #panel.open { transform: translateY(0); }
  #panel.dragging { transition: none; }
  .grab { display: flex; justify-content: center; padding: var(--s2) 0 0; cursor: grab; touch-action: none; }
  .grab span { width: 36px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
  .bar { padding: var(--s2) var(--s4) var(--s1); }
  .topnote, .stale { margin-left: var(--s4); margin-right: var(--s4); }
  .scroll { padding: var(--s1) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); }
  .mapkey { left: 12px; right: auto; top: 12px; bottom: auto; width: auto; max-width: calc(100% - 72px); padding: 0; }
  .mapkey .keytoggle { display: block; }
  .mapback { left: 12px; top: calc(12px + env(safe-area-inset-top)); }
  body.on-city .mapkey { top: 62px; }
  .mapkey .keybody { display: none; padding: 0 var(--s4) var(--s3); }
  .mapkey.open .keybody { display: block; }
}
@media (prefers-reduced-motion: reduce) { .live i, #panel { animation: none; transition: none; } }
.tags.left { justify-content: flex-start; }
.summary .tags { margin-top: var(--s2); }
.results .osm { padding: 6px 12px 4px; font-size: 11px; color: #5D6676; }
.results .osm a { color: #3A6EA5; }

/* dashed = computer estimate, dotted = tide only, solid = measured or official */
.estkey { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px dashed #8FA9C4; margin: 0 6px 0 0; vertical-align: -1px; flex: 0 0 10px; }
.mk { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 0; vertical-align: -1px; }
.mk.solid { background: #8CC3FF; }
.mk.dash { border: 2px dashed #8CC3FF; }
.mk.dot { border: 2px dotted rgba(246,248,251,.6); }
.d3 .hi .mk { margin: 0 0 0 5px; width: 8px; height: 8px; }

/* city summary */
.glance { display: grid; gap: 1px; border-radius: var(--r); overflow: hidden; background: var(--hair); margin-top: var(--s2); }
.gl { background: #161C27; padding: var(--s4); }
.gl.warn { background: #2A1A20; }
.gk { display: flex; align-items: center; gap: 6px; font-size: var(--t-meta); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.gl.warn .gk { color: #FFC2C6; }
.gb { margin-top: 6px; font-size: var(--t-em); font-weight: 650; line-height: 1.35; color: var(--text); }
.gs { margin-top: 4px; font-size: var(--t-sec); line-height: 1.5; color: var(--text-3); }
.gl .tags { margin-top: var(--s2); }
.gl blockquote { margin: var(--s3) 0 0; padding: 0 0 0 var(--s3); border-left: 2px solid rgba(255,255,255,.3); font-size: var(--t-sec); line-height: 1.55; color: var(--text); white-space: pre-wrap; }
.sec { margin: var(--s6) 0 0; font-size: var(--t-em); font-weight: 700; letter-spacing: -.01em; }
.sec + .mod { margin-top: var(--s3); }
.chero { padding-bottom: var(--s3); }

/* hour-by-hour strip */
.hoursWrap { position: relative; }
.hoursWrap::before, .hoursWrap::after { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; width: 56px; pointer-events: none; }
.hoursWrap::after { right: -6px; background: linear-gradient(90deg, rgba(22,28,39,0), rgba(22,28,39,.97) 60%); }
.hoursWrap::before { left: -6px; background: linear-gradient(270deg, rgba(22,28,39,0), rgba(22,28,39,.97) 60%); }
.hoursWrap.atend::after, .hoursWrap.atstart::before { display: none; }
.hnav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #10151E; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.hnav[hidden] { display: none; }
.hnav:hover { background: #E6ECF3; }
.hnav:focus-visible { outline: 3px solid rgba(140, 195, 255, .7); outline-offset: 2px; }
.hnav svg { width: 18px; height: 18px; opacity: 1 !important; }
.hnav.prev { left: -4px; }
.hnav.next { right: -4px; }
.hr { flex: 0 0 58px; }
.hr .vv { font-size: 10.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; line-height: 1.2; text-align: center; }
.hr .vv.over { color: #FFAE6E; }
.hday { flex: 0 0 auto; align-self: stretch; display: flex; align-items: flex-start; padding: 6px 4px 0 8px; margin-left: 4px; border-left: 1px solid var(--hair); font-size: 11px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.hhint { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }

.seg button:disabled { opacity: .35; cursor: default; }

/* filter bar on the map */
.mapbar { position: fixed; z-index: 6; left: calc(var(--panel-w) + 32px); right: 70px; top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.mapbar > * { pointer-events: auto; }
.mapbar .search { width: min(420px, 100%); } /* search on its own row, filters under it (Google Maps pattern) */
.mapbar .search > svg { top: 12px; }
.mapbar .search input { height: 42px; }
.mapbar .results { position: absolute; left: 0; right: 0; top: 100%; z-index: 10; max-height: min(60vh, 420px); overflow-y: auto; }
.mapbar .filters { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.lvdd { position: relative; flex: 0 0 auto; }
.lvbtn { height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(15, 20, 30, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.4); color: var(--text); font: 600 var(--t-sec) var(--font); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.lvbtn:hover { background: rgba(32, 40, 54, .95); }
.lvbtn i, .lvmenu i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.lvmenu i.none { box-shadow: inset 0 0 0 1.5px var(--text-3); }
.lvbtn svg { opacity: .7; }
.lvbtn .lvshort { display: none; }
@media (max-width: 1000px) { .lvbtn .lvshort { display: inline; } .lvbtn .lvlong { display: none; } }
/* tablets: the drawer leaves less room, so the filters may wrap instead of hiding days */
@media (min-width: 761px) and (max-width: 1000px) {
  .mapbar { right: 56px; }
  .mapbar .filters { flex-wrap: wrap; }
  .mapbar .seg { flex-wrap: wrap; border-radius: 18px; gap: 4px; }
  .mapbar .seg button { padding: 0 9px; gap: 5px; }
}
.lvmenu { position: absolute; z-index: 10; top: calc(100% + 6px); right: 0; min-width: 240px; padding: 4px; border-radius: 16px; background: rgba(15, 20, 30, .97); box-shadow: 0 12px 36px rgba(0,0,0,.5); }
.lvmenu[hidden] { display: none; }
.lvmenu button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--text); font: 600 var(--t-sec) var(--font); text-align: left; cursor: pointer; }
.lvmenu button:hover:not(:disabled) { background: var(--mod-2); }
.lvmenu button[aria-pressed="true"] { background: #fff; color: #10151E; }
.lvmenu button:disabled { opacity: .4; cursor: default; }
.lvmenu .n { margin-left: auto; padding-left: 12px; font-weight: 500; color: inherit; opacity: .65; font-size: 12px; }
.mapbar[hidden] { display: none; }
.mapbar .seg { margin: 0; min-width: 0; padding: 4px; border-radius: 999px; background: rgba(15, 20, 30, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.mapbar .seg button { background: transparent; }
.mapbar .seg button:hover { background: var(--mod-2); }
.mapbar .seg button[aria-pressed="true"] { background: #fff; color: #10151E; }
@media (max-width: 760px) {
  .mapbar { left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); gap: 6px; }
  /* phone: search and the level menu share the top row; the day pills get the full second row */
  .mapbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .mapbar .search { width: auto; grid-column: 1; grid-row: 1; }
  .mapbar .filters { display: contents; }
  .mapbar .lvdd { grid-column: 2; grid-row: 1; }
  .mapbar .seg { grid-column: 1 / -1; grid-row: 2; justify-self: start; max-width: 100%; }
  .lvbtn { height: 42px; }
  .lvbtn .lvlong { display: none; }
  .mapbar .seg { overflow-x: auto; padding: 3px; }
  .mapbar .seg { gap: 4px; }
  .mapbar .seg button { height: 32px; padding: 0 8px; font-size: 12.5px; gap: 5px; }
  .lvbtn { padding: 0 12px; }
  body:not(.on-city) .maplibregl-ctrl-top-right { display: none; }
  body:not(.on-city) .mapkey { top: calc(108px + env(safe-area-inset-top)); }
}

/* map key: one slim strip, bottom-right, can be hidden */
@media (min-width: 761px) {
  .mapkey { left: auto; right: 12px; bottom: 30px; width: auto; max-width: calc(100% - var(--panel-w) - 60px); padding: 7px 8px 7px 14px; border-radius: 999px; }
  .mapkey .keybody { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
  .mapkey .keybody > * + * { margin-top: 0 !important; }
  .mapkey .kt { color: var(--text-3); }
  .mapkey .ki { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .mapkey .ki i { width: 8px; height: 8px; border-radius: 50%; }
  .mapkey .ki .estkey { margin: 0; }
  .mapkey .keyhide { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--mod-2); color: var(--text-2); cursor: pointer; }
  .mapkey .keyshow { display: none; }
  .mapkey.min { padding: 0; }
  .mapkey.min .keybody { display: none; }
  .mapkey.min .keyshow { display: block; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 600 12.5px var(--font); cursor: pointer; }
}
@media (max-width: 760px) {
  .mapkey .keyshow, .mapkey .keyhide, .mapkey .kt { display: none; }
  .mapkey .keybody .ki { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
  .mapkey .keybody .ki i { width: 8px; height: 8px; border-radius: 50%; }
  .mapkey.min .keybody { display: none; }
  .mapkey.open .keybody { display: block; }
}
.summary .sline { display: block; margin-top: 2px; }
.summary .sline .mk { width: 9px; height: 9px; }

/* ---- review fixes: phone sheet vs filters, tap targets, sizes ---- */
.search input::-webkit-search-cancel-button { display: none; }
@media (max-width: 760px) {
  body.sheet-open .mapbar, body.sheet-open .mapkey { display: none; }
  .grab { padding: 8px 0 12px; min-height: 28px; }
  .maplibregl-ctrl-top-right { top: env(safe-area-inset-top); }
}
@media (min-width: 761px) and (max-width: 1024px) { :root { --panel-w: 340px; } }
@media (min-width: 761px) { .mapkey { bottom: 38px; } }
.chero .star, .icon-btn { width: 44px; height: 44px; flex-basis: 44px; }
.chero .star { top: -44px; }
.back { height: 44px; }
.linkrow { min-height: 44px; }
.mod.alert button.more { min-height: 44px; }
.hdr button { min-height: 44px; padding: 0 4px; }
.mapkey .keyhide { width: 32px; height: 32px; }
.d3 { grid-template-columns: 84px minmax(40px, 1fr) auto; }
.d3 .hi { max-width: 150px; white-space: normal; }
.chero .near { color: var(--text-2); }
.empty a { color: var(--link); }

/* phone: the map key is a small round "?" button in the map's bottom-right corner, just above the sheet; it opens upward */
@media (max-width: 760px) {
  .mapkey, body:not(.on-city) .mapkey { left: auto; right: 12px; top: auto; bottom: calc(min(var(--peek, 360px), 55dvh) + 12px); width: auto; max-width: calc(100% - 24px); padding: 0; border-radius: 20px; display: flex; flex-direction: column-reverse; align-items: flex-end; }
  .mapkey[hidden] { display: none; }
  .mapkey .keytoggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
  .mapkey .keytoggle::before { content: "?"; font: 700 18px var(--font); color: var(--text); }
  .mapkey.open .keytoggle::before { content: "\00d7"; font-size: 22px; }
  .mapkey.open .keybody, .mapkey.open.min .keybody { display: block; padding: 12px 16px 0; }
}
