:root {
  --ink: #17202c;
  --muted: #6c7685;
  --subtle: #8d98a7;
  --line: #dfe5ed;
  --paper: #f4f7fa;
  --panel: #ffffff;
  --brand: #0f8b8d;
  --brand-dark: #0a6062;
  --red: #d94f30;
  --green: #208f62;
  --violet: #8059d6;
  --metro: #4b63d9;
  --mall: #efb034;
  --price: #ec6f90;
  --shadow: 0 18px 45px rgba(23, 32, 44, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 139, 141, 0.08), transparent 240px),
    var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  min-height: 100vh;
  padding: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.identity,
.account-bar,
.quota-pill,
.card-title,
.field-header {
  display: flex;
  align-items: center;
}

.identity { gap: 12px; }

.identity {
  flex: 0 0 auto;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  letter-spacing: 0;
}

.identity h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.identity span:not(.logo-mark) {
  color: var(--muted);
  font-size: 13px;
}

.account-bar {
  flex: 0 0 auto;
  gap: 10px;
}

.quota-pill {
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.quota-pill span {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 290px;
  gap: 10px;
  min-height: calc(100vh - 76px);
}

.control-panel,
.map-area,
.insight-panel {
  min-width: 0;
}

.control-panel {
  position: relative;
  z-index: 16;
  overflow: visible;
  min-width: 0;
  max-width: 300px;
}

.query-card,
.map-area,
.summary-card,
.ranking-card,
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.query-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.card-title {
  justify-content: space-between;
  gap: 12px;
}

.card-title span,
.field-header span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.card-title strong,
.field-header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.control-section {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-header {
  justify-content: space-between;
  min-width: 0;
}

.text-action {
  border: 0;
  padding: 0;
  color: var(--brand-dark);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.brand-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.brand-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-chip {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.brand-chip.selected,
.style-chip.selected {
  outline: 3px solid rgba(15, 139, 141, 0.22);
  outline-offset: 2px;
}

.brand-chip.brand-0 { background: var(--red); }
.brand-chip.brand-1 { background: var(--green); }
.brand-chip.brand-2 { background: var(--violet); }

input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  color: var(--ink);
  outline: none;
  background: #fff;
}

input,
select:not([multiple]) {
  height: 34px;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.14);
}

.icon-action {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.cascade-select {
  position: relative;
  display: grid;
  min-width: 0;
}

.cascade-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.cascade-trigger span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cascade-trigger strong {
  color: var(--muted);
}

.cascade-dropdown {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  z-index: 80;
  display: block;
  width: 260px;
  min-height: 260px;
  max-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  background: #fff;
  box-shadow: 0 14px 28px rgba(23, 32, 44, 0.16);
  transform-origin: top left;
  animation: cascadeIn 120ms ease-out;
}

.cascade-dropdown.hidden {
  display: none;
}

.province-list,
.city-list {
  overflow-y: scroll;
  overflow-x: hidden;
}

.province-list::-webkit-scrollbar,
.city-list::-webkit-scrollbar {
  width: 6px;
}

.province-list::-webkit-scrollbar-thumb,
.city-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c6d0dc;
}

.province-list {
  max-height: 300px;
  background: #f8fafc;
}

.province-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid rgba(223, 229, 237, 0.7);
  padding: 0 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.province-item span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.province-item.active {
  color: var(--brand-dark);
  background: #fff;
  font-weight: 800;
}

.province-item small {
  color: var(--muted);
  text-align: right;
}

.checkbox-visual {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #b9c3cf;
  border-radius: 4px;
  background: #fff;
}

.checkbox-visual.checked,
.checkbox-visual.mixed {
  border-color: var(--brand);
  background: var(--brand);
}

.checkbox-visual.checked::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-visual.mixed::after {
  content: "";
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.city-panel {
  position: absolute;
  left: calc(100% - 1px);
  top: 0;
  width: 330px;
  height: 300px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 14px 14px 28px rgba(23, 32, 44, 0.12);
  animation: citySlideIn 140ms ease-out;
}

.city-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.city-panel-head strong {
  font-size: 13px;
}

.city-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 2px 8px;
  padding: 9px 10px;
}

.city-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 6px;
  padding: 0 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

@keyframes cascadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes citySlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.city-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-check:hover {
  background: #f4f7fa;
}

.city-check.all-city {
  grid-column: 1 / -1;
  color: var(--ink);
  font-weight: 800;
}

.city-check input {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: var(--brand);
}

.selected-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 66px;
  overflow: auto;
  padding-right: 2px;
  min-width: 0;
  max-width: 100%;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px 0 11px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  max-width: 100%;
  min-width: 0;
}

.selected-chip span {
  display: block;
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-chip strong {
  color: var(--muted);
}

.layer-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.layer-guide {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d8ecec;
  border-radius: 8px;
  background: #f6fbfb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.layer-guide strong {
  color: var(--ink);
  font-size: 13px;
}

.layer-guide p {
  margin: 0;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px 0 7px;
  background: #fff;
  cursor: pointer;
  min-width: auto;
  max-width: none;
  white-space: nowrap;
}

.style-chip {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.style-chip.mall { background: var(--mall); }
.style-chip.metro { background: var(--metro); }
.style-chip.housing { background: var(--price); }

.check-option input {
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: var(--brand);
}

.check-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(15, 139, 141, 0.08);
}

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

.display-order-list {
  display: grid;
  gap: 5px;
  margin-bottom: 6px;
}

.visual-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 7px;
}

.visual-mode-card {
  display: grid;
  gap: 2px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.visual-mode-card.active {
  border-color: var(--brand);
  background: rgba(15, 139, 141, 0.08);
  box-shadow: 0 0 0 2px rgba(15, 139, 141, 0.1);
}

.visual-mode-card strong {
  font-size: 13px;
}

.visual-mode-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.hidden-control {
  display: none !important;
}

.palette-card {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
}

.palette-card label {
  grid-template-columns: 58px minmax(0, 1fr);
}

.heat-gradient-preview {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
}

.heat-gradient-preview input[type="color"] {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
}

.heat-gradient-preview i {
  display: block;
  height: 24px;
  border-radius: 0;
  background: linear-gradient(90deg, #208f62, #d94f30);
}

.palette-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.display-order-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.display-order-item.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15, 139, 141, 0.12);
}

.visibility-toggle,
.order-actions button,
.order-target {
  border: 0;
  cursor: pointer;
  background: transparent;
}

.visibility-toggle {
  min-height: 24px;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.visibility-toggle.muted {
  color: var(--muted);
  background: #eef2f6;
}

.order-target {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.order-target strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.order-actions {
  display: flex;
  gap: 4px;
}

.order-actions button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fbfcfe;
}

.order-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.style-controls label {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.style-controls select,
.style-controls input[type="range"],
.style-controls input[type="color"] {
  width: 100%;
  min-width: 0;
}

.style-controls select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
}

.style-controls select:disabled {
  color: var(--subtle);
  background: #f4f7fa;
  cursor: not-allowed;
}

.style-controls input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.style-controls input[type="color"] {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  background: #fff;
}

.upload-drop {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfe;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.upload-drop.compact {
  min-height: 46px;
}

.upload-drop input {
  display: none;
}

.upload-drop span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.upload-drop small {
  color: var(--muted);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-import {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.address-import textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  line-height: 1.45;
}

.primary-action,
.secondary-action {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
}

.primary-action {
  color: white;
  background: var(--brand);
}

.primary-action:hover { background: var(--brand-dark); }

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.query-progress {
  display: grid;
  gap: 6px;
}

.side-account-card {
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  overflow: hidden;
}

.side-account-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}

.side-account-summary::-webkit-details-marker {
  display: none;
}

.side-account-summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
}

.side-account-card[open] .side-account-summary {
  border-bottom: 1px solid var(--line);
}

.side-account-card[open] .side-account-summary::after {
  transform: rotate(180deg);
}

.avatar-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: #2b84c6;
  font-size: 12px;
  font-weight: 800;
}

.side-account-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.side-account-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-account-summary small,
.side-credit-box span,
.side-credit-box small,
.side-price-list span {
  color: var(--muted);
  font-size: 12px;
}

.side-account-summary b {
  color: var(--ink);
  font: inherit;
}

.side-account-summary em {
  color: var(--red);
  font-style: normal;
}

.side-account-body {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.side-credit-box {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.side-credit-box strong {
  font-size: 24px;
}

.side-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.side-account-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 12px;
}

.side-price-list {
  display: grid;
  gap: 8px;
}

.side-price-list article {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.side-price-list article.featured {
  border-color: #9ed5d5;
  background: #f2fbfa;
}

.side-price-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.side-price-list strong {
  color: var(--ink);
}

.side-price-list small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.side-price-list .text-action {
  justify-self: start;
  min-height: auto;
  padding: 0;
  font-size: 12px;
}

.credit-log-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.credit-log-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.credit-log-panel summary::-webkit-details-marker {
  display: none;
}

.credit-log-panel summary::after {
  content: "⌄";
  color: var(--muted);
  font-weight: 800;
}

.credit-log-panel[open] summary::after {
  transform: rotate(180deg);
}

.credit-log-panel summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.query-progress.hidden {
  display: none;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.24s ease;
}

.secondary-action {
  color: var(--brand-dark);
  background: rgba(15, 139, 141, 0.11);
}

.map-area {
  display: grid;
  grid-template-rows: auto minmax(500px, 1fr);
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.toolbar-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 6px;
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}

.toolbar-metrics article {
  display: grid;
  gap: 1px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.toolbar-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.toolbar-metrics strong {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.data-status {
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.data-status.demo {
  color: #6c7685;
  background: #eef2f6;
}

.data-status.loading {
  color: #7a5a00;
  background: #fff4d8;
}

.data-status.real {
  color: #0a6062;
  background: rgba(15, 139, 141, 0.14);
}

.data-status.error {
  color: #a23a23;
  background: rgba(217, 79, 48, 0.12);
}

.map-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.map-toolbar strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

.map-tabs {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.map-tabs button {
  min-width: 54px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.map-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 32, 44, 0.08);
}

.map-board {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #e9eef3;
}

.selection-tools {
  position: absolute;
  z-index: 12;
  left: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px;
  border: 1px solid rgba(216, 222, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(23, 32, 44, 0.12);
}

.selection-tools button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.selection-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.selection-tools input {
  width: 90px;
}

.selection-tools strong {
  min-width: 76px;
  color: var(--brand-dark);
  font-size: 12px;
  text-align: right;
}

.grid-map {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(32, 47, 67, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(32, 47, 67, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 63% 24%, rgba(15, 139, 141, 0.18), transparent 20%),
    radial-gradient(circle at 28% 72%, rgba(217, 79, 48, 0.14), transparent 23%),
    #eef3f6;
  background-size: 58px 58px, 58px 58px, 100% 100%, 100% 100%, auto;
}

.grid-map.amap-ready {
  background: #eef3f6;
}

.amap-logo-marker,
.logo-marker {
  display: grid;
  place-items: center;
  width: var(--marker-size, 26px);
  height: var(--marker-size, 26px);
  border: var(--marker-stroke, 0) solid #fff;
  border-radius: 999px;
  color: #fff;
  opacity: var(--marker-opacity, 0.72);
  box-shadow: 0 8px 18px rgba(20, 28, 38, 0.28);
  font-size: max(10px, calc(var(--marker-size, 26px) * 0.44));
  font-weight: 900;
  line-height: 1;
}

.amap-logo-marker span,
.logo-marker span {
  transform: translateY(-1px);
}

.amap-logo-marker img,
.logo-marker img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.amap-logo-marker.shape-square,
.logo-marker.shape-square {
  border-radius: 7px;
}

.amap-logo-marker.shape-pin,
.logo-marker.shape-pin {
  border-radius: 999px 999px 999px 4px;
  transform: rotate(-45deg);
}

.amap-logo-marker.shape-pin span,
.amap-logo-marker.shape-pin img,
.logo-marker.shape-pin span,
.logo-marker.shape-pin img {
  transform: rotate(45deg);
}

.amap-logo-marker.shape-building,
.logo-marker.shape-building {
  border-radius: 7px;
}

.amap-logo-marker.shape-metro,
.logo-marker.shape-metro {
  border-radius: 999px;
}

.amap-logo-marker.shape-price,
.logo-marker.shape-price {
  width: var(--marker-size, 54px);
  min-width: var(--marker-size, 54px);
  color: var(--marker-color, var(--price));
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(20, 28, 38, 0.16);
}

.symbol-building {
  position: relative;
  display: block;
  width: 58%;
  height: 62%;
  border-radius: 2px 2px 1px 1px;
  background: currentColor;
}

.symbol-building::before,
.symbol-building::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
}

.symbol-building::before {
  left: 22%;
  top: -28%;
  width: 56%;
  height: 28%;
  border-radius: 2px 2px 0 0;
}

.symbol-building::after {
  left: 24%;
  bottom: 0;
  width: 16%;
  height: 28%;
  box-shadow: 11px 0 0 rgba(255, 255, 255, 0.88), 0 -9px 0 rgba(255, 255, 255, 0.88), 11px -9px 0 rgba(255, 255, 255, 0.88);
}

.symbol-metro {
  display: grid;
  place-items: center;
  width: 68%;
  height: 68%;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72em;
  font-weight: 900;
}

.symbol-price {
  padding: 0 5px;
  color: inherit;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
}

.amap-logo-marker.brand-0,
.logo-marker.brand-0 { background: var(--marker-color, var(--red)); }
.amap-logo-marker.brand-1,
.logo-marker.brand-1 { background: var(--marker-color, var(--green)); }
.amap-logo-marker.brand-2,
.logo-marker.brand-2 { background: var(--marker-color, var(--violet)); }
.amap-logo-marker.mall,
.logo-marker.mall { background: var(--marker-color, var(--mall)); }
.amap-logo-marker.metro,
.logo-marker.metro { background: var(--marker-color, var(--metro)); }
.amap-logo-marker.housing,
.logo-marker.housing { background: var(--marker-color, var(--price)); }

.river {
  position: absolute;
  left: -8%;
  top: 43%;
  width: 116%;
  height: 94px;
  transform: rotate(-8deg);
  background: rgba(50, 132, 176, 0.2);
  border-top: 1px solid rgba(50, 132, 176, 0.24);
  border-bottom: 1px solid rgba(50, 132, 176, 0.24);
}

.artery {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 222, 232, 0.65);
  border-radius: 999px;
}

.artery.one { left: 8%; top: 31%; width: 82%; height: 10px; transform: rotate(18deg); }
.artery.two { left: 21%; top: 15%; width: 10px; height: 72%; transform: rotate(8deg); }
.artery.three { left: 61%; top: 12%; width: 10px; height: 78%; transform: rotate(-12deg); }

.marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: var(--marker-stroke, 0) solid #fff;
  box-shadow: 0 8px 18px rgba(20, 28, 38, 0.26);
  cursor: pointer;
}

.marker:hover {
  z-index: 5;
  width: 38px;
  height: 38px;
}

.marker.brand-0,
.dot.brand-0 { background: var(--red); }
.marker.brand-1,
.dot.brand-1 { background: var(--green); }
.marker.brand-2,
.dot.brand-2 { background: var(--violet); }
.marker.mall,
.dot.mall { background: var(--mall); }
.marker.metro,
.dot.metro { background: var(--metro); }

.heat-zone {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 170px;
  height: 118px;
  border-radius: 999px;
  background: rgba(236, 111, 144, 0.22);
  border: 1px solid rgba(236, 111, 144, 0.35);
  display: grid;
  place-items: center;
  color: #913550;
  font-weight: 800;
  font-size: 13px;
}

.legend,
.point-card,
.map-tooltip {
  position: absolute;
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(23, 32, 44, 0.12);
}

.legend {
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 360px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot,
.heat {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.heat { background: var(--price); }

.point-card {
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 12px 14px;
}

.point-card span,
.point-card small {
  color: var(--muted);
  font-size: 12px;
}

.point-card strong {
  font-size: 14px;
}

.map-tooltip {
  z-index: 18;
  display: grid;
  gap: 4px;
  max-width: 260px;
  padding: 10px 12px;
  pointer-events: none;
}

.map-tooltip.hidden {
  display: none;
}

.map-tooltip strong {
  font-size: 13px;
}

.map-tooltip span,
.map-tooltip small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.insight-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  align-content: start;
  overflow: auto;
}

.summary-card,
.account-card,
.ranking-card,
.pattern-card,
.address-card,
.feedback-card,
.pricing-card {
  padding: 12px;
}

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

.summary-grid article {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong {
  font-size: 22px;
}

.compare-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 150px;
  overflow: auto;
}

.account-card {
  padding: 14px;
}

.credit-balance {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.credit-balance span,
.credit-balance small {
  color: var(--muted);
  font-size: 12px;
}

.credit-balance strong {
  font-size: 28px;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.account-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 12px;
}

.credit-log-list {
  display: grid;
  gap: 7px;
  padding: 0 10px 10px;
}

.credit-log-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.credit-log-item strong {
  color: var(--ink);
}

.address-card {
  padding: 14px;
  min-height: 310px;
  resize: vertical;
  overflow: auto;
}

.feedback-card {
  padding: 14px;
}

.feedback-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.feedback-form select,
.feedback-form textarea,
.feedback-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 86px;
  line-height: 1.5;
}

.feedback-form small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.feedback-item {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.feedback-item div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.feedback-item div span,
.feedback-item small {
  color: var(--muted);
}

.feedback-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

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

.pattern-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pattern-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.pattern-item span,
.pattern-item small {
  color: var(--muted);
  font-size: 12px;
}

.pattern-item strong {
  font-size: 16px;
}

.compare-item {
  display: grid;
  gap: 8px;
}

.compare-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.meter .brand-0 { background: var(--red); }
.meter .brand-1 { background: var(--green); }
.meter .brand-2 { background: var(--violet); }

.pricing-card {
  display: grid;
  gap: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.price-row strong {
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 20, 31, 0.48);
}

.modal-backdrop.hidden { display: none; }

.dialog-card {
  width: min(430px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.payment-dialog-card {
  width: min(560px, calc(100vw - 36px));
}

.dialog-card h2 { margin: 0 0 8px; }
.dialog-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

.package-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.package-option {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.package-option.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15, 143, 141, 0.08);
}

.package-option span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.package-option strong {
  font-size: 24px;
}

.package-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d8ecec;
  border-radius: 8px;
  background: #f6fbfb;
}

.order-panel.hidden {
  display: none;
}

.order-panel span,
.order-panel small {
  color: var(--muted);
  font-size: 12px;
}

.order-panel strong {
  font-size: 17px;
}

.pay-placeholder {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 86px;
  border: 1px dashed #bfd5d7;
  border-radius: 8px;
  background: white;
  text-align: center;
}

.pay-placeholder b {
  color: var(--brand-dark);
}

.confirm-rules {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px 12px 12px 28px;
  border: 1px solid #d8ecec;
  border-radius: 8px;
  background: #f6fbfb;
}

.confirm-rules li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .insight-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
  }
}

@media (max-width: 760px) {
  .app-shell { padding: 12px; }
  .top-nav { align-items: stretch; flex-direction: column; }
  .account-bar { justify-content: space-between; }
  .workspace { grid-template-columns: 1fr; }
  .map-area { grid-template-rows: auto 520px; }
  .insight-panel { grid-template-columns: 1fr; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .point-card { left: 12px; right: 12px; min-width: 0; }
  .cascade-dropdown {
    width: 45vw;
    max-height: 320px;
  }
  .city-panel {
    width: calc(55vw - 24px);
    height: 320px;
  }
  .city-list {
    grid-template-columns: 1fr;
  }
}
