/* GEO knowledge map */
.page-geo-map .geo-section {
  padding-top: clamp(36px, 5vw, 64px);
}

.geo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.geo-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}

.geo-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #7a6a5e);
  pointer-events: none;
}

.geo-search input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 44px;
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #2a1d16);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.geo-search input:focus {
  border-color: var(--brand, #f37021);
  box-shadow: 0 0 0 4px rgba(243, 112, 33, .12);
}

.geo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #2a1d16);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.geo-legend-item:hover {
  border-color: var(--group-color, #f37021);
  transform: translateY(-1px);
}

.geo-legend-item.is-active {
  border-color: var(--group-color, #f37021);
  background: color-mix(in srgb, var(--group-color, #f37021) 10%, #fff);
}

.geo-legend-item > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--group-color, #f37021);
}

.geo-legend-item small {
  color: var(--muted, #7a6a5e);
  font-size: 11px;
  font-weight: 600;
}

.geo-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: stretch;
}

.geo-canvas-wrap {
  position: relative;
  min-height: clamp(460px, 62vh, 720px);
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(243, 112, 33, .06), transparent 55%),
    linear-gradient(180deg, #fffdfb, #fdf6ef);
  overflow: hidden;
}

.geo-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(42, 29, 22, .10) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}

.geo-canvas-wrap canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.geo-tooltip {
  position: absolute;
  z-index: 6;
  max-width: 250px;
  padding: 10px 13px;
  border: 1px solid rgba(42, 29, 22, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 30px rgba(42, 29, 22, .16);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.45;
}

.geo-tooltip[hidden] {
  display: none;
}

.geo-tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink, #2a1d16);
  font-size: 13px;
}

.geo-tooltip span {
  color: var(--muted, #7a6a5e);
}

.geo-zoom {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.geo-zoom button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink, #2a1d16);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.geo-zoom button:hover {
  border-color: var(--brand, #f37021);
  color: var(--brand, #f37021);
}

.geo-hint {
  position: absolute;
  right: 16px;
  bottom: 18px;
  margin: 0;
  color: var(--muted, #7a6a5e);
  font-size: 11px;
  letter-spacing: .02em;
  pointer-events: none;
}

.geo-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 20px;
  background: #fff;
}

.geo-side h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.geo-layer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-layer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 10px;
  transition: background .2s;
}

.geo-layer:hover {
  background: #fdf6ef;
}

.geo-layer-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.geo-layer div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.geo-layer strong {
  font-size: 13px;
  font-weight: 600;
}

.geo-layer small {
  color: var(--muted, #7a6a5e);
  font-size: 11px;
}

.geo-side-note {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line, #e7ddd3);
}

.geo-side-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.geo-side-note p {
  margin: 0 0 10px;
  color: var(--muted, #7a6a5e);
  font-size: 12px;
  line-height: 1.55;
}

.geo-side-note a {
  display: block;
  padding: 7px 0;
  color: var(--brand, #f37021);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(243, 112, 33, .3);
}

.geo-side-note a:last-child {
  border-bottom: 0;
}

.geo-side-note a:hover {
  color: var(--brand-dark, #c9500b);
}

.geo-index-section {
  padding-top: 0;
}

.geo-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.geo-index-card {
  padding: 20px;
  border: 1px solid var(--line, #e7ddd3);
  border-radius: 16px;
  background: #fff;
}

.geo-index-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.geo-index-card h3 span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.geo-index-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.geo-index-card li a {
  display: block;
  color: var(--muted, #7a6a5e);
  font-size: 12.5px;
  line-height: 1.45;
  text-decoration: none;
}

.geo-index-card li a:hover {
  color: var(--brand, #f37021);
}

@media (max-width: 960px) {
  .geo-shell {
    grid-template-columns: 1fr;
  }
  .geo-side {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .geo-layer-list {
    flex: 1 1 220px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .geo-side-note {
    flex: 1 1 220px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 640px) {
  .geo-toolbar {
    align-items: stretch;
  }
  .geo-search {
    max-width: none;
  }
  .geo-legend {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .geo-legend-item {
    flex: 0 0 auto;
  }
  .geo-canvas-wrap {
    min-height: 420px;
    border-radius: 16px;
  }
  .geo-hint {
    display: none;
  }
  .geo-layer-list {
    grid-template-columns: 1fr;
  }
}