.city-explorer {
  --atlas-ink: #edf0df;
  --atlas-muted: #b4c7b8;
  --atlas-line: #446258;
  --atlas-dark: #102622;
  --atlas-light: #e8dbad;
  padding: 47px 0 0;
  scroll-margin-top: 8px;
}

.city-explorer .section-header { margin-bottom: 16px; }
.city-explorer-beijing { white-space: nowrap; }

.city-explorer-shell {
  isolation: isolate;
  overflow: hidden;
  color: var(--atlas-ink);
  border: 1px solid #344f46;
  border-radius: 13px;
  background: var(--atlas-dark);
  box-shadow: 0 14px 34px #253d3220;
}

.city-explorer-shell :focus-visible { outline: 2px solid #ffde90; outline-offset: 2px; }

.city-explorer-toolbar {
  min-height: 67px;
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(7rem, 9rem) minmax(7rem, 11rem) 1fr;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-bottom: 1px solid #3c574e;
  background: #142d27;
}

.city-explorer-search, .city-explorer-select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 43px;
  border: 1px solid #527166;
  border-radius: 6px;
  background: #1a3830;
  color: var(--atlas-ink);
}

.city-explorer-search > [data-icon] { pointer-events: none; position: absolute; left: 12px; color: #d2c497; }

.city-explorer-search input, .city-explorer-select select {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: transparent;
  font-size: .92rem;
}

.city-explorer-search input { padding: 0 9px 0 38px; }
.city-explorer-search input::placeholder { color: #b9ccbf; opacity: 1; }
.city-explorer-search input::-webkit-search-cancel-button { cursor: pointer; filter: brightness(0) invert(.95); }
.city-explorer-select select { appearance: none; cursor: pointer; padding: 0 31px 0 12px; }
.city-explorer-select option, .city-explorer-select optgroup { background: #18342c; color: var(--atlas-ink); }
.city-explorer-select > [data-icon] { pointer-events: none; position: absolute; right: 10px; color: #d2c497; }
#city-explorer-count { justify-self: end; color: var(--atlas-muted); font-size: .86rem; white-space: nowrap; }

.city-explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(264px, 29%, 345px);
  min-height: clamp(435px, 43vw, 550px);
}

.city-explorer-viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  min-height: inherit;
  cursor: grab;
  touch-action: pan-y;
  background-color: #102824;
  background-image: radial-gradient(ellipse at 44% 44%, #324e3e58 0%, transparent 64%),
    radial-gradient(circle, #5873634a .65px, transparent .8px);
  background-size: auto, 18px 18px;
}

.city-explorer-viewport[data-zoomed] { touch-action: none; }
.city-explorer-viewport[data-dragging] { cursor: grabbing; }
.city-explorer-viewport:focus-visible { outline-offset: -3px; }

.city-explorer-plane {
  position: absolute;
  top: calc(50% - 262.5px);
  left: calc(50% - 380px);
  width: 760px;
  height: 525px;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.city-explorer-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.city-explorer-layer-bottom { transform: translateZ(-18px); color: #10241e; filter: drop-shadow(0 12px 14px #061310c9); }
.city-explorer-layer-middle { transform: translateZ(-9px); color: #345147; }
.city-explorer-layer:is(.city-explorer-layer-bottom, .city-explorer-layer-middle) use { fill: currentColor; stroke: currentColor; stroke-width: 2.5; }
.city-explorer-viewport[data-flat] :is(.city-explorer-layer-bottom,.city-explorer-layer-middle) { visibility: hidden; }
.city-explorer-surface path { fill-rule: evenodd; }
.city-explorer-surface #city-explorer-shapes path {
  fill: url(#city-explorer-map-fill);
  stroke: #bdd2b67d;
  stroke-width: .85;
  vector-effect: non-scaling-stroke;
}

.city-explorer-surface #city-explorer-shapes [data-active] { fill: url(#city-explorer-specific-fill); stroke: #d8dcbc; }
.city-explorer-surface #city-explorer-shapes [data-muted] { fill: #33564d; stroke: #95b6a060; }
.city-explorer-surface #city-explorer-inset rect { fill: #14332dd9; stroke: #8bad9d80; stroke-width: .75; }
.city-explorer-surface #city-explorer-inset path { fill: #547666; stroke: #9bb9a4; stroke-width: .65; }

.city-explorer-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-explorer-pin {
  isolation: isolate;
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #fff5ce;
  background: transparent;
  pointer-events: auto;
}

.city-explorer-pin::before {
  width: 8px;
  height: 8px;
  content: "";
  border: 1.5px solid #fff6d9;
  border-radius: 50%;
  background: #d3bd7a;
  box-shadow: 0 0 0 2px #1a332bd4;
}

.city-explorer-pin[aria-pressed="true"] { z-index: 3; }
.city-explorer-pin[aria-pressed="true"]::before { width: 13px; height: 13px; border: 2px solid #fff6cb; background: #eac66d; box-shadow: 0 0 0 4px #ead99945, 0 0 16px #ecce768a; }
.city-explorer-pin:is(:hover,:focus-visible,[aria-pressed="true"],[data-label]) { color: #fff6dc; }
.city-explorer-pin:is(:hover,:focus-visible) { z-index: 4; }
.city-explorer-pin span {
  display: none;
  position: absolute;
  left: calc(50% + 8px);
  bottom: calc(50% + 5px);
  color: inherit;
  font-weight: 690;
  font-size: .72rem;
  line-height: 1.28;
  letter-spacing: .05em;
  white-space: nowrap;
  text-shadow: 0 1px 5px #091e17, 0 0 3px #091e17, 0 0 2px #091e17;
  pointer-events: none;
}
.city-explorer-pin:is(:hover,:focus-visible,[aria-pressed="true"],[data-label]) span { display: block; }
.city-explorer-pin[data-label-side="left"] span { left: auto; right: calc(50% + 8px); }
.city-explorer-pin[aria-pressed="true"] span { padding: 3px 6px; border-radius: 4px; background: #172f29; text-shadow: none; font-size: .8rem; }

.city-explorer-view, .city-explorer-navigation {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  border: 1px solid #77908476;
  border-radius: 7px;
  background: #142e29eb;
  box-shadow: 0 4px 12px #0920193d;
}

.city-explorer-view { top: 15px; left: 15px; }
.city-explorer-navigation { top: 15px; right: 15px; flex-direction: column; }
.city-explorer-view button, .city-explorer-navigation button {
  display: grid;
  place-items: center;
  width: 39px;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--atlas-ink);
  font-size: .79rem;
  font-weight: 720;
}
.city-explorer-view button[aria-pressed="true"] { background: var(--atlas-light); color: #19382f; }
.city-explorer-view button[aria-pressed="false"]:hover, .city-explorer-navigation button:hover { background: #2d5147; }
.city-explorer-navigation button:disabled { opacity: .45; cursor: default; }
.city-explorer-navigation .icon { width: 17px; height: 17px; }
.city-explorer-needle { display: grid; justify-items: center; line-height: .85; color: #e6d19a; font-size: .58rem; }
.city-explorer-needle svg { width: 12px; height: 14px; }

.city-explorer-gestures, .city-explorer-map-status {
  position: absolute;
  z-index: 5;
  margin: 0;
  color: var(--atlas-muted);
  font-size: .76rem;
}
.city-explorer-gestures { left: 16px; bottom: 11px; pointer-events: none; }
.city-explorer-touch-gesture { display: none; }
.city-explorer-map-status { top: 69px; left: 15px; max-width: calc(100% - 30px); padding: 7px 11px; border-radius: 5px; background: #1d3932; color: #f0e7cb; }

.city-explorer-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  min-height: inherit;
  border-left: 1px solid #506a5f;
  background: #1d3830;
  color: #fff7e4;
}

.city-explorer-preview img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.city-explorer-preview::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(180deg, #11231d04 10%, #11231d21 35%, #11251fce 62%, #101f1bfa 89%); }
.city-explorer-preview-body { display: grid; align-content: end; gap: 10px; padding: 22px 23px 24px; }
.city-explorer-place { margin: 0; color: #f2dfab; font-size: .83rem; letter-spacing: .06em; }
.city-explorer-preview h3 { margin: 0; color: #fff9ea; font: 800 clamp(2.4rem, 4.1vw, 3.55rem)/1.06 var(--serif); letter-spacing: -.025em; }
.city-explorer-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; color: #f0f0df; font-size: .9rem; line-height: 1.55; }
#city-explorer-open { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 43px; margin-top: 6px; padding: 7px 11px; color: #20382d; background: #f6e8bc; border-radius: 5px; font-weight: 750; font-size: .92rem; }
#city-explorer-open:hover { background: #fff3cd; }

.city-explorer-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 5px 20px;
  padding: 10px 16px;
  min-height: 41px;
  border-top: 1px solid #3c574e;
  background: #142d27;
  color: var(--atlas-muted);
  font-size: .78rem;
}

.city-explorer-footer a:hover, .city-explorer-sources summary:hover { color: #ffe9af; text-decoration: underline; }
.city-explorer-sources summary { color: var(--atlas-ink); cursor: pointer; }
.city-explorer-sources p { margin: 5px 0; }
.city-explorer-sources ul { margin: 5px 0; padding-left: 19px; }
.city-explorer-noscript { margin: 0; padding: 10px 16px; color: var(--atlas-ink); }

@media (max-width: 800px) {
  .city-explorer-layout { grid-template-columns: minmax(0, 1fr) 229px; min-height: 420px; }
  .city-explorer-preview-body { padding: 17px; }
}

@media (max-width: 650px) {
  .city-explorer { padding-top: 33px; }
  .city-explorer .section-header { flex-wrap: wrap; align-items: start; gap: 7px; }
  .city-explorer-beijing { font-size: .83rem; }
  .city-explorer-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 7px; padding: 9px; }
  .city-explorer-search { grid-column: 1/-1; }
  .city-explorer-layout { display: block; }
  .city-explorer-viewport { height: clamp(280px, 78vw, 405px); min-height: 0; }
  .city-explorer-preview { min-height: 250px; border-left: 0; border-top: 1px solid #506a5f; }
  .city-explorer-preview::after { background: linear-gradient(180deg, #11231d04, #11231d57 37%, #11251fe0 79%, #101f1bfa); }
  .city-explorer-view { top: 8px; left: 8px; }
  .city-explorer-navigation { top: 8px; right: 8px; flex-direction: row; }
  .city-explorer-view button, .city-explorer-navigation button { width: 38px; height: 38px; }
  .city-explorer-pin { width: 24px; height: 24px; }
  .city-explorer-pin::before { width: 6.5px; height: 6.5px; box-shadow: 0 0 0 1px #1a332bd4; }
  .city-explorer-pin span { font-size: .67rem; }
  .city-explorer-gestures { left: 10px; bottom: 8px; }
}

@media (pointer: coarse), (max-width: 650px) {
  .city-explorer-touch-gesture { display: inline; }
  .city-explorer-desktop-gesture { display: none; }
}
