:root {
  --blue: #1E40AF;
  --blue-soft: #3B82F6;
  --blue-deep: #1E3A8A;
  --blue-ink: #1E3A8A;
  --ink: #1E293B;
  --muted: #475569;
  --muted-soft: #64748B;
  --line: rgba(148, 163, 184, 0.36);
  --card: rgba(255, 255, 255, 0.96);
  --glass: rgba(255, 255, 255, 0.94);
  --glass-strong: rgba(255, 255, 255, 0.98);
  --surface: #F8FAFC;
  --surface-blue: #EFF6FF;
  --warning: #F59E0B;
  --success: #16A34A;
  --danger: #DC2626;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.09);
  --shadow-button: 0 8px 18px rgba(30, 64, 175, .18);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --sheet-visible: 64px;
  --bottom-nav-height: 76px;
  --mobile-topbar-height: 104px;
  --panel-bg: rgba(255, 255, 255, .96);
  --panel-border: rgba(148, 163, 184, .30);
}

.mobile-app,
.mobile-app * { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
.mobile-app, .mobile-app .map-page { width: 100%; min-height: 100dvh; height: 100dvh; margin: 0; overflow: hidden; }
body {
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mobile-app button,
.mobile-app input,
.mobile-app select { font: inherit; }
.mobile-app button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-app input,
.mobile-app select {
  -webkit-tap-highlight-color: transparent;
}

.mobile-app button:focus-visible,
.mobile-app input:focus-visible,
.mobile-app select:focus-visible,
.sheet-grabber:focus-visible,
.layer-sample-info summary:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .72);
  outline-offset: 2px;
}

.mobile-app button[aria-pressed="true"],
.mobile-app button[aria-selected="true"] {
  border-color: rgba(30, 64, 175, .40);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-app *,
  .mobile-app *::before,
  .mobile-app *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

.map-page {
  position: relative;
  isolation: isolate;
}

.mobile-map {
  position: absolute;
  inset: 0;
  background: #dbeafe;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.exact-point-canvas {
  position: absolute;
  inset: 0;
  z-index: 18;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.exact-point-canvas[hidden] {
  display: none;
}

.exact-point-canvas.drawing {
  opacity: .55;
}

.exact-point-canvas.stale {
  opacity: 0;
}

.map-status-badge {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top)) + 74px);
  left: 14px;
  z-index: 47;
  max-width: calc(100vw - 112px);
  padding: 8px 11px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.map-status-badge.error {
  color: #991b1b;
  border-color: rgba(220, 38, 38, .18);
  background: rgba(254, 242, 242, .94);
}

.map-status-badge[hidden] {
  display: none;
}

.district-summary-marker {
	display: grid;
	grid-template-rows: auto auto;
	place-items: center;
	width: 46px;
	height: 34px;
	padding: 4px 5px;
  border: 1px solid rgba(255, 255, 255, .76);
	border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.56), rgba(255,255,255,0) 42%),
    linear-gradient(135deg, rgba(82, 147, 255, var(--marker-alpha, .52)), rgba(13, 42, 99, .70)),
    rgba(255,255,255,.22);
	box-shadow:
    inset 0 1px 0 rgba(255,255,255,.68),
    0 8px 20px rgba(15, 55, 118, var(--marker-shadow, .14)),
    0 0 0 4px rgba(37, 99, 235, .055);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  font-weight: 950;
  line-height: 1;
  transform: scale(var(--marker-scale, .86));
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
}

.district-summary-marker strong {
	display: block;
	margin-top: 0;
	font-size: 10.5px;
  letter-spacing: 0;
}

.district-summary-marker span {
	display: block;
	max-width: 40px;
	margin-top: 2px;
	overflow: hidden;
	font-size: 8.8px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-bubble {
  display: grid;
  place-items: center;
  width: var(--cluster-size);
  min-width: var(--cluster-size);
  height: var(--cluster-size);
  min-height: var(--cluster-size);
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 999px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.52), rgba(255,255,255,0) 38%),
    linear-gradient(135deg, rgba(37,99,235,.82), rgba(15,58,115,.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 12px 28px rgba(15,35,70,.24);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

.heat-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(37, 99, 235, calc(.22 + var(--heat) * .56));
  box-shadow: 0 0 calc(18px + var(--heat) * 18px) rgba(37,99,235,.42);
}

.my-location-marker {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .18);
}

.my-location-marker::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(37, 99, 235, .34);
  border-radius: inherit;
  animation: my-location-pulse 1.6s ease-out infinite;
}

.my-location-marker span {
  position: absolute;
  inset: 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 4px 14px rgba(37,99,235,.38);
}

@keyframes my-location-pulse {
  0% { transform: scale(.72); opacity: .85; }
  100% { transform: scale(1.8); opacity: 0; }
}

.peek-dismiss-layer {
  position: absolute;
  inset: 0;
  z-index: 27;
  background: rgba(255, 255, 255, 0);
  pointer-events: auto;
  touch-action: manipulation;
}

.peek-dismiss-layer[hidden] {
  display: none;
}

.map-peek-card {
  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: clamp(260px, 76vw, 340px);
  max-width: calc(100vw - 24px);
  z-index: 99999;
  isolation: isolate;
  pointer-events: auto;
  transform: translate3d(-9999px, -9999px, 0);
  opacity: 0;
  transition: opacity 160ms ease;
  contain: layout paint style;
  touch-action: manipulation;
}

.map-peek-card.smart-popover {
  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: clamp(260px, 76vw, 340px);
  max-width: calc(100vw - 24px);
  z-index: 99999;
  transform: translate3d(-9999px, -9999px, 0);
}

@media (max-width: 374px) {
  .map-peek-card {
    left: 10px;
    right: 86px;
  }
}

.map-peek-card.show {
  opacity: 1;
}

.map-peek-card.smart-popover.show {
  opacity: 1;
}

.map-peek-card.compact {
  left: 12px;
  right: auto;
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: min(230px, calc(100vw - 132px));
}

body[data-mobile-sheet-state="half"] .map-peek-card.compact {
  bottom: calc(430px + env(safe-area-inset-bottom));
}

body[data-mobile-sheet-state="full"] .map-peek-card.compact {
  display: none;
}

.map-peek-card[hidden] {
  display: none;
}

.peek-card {
  position: relative;
  overflow: auto;
  max-height: min(260px, calc(100dvh - 284px));
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.smart-popover .peek-card {
  isolation: isolate;
  overflow-y: auto;
  width: 100%;
  max-height: min(46dvh, var(--smart-popover-max-height, 320px));
  padding: 12px;
  border-color: var(--panel-border);
  border-radius: var(--radius-lg);
  color: #08224d;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.smart-popover .peek-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: var(--popover-arrow-left, 50%);
  top: var(--popover-arrow-top, -7px);
  width: 14px;
  height: 14px;
  border-left: 1px solid rgba(255,255,255,.78);
  border-top: 1px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.90);
  transform: translateX(-50%) rotate(45deg);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
}

.smart-popover .peek-card > * {
  position: relative;
  z-index: 2;
}

.smart-popover[data-placement="top"] .peek-card::after {
  border: 0;
  border-right: 1px solid rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(255,255,255,.78);
}

.smart-popover[data-placement="left"] .peek-card::after,
.smart-popover[data-placement="right"] .peek-card::after {
  top: var(--popover-arrow-top, 50%);
}

.smart-popover[data-placement="center"] .peek-card::after,
.smart-popover .overlap-peek-card::after {
  content: none;
  display: none;
}

.smart-popover-drag {
  cursor: grab;
  touch-action: none;
}

.smart-popover .peek-title-row {
  padding-right: 0;
}

.map-peek-card.compact .peek-card {
  max-height: none;
  padding: 9px 11px;
  border-radius: 18px;
  overflow: hidden;
}

.map-peek-card.compact .peek-title-row {
  padding-right: 0;
  gap: 8px;
}

.map-peek-card.compact .peek-title-row strong {
  font-size: 12px;
}

.map-peek-card.compact .peek-title-row span {
  padding: 3px 6px;
}

.map-peek-card.compact .peek-sub {
  margin: 4px 0 0;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peek-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(238, 244, 255, .92);
  box-shadow: none;
  font-size: 22px;
  font-weight: 900;
}

.peek-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255,255,255,.58), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,0) 54%);
  mix-blend-mode: screen;
}

.mobile-app .amap-info-contentContainer,
.mobile-app .amap-info-sharp {
  display: none !important;
}

.scan-peek-card,
.poi-peek-card {
  max-height: min(46dvh, var(--smart-popover-max-height, 320px));
  background: var(--panel-bg);
}

.peek-kicker {
  width: fit-content;
  margin-bottom: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, .34);
  font-size: 11px;
  font-weight: 950;
}

.peek-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-right: 44px;
}

.peek-title-row strong {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: #08224d;
  font-size: 15px;
  line-height: 1.25;
}

.peek-title-row span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(219, 234, 254, .38);
  color: #0b2f68;
  font-size: 11px;
  font-weight: 950;
}

.peek-title-row .remote-goods {
  color: #111827;
  background: rgba(17, 24, 39, .08);
}

.peek-title-row .primary-goods {
  color: #047857;
  background: rgba(16, 185, 129, .14);
}

.peek-sub,
.peek-address {
  margin: 4px 0 0;
  color: #385575;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.28;
}

.peek-address {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.scan-peek-lines {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.scan-peek-lines p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.16;
  padding: 4px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
}

.scan-peek-lines b {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-peek-card {
  display: grid;
  gap: 8px;
}

.smart-peek-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.scan-peek-card .smart-peek-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.smart-peek-metrics span {
  min-width: 0;
  padding: 8px 7px;
  border-radius: 13px;
  background: rgba(219,234,254,.58);
}

.smart-peek-metrics b {
  display: block;
  overflow: hidden;
  color: #0b2f68;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-peek-metrics em {
  display: block;
  margin-top: 3px;
  color: #536b8d;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.smart-peek-lines {
  display: grid;
  gap: 5px;
}

.smart-peek-lines p {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.48);
  color: #506987;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.24;
}

.smart-peek-lines b {
  overflow: hidden;
  color: #08224d;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-record-list {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(37, 99, 235, .10);
  border-radius: 14px;
  background: rgba(239, 246, 255, .48);
}

.peek-record-list > strong {
  color: #0b2f68;
  font-size: 11px;
  font-weight: 1000;
}

.peek-record-row {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 11px;
  background: rgba(255,255,255,.70);
}

.peek-record-row b,
.peek-record-row span,
.peek-record-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-record-row b {
  color: #08224d;
  font-size: 11px;
  font-weight: 1000;
}

.peek-record-row span,
.peek-record-row em,
.peek-detail-note {
  margin: 0;
  color: #506987;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.overlap-list {
  display: grid;
  gap: 7px;
  max-height: 168px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.overlap-list button {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 14px;
  color: #08224d;
  background: rgba(255,255,255,.58);
  text-align: left;
}

.overlap-list b,
.overlap-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlap-list b {
  font-size: 12px;
  font-weight: 1000;
}

.overlap-list span {
  color: #46617f;
  font-size: 10.5px;
  font-weight: 900;
}

.scan-point-sheet-detail {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(37, 99, 235, .13);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
}

.point-detail-view {
  min-height: max-content;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
}

.scan-point-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.scan-point-sheet-head h3 {
  margin: 2px 0 3px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.scan-point-sheet-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.scan-point-sheet-head button {
  flex: 0 0 auto;
  align-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.92);
  font-size: 12px;
  font-weight: 950;
}

.point-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.point-detail-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.94);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.point-detail-actions button.primary {
  color: #fff;
  border-color: rgba(37,99,235,.42);
  background: linear-gradient(135deg, #2563eb, #123a73);
}

.scan-point-sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scan-point-sheet-tags span {
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(219,234,254,.55);
  font-size: 11px;
  font-weight: 950;
}

.peek-warning {
  margin: 6px 0 0;
  padding: 7px 9px;
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: 12px;
  color: #92400e;
  background: rgba(255, 251, 235, .72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.peek-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.poi-peek-lines {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.poi-peek-lines p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  padding: 5px 7px;
  border-radius: 11px;
  background: rgba(255,255,255,.62);
}

.poi-peek-lines b {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-grid span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 12px;
  color: #64748b;
  background: rgba(255,255,255,.24);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.peek-grid b {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #0f172a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-grid.compact b {
  display: inline;
  margin-left: 4px;
}

.district-peek-note {
  margin: 9px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 14px;
  color: #375277;
  background: rgba(255,255,255,.24);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.district-peek-note.compact {
  margin-top: 7px;
  padding: 7px 9px;
  font-size: 11px;
}

.district-peek-top {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.district-peek-top span {
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 11px;
  color: #375277;
  background: rgba(255,255,255,.20);
  font-size: 10.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 7px;
  margin-top: 6px;
}

.smart-popover .peek-actions {
  position: sticky;
  bottom: -2px;
  z-index: 3;
  padding-top: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.94) 30%, rgba(255,255,255,.94));
}

.peek-actions button {
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(239, 246, 255, .56);
  font-size: 11px;
  font-weight: 950;
  touch-action: manipulation;
}

.peek-actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: var(--shadow-button);
}

.peek-actions button.primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: var(--shadow-button);
}

.scan-peek-card .peek-actions button:first-child {
  color: var(--blue-deep);
  background: rgba(239, 246, 255, .70);
  box-shadow: none;
}

.poi-peek-card .peek-actions button:first-child {
  color: var(--blue-deep);
  background: rgba(239, 246, 255, .82);
  box-shadow: none;
}

.mobile-topbar {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  min-height: 72px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(245,249,255,.93)),
    rgba(255,255,255,.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
}

.mobile-topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--blue);
  opacity: .92;
}

.mobile-topbar strong {
  display: block;
  color: var(--blue-ink);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0;
}

.mobile-topbar span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-topbar .mobile-data-meta {
  display: block;
  max-width: min(calc(100vw - 110px), 520px);
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

#mobileFilterOpen {
  min-width: 62px;
  padding: 0 10px;
  font-size: 15px;
}

.mobile-topbar button,
.mobile-map-tools button,
.mobile-panel header button,
.mobile-panel footer button,
#poiSearch {
  border: 1px solid rgba(30, 64, 175, .18);
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  box-shadow: var(--shadow-button);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.mobile-topbar button:active,
.mobile-map-tools button:active,
.mobile-panel header button:active,
.mobile-panel footer button:active,
#poiSearch:active {
  background: var(--blue-deep);
}

.mobile-map-tools {
  position: fixed;
  right: 12px;
  top: calc(max(8px, env(safe-area-inset-top)) + 98px);
  z-index: 44;
  display: grid;
  gap: 10px;
}

.mobile-map-tools button {
  min-width: 62px;
  color: var(--blue-deep);
  border: 1px solid rgba(255, 255, 255, .76);
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(239,246,255,.92)),
    rgba(255,255,255,.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.mobile-locate-button {
  position: fixed;
  right: 14px;
  bottom: calc(154px + env(safe-area-inset-bottom));
  z-index: 44;
  display: grid;
  grid-template-rows: 22px 13px;
  gap: 1px;
  place-items: center;
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  color: var(--blue-deep);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.93)),
    rgba(255,255,255,.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.mobile-locate-button.active {
  color: #fff;
  border-color: rgba(37,99,235,.28);
  background: var(--blue);
}

.mobile-locate-button.located {
  color: var(--blue-deep);
  border-color: rgba(37,99,235,.26);
  background: #DBEAFE;
}

.mobile-locate-button .locate-icon {
  display: block;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1;
}

.mobile-locate-button .locate-label {
  display: block;
  font-size: 9.5px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.mobile-locate-button.loading .locate-icon {
  animation: locate-spin .9s linear infinite;
}

.mobile-locate-button.error {
  color: #991b1b;
  border-color: rgba(220,38,38,.22);
}

@keyframes locate-spin {
  to { transform: rotate(360deg); }
}

.map-legend {
  position: fixed;
  left: 12px;
  bottom: calc(154px + env(safe-area-inset-bottom));
  z-index: 31;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  max-width: min(270px, calc(100vw - 88px));
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  color: #375277;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-soft);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1.15;
  pointer-events: none;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.map-legend.hidden-by-detail,
.map-legend[hidden] {
  display: none;
}

.map-legend span,
.map-legend b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.map-legend b {
  color: var(--blue-deep);
}

.map-legend small {
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

.map-legend .legend-sample-mini {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(219,234,254,.70);
  white-space: nowrap;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15,35,70,.18);
}

.legend-dot.primary { background: #2563eb; }
.legend-dot.remote { background: #111827; }
.legend-dot.mine { background: #38bdf8; }

body[data-mobile-sheet-state="full"] .mobile-map-tools {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(14px, -8px, 0) scale(.96);
}

body[data-mobile-sheet-state="full"] .mobile-locate-button,
body[data-mobile-sheet-state="full"] .map-legend {
  opacity: 0;
  pointer-events: none;
}

.mobile-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  z-index: 35;
  height: min(72vh, calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  min-height: 390px;
  overflow: hidden;
  padding: 0 12px 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(245,249,255,.93)),
    rgba(255,255,255,.96);
  box-shadow: 0 22px 60px rgba(10, 32, 70, .16), inset 0 1px 0 rgba(255,255,255,.68);
  backdrop-filter: blur(30px) saturate(1.45);
  -webkit-backdrop-filter: blur(30px) saturate(1.45);
  transform: translate3d(0, calc(100% - var(--sheet-visible)), 0);
  will-change: transform;
  transition: transform 260ms cubic-bezier(.2,.82,.2,1);
  contain: layout paint;
  touch-action: pan-y;
}

.mobile-sheet.dragging {
  transition: none;
}

.mobile-sheet[data-sheet-state="collapsed"] {
  --sheet-visible: 64px;
}

.mobile-sheet[data-sheet-state="collapsed"] {
  padding-bottom: 0;
}

.mobile-sheet[data-sheet-state="collapsed"] .sheet-grabber {
  min-height: 64px;
  gap: 5px;
  padding: 7px 0 6px;
  border-bottom: 0;
}

.mobile-sheet[data-sheet-state="collapsed"] .sheet-scroll {
  visibility: hidden;
  pointer-events: none;
}

.mobile-sheet[data-sheet-state="half"] {
  --sheet-visible: min(350px, 48vh);
}

body[data-mobile-sheet-state="half"] .mobile-locate-button,
body[data-mobile-sheet-state="half"] .map-legend {
  bottom: calc(430px + env(safe-area-inset-bottom));
}

.mobile-sheet[data-sheet-state="full"] {
  --sheet-visible: min(72vh, calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
}

.mobile-sheet.point-detail-mode {
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 6px);
  height: min(78vh, calc(100dvh - var(--mobile-topbar-height) - var(--bottom-nav-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 10px));
  min-height: 0;
  z-index: 45;
}

.mobile-sheet.point-detail-mode[data-sheet-state="full"] {
  --sheet-visible: 100%;
}

.mobile-sheet.point-detail-mode .sheet-grabber {
  min-height: 66px;
  padding: 8px 0 7px;
}

.mobile-sheet.point-detail-mode .sheet-scroll {
  height: calc(100% - 66px);
  padding: 12px 0 calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-sheet.point-detail-mode .sheet-summary,
.mobile-sheet.point-detail-mode .sheet-quick-actions,
.sheet-summary[hidden],
.sheet-quick-actions[hidden] {
  display: none;
}

.sheet-grabber {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 9px 0 8px;
  border-bottom: 1px solid rgba(145, 162, 190, .18);
  background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,255,255,.28));
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.sheet-grabber:active {
  cursor: grabbing;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
  opacity: .86;
}

.sheet-collapsed-line {
  display: grid;
  gap: 3px;
  justify-items: center;
  overflow: visible;
  max-width: calc(100vw - 72px);
  margin: 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 20px;
  color: var(--blue-ink);
  background: var(--panel-bg);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  line-height: 1.28;
  white-space: normal;
}

.mobile-sheet[data-sheet-state="collapsed"] .sheet-collapsed-line {
  max-width: calc(100vw - 54px);
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.18;
  white-space: nowrap;
}

.sheet-collapsed-line span {
  max-width: 100%;
}

.sheet-line-main {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-sheet[data-sheet-state="collapsed"] .sheet-line-main {
  max-width: 100%;
}

.mobile-sheet[data-sheet-state="collapsed"] .sheet-line-meta {
  display: none;
}

.sheet-line-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 6px;
  color: #375277;
  font-size: 11px;
  line-height: 1.18;
}

.sheet-line-meta b {
  display: inline-block;
  font-weight: 950;
  white-space: nowrap;
}

.sheet-scroll {
  height: calc(100% - 84px);
  overflow: auto;
  padding: 13px 0 calc(168px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 20px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metric strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

button.metric:active {
  transform: translateY(1px);
}

.sheet-content {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sheet-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.sheet-quick-actions button {
  min-height: 44px;
  border: 1px solid rgba(37, 99, 235, .13);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(244, 248, 255, .92);
  font-size: 13px;
  font-weight: 950;
}

.sheet-primary-action {
  width: 100%;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 950;
  box-shadow: var(--shadow-button);
}

.mobile-card,
.mobile-list-row {
  padding: 15px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: 0 10px 24px rgba(15, 35, 70, .075);
}

.mobile-card h3 {
  margin: 0 0 10px;
  color: var(--blue-ink);
  font-size: 18px;
}

.mobile-list-row {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

button.mobile-list-row {
  width: 100%;
  min-height: 0;
  color: inherit;
  text-align: left;
}

.mobile-list-row.clickable {
  cursor: pointer;
}

.district-quick-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.district-quick-row button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
  font-size: 12px;
  font-weight: 950;
}

.map-mode-state {
  padding: 12px;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 18px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.88);
  font-size: 13px;
  font-weight: 950;
}

.metric-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
}

.metric-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.metric-detail-head h3 {
  margin: 3px 0 4px;
  color: var(--blue-ink);
  font-size: 19px;
  line-height: 1.15;
}

.metric-detail-head p,
.metric-detail-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.metric-detail-head button,
.metric-detail-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 950;
}

.metric-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-detail-grid span {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.58);
}

.metric-detail-grid b {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.metric-detail-grid em {
  display: block;
  margin-top: 4px;
  color: #48617f;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.metric-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-detail-actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
}

.metric-analysis-grid {
  display: grid;
  gap: 9px;
}

.metric-analysis-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 16px;
  background: rgba(255,255,255,.50);
}

.metric-analysis-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 950;
}

.metric-analysis-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.metric-analysis-list {
  display: grid;
  gap: 6px;
}

.metric-analysis-row {
  display: grid;
  gap: 4px;
}

.metric-analysis-row div,
.metric-rank-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: #405675;
  font-size: 11px;
  font-weight: 900;
}

.metric-analysis-row span,
.metric-rank-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-analysis-row b,
.metric-rank-row b {
  flex: 0 0 auto;
  color: var(--ink);
  white-space: nowrap;
}

.metric-analysis-row i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.metric-analysis-empty,
.metric-rank-current {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.metric-rank-row {
  min-height: 28px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(255,255,255,.34);
}

.metric-rank-row.active {
  color: #fff;
  background: var(--blue);
}

.metric-rank-row.active b {
  color: #fff;
}

.metric-inline-action {
  min-height: 44px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.86);
  font-size: 12px;
  font-weight: 950;
}

.mobile-list-row strong {
  font-size: 16px;
}

.mobile-list-row span,
.mobile-list-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.data-loading-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, .15);
  border-radius: 17px;
  color: var(--blue-ink);
  background: rgba(239, 246, 255, .92);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.data-loading-note button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.applied-filter-strip,
.filter-empty-state {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 21px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, .80), rgba(255,255,255,.94));
  box-shadow: 0 10px 24px rgba(15, 35, 70, .075);
}

.applied-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--blue-ink);
  font-weight: 950;
}

.applied-filter-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.applied-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.applied-filter-chips span,
.applied-highlight-row span {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 950;
}

.applied-highlight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.applied-highlight-row button,
.filter-empty-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.88);
  font-size: 12px;
  font-weight: 950;
}

.filter-empty-state {
  border-color: rgba(234, 88, 12, .18);
  background: linear-gradient(135deg, rgba(255, 237, 213, .82), rgba(255,255,255,.94));
}

.filter-empty-state strong {
  color: #9a3412;
  font-size: 16px;
}

.filter-empty-state p {
  margin: 0;
  color: #7c5b42;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.filter-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-empty-actions button:disabled {
  opacity: .45;
}

.mobile-tabs {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 46;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 28px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.mobile-tabs button {
  min-height: 46px;
  border-radius: 22px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.mobile-tabs button.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(30, 64, 175, .22);
}

.tab-placeholder {
  display: grid;
  gap: 10px;
}

.tab-placeholder .placeholder-label {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 950;
}

.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
}

.mobile-panel.open { display: grid; }

.mobile-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 13px;
  border-bottom: 1px solid rgba(135, 154, 184, .20);
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 26px rgba(15, 35, 70, .07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-panel header strong {
  color: var(--blue-ink);
  font-size: 20px;
  letter-spacing: 0;
}
.mobile-panel header button {
  color: var(--blue-deep);
  background: rgba(238, 244, 255, .9);
  border: 1px solid rgba(37, 99, 235, .12);
  box-shadow: none;
}

.panel-body {
  overflow: auto;
  padding: 16px 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.panel-body label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink);
  font-weight: 900;
}

.panel-body label span {
  color: var(--muted);
  font-size: 13px;
}

.panel-body select,
.panel-body input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(135, 154, 184, .25);
  border-radius: 17px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  outline: none;
}

.panel-body select:focus,
.panel-body input:focus,
.district-search input:focus {
  border-color: rgba(37, 99, 235, .48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.panel-body.switches label {
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  border: 1px solid rgba(135, 154, 184, .20);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}

.layer-mode-fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(135,154,184,.20);
  border-radius: 20px;
  background: rgba(255,255,255,.84);
  box-shadow: var(--shadow-soft);
}

.layer-mode-fieldset legend {
  padding: 0 6px;
  color: var(--blue-ink);
  font-size: 14px;
  font-weight: 950;
}

.panel-body.switches .layer-mode-fieldset label {
  margin: 0;
  box-shadow: none;
}

.layer-sample-info {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 18px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.86);
  font-size: 13px;
  font-weight: 900;
}

.layer-sample-info summary {
  cursor: pointer;
  font-weight: 950;
}

.layer-sample-info p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.mobile-panel footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.90);
  border-top: 1px solid rgba(135, 154, 184, .20);
  box-shadow: 0 -12px 30px rgba(15, 35, 70, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-panel footer button,
#poiSearch {
  width: 100%;
}

.mobile-panel footer button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.filter-v2-body {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
}

.filter-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(135, 154, 184, .20);
  border-radius: 24px;
  background: rgba(255,255,255,.90);
  box-shadow: 0 14px 34px rgba(15, 35, 70, .08);
}

.filter-section h2 {
  margin: 0;
  color: var(--blue-ink);
  font-size: 18px;
  line-height: 1.1;
}

.filter-current {
  border-color: rgba(37,99,235,.18);
  background: linear-gradient(135deg, rgba(37,99,235,.13), rgba(255,255,255,.94));
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  max-width: 100%;
  padding: 0 9px 0 13px;
  border: 1px solid rgba(37,99,235,.22);
  border-radius: 999px;
  color: var(--blue-deep);
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(37, 99, 235, .08);
}

.filter-chip button {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  color: var(--blue-deep);
  background: rgba(255,255,255,.78);
}

.filter-search {
  margin: 0;
}

.filter-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.filter-date-range[hidden] {
  display: none;
}

.filter-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.filter-option-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-option {
  min-width: 0;
  min-height: 46px;
  padding: 0 11px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 17px;
  color: var(--blue-deep);
  background: rgba(248, 251, 255, .94);
  font-size: 14px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-option.full-span {
  grid-column: 1 / -1;
}

.filter-option.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}

.filter-option.more-note {
  grid-column: 1 / -1;
  color: var(--muted);
  background: #fff;
  pointer-events: none;
}

.prize-options {
  grid-template-columns: 1fr;
}

.prize-options .filter-option {
  height: auto;
  min-height: 48px;
  padding: 10px 12px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.district-page {
  display: grid;
  gap: 13px;
  min-height: 0;
}

.district-page-head {
  display: grid;
  gap: 9px;
  padding: 3px 2px 0;
}

.section-kicker {
  display: block;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .10em;
}

.district-page-head h3 {
  margin: 4px 0 4px;
  color: var(--blue-ink);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.district-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.district-page-head p span {
  display: block;
}

.district-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.district-head-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, .15);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.90);
  font-size: 12px;
  font-weight: 950;
}

.district-search {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.district-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(135, 154, 184, .24);
  border-radius: 18px;
  padding: 0 14px;
  background: rgba(255,255,255,.94);
  outline: none;
}

.district-sort {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 999px;
  background: rgba(238, 244, 255, .82);
}

.district-sort.disabled-note {
  display: block;
  grid-template-columns: none;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.district-sort button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--blue-deep);
  background: transparent;
  font-size: 13px;
  font-weight: 950;
}

.district-sort button.active {
  color: #fff;
  border-color: transparent;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(30, 64, 175, .22);
}

.district-total-card,
.district-card {
  border: 1px solid rgba(135, 154, 184, .20);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.district-total-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(255,255,255,.34) 44%, rgba(219,234,254,.24)),
    rgba(255,255,255,.26);
}

.district-total-card span,
.district-status,
.district-result-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.district-total-card strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-ink);
  font-size: 23px;
  letter-spacing: 0;
}

.district-total-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.district-total-grid b {
  display: block;
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid rgba(37, 99, 235, .10);
  border-radius: 16px;
  color: var(--blue-deep);
  background: rgba(238, 244, 255, .42);
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
}

.district-card-list {
  display: grid;
  gap: 12px;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
  min-width: 0;
}

.district-card {
  display: grid;
  gap: 11px;
  position: relative;
  overflow: hidden;
  padding: 15px;
  min-width: 0;
}

.district-card.highlighted {
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 16px 38px rgba(37, 99, 235, .18);
}

.district-card.highlighted::before,
.district-card.filtered::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
}

.district-card.filtered {
  border-color: rgba(18, 58, 115, .75);
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: 0 18px 42px rgba(18, 58, 115, .16);
}

.district-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.district-card-main > div {
  min-width: 0;
}

.district-card-main h4 {
  margin: 3px 0 0;
  color: var(--blue-ink);
  font-size: 21px;
  line-height: 1.1;
}

.district-card-main strong {
  max-width: 122px;
  overflow: hidden;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.district-metrics span {
  min-width: 0;
  padding: 9px 9px;
  border: 1px solid rgba(37, 99, 235, .08);
  border-radius: 14px;
  color: var(--blue-deep);
  background: rgba(242, 246, 255, .42);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  text-align: center;
}

.district-metrics span.sort-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}

.district-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf8;
}

.district-progress i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.district-actions {
  display: grid;
  grid-template-columns: 1.2fr .9fr .75fr;
  gap: 8px;
}

.district-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.district-detail-actions button {
  min-height: 38px;
  border: 1px solid rgba(37, 99, 235, .13);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.86);
  font-size: 12px;
  font-weight: 950;
}

.district-detail-actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
}

.district-actions button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.92);
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-actions button[data-district-detail] {
  color: var(--muted);
  background: rgba(239,246,255,.78);
}

.district-actions button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: var(--shadow-button);
}

.district-result-note.important {
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--blue-deep);
  background: rgba(239,246,255,.72);
  font-weight: 900;
}

.district-empty-state {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
}

.district-empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.filter-sheet-page {
  display: grid;
  gap: 12px;
}

.filter-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.filter-sheet-grid button {
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 16px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.72);
  text-align: left;
  font-weight: 950;
}

.filter-sheet-grid span,
.filter-sheet-layer strong {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}

.filter-sheet-grid b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-sheet-layer {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(135, 154, 184, .16);
  border-radius: 17px;
  background: rgba(255,255,255,.45);
}

.district-detail {
  display: grid;
  gap: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(135, 154, 184, .25);
}

.district-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.district-detail-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 9px;
  border: 1px solid rgba(135, 154, 184, .16);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(248, 251, 255, .92);
  font-size: 12px;
  font-weight: 900;
}

.district-detail-grid b {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.district-detail-columns {
  display: grid;
  gap: 9px;
}

.district-detail-columns section {
  padding: 11px;
  border: 1px solid rgba(135, 154, 184, .16);
  border-radius: 16px;
  background: rgba(248, 251, 255, .42);
}

.district-detail-columns h5 {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 14px;
}

.district-detail-columns p,
.district-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.district-mini-row {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.district-detail-columns p span,
.district-mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-detail-columns p b,
.district-mini-row b {
  color: var(--ink);
  white-space: nowrap;
}

.district-mini-row em,
.district-award-drill-row em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 999px;
  color: #0f2f67;
  background: rgba(219, 234, 254, .92);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.district-all-awards {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 17px;
  background: var(--panel-bg);
}

.district-all-awards-head {
  display: grid;
  gap: 3px;
}

.district-all-awards-head strong {
  color: var(--blue-deep);
  font-size: 14px;
}

.district-all-awards-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.district-mode-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.district-mode-segment button,
.district-sku-entry {
  min-height: 36px;
  border: 1px solid rgba(37, 99, 235, .13);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.62);
  font-size: 12px;
  font-weight: 950;
}

.district-mode-segment button.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #123a73);
}

.district-sku-entry {
  width: 100%;
  background: rgba(219,234,254,.76);
}

.district-inline-search {
  display: grid;
  gap: 5px;
}

.district-inline-search span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.district-inline-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 900;
}

.district-award-drill-list {
  display: grid;
  gap: 7px;
}

.district-award-drill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(37, 99, 235, .10);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255,255,255,.30);
  text-align: left;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.district-award-drill-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-award-drill-row b {
  color: var(--ink);
  white-space: nowrap;
}

.district-award-drill-row.static {
  cursor: default;
}

.district-award-drill-row.static em {
  color: #0f2f67;
}

.street-highlight-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 17px;
  background: var(--panel-bg);
}

.street-highlight-head {
  display: grid;
  gap: 4px;
}

.street-highlight-head strong {
  color: var(--blue-ink);
  font-size: 14px;
}

.street-highlight-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.street-highlight-list {
  display: grid;
  gap: 7px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.street-highlight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(135,154,184,.17);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.26);
  text-align: left;
}

.street-highlight-row.static {
  cursor: default;
}

.street-highlight-row span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.street-highlight-row b {
  color: var(--blue-deep);
  font-size: 13px;
  white-space: nowrap;
}

.street-highlight-row em {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.street-highlight-empty {
  padding: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.street-highlight-warning {
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: 12px;
  color: #92400e;
  background: rgba(255, 251, 235, .7);
}

.district-more-analysis {
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 17px;
  background: rgba(255,255,255,.28);
}

.district-more-analysis summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 11px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.district-more-analysis summary::-webkit-details-marker {
  display: none;
}

.district-more-analysis summary em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.district-more-analysis[open] {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
}

.district-more-analysis .street-highlight-panel {
  margin: 0 10px;
}

.poi-page {
  display: grid;
  gap: 13px;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

.poi-page-head {
  padding: 3px 2px 0;
}

.poi-page-head h3 {
  margin: 4px 0 4px;
  color: var(--blue-ink);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.poi-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.poi-query-card,
.poi-status-card,
.poi-selected-card,
.poi-results {
  padding: 15px;
  border: 1px solid rgba(135, 154, 184, .20);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(15, 35, 70, .08);
}

.poi-query-card {
  display: grid;
  gap: 11px;
}

.poi-query-card h4 {
  margin: 4px 0 0;
  color: var(--blue-ink);
  font-size: 15px;
}

.poi-pill-grid,
.poi-radius-segment,
.poi-action-row,
.poi-card-actions {
  display: grid;
  gap: 8px;
}

.poi-pill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.poi-pill-grid.center-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.poi-pill-grid button,
.poi-radius-segment button,
.poi-action-row button,
.poi-card-actions button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(248, 251, 255, .94);
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poi-pill-grid button.active,
.poi-radius-segment button.active,
.poi-search-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.poi-pill-grid button:disabled,
.poi-action-row button:disabled,
.poi-search-primary:disabled {
  opacity: .48;
  box-shadow: none;
}

.poi-radius-segment,
.poi-action-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.poi-search-primary {
  width: 100%;
  min-height: 50px;
  border-radius: 999px;
  font-weight: 950;
}

.poi-status-card {
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(255,255,255,.94));
}

.poi-status-card strong {
  color: var(--blue-ink);
  font-size: 15px;
  line-height: 1.42;
}

.poi-status-card span,
.poi-selected-card span,
.poi-result-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.poi-status-card.error {
  border-color: rgba(220, 38, 38, .20);
  background: linear-gradient(135deg, rgba(254, 226, 226, .82), rgba(255,255,255,.95));
}

.poi-status-card.stale {
  border-color: rgba(245, 158, 11, .24);
  background: linear-gradient(135deg, rgba(255, 251, 235, .88), rgba(255,255,255,.95));
}

.poi-status-card.empty {
  border-color: rgba(234, 88, 12, .20);
  background: linear-gradient(135deg, rgba(255, 237, 213, .82), rgba(255,255,255,.95));
}

.poi-selected-card {
  display: grid;
  gap: 8px;
  border-color: rgba(37, 99, 235, .20);
  background: linear-gradient(135deg, rgba(219,234,254,.92), rgba(255,255,255,.96));
}

.poi-selected-card strong {
  color: var(--ink);
  font-size: 17px;
}

.poi-selected-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.poi-results {
  display: grid;
  gap: 10px;
}

.poi-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.poi-result-head strong {
  color: var(--blue-ink);
  font-size: 16px;
}

.poi-result-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(135, 154, 184, .20);
  border-radius: 20px;
  background: rgba(248, 251, 255, .94);
}

.poi-result-card.active {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .12);
}

.poi-result-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.poi-result-card span,
.poi-result-card p,
.poi-empty,
.poi-loading {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.poi-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.poi-result-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(238, 244, 255, .92);
  color: var(--blue-deep);
}

.poi-card-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.poi-card-actions button {
  min-height: 40px;
  font-size: 12px;
}

.poi-empty,
.poi-loading {
  padding: 13px;
  border: 1px dashed rgba(135, 154, 184, .28);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
}

.poi-empty.error {
  color: #991b1b;
  border-color: rgba(220, 38, 38, .22);
  background: rgba(254, 226, 226, .68);
}

.poi-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.detail-page {
  display: grid;
  gap: 14px;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

.detail-page-head,
.detail-summary-card,
.detail-controls-card,
.detail-selected-card,
.detail-card {
  border: 1px solid rgba(135, 154, 184, .18);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(248,251,255,.84));
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}

.detail-page-head {
  padding: 16px;
}

.detail-page-head h3 {
  margin: 4px 0 5px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.detail-page-head p,
.detail-result-head span,
.detail-selected-card span,
.detail-selected-card p,
.detail-card-grid span,
.detail-address {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.detail-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.detail-summary-card div {
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(239, 246, 255, .80);
}

.detail-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.detail-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-ink);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.detail-selected-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-color: rgba(37, 99, 235, .22);
  background: linear-gradient(135deg, rgba(219,234,254,.92), rgba(255,255,255,.96));
}

.detail-selected-card strong {
  color: var(--ink);
  font-size: 16px;
}

.detail-controls-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.detail-search,
.detail-select {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.detail-search span,
.detail-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.detail-search input,
.detail-select select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: rgba(248, 251, 255, .96);
  font-size: 14px;
  font-weight: 850;
}

.detail-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-sort-segment {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.detail-sort-segment button,
.detail-card-actions button,
.detail-more-row button {
  min-height: 44px;
  border: 1px solid rgba(135, 154, 184, .22);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(248, 251, 255, .94);
  font-size: 12px;
  font-weight: 950;
}

.detail-sort-segment button.active,
.detail-more-row button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
}

.detail-result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.detail-result-head strong {
  color: var(--blue-ink);
  font-size: 16px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.detail-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-card-top strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.detail-card-top span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.primary-goods {
  color: #075985;
  background: rgba(219, 234, 254, .95);
}

.remote-goods {
  color: #111827;
  background: rgba(229, 231, 235, .95);
}

.detail-card-main h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.36;
}

.detail-card-main p {
  margin: 5px 0 0;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.detail-card-grid span {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(238, 244, 255, .82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-card-grid .district-mismatch-note {
  grid-column: 1 / -1;
  color: #92400e;
  background: rgba(255, 251, 235, .82);
  border: 1px solid rgba(245, 158, 11, .2);
}

.detail-address {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(248, 251, 255, .86);
}

.detail-card-actions,
.detail-more-row {
  display: grid;
  gap: 9px;
}

.detail-card-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-more-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-card-actions button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #123a73);
}

.detail-more-row span,
.detail-empty {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 12px;
  border: 1px dashed rgba(135, 154, 184, .25);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.76);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.detail-empty.compact {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 12px;
}

.detail-scan-focus {
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, .18), 0 12px 26px rgba(15, 23, 42, .28);
}

.poi-marker,
.scan-marker {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .25);
}

.poi-marker {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: #7c3aed;
  appearance: none;
  cursor: pointer;
}

.scan-label-marker.scan-marker {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .92);
  background: var(--scan-color, #2563eb);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .13), 0 9px 18px rgba(15, 23, 42, .18);
  appearance: none;
  cursor: pointer;
}

.poi-marker.selected {
  outline: 3px solid rgba(37, 99, 235, .22);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, .16), 0 12px 24px rgba(15, 23, 42, .24);
}

.mobile-toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 90;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 35, 70, .88);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transition: transform .22s ease, opacity .22s ease;
}

.mobile-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 389px) {
  .poi-pill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .poi-action-row,
  .poi-card-actions,
  .detail-card-actions {
    grid-template-columns: 1fr;
  }
}

.mobile-error {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 90px;
  z-index: 100;
  padding: 14px;
  border-radius: 18px;
  color: #991b1b;
  background: #fee2e2;
  font-weight: 900;
}

@media (min-width: 768px) {
  .mobile-sheet {
    left: auto;
    right: 18px;
    top: auto;
    bottom: 92px;
    width: 390px;
    height: min(56vh, 520px);
    min-height: 0;
    max-height: none;
    border-radius: 22px;
    transform: none;
  }

  .mobile-tabs {
    left: auto;
    right: 18px;
    width: 390px;
  }

  .mobile-topbar {
    left: 18px;
    right: auto;
    width: min(560px, calc(100vw - 36px));
  }

  .mobile-topbar .mobile-data-meta {
    max-width: 430px;
    font-size: 12px;
  }

  .mobile-map-tools {
    right: 426px;
    top: calc(max(12px, env(safe-area-inset-top)) + 92px);
    grid-auto-flow: column;
    grid-template-columns: repeat(4, minmax(64px, auto));
  }

  .mobile-sheet[data-sheet-state="collapsed"] {
    height: 76px;
    padding-bottom: 0;
    transform: none;
  }

  .mobile-sheet[data-sheet-state="half"] {
    --sheet-visible: 100%;
    height: min(420px, calc(100dvh - 210px));
    transform: none;
  }

  .mobile-sheet[data-sheet-state="full"] {
    --sheet-visible: 100%;
    top: 110px;
    bottom: 92px;
    height: auto;
    transform: none;
  }
}

@media (min-width: 1024px) {
  .mobile-sheet {
    width: 420px;
  }

  .mobile-tabs {
    width: 420px;
  }

  .mobile-topbar {
    width: min(560px, calc(100vw - 510px));
  }

  .mobile-map-tools {
    right: 466px;
  }
}

@media (min-width: 1440px) {
  .mobile-sheet {
    width: 440px;
  }

  .mobile-tabs {
    width: 440px;
  }

  .mobile-topbar {
    width: 620px;
  }

  .mobile-map-tools {
    right: 492px;
  }
}
