* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f3f4f6;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: #1e3a5f;
  color: #fff;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { font-size: 18px; font-weight: 600; }
.tabs a {
  color: #cbd5e1;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}
.tabs a.active, .tabs a:hover { color: #fff; }
.layout { flex: 1; display: flex; min-height: 0; }
.map { flex: 1; position: relative; }
.sidebar {
  width: 360px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}
.legend { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-size: 12px; color: #6b7280; }
.legend .bar {
  height: 10px; border-radius: 5px; margin: 6px 0;
  background: linear-gradient(90deg, rgb(104,159,56), rgb(173,196,70), rgb(244,196,48), rgb(237,125,49), rgb(214,69,65));
}
.legend-range { color: #374151; font-weight: 600; }
.filters { display: flex; gap: 6px; padding: 10px 16px; flex-wrap: wrap; }
.filters button {
  border: 1px solid #d1d5db; background: #fff; border-radius: 14px;
  padding: 4px 12px; font-size: 13px; cursor: pointer; color: #374151;
}
.filters button.active { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
.policy-list { flex: 1; overflow-y: auto; padding: 8px 16px 16px; }
.policy-card { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.policy-title {
  display: block; font-size: 14px; color: #1f2937; text-decoration: none;
  margin: 4px 0; line-height: 1.4;
}
.policy-title:hover { color: #1e3a5f; }
.policy-meta { font-size: 12px; color: #9ca3af; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; color: #fff; }
.tag-a { background: #2b6cb0; } .tag-b { background: #2f855a; } .tag-c { background: #b7791f; }
.info { font-size: 13px; max-width: 280px; }
.info h4 { font-size: 15px; margin-bottom: 4px; }
.info .muted { color: #9ca3af; font-size: 12px; }
.info-pol { list-style: none; margin-top: 6px; }
.info-pol li { margin-bottom: 4px; }
.info-pol a { color: #1e3a5f; text-decoration: none; font-size: 13px; }
.notice { padding: 40px; color: #6b7280; text-align: center; line-height: 1.8; }
.notice h3 { margin-bottom: 10px; color: #374151; }

/* 小区价格面板（浮层） */
.layout { position: relative; }
.community-panel {
  position: absolute; top: 12px; left: 12px; z-index: 20;
  width: 320px; max-height: calc(100% - 24px); display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16); overflow: hidden;
}
.community-panel.hidden { display: none; }
.cp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #1e3a5f; color: #fff; font-size: 14px; font-weight: 600;
}
.cp-close {
  border: none; background: transparent; color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.cp-body { padding: 8px 12px 12px; overflow-y: auto; }
.cp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cp-table th, .cp-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }
.cp-table th { color: #6b7280; font-weight: 600; background: #f9fafb; }
.cp-table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.info .btn-community {
  margin-top: 8px; border: 1px solid #1e3a5f; background: #1e3a5f; color: #fff;
  border-radius: 6px; padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.info .btn-community:hover { background: #29527f; }
