:root {
  --nav: rgba(251, 251, 253, 0.78);
  --nav-strong: rgba(255, 255, 255, 0.72);
  --nav-line: rgba(0, 0, 0, 0.1);
  --page: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-soft: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --blue: #0066cc;
  --salmon: #ff3b30;
  --green: #34c759;
  --gold: #ff9f0a;
  --marker: #1d1d1f;
  --highlight: #0071e3;
  --map-ink: #1d1d1f;
  --map-highlight-soft: rgba(0, 113, 227, 0.14);
  --map-surface: #f2f2f4;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI",
    "Open Sans", "Helvetica Neue", Arial, sans-serif, "Microsoft YaHei New", "Microsoft Yahei",
    STXihei;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.app-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--nav-line);
  background: var(--nav);
  color: var(--ink);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(18px);
}

.nav-brand {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.nav-brand:hover {
  text-decoration: none;
}

.brand-cluster {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.about-button {
  width: 28px;
  height: 28px;
  border-color: transparent;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
}

.about-button:hover,
.about-button:focus-visible {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.nav-button:hover,
.nav-button:focus-visible,
.nav-button.active {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  outline: none;
}

.fit-button {
  border-color: rgba(0, 113, 227, 0.16);
  background: var(--highlight);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

.fit-button:hover,
.fit-button:focus-visible {
  border-color: var(--highlight);
  background: #0077ed;
  color: #fff;
}

.nav-button svg {
  width: 16px;
  height: 16px;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.search-shell,
select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

.search-shell {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0 6px 0 10px;
}

.nav-search {
  flex: 0 1 310px;
  height: 34px;
  border-color: var(--nav-line);
  background: var(--nav-strong);
  color: var(--muted);
}

.nav-search input {
  color: var(--ink);
}

.nav-search input::placeholder {
  color: #86868b;
}

.search-shell:focus-within,
select:focus {
  border-color: rgba(0, 113, 227, 0.46);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
  outline: none;
}

.search-shell svg {
  width: 17px;
  height: 17px;
  color: currentColor;
  opacity: 0.75;
}

.search-shell input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

select {
  width: 100%;
  padding: 0 10px;
}

.language-select {
  width: 118px;
  height: 34px;
  border-color: var(--nav-line);
  background: var(--nav-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

.icon-button {
  width: 30px;
  height: 30px;
  padding: 0;
}

.icon-button.ghost {
  border-color: transparent;
  background: transparent;
  color: inherit;
}

.panel-icon {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.panel-icon:hover,
.panel-icon:focus-visible {
  border-color: var(--salmon);
  color: var(--salmon);
  outline: none;
}

.text-button {
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.text-button.primary {
  border-color: var(--highlight);
  background: var(--highlight);
  color: #fff;
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.text-button svg,
.icon-button svg {
  width: 15px;
  height: 15px;
}

.map-stage {
  position: absolute;
  inset: 56px 0 0;
  z-index: 0;
  background: var(--map-surface);
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--map-surface);
}

.leaflet-tile-pane {
  filter: grayscale(0.7) saturate(0.48) sepia(0.08) brightness(1.05) contrast(0.94);
  opacity: 0.94;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: var(--radius);
}

.control-panel,
.detail-panel,
.distribution-panel {
  position: absolute;
  z-index: 500;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(18px);
}

.control-panel {
  top: 66px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(360px, calc(100vw - 20px));
  max-height: calc(100vh - 76px);
  padding: 0 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

body.control-panel-closed .control-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
}

.control-panel > * {
  flex-shrink: 0;
}

.close-control {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.feature-visual {
  margin: 0 -16px;
  overflow: hidden;
  background: #f2f2f4;
  border-radius: var(--radius) var(--radius) 0 0;
}

.feature-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
}

.feature-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: -28px;
  min-height: 28px;
  padding: 6px 10px;
  background: linear-gradient(90deg, rgba(29, 29, 31, 0.72), rgba(29, 29, 31, 0.18));
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.3;
}

.feature-visual a {
  color: #fff;
}

.brand-block {
  display: block;
}

.brand-block h1,
.detail-panel h2 {
  margin: 4px 0 0;
  line-height: 1.2;
}

.brand-block h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  word-break: keep-all;
}

.brand-block h1 span {
  display: block;
}

.intro-copy {
  margin: 14px 0 0;
  color: #3a3a3c;
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid div {
  min-width: 0;
  padding: 10px 6px;
  border-left: 1px solid var(--line);
}

.stats-grid div:first-child {
  border-left: 0;
}

.stats-grid span,
.stats-grid small {
  display: block;
}

.stats-grid span {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.stats-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.filter-stack {
  display: grid;
  gap: 12px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.year-tabs button {
  min-width: 55px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.year-tabs button.active {
  border-color: var(--salmon);
  background: var(--salmon);
  color: #fff;
}

.rating-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.84);
}

.rating-toggle button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.rating-toggle button.active {
  background: #1d1d1f;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
}

.list-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-heading {
  padding-top: 2px;
}

.list-heading strong,
.panel-heading strong {
  display: block;
  font-size: 15px;
}

.list-heading span,
.panel-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.panel-heading.compact {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.attraction-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.attraction-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px 11px;
  text-align: left;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.attraction-card:hover,
.attraction-card.active {
  border-color: var(--highlight);
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-name {
  display: block;
  margin: 0;
  color: #241a16;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.card-meta {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.year-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--blue);
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
}

.attraction-card.active .year-badge {
  background: var(--highlight);
  color: #fff;
}

.distribution-panel {
  right: 10px;
  bottom: 10px;
  width: min(390px, calc(100vw - 20px));
  max-height: min(64vh, 560px);
  padding: 14px;
  overflow: hidden;
}

.distribution-panel.collapsed {
  display: none;
}

.legend-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.legend-metrics div {
  min-width: 0;
  border: 1px solid rgba(215, 196, 167, 0.78);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 9px 10px;
}

.legend-metrics span,
.legend-metrics small {
  display: block;
}

.legend-metrics span {
  color: #2b211c;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.legend-metrics small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.legend-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.legend-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  min-width: 0;
  padding: 1px 0;
}

.legend-row p {
  margin: 0;
  min-width: 0;
}

.legend-row strong,
.legend-row span {
  display: block;
}

.legend-row strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.legend-row p span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.marker-sample,
.range-sample {
  box-sizing: border-box;
  justify-self: center;
}

.marker-sample {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 30px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, #2b2b2f 0%, #171719 100%);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  padding: 0 10px;
  transform: translateZ(0);
}

.marker-sample.peer {
  min-width: 50px;
  border-color: rgba(29, 29, 31, 0.16);
  background: rgba(245, 245, 247, 0.96);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 11px;
}

.marker-sample.four-a {
  background: linear-gradient(180deg, #4d6f85 0%, #263d4c 100%);
}

.range-sample {
  width: 42px;
  height: 42px;
  border: 3px solid var(--highlight);
  border-radius: 50%;
  background: var(--map-highlight-soft);
}

.province-bars {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 4px;
}

.province-bar {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
}

.province-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #e5ddd2;
  overflow: hidden;
}

.province-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--highlight);
  opacity: 0.82;
}

.map-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 7px;
  background: var(--map-ink);
  box-shadow: 0 2px 7px rgba(47, 41, 36, 0.28);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  transform: rotate(-45deg);
}

.map-marker.four-a {
  background: #2f5f75;
  font-size: 9px;
}

.map-marker.peer {
  background: #f5f5f7;
  color: var(--ink);
  font-size: 8px;
}

.map-marker span {
  transform: rotate(45deg);
}

.map-marker-shell.selected .map-marker {
  background: var(--highlight);
  box-shadow:
    0 0 0 7px var(--map-highlight-soft),
    0 4px 11px rgba(47, 41, 36, 0.3);
  transform: rotate(-45deg) scale(1.16);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: var(--map-highlight-soft);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(47, 41, 36, 0.9);
  color: #fff;
  font-weight: 700;
}

.detail-panel {
  top: 66px;
  right: 10px;
  width: min(340px, calc(100vw - 20px));
  max-height: calc(100vh - 76px);
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(14px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

body.has-selection .detail-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.close-detail {
  position: absolute;
  top: 14px;
  right: 14px;
}

.detail-panel h2 {
  margin-right: 34px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 600;
}

.detail-description {
  margin: -4px 34px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.detail-visual {
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f2f2f4;
}

.detail-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
}

.detail-visual.image-missing {
  display: grid;
}

.detail-visual.image-missing::before {
  content: attr(data-placeholder);
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.detail-visual.image-missing img {
  display: none;
}

.detail-visual figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.detail-facts {
  display: grid;
  gap: 0;
  margin: 20px 0;
  border-top: 1px solid var(--line);
}

.detail-facts div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.related-section {
  margin-top: 10px;
}

.related-list {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.related-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
}

.related-item:hover {
  border-color: var(--salmon);
}

.related-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.source-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.source-note span {
  color: var(--ink);
  font-weight: 700;
}

.about-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(245, 245, 247, 0.68);
  backdrop-filter: saturate(180%) blur(18px);
}

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

.about-card {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  padding: 26px;
}

.about-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.about-card h2 {
  margin: 8px 42px 0 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.about-lead {
  margin: 14px 0 0;
  color: #3a3a3c;
  font-size: 15px;
  line-height: 1.65;
}

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

.about-grid article,
.about-disclaimer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.about-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

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

.about-disclaimer {
  margin-top: 10px;
}

.about-credit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed #cdb897;
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-nav {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    padding: 10px 12px;
  }

  .nav-brand {
    width: auto;
    font-size: 20px;
  }

  .brand-cluster {
    order: 1;
  }

  .nav-search {
    order: 3;
    flex: 1 1 100%;
  }

  .nav-center {
    position: static;
    order: 2;
    margin-left: auto;
    transform: none;
  }

  .nav-actions {
    order: 4;
    margin-left: 0;
  }

  .map-stage {
    position: relative;
    inset: auto;
    height: 62vh;
    min-height: 480px;
  }

  .control-panel,
  .detail-panel {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: auto;
    max-height: none;
    margin: 12px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body.control-panel-closed .control-panel {
    display: none;
  }

  .detail-panel {
    display: none;
  }

  body.has-selection .detail-panel {
    display: block;
  }

  .distribution-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    max-height: 42vh;
  }

  .about-backdrop {
    position: fixed;
    align-items: flex-end;
    padding: 12px;
  }

  .about-card {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .nav-center,
  .nav-actions {
    width: 100%;
  }

  .nav-center .nav-button {
    width: 100%;
  }

  .nav-button {
    padding: 0 8px;
  }

  .data-pill {
    margin-left: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid div:nth-child(odd) {
    border-left: 0;
  }

  .stats-grid div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .province-bar {
    grid-template-columns: 48px minmax(0, 1fr) 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card h2 {
    font-size: 22px;
  }

  .legend-row {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
  }

  .marker-sample,
  .range-sample {
    justify-self: center;
  }

  .marker-sample {
    min-width: 38px;
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .marker-sample.peer {
    min-width: 46px;
    font-size: 10px;
  }

  .range-sample {
    width: 38px;
    height: 38px;
  }
}
