:root { --night:#071417; --panel:#0c1f24; --line:#1d3a40; --aqua:#56DFEA; --aqua-2:#83EDF4; --gold:#D6B35A; --frost:#A7B5BA; --dim:#5E6E73; --official:#77B8E8; --text:#e9f4f5; --muted:#a7b5ba; }
* { box-sizing: border-box; }
html, body.map-app { margin: 0; height: 100%; background: var(--night); color: var(--text); font: 15px/1.45 Inter, "Segoe UI", Roboto, system-ui, -apple-system, sans-serif; overflow: hidden; }
.sr-only, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--aqua); color: var(--night); padding: 8px 12px; border-radius: 8px; }
#map { position: fixed; inset: 0; }
.map-top { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 10; display: flex; gap: 8px; align-items: center; }
.map-brand { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px; background: rgba(7,20,23,.92); color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .12em; font-size: 12px; border: 1px solid var(--line); }
.map-brand span { display: none; }
.map-search { position: relative; flex: 1; }
.map-search input { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(7,20,23,.94); color: var(--text); font-size: 16px; }
.map-search input::placeholder { color: var(--muted); }
.map-search input:focus { outline: 2px solid var(--aqua); outline-offset: 1px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; max-height: 50vh; overflow: auto; }
.search-results button { width: 100%; text-align: left; padding: 10px; background: none; border: 0; color: var(--text); border-radius: 8px; font-size: 15px; }
.search-results button:hover, .search-results button:focus { background: #12303a; }
.search-results .none { padding: 10px; color: var(--muted); font-size: 14px; }
.member-pill { padding: 10px 12px; border-radius: 14px; background: rgba(7,20,23,.92); border: 1px solid var(--line); color: var(--aqua-2); text-decoration: none; font-size: 13px; white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.member-pill.signed-in { border-color: var(--gold); color: var(--text); }
.chips { position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 54px); left: 10px; right: 10px; z-index: 9; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(7,20,23,.9); color: var(--text); font-size: 14px; }
.chip[aria-pressed="true"] { border-color: var(--aqua); color: var(--aqua-2); background: #0e2a30; }
.chip-note { position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 98px); left: 10px; right: 10px; z-index: 9; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(12,31,36,.96); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.feedback-fab { position: fixed; left: 10px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 11; padding: 9px 12px; border-radius: 999px; background: rgba(7,20,23,.92); border: 1px solid var(--line); color: var(--frost); text-decoration: none; font-size: 13px; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; background: var(--panel); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; max-height: 78vh; transform: translateY(calc(100% - 84px - env(safe-area-inset-bottom))); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -12px 30px rgba(0,0,0,.35); }
.sheet-open .sheet { transform: translateY(0); }
.sheet-open .feedback-fab { display: none; }
.sheet-handle { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 18px 14px; background: none; border: 0; color: var(--text); text-align: left; }
.grip { grid-column: 1 / -1; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.sheet-title { font-weight: 700; font-size: 17px; }
.sheet-count { color: var(--aqua-2); font-weight: 700; }
.sheet-body { padding: 0 18px 18px; overflow: auto; max-height: calc(78vh - 70px); }
.sheet-status { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.signal-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.signal-row { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #0a1a1e; color: var(--text); text-align: left; }
.signal-row span { display: grid; } .signal-row small { color: var(--muted); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid #071417; vertical-align: middle; }
.dot.recent { background: var(--aqua); } .dot.ageing { background: var(--frost); opacity: .8; } .dot.historical { background: var(--dim); }
.dot.corroborated { border-color: var(--gold); }
.legend .dot.corroborated { background: var(--aqua); }
.ring.official { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--official); vertical-align: middle; }
.official-list h3 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--official); margin: 14px 0 8px; }
.official { border: 1px solid #2a4a5e; border-left: 3px solid var(--official); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.official small { display: block; color: var(--muted); } .official p { margin: 6px 0; font-size: 14px; } .official a { color: var(--official); }
.legend { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.legend summary { cursor: pointer; color: var(--aqua-2); }
.legend ul { padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.legend p { font-size: 13px; color: var(--muted); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.btn { display: inline-block; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0e2328; color: var(--text); text-decoration: none; font-size: 14px; cursor: pointer; }
.btn.primary { background: var(--aqua); color: var(--night); border-color: var(--aqua); font-weight: 700; }
.history-toggle { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.attribution { font-size: 12px; color: var(--dim); }
.detail { position: fixed; left: 10px; right: 10px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 20; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.detail-close { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.detail-eyebrow { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--aqua-2); }
.detail h2 { margin: 4px 0 10px; font-size: 20px; }
.detail-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.detail-facts dt { color: var(--muted); } .detail-facts dd { margin: 0; }
.detail-note { font-size: 13px; color: var(--muted); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-form fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; display: grid; gap: 6px; font-size: 14px; }
.report-form textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #0a1a1e; color: var(--text); padding: 8px; font: inherit; }
.report-form .role { display: block; font-size: 14px; margin: 6px 0; }
.fine, .detail-status { font-size: 13px; color: var(--muted); }
.maplibregl-ctrl-top-right { top: auto; bottom: calc(140px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .map-brand span { display: inline; }
  .map-top { right: auto; width: min(640px, 60vw); }
  .chips { right: auto; width: min(640px, 60vw); }
  .chip-note { right: auto; width: min(640px, 60vw); }
  .sheet { left: auto; right: 16px; top: 16px; bottom: 16px; width: 380px; max-height: none; border-radius: 18px; border: 1px solid var(--line); transform: none; }
  .sheet-body { max-height: calc(100% - 70px); }
  .sheet-handle .grip { display: none; }
  .feedback-fab { bottom: 16px; }
  .detail { left: 16px; right: auto; width: 420px; bottom: 16px; }
  .maplibregl-ctrl-top-right { top: 10px; bottom: auto; right: 410px; }
}
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
