[data-city-network] {
  --atlas-teal: #1a6052;
  --atlas-text: #213c36;
  --atlas-muted: #53695e;
  --atlas-border: #cbdcd0;
  --atlas-paper: #f8faef;
  --atlas-verified: #217a67;
  --atlas-plan: #9a6315;
  --atlas-schematic: #61717d;
  color: var(--atlas-text);
}

.city-atlas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.3rem;
}

.city-atlas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
  padding: 0.23rem;
  border: 1px solid #c5d8ca;
  border-radius: 0.55rem;
  background: #eaf3e8;
}

.city-atlas-tabs button {
  min-height: 42px;
  padding: 0.28rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.38rem;
  color: #25493e;
  background: transparent;
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}

.city-atlas-tabs button[aria-selected="true"] {
  border-color: #175b4d;
  color: #fff;
  background: #175b4d;
}

.city-atlas-tabs button[aria-selected="false"]:hover { background: #d8eadc; }
.city-atlas-queries { display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; }
.city-atlas-queries label { display: flex; gap: 0.42rem; align-items: center; color: #3b5b51; font-size: 0.82rem; font-weight: 700; }
.city-atlas-queries select {
  width: min(13.2rem, 52vw);
  min-height: 44px;
  max-width: 100%;
  padding: 0.35rem 0.48rem;
  border: 1px solid #a9c5b6;
  border-radius: 0.32rem;
  color: #1d473d;
  background: #f8fcf1;
  font: inherit;
  cursor: pointer;
}
.city-atlas-queries label:first-child select { width: 7.45rem; }

.city-atlas-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem 0.95rem;
  margin: 0.8rem 0 0.48rem;
}
.city-atlas-legend > span { display: inline-flex; align-items: center; gap: 0.32rem; }
.city-atlas-legend small { color: #4c6258; font-size: 0.74rem; line-height: 1.25; }

.city-atlas-badge {
  --scope: var(--atlas-verified);
  display: inline-flex;
  padding: 0.11rem 0.39rem;
  gap: 0.34rem;
  align-items: center;
  flex: none;
  border: 1px solid #97c3ad;
  border-radius: 1rem;
  color: #205c49;
  background: #e8f4e8;
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.5;
  white-space: nowrap;
}
.city-atlas-badge i {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border: 1.5px solid var(--scope);
  border-radius: 50%;
  background: var(--scope);
}
.city-atlas-badge.is-plan { --scope: var(--atlas-plan); border-color: #d7b577; border-style: dashed; color: #745017; background: #fff4db; }
.city-atlas-badge.is-plan i { border-radius: 0.05rem; background: transparent; transform: rotate(45deg); }
.city-atlas-badge.is-schematic { --scope: var(--atlas-schematic); border-color: #afbdc0; border-style: dotted; color: #415867; background: #edf1ee; }
.city-atlas-badge.is-schematic i { background: transparent; }
.city-atlas-legend-line { width: 1.05rem; border-top: 2px solid var(--atlas-verified); }
.city-atlas-legend-line.is-plan { border-color: var(--atlas-plan); border-top-style: dashed; }
.city-atlas-legend-line.is-schematic { border-color: var(--atlas-schematic); border-top-style: dotted; }
.city-atlas-history-key { width: 1.55rem; height: 0.28rem; }
.city-atlas-history-key path { stroke: var(--atlas-verified); stroke-width: 2; stroke-dasharray: 9 3 2 3; }

.city-atlas-content {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 27%);
  gap: 0.86rem;
}
.city-atlas-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--atlas-border);
  border-radius: 0.58rem;
  background: var(--atlas-paper);
}
.city-atlas-map-caption {
  display: flex;
  min-height: 46px;
  padding: 0.3rem 0.65rem;
  justify-content: space-between;
  align-items: center;
  gap: 0.36rem;
  color: #284f45;
  font-size: 0.79rem;
  font-weight: 720;
}
.city-atlas-nudge { display: none; flex: none; gap: 0.25rem; }
.city-atlas-nudge button {
  min-height: 38px;
  min-width: 44px;
  padding: 0.2rem 0.26rem;
  border: 1px solid #b4cfc2;
  border-radius: 0.26rem;
  color: #1d5646;
  background: #f9fdf4;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}
.city-atlas-nudge button:hover { background: #e8f4ea; }
.city-atlas-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  background: #eaf2e3;
  scrollbar-color: #8ea9a0 #e6eee3;
}
.city-atlas-board { position: relative; width: 100%; min-width: 747px; aspect-ratio: 1000 / 620; }
.city-atlas-terrain { position: absolute; display: block; width: 100%; height: 100%; inset: 0; }
.city-atlas-parks { fill: #e1ead8; opacity: 0.75; }
.city-atlas-shore { fill: url(#atlas-river); stroke: #80aebb; stroke-width: 1.5; }
.city-atlas-current { fill: none; stroke: #e4f0ec; stroke-width: 1.6; opacity: 0.94; }
.city-atlas-waterway { fill: none; stroke: #86c4c5; stroke-width: 6; opacity: 0.74; }
.city-atlas-waterway-thin { stroke-width: 4; }
.city-atlas-lake { fill: #b6d9d1; stroke: #78b4af; stroke-width: 1.5; opacity: 0.7; }
.city-atlas-schematic-roads { fill: none; stroke: #b3c7b4; stroke-width: 4; stroke-dasharray: 2 7; opacity: 0.62; }
.city-atlas-area-names { fill: #5e765d; font-family: var(--sans, system-ui); font-weight: 650; font-size: 15px; letter-spacing: 3px; }
.city-atlas-water-names { fill: #2f695c; font-family: var(--sans, system-ui); font-weight: 720; font-size: 16px; letter-spacing: 3px; }
.city-atlas-water-names text:first-child { fill: #234d61; font-size: 26px; letter-spacing: 7px; }
.city-atlas-compass { fill: #3c6058; font-size: 17px; font-weight: 760; }
.city-atlas-compass path { fill: #3c6058; stroke: #3c6058; stroke-width: 2.2; }
.city-atlas-edge {
  fill: none;
  stroke: var(--atlas-verified);
  stroke-width: 2.3;
  opacity: 0.61;
  vector-effect: non-scaling-stroke;
}
.city-atlas-edge.is-plan { stroke: var(--atlas-plan); stroke-dasharray: 7 5; }
.city-atlas-edge.is-schematic { stroke: var(--atlas-schematic); stroke-dasharray: 1 5; stroke-linecap: round; }
.city-atlas-edge.is-historical { stroke-dasharray: 10 3 2 3; }
.city-atlas-edge.is-active { opacity: 1; stroke-width: 3; }
.city-atlas-arrow { fill: var(--atlas-verified); }
.city-atlas-arrow.is-plan { fill: var(--atlas-plan); }
.city-atlas-arrow.is-schematic { fill: var(--atlas-schematic); }

.city-atlas-pin {
  --pin-tone: #1d7560;
  --pin-outline: #287561;
  --pin-paper: #f1faf0;
  z-index: 1;
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: var(--pin-tone);
  font: inherit;
  cursor: pointer;
}
.city-atlas-pin.for-sewage { --pin-tone: #7f5524; --pin-outline: #996c36; --pin-paper: #fff4e4; }
.city-atlas-pin.for-rain { --pin-tone: #225871; --pin-outline: #4e8296; --pin-paper: #ecf7f8; }
.city-atlas-pin.for-reference { --pin-tone: #4a635a; --pin-outline: #859790; --pin-paper: #f3f6ed; }
.city-atlas-pin.is-context { opacity: 0.78; }
.city-atlas-pin[hidden] { display: none; }
.city-atlas-marker {
  --point: var(--atlas-verified);
  position: relative;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1.5px solid var(--pin-outline);
  border-radius: 50%;
  background: var(--pin-paper);
  box-shadow: 0 1px 5px #173d2b24;
}
.city-atlas-marker svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
.city-atlas-marker::after {
  position: absolute;
  width: 7px;
  height: 7px;
  right: -3px;
  top: -2px;
  border: 1px solid var(--point);
  border-radius: 50%;
  background: var(--point);
  content: "";
}
.city-atlas-pin.is-plan .city-atlas-marker { --point: var(--atlas-plan); border-style: dashed; }
.city-atlas-pin.is-plan .city-atlas-marker::after { border-radius: 1px; background: #fff5d9; transform: rotate(45deg); }
.city-atlas-pin.is-schematic .city-atlas-marker { --point: var(--atlas-schematic); border-style: dotted; }
.city-atlas-pin.is-schematic .city-atlas-marker::after { background: #f1f4ee; }
.city-atlas-pin.icon-source .city-atlas-marker { --pin-paper: #eaf8fa; }
.city-atlas-pin.icon-plant .city-atlas-marker { border-radius: 0.38rem; }
.city-atlas-pin.icon-reserve .city-atlas-marker { border-radius: 0.65rem 0.65rem 0.65rem 0.2rem; }
.city-atlas-pin.icon-landmark .city-atlas-marker { border-radius: 0.42rem; }
.city-atlas-pin-label {
  position: absolute;
  top: 34px;
  left: 50%;
  display: block;
  padding: 0.14rem 0.29rem;
  transform: translateX(-50%);
  border: 1px solid #c3d3c3;
  border-radius: 0.27rem;
  color: #264a3f;
  background: #f7faeefd;
  line-height: 1.12;
  font-size: 0.7rem;
  font-weight: 710;
  white-space: nowrap;
}
.city-atlas-pin[aria-pressed="true"],
.city-atlas-pin:hover,
.city-atlas-pin:focus-visible { z-index: 3; opacity: 1; }
.city-atlas-pin[aria-pressed="true"] .city-atlas-marker {
  color: #fff;
  background: var(--pin-tone);
  outline: 3px solid #f0cf7f;
  outline-offset: 2px;
}
.city-atlas-pin[aria-pressed="true"] .city-atlas-pin-label {
  border-color: #b28a48;
  color: #513b17;
  background: #fff1cd;
}
.city-atlas-pin:focus-visible .city-atlas-marker { outline: 2px solid #133f39; outline-offset: 3px; }

.city-atlas-shoreline,
.city-atlas-map-note { margin: 0; padding: 0.32rem 0.68rem; line-height: 1.55; }
.city-atlas-shoreline { border-top: 1px solid #c6dacf; color: #284d43; font-size: 0.8rem; font-weight: 710; }
.city-atlas-map-note { padding-top: 0; padding-bottom: 0.7rem; color: var(--atlas-muted); font-size: 0.76rem; }

.city-atlas-detail {
  min-width: 0;
  padding: 0.96rem;
  border: 1px solid var(--atlas-border);
  border-radius: 0.58rem;
  background: var(--atlas-paper);
  line-height: 1.62;
}
.city-atlas-detail p { margin: 0; }
.city-atlas-detail h3 { margin: 0.12rem 0 0.36rem; color: #154b43; font-family: var(--serif, serif); font-size: 1.37rem; line-height: 1.34; }
.city-atlas-detail-kind { color: #3e6b5c; font-size: 0.78rem; font-weight: 730; }
.city-atlas-detail-scope { margin-bottom: 0.54rem !important; color: #4f6559; font-size: 0.78rem; }
.city-atlas-position { margin-bottom: 0.37rem !important; }
.city-atlas-position strong { color: #1e594b; font-size: 0.8rem; }
.city-atlas-summary, .city-atlas-position { font-size: 0.87rem; }
.city-atlas-actions { display: flex; flex-wrap: wrap; gap: 0.38rem; margin: 0.68rem 0 0.62rem; }
.city-atlas-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.27rem 0.45rem;
  border: 1px solid #9cbcaa;
  border-radius: 0.33rem;
  color: #1f5949;
  background: #f1f8ea;
  font-size: 0.8rem;
  font-weight: 730;
  text-decoration: none;
}
.city-atlas-actions a:hover { background: #deefe3; }
.city-atlas-actions a[data-atlas-exhibit] { border-color: #145d4d; color: white; background: #17604f; }
.city-atlas-actions a[data-atlas-exhibit]:hover { background: #104c41; }
.city-atlas-detail-block { border-top: 1px solid #d6e1d4; padding: 0.46rem 0 0; margin: 0.55rem 0 0; }
.city-atlas-detail-block h4 { margin: 0 0 0.32rem; color: #254f43; font-size: 0.88rem; line-height: 1.23; }
.city-atlas-detail-block > p { color: var(--atlas-muted); font-size: 0.8rem; }
.city-atlas-relations, .city-atlas-sources { padding: 0; margin: 0; list-style: none; }
.city-atlas-relations { display: grid; gap: 0.38rem; }
.city-atlas-relation {
  padding: 0.42rem 0.52rem;
  border: 1px solid #cfddd0;
  border-left: 2px solid var(--atlas-verified);
  border-radius: 0.3rem;
  background: #fdfdf5;
  font-size: 0.79rem;
}
.city-atlas-relation.is-plan { border-left-color: var(--atlas-plan); border-left-style: dashed; }
.city-atlas-relation.is-schematic { border-left-color: var(--atlas-schematic); border-left-style: dotted; }
.city-atlas-relation .city-atlas-badge { margin-top: 0.17rem; font-size: 0.66rem; }
.city-atlas-direction { margin-right: 0.3rem; color: #3f6557; font-size: 0.71rem; font-weight: 780; }
.city-atlas-related {
  padding: 0.18rem 0;
  border: 0;
  color: #245b4b;
  background: transparent;
  font: inherit;
  font-weight: 760;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
  cursor: pointer;
}
.city-atlas-related:hover { color: #133d33; }
.city-atlas-relation details { margin-top: 0.19rem; color: #345f55; }
.city-atlas-relation summary { cursor: pointer; }
.city-atlas-sources li { margin: 0.25rem 0 0.34rem; }
.city-atlas-sources a { color: #245a50; font-size: 0.79rem; }
.city-atlas-sources small { display: block; color: #526b61; font-size: 0.72rem; }
.city-atlas-back { display: inline-block; margin-top: 0.62rem; color: #245a50; font-size: 0.78rem; font-weight: 720; }

@media (max-width: 1070px) {
  .city-atlas-content { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 810px) {
  .city-atlas-nudge { display: inline-flex; }
}
@media (max-width: 570px) {
  .city-atlas-tabs { width: 100%; }
  .city-atlas-tabs button { flex: 1; padding-inline: 0.24rem; }
  .city-atlas-queries { display: grid; width: 100%; }
  .city-atlas-queries label { display: grid; grid-template-columns: 4.2rem minmax(0,1fr); }
  .city-atlas-queries select, .city-atlas-queries label:first-child select { width: 100%; }
  .city-atlas-legend { gap: 0.17rem 0.5rem; }
  .city-atlas-legend > span { gap: 0.23rem; }
  .city-atlas-legend-line { width: 0.64rem; }
  .city-atlas-legend small { font-size: 0.67rem; }
  .city-atlas-detail { padding: 0.73rem; }
}
