:root {
  --bg: #0b1220; --panel: rgba(13, 20, 36, .92); --line: rgba(148, 163, 184, .22);
  --text: #e5edf7; --muted: #94a3b8; --accent: #38bdf8;
  --list: #22c55e; --lease: #a78bfa; --drop: #f43f5e; --open: #f59e0b; --pending: #64748b;
  --vacant: #eab308; --sold: #ec4899; --r311: #fb923c; --gauge: #06b6d4; --alert: #ef4444;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#map { position: fixed; inset: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.top {
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 5;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px);
}
.brand { font-size: 16px; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; padding: 0 6px; white-space: nowrap; }
.brand .logo { border-radius: 7px; display: block; }
.brand .word { font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.brand .word b { color: #22d3ee; font-weight: 800; }
.brand .live { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #86efac; border: 1px solid rgba(134,239,172,.35); border-radius: 99px; padding: 2px 7px 2px 6px; }
.brand .live .dot { width: 6px; height: 6px; }
.dot, .pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: ping 1.8s infinite; display: inline-block; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
/* Header controls share one height and one look. */
:root { --ctl-h: 38px; --ctl-bg: rgba(255,255,255,.05); --ctl-bg-hover: rgba(255,255,255,.09); }
.ico { width: 17px; height: 17px; flex: none; }
button:focus-visible, [role=option]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dd { position: relative; }
.dd-btn {
  height: var(--ctl-h); display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 11px;
  background: var(--ctl-bg); border: 1px solid var(--line); border-radius: 11px; color: var(--text); font-weight: 600; white-space: nowrap;
}
.dd-btn:hover { background: var(--ctl-bg-hover); }
.dd-btn .ico { color: var(--accent); }
.dd-btn .chev { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.dd-btn[aria-expanded="true"] { border-color: var(--accent); }
.dd-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 200px; margin: 0; padding: 6px; list-style: none;
  background: #0f172a; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.dd-menu [role=option] {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px 9px 34px; border-radius: 9px; cursor: pointer; color: var(--text); position: relative;
}
.dd-menu [role=option] .ico { position: absolute; left: 10px; color: var(--accent); }
.dd-menu [role=option]:hover, .dd-menu [role=option]:focus { background: rgba(56,189,248,.12); outline: none; }
.dd-menu [aria-selected=true] { color: var(--accent); font-weight: 700; }
.dd-menu [aria-selected=true]::before { content: ""; position: absolute; left: 13px; top: 50%; width: 10px; height: 6px; margin-top: -5px; border: solid var(--accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.dd-menu [data-area=near][aria-selected=true]::before { display: none; }
.dd-menu .sep { height: 1px; background: var(--line); margin: 5px 6px; }

.seg { display: flex; height: var(--ctl-h); background: var(--ctl-bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-left: auto; gap: 2px; }
.seg button { flex: 1; min-width: 58px; border: 0; background: none; padding: 0 12px; border-radius: 8px; color: #cbd5e1; font-weight: 600; transition: background .15s, color .15s; }
.seg button:hover:not(.on) { background: var(--ctl-bg-hover); color: #fff; }
.seg button.on { background: var(--accent); color: #04121f; box-shadow: 0 2px 8px rgba(56,189,248,.35); }
.icon-btn { height: var(--ctl-h); display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--ctl-bg); padding: 0 12px; border-radius: 11px; font-weight: 600; }
.agent-cta { display: block; margin: 0 0 10px; padding: 9px 10px; border-radius: 10px; background: rgba(56,189,248,.12); color: var(--accent); text-decoration: none; font-weight: 700; font-size: 13px; }
.icon-btn:hover { background: var(--ctl-bg-hover); }
a.icon-btn { text-decoration: none; color: inherit; }
.icon-btn.myhome { border-color: rgba(74,222,128,.5); color: #86efac; }
.icon-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.panel {
  position: fixed; top: calc(var(--top-h, 62px) + 24px); right: 12px; z-index: 6; width: 290px; overflow: auto;
  max-height: calc(100vh - var(--top-h, 62px) - 40px); max-height: calc(100dvh - var(--top-h, 62px) - 40px); /* always fits below the header */
  padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px);
}
.panel h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.panel label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }
.panel select { background: #111a2e; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.panel .chk { justify-content: flex-start; }
.panel em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
/* Map key (Layers panel): swatches drawn like the marks on the map */
#layers { width: 320px; }
.lgroup { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.lgroup:first-of-type { border-top: 0; padding-top: 0; }
.lgroup h4 { display: flex; justify-content: space-between; margin: 2px 0 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lgroup h4 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.panel label.lrow { display: grid; grid-template-columns: 18px 22px 1fr; gap: 8px; align-items: start; justify-content: initial; margin: 8px 0; cursor: pointer; }
.panel label.lrow:first-child { grid-template-columns: 18px 1fr; }
.lrow input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); }
.lname { font-weight: 600; line-height: 1.3; min-width: 0; }
.lname small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 1px; }
.mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: 11.5px; font-weight: 400; color: var(--text2, #cbd5e1); }
.key { list-style: none; margin: 0 0 4px 26px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--text2, #cbd5e1); }
.key li { display: flex; align-items: center; gap: 7px; }
/* listing dots: colored circle with the same white outline as on the map */
.k-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; flex: none; display: inline-block; }
.k-dot.big { width: 15px; height: 15px; }
.k-dot.ring { box-shadow: 0 0 0 3px #fbbf24; }
.k-dot.sm { width: 9px; height: 9px; box-shadow: 0 0 0 1.5px #e0f2fe; }
.k-dot.xs { width: 7px; height: 7px; box-shadow: none; }
.s-gauge { width: 14px; height: 14px; margin: 2px 4px; border-radius: 50%; background: var(--gauge); box-shadow: 0 0 0 2px #e0f2fe; }
.s-311 { position: relative; width: 22px; height: 18px; }
.s-311 b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--r311); left: 3px; top: 3px; }
.s-311 b + b { background: var(--gauge); left: 12px; top: 9px; }
.s-warn { width: 20px; height: 14px; margin-top: 2px; border: 2px dashed var(--alert); background: rgba(239,68,68,.14); border-radius: 3px; }
.s-area { width: 20px; height: 14px; margin-top: 2px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 40%, transparent); border-radius: 2px; }
.row { display: flex; gap: 6px; margin-top: 12px; }
.pill { flex: 1; border: 1px solid var(--line); background: none; padding: 7px; border-radius: 9px; }
.pill.on { background: var(--accent); color: #04121f; border-color: var(--accent); font-weight: 600; }
.hint, .count { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

.feed {
  position: fixed; left: 12px; bottom: 24px; z-index: 5; width: 340px; max-height: 46vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px); overflow: hidden;
}
.feed-head { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 12px 14px; font-weight: 600; text-align: left; }
.badge { background: rgba(255,255,255,.1); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 500; }
.chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.feed.closed .chev { transform: rotate(180deg); }
.feed.closed ol { display: none; }
.feed ol { list-style: none; margin: 0; padding: 0 6px 8px; overflow: auto; }
.feed li { display: flex; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; animation: slidein .35s ease; }
.feed li:hover { background: rgba(255,255,255,.06); }
.feed li .k { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; }
.feed li .t { flex: 1; min-width: 0; }
.feed li .m { color: var(--muted); font-size: 12px; }
.feed li .tag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.notice {
  position: fixed; right: 12px; bottom: 24px; z-index: 4; max-width: 360px; padding: 10px 34px 10px 12px; font-size: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.notice b { color: var(--text); }
.notice button { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 18px; color: var(--muted); }
.toast { position: fixed; top: calc(var(--top-h, 62px) + 24px); left: 50%; transform: translateX(-50%); z-index: 7; background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; font-size: 13px; }

/* flood facts */
.flood { left: 12px; right: auto; width: 360px; z-index: 7; }
.flood .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; color: var(--muted); }
.flood .addr { font-weight: 600; margin: -4px 0 10px; }
.fx { border-top: 1px solid var(--line); padding: 10px 0; }
.fx:first-of-type { border-top: 0; }
.fx h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #04121f; margin-right: 6px; }
.chip.ok { background: #4ade80; } .chip.mid { background: #fbbf24; } .chip.bad { background: #f87171; } .chip.na { background: #94a3b8; }
.storm { display: flex; gap: 10px; margin: 8px 0; }
.storm .chip { flex: none; align-self: flex-start; margin-top: 2px; min-width: 64px; text-align: center; }
.storm small, .flood .note { color: var(--muted); font-size: 12px; }
.flood .note { margin: 6px 0 0; line-height: 1.45; }
.flood .loading { color: var(--muted); padding: 10px 0; }
.pop-actions { display: flex; gap: 6px; margin-top: 10px; }
.pop-actions .btn-flood { margin-top: 0; flex: 1; }
.btn-watch { border: 1px solid #fbbf24; color: #fbbf24; background: rgba(251,191,36,.08); padding: 8px 10px; border-radius: 9px; font-weight: 600; white-space: nowrap; }
.btn-tax { display: block; margin-top: 6px; text-align: center; text-decoration: none; border: 1px solid #4ade80; color: #86efac; background: rgba(74,222,128,.1); font-weight: 700; padding: 8px; border-radius: 9px; }
.btn-video { display: block; margin-top: 6px; text-align: center; text-decoration: none; border: 1px solid #a78bfa; color: #c4b5fd; background: rgba(167,139,250,.1); font-weight: 700; padding: 8px; border-radius: 9px; }
.btn-ask { display: block; margin-top: 6px; text-align: center; text-decoration: none; background: #4ade80; color: #04121f; font-weight: 700; padding: 8px; border-radius: 9px; }
.pop-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding-right: 26px; } /* room for the close × */
.pop-head h4 { margin: 0; }
.pop h4 { padding-right: 0; }
.pop > h4 { padding-right: 26px; }
.deal { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; color: #04121f; }
.deal.buy { background: var(--list); } .deal.lease { background: var(--lease); }
.tag-sample { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.pop .facts { margin-top: 8px; font-size: 13px; color: var(--text); }
.cta-note { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.gauge-trend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.pop .by { margin-top: 6px; font-size: 12px; color: var(--muted); }
.pop .by.mine { color: #fbbf24; font-weight: 600; }
.btn-flood { margin-top: 10px; width: 100%; border: 1px solid var(--gauge); color: var(--gauge); background: rgba(6,182,212,.08); padding: 8px; border-radius: 9px; font-weight: 600; }

/* bell + agent bar */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; }
.nbadge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.agentbar { flex-basis: 100%; order: 10; display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; border-top: 1px solid var(--line); }
.agentbar .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #0b1220; flex: none; }
.agentbar .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.agentbar .who b { font-size: 13px; }
.agentbar .who small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-seg { display: flex; margin-left: auto; background: rgba(255,255,255,.06); border-radius: 9px; padding: 2px; flex: none; }
.mine-seg button { border: 0; background: none; color: var(--muted); padding: 5px 9px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.mine-seg button.on { background: #fbbf24; color: #1c1300; font-weight: 700; }
.agentbar .call { flex: none; text-decoration: none; color: #04121f; background: #4ade80; font-weight: 700; font-size: 12px; padding: 6px 11px; border-radius: 9px; }

/* sign-up + account */
.signup { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.signup h5 { margin: 0 0 4px; font-size: 16px; }
.signup label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); margin: 10px 0 0; align-items: stretch; }
.signup label em { font-style: normal; opacity: .7; }
.signup input:not([type=checkbox]) { background: #0f172a; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 10px; font: inherit; font-size: 16px; }
.signup input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup .consent { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text); font-size: 12px; line-height: 1.4; }
.signup .consent input { margin-top: 2px; width: 16px; height: 16px; flex: none; }
.signup .err { color: #fca5a5; font-size: 13px; margin: 8px 0 0; }
.btn-primary { width: 100%; margin-top: 12px; border: 0; background: var(--accent); color: #04121f; font-weight: 700; padding: 11px; border-radius: 10px; font-size: 15px; }
.btn-primary:disabled { opacity: .6; }
.fx.locked h4 { margin-top: 8px; }
.blur { filter: blur(5px); user-select: none; color: var(--muted); margin: 2px 0 4px; }
.wlist, .nlist { list-style: none; margin: 0; padding: 0; }
.wlist li, .nlist li { display: flex; align-items: center; border-radius: 8px; }
.wlist .go, .nlist .go { flex: 1; text-align: left; border: 0; background: none; padding: 7px 4px; font-size: 13px; color: var(--text); }
.nlist .go small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.nlist li.new { background: rgba(56,189,248,.1); }
.wlist .rm { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.linkish { border: 0; background: none; color: var(--accent); padding: 0; font-size: 12px; text-decoration: underline; }
.flood a { color: var(--accent); }

/* Dialpatch (emergency home pros) */
/* One slim row (about 36px) so it never hides the live feed. */
.dp { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 5px 5px 9px; min-height: 36px; border-radius: 10px;
  background: rgba(249,115,22,.10); border: 1px solid rgba(249,115,22,.38); }
.dp-mark { font-size: 14px; flex: none; }
.dp-text { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.25; color: var(--text2, #cbd5e1); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-text b { color: #fff; font-weight: 700; }
.dp-text u { text-decoration: none; color: #fdba74; font-weight: 700; }
.dp-text:hover u { text-decoration: underline; }
.dp-call { flex: none; text-decoration: none; background: #f97316; color: #1a0a00; font-weight: 800; font-size: 12.5px; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.dp-pin { padding: 0 8px; }
.dp-pin .dp { margin: 0 0 6px; }
.dp-pin.cold .dp { background: rgba(56,189,248,.14); border-color: #38bdf8; }
/* Stays visible even when the feed is collapsed, so every map shows it. */
.feed.closed .dp-pin .dp { margin-bottom: 8px; }

/* popups */
.maplibregl-popup-content { background: #0f172a; color: var(--text); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); min-width: 210px; }
.maplibregl-popup-tip { border-top-color: #0f172a !important; border-bottom-color: #0f172a !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 20px; width: 30px; height: 30px; top: 6px; right: 6px; border-radius: 8px; padding: 0; line-height: 1; }
.maplibregl-popup-close-button:hover { background: rgba(255,255,255,.08); color: #fff; }
.pop h4 { margin: 0 0 2px; font-size: 16px; }
.pop .sub { color: var(--muted); font-size: 12px; }
.pop .ev { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; color: #04121f; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: 12px; }
.pop dt { color: var(--muted); } .pop dd { margin: 0; }
.pop .samp { margin-top: 8px; font-size: 11px; color: var(--muted); }
.maplibregl-ctrl-attrib { background: rgba(11,18,32,.7) !important; color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--muted); }

/* "You are here" (only after the visitor taps Near me) */
.you { width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59,130,246,.25); }

/* live ripple marker */
.ripple { width: 18px; height: 18px; border-radius: 50%; pointer-events: none; }
.ripple::before, .ripple::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid currentColor; animation: rip 1.6s ease-out infinite; }
.ripple::after { animation-delay: .8s; }
@keyframes rip { from { transform: scale(.4); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }

/* phones */
@media (max-width: 640px) {
  .top { top: 8px; left: 8px; right: 8px; gap: 6px; padding: 6px; }
  .brand { font-size: 15px; flex: 1; }
  :root { --ctl-h: 36px; }
  .dd { order: 3; flex: none; }
  .dd-btn { padding: 0 8px 0 9px; gap: 5px; max-width: 150px; }
  .dd-btn #areaLabel { overflow: hidden; text-overflow: ellipsis; }
  .seg { order: 4; flex: 1; min-width: 0; margin-left: 0; }
  .seg button { min-width: 0; padding: 0; font-size: 13px; }
  .icon-btn { padding: 0 10px; }
  .icon-btn .lbl { display: none; }   /* icon-only on phones; buttons keep aria-labels */
  .panel, .flood { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: min(70vh, calc(100dvh - var(--top-h, 92px) - 24px)); border-radius: 16px 16px 0 0; z-index: 8; }
  .flood { max-height: min(60vh, calc(100dvh - var(--top-h, 92px) - 24px)); }
  #layers { width: auto; }
  .feed { left: 8px; right: 8px; bottom: 12px; width: auto; max-height: 38vh; }
  .notice { left: 8px; right: 8px; bottom: auto; top: calc(var(--top-h, 92px) + 16px); max-width: none; }
  .toast { top: calc(var(--top-h, 92px) + 20px); }
  .brand .live { display: none; }
  .agentbar .who small { display: none; }
  .mine-seg button { padding: 5px 7px; }
  .maplibregl-ctrl-bottom-right { bottom: 60px; }
}

/* listing photos: cover on the card, hover preview, gallery */
.pop .cover { display: block; position: relative; width: calc(100% + 28px); margin: -12px -14px 10px; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px 12px 0 0; overflow: hidden; background: #111a2e; }
.pop button.cover { cursor: zoom-in; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-none { display: grid !important; place-items: center; color: #475569; background: linear-gradient(135deg, #111a2e, #1a2540) !important; }
.cover-none span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.pop .cover-none { aspect-ratio: 5 / 1; }
.cover-count { position: absolute; left: 8px; bottom: 8px; background: rgba(2,6,15,.72); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.maplibregl-popup-close-button { background: rgba(2,6,15,.55); color: #e5edf7; z-index: 1; }
.btn-photos { display: block; margin-top: 6px; text-align: center; text-decoration: none; border: 1px solid #fbbf24; color: #fde68a; background: rgba(251,191,36,.08); font-weight: 700; padding: 8px; border-radius: 9px; }
.hover-card { position: fixed; left: 0; top: 0; z-index: 20; width: 220px; pointer-events: none; background: #0f172a; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hover-card .cover { aspect-ratio: 16 / 10; }
.hover-card .cover-none { aspect-ratio: 16 / 6; }
.hc-body { padding: 8px 10px 9px; font-size: 12px; color: var(--muted); }
.hc-body b { color: var(--text); font-size: 14px; }
.gal { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(2,6,15,.97); color: #fff; }
.gal-top { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; min-width: 0; }
.gal-count { font-weight: 800; white-space: nowrap; }
.gal-title { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; font-size: 20px; line-height: 1; }
.gal-btn:hover { background: rgba(255,255,255,.2); }
.gal-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; user-select: none; }
.gal-img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.gal-prev, .gal-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; background: rgba(2,6,15,.6); }
.gal-prev { left: 10px; } .gal-next { right: 10px; }
.gal-cap { min-height: 40px; padding: 10px 16px 16px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 639px) {
  .pop .cover { aspect-ratio: 21 / 9; }
  .pop .cover-none { aspect-ratio: 6 / 1; }
  /* Short phones: the card scrolls instead of sliding under the header. */
  .maplibregl-popup-content { max-height: calc(100dvh - 250px); overflow-y: auto; overscroll-behavior: contain; }
  .gal-btn { width: 40px; height: 40px; }
  .gal-prev { left: 6px; } .gal-next { right: 6px; }
}
