:root {
  color-scheme: light;
  --ink: #123042;
  --ink-strong: #082332;
  --muted: #526b78;
  --subtle: #748994;
  --line: #d9e4e8;
  --line-strong: #bdcfd6;
  --paper: #f4f8f9;
  --card: #ffffff;
  --primary: #0c7183;
  --primary-dark: #075b6a;
  --primary-soft: #e1f2f4;
  --accent: #e69645;
  --danger: #bb4b44;
  --danger-soft: #fbeceb;
  --safe: #28735c;
  --safe-soft: #e8f4ef;
  --shadow: 0 22px 60px rgba(21, 61, 77, .09);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -10%, rgba(55, 153, 166, .15), transparent 31rem),
    radial-gradient(circle at 96% 8%, rgba(230, 150, 69, .10), transparent 26rem),
    var(--paper);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

button:focus-visible,
input:focus-visible,
.header-link:focus-visible,
.docs-button:focus-visible,
.drop-zone:focus-within,
.layer-view-switch button:focus-visible,
.layer-option-toggle:focus-visible,
.reset-view-button:focus-visible,
.city-card:focus-visible {
  outline: 3px solid rgba(12, 113, 131, .28);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink-strong);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1400px, calc(100% - 48px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(189, 207, 214, .7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: .01em;
}

.brand-mark,
.upload-icon {
  display: grid;
  place-items: center;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(12, 113, 131, .22);
}

.brand-mark svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.header-actions { display: flex; align-items: center; gap: 22px; }

.header-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.header-link { padding: 8px 2px; border-bottom: 1px solid transparent; }
.header-link:hover { border-color: currentColor; }
.header-link.is-current { color: var(--ink-strong); border-color: var(--primary); }

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3e9d78;
  box-shadow: 0 0 0 5px rgba(62, 157, 120, .11);
}

.shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 38px;
}

.eyebrow,
.card-kicker,
.legend-title {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, p { overflow-wrap: break-word; }
h1, h2 { margin: 0; color: var(--ink-strong); font-size: 23px; letter-spacing: -.02em; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: stretch;
}

.map-card,
.control-card,
.detail-card,
.city-section {
  border: 1px solid rgba(195, 213, 220, .88);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.map-card { min-width: 0; overflow: hidden; border-radius: var(--radius-lg); }

.card-header {
  min-height: 91px;
  padding: 23px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.card-kicker { margin-bottom: 5px; color: var(--subtle); }

.map-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }

.icon-button,
.text-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.icon-button { width: 42px; padding: 0; display: grid; place-items: center; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.text-button { padding: 0 14px; font-size: 13px; }
.icon-button:hover:not(:disabled), .text-button:hover:not(:disabled) { color: var(--primary); border-color: #83b4bd; background: #f2fafb; }
button:disabled { cursor: not-allowed; opacity: .44; }

.map-stage {
  position: relative;
  min-height: 550px;
  overflow: hidden;
  background:
    linear-gradient(rgba(220, 232, 236, .4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 232, 236, .4) 1px, transparent 1px),
    radial-gradient(circle at 45% 46%, #fff 0, #f8fbfc 58%, #eff6f7 100%);
  background-size: 32px 32px, 32px 32px, auto;
}

.map-stage::before,
.map-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(12, 113, 131, .09);
}

.map-stage::before { width: 360px; height: 360px; left: calc(50% - 180px); top: calc(50% - 180px); }
.map-stage::after { width: 500px; height: 500px; left: calc(50% - 250px); top: calc(50% - 250px); }

#shandong-map {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 550px;
  padding: 22px 34px 26px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#shandong-map:focus-visible { outline: 3px solid rgba(12, 113, 131, .28); outline-offset: -5px; }
.map-stage.is-panning #shandong-map { cursor: grabbing; }

.map-loading {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.map-loading[hidden] { display: none; }

.base-city {
  fill: #dcecef;
  stroke: #fff;
  stroke-width: .48;
  vector-effect: non-scaling-stroke;
  filter: url(#map-shadow);
}

.base-city:nth-child(3n + 2) { fill: #d3e7ea; }
.base-city:nth-child(3n + 3) { fill: #e4f0f1; }

#weather-image-layer,
#classified-region-layer {
  opacity: 0;
  pointer-events: none;
  transition: opacity .65s cubic-bezier(.2, .7, .2, 1);
}

.map-stage.layer-mode-source #weather-image-layer.is-visible,
.map-stage.layer-mode-classified #classified-region-layer.is-visible {
  opacity: var(--layer-opacity, .72);
}

#weather-image-layer.is-replaying,
#classified-region-layer.is-replaying { animation: reveal-overlay 1.05s cubic-bezier(.18, .75, .2, 1) both; }

#base-map-layer,
#city-shape-layer,
#city-label-layer { transition: opacity .22s ease; }

.map-stage.overlay-hidden #base-map-layer,
.map-stage.overlay-hidden #city-shape-layer,
.map-stage.overlay-hidden #city-label-layer { opacity: 0; pointer-events: none; }

.map-stage.overlay-hidden .map-scale { opacity: 0; }
.map-card.overlay-hidden .legend-block { opacity: .42; }

.weather-image { image-rendering: auto; }
.classified-region-image { image-rendering: pixelated; }

.city-shape {
  fill: rgba(255, 255, 255, .01);
  stroke: #fff;
  stroke-width: .65;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .2s ease, stroke .2s ease, filter .2s ease;
}

.city-shape:focus { outline: none; }

.city-shape:hover,
.city-shape:focus-visible {
  fill: rgba(12, 113, 131, .16);
  stroke: #0c7183;
  stroke-width: 1.55;
  filter: drop-shadow(0 2px 3px rgba(8, 57, 70, .22));
}
.city-shape.has-coverage { fill: rgba(230, 150, 69, .13); }
.city-shape.is-affected { fill: rgba(187, 75, 68, .18); }
.city-shape.is-selected { fill: rgba(12, 113, 131, .23); stroke: #075b6a; stroke-width: 1.55; filter: drop-shadow(0 2px 3px rgba(8, 57, 70, .24)); }

.city-label { pointer-events: none; text-anchor: middle; paint-order: stroke; stroke: rgba(248, 252, 252, .96); stroke-width: .75; stroke-linejoin: round; }
.city-name { fill: #143c49; font-size: 2.55px; font-weight: 760; stroke: rgba(248, 252, 252, .98); }
.city-percent { fill: #805124; font-size: 2.05px; font-weight: 850; stroke-width: .65; }
.city-percent.affected { fill: #9d3430; }

.map-scale {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
}

.map-scale span { width: 38px; height: 5px; border: solid var(--muted); border-width: 0 1px 1px; }

.map-navigation {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 15px;
  min-height: 42px;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(189, 207, 214, .92);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(21, 61, 77, .12);
  backdrop-filter: blur(8px);
}

.map-zoom {
  display: grid;
  grid-template-columns: auto minmax(92px, 145px) 48px auto;
  align-items: center;
  gap: 7px;
}

.reset-view-button,
.zoom-button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #edf6f7;
  font-size: 11px;
  font-weight: 780;
}

.reset-view-button {
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
}

.reset-view-button:hover:not(:disabled),
.zoom-button:hover:not(:disabled) { color: #fff; background: var(--primary); }
.zoom-slider { display: flex; align-items: center; }
.zoom-slider input { width: 100%; accent-color: var(--primary); cursor: pointer; }
.zoom-slider input:disabled { cursor: not-allowed; }
.map-zoom output { color: var(--muted); font-size: 11px; font-weight: 780; font-variant-numeric: tabular-nums; text-align: center; }

.map-footer {
  min-height: 118px;
  padding: 19px 26px;
  display: grid;
  grid-template-columns: minmax(390px, 1.15fr) minmax(280px, .85fr);
  align-items: stretch;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.legend-title { margin-bottom: 7px; color: var(--subtle); }
.legend-block { transition: opacity .22s ease; }
.legend-items { display: flex; flex-wrap: wrap; gap: 8px 15px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.swatch { width: 11px; height: 11px; flex: 0 0 11px; border: 1px solid rgba(18, 48, 66, .16); border-radius: 3px; background: var(--swatch, #dcecef); }
.swatch.selected { background: rgba(12, 113, 131, .35); }

.layer-view-controls {
  min-width: 0;
  padding-right: 27px;
  border-right: 1px solid var(--line);
}

.layer-control-main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(210px, 250px);
  align-items: center;
  gap: 18px;
}

.layer-control-copy { min-width: 0; }
.layer-view-switch {
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  border-radius: 10px;
  background: #e9f0f2;
}

.layer-view-switch button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 760;
}

.layer-view-switch button.is-active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 2px 8px rgba(21, 61, 77, .11);
}

.layer-view-note {
  max-width: 330px;
  margin: 0;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.45;
}

.layer-options {
  margin-top: 13px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #e7eef0;
}

.layer-option-toggle {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 720;
}

.layer-option-toggle strong {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
}

.layer-option-toggle.is-active {
  color: var(--primary-dark);
  border-color: #91bac2;
  background: #f1f9fa;
}

.layer-option-toggle.is-active strong { color: var(--primary); }

.opacity-control {
  min-width: 190px;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.opacity-control[hidden] { display: none; }
.opacity-control input { grid-column: 1 / -1; width: 100%; accent-color: var(--primary); cursor: pointer; }
.opacity-control input:disabled { cursor: not-allowed; }

.side-stack { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 20px; }
.control-card, .detail-card { padding: 24px; border-radius: var(--radius-lg); }

.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading h2 { font-size: 19px; }
.step-number { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 850; letter-spacing: .05em; }

#analysis-form { display: grid; gap: 12px; }

.input-mode-switch {
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 12px;
  background: #edf3f5;
}

.input-mode {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.input-mode.is-active { color: var(--primary-dark); background: #fff; box-shadow: 0 2px 9px rgba(12, 56, 72, .1); }
.input-panel[hidden] { display: none; }

.drop-zone {
  min-height: 104px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px dashed #9ebbc3;
  border-radius: 14px;
  background: #f8fbfc;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.drop-zone:hover, .drop-zone.dragging { border-color: var(--primary); background: #f0f9fa; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; color: var(--primary); background: #e5f2f4; }
.upload-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.drop-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--subtle); font-size: 11px; line-height: 1.35; }
.drop-copy strong { color: var(--ink); font-size: 14px; }
.file-name { max-width: 220px; overflow: hidden; color: var(--primary); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.url-panel { min-height: 104px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfc; }
.url-panel > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 750; }
.url-input-shell { min-height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #aac0c6; border-radius: 10px; background: #fff; }
.url-input-shell:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12, 113, 131, .11); }
.url-input-shell svg { width: 17px; flex: 0 0 17px; fill: none; stroke: var(--primary); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.url-input-shell input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.url-input-shell input::placeholder { color: #8ca3aa; }
.url-panel p { margin: 9px 1px 0; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.url-panel code { color: var(--primary-dark); }

.primary-button {
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(12, 113, 131, .19);
  font-size: 14px;
  font-weight: 780;
  transition: background .2s ease, box-shadow .2s ease;
}

.primary-button:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 12px 28px rgba(12, 113, 131, .25); }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.primary-button.loading span::after { content: "…"; }

.status { min-height: 38px; margin: 14px 2px 0; color: var(--subtle); font-size: 12px; line-height: 1.6; }
.status.error { color: var(--danger); }
.status.success { color: var(--safe); }

.detail-card { min-height: 315px; }
.detail-placeholder { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--subtle); text-align: center; }
.detail-placeholder svg { width: 30px; fill: none; stroke: #7fa2ac; stroke-width: 1.6; }
.detail-placeholder p { max-width: 280px; margin: 0; font-size: 13px; line-height: 1.7; }

.detail-overview { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 15px; border-radius: 14px; background: #f4f9fa; }
.detail-overview span { color: var(--muted); font-size: 12px; }
.detail-overview strong { display: block; margin-top: 4px; color: var(--ink-strong); font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.result-pill { align-self: center; padding: 6px 9px; border-radius: 999px; color: var(--safe); background: var(--safe-soft); font-size: 11px; font-weight: 800; }
.result-pill.affected { color: var(--danger); background: var(--danger-soft); }
.weather-fact { margin: 13px 1px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.weather-fact strong { color: var(--ink); }
.level-list { display: grid; gap: 10px; margin-top: 14px; }
.level-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.level-label { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.level-value { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.level-bar { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: #e8eff1; }
.level-bar span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--bar-color, var(--accent)); }
.mini-swatch { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px; background: var(--mini-color); }

.city-section { margin-top: 20px; padding: 28px; border-radius: var(--radius-lg); }
.result-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.analysis-meta { padding: 7px 10px; border-radius: 9px; color: var(--muted); background: #edf3f5; font-size: 12px; font-weight: 750; }
.summary-line { margin: 18px 0 20px; padding: 12px 15px; border-left: 3px solid var(--primary); color: var(--muted); background: #f5f9fa; font-size: 13px; line-height: 1.6; }
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.city-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.city-card:hover { border-color: #99bac2; background: #f8fbfc; }
.city-card.is-selected { border-color: var(--primary); background: #f2f9fa; box-shadow: inset 0 0 0 1px rgba(12, 113, 131, .08); }
.city-card-name { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.city-card-value { color: var(--subtle); font-size: 13px; font-weight: 780; font-variant-numeric: tabular-nums; }
.city-card-value.affected { color: var(--danger); }
.city-card-state { grid-column: 1 / -1; color: var(--subtle); font-size: 10px; }

.api-section {
  margin-top: 20px;
  padding: 32px;
  scroll-margin-top: 20px;
  border: 1px solid rgba(195, 213, 220, .88);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.api-page-shell { width: min(1120px, calc(100% - 48px)); }
.api-section.standalone { margin-top: 0; }

.api-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 36px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.api-header h1 { font-size: 27px; }

.api-intro {
  max-width: 720px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.docs-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #8eb7c0;
  border-radius: 12px;
  color: var(--primary-dark);
  background: #f3fafb;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.docs-button:hover { border-color: var(--primary); background: #e8f5f6; }
.docs-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.api-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 20px;
  padding-top: 24px;
}

.api-quickstart,
.endpoint-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfdfd;
}

.api-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.api-card-heading h3,
.endpoint-heading h3 { margin: 0; color: var(--ink-strong); font-size: 18px; }

.base-url-row {
  min-height: 67px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.base-url-row div { min-width: 0; display: grid; gap: 5px; }
.base-url-row span,
.request-spec span { color: var(--subtle); font-size: 10px; font-weight: 700; }
.base-url-row code { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }

.copy-button {
  min-height: 30px;
  padding: 0 10px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--primary);
  background: #fff;
  font-size: 11px;
  font-weight: 780;
}

.copy-button:hover { border-color: var(--primary); background: var(--primary-soft); }
.copy-button.dark { min-height: 27px; color: #cdebf0; border-color: rgba(205, 235, 240, .24); background: rgba(255, 255, 255, .06); }
.copy-button.dark:hover { color: #fff; border-color: rgba(205, 235, 240, .5); background: rgba(255, 255, 255, .12); }

.request-spec { margin: 12px 0 18px; display: grid; grid-template-columns: .7fr 1.35fr .65fr; gap: 8px; }
.request-spec div { min-width: 0; padding: 11px; display: grid; gap: 4px; border-radius: 10px; background: #edf5f6; }
.request-spec strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.code-heading {
  min-height: 38px;
  padding: 6px 8px 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 11px 11px 0 0;
  color: #d8e8ec;
  background: #173845;
  font-size: 10px;
  font-weight: 760;
}

.code-block {
  margin: 0;
  padding: 17px;
  overflow-x: auto;
  border-radius: 0 0 11px 11px;
  color: #eaf5f6;
  background: #0e2b37;
  font: 12px/1.75 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.code-block.compact { max-height: 270px; font-size: 11px; line-height: 1.55; }

.api-note { margin: 11px 2px 0; color: var(--subtle); font-size: 11px; line-height: 1.65; }
.api-note code, .endpoint-row code { color: var(--primary-dark); font-family: "SFMono-Regular", Consolas, monospace; }

.endpoint-heading { margin-bottom: 14px; }
.endpoint-row { padding: 15px 2px; border-top: 1px solid var(--line); }
.endpoint-row.primary-endpoint { padding-top: 2px; border-top: 0; }
.endpoint-line { display: flex; align-items: center; gap: 10px; }
.endpoint-line code { color: var(--ink-strong); font-size: 13px; font-weight: 740; }
.method { min-width: 42px; padding: 4px 6px; border-radius: 6px; font-size: 9px; font-weight: 850; text-align: center; letter-spacing: .04em; }
.method.post { color: #9d3b35; background: #fbe8e6; }
.method.get { color: #17634e; background: #e2f2eb; }
.endpoint-row p { margin: 8px 0 0 52px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.endpoint-row dl { margin: 11px 0 0 52px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.endpoint-row dl div { display: flex; gap: 6px; font-size: 10px; }
.endpoint-row dt { color: var(--subtle); }
.endpoint-row dd { margin: 0; color: var(--ink); font-weight: 700; }
.response-preview { margin-top: 14px; }
.secondary-example { margin-top: 18px; }

.disclaimer { margin: 20px 3px 0; color: var(--subtle); font-size: 11px; line-height: 1.7; text-align: center; }

@keyframes reveal-overlay {
  0% { opacity: 0; transform: translateY(8px); }
  62% { opacity: var(--layer-opacity, .72); }
  100% { opacity: var(--layer-opacity, .72); transform: translateY(0); }
}

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); }
  .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-footer { grid-template-columns: 1fr; gap: 18px; }
  .layer-view-controls {
    width: 100%;
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .opacity-control { width: 100%; }
}

@media (max-width: 880px) {
  .site-header, .shell, .api-page-shell { width: min(100% - 32px, 720px); }
  .shell { padding-top: 38px; }
  .workspace { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header, .shell, .api-page-shell { width: min(100% - 24px, 520px); }
  .site-header { min-height: 66px; }
  .system-state { display: none; }
  .header-actions { gap: 12px; }
  .shell { padding: 30px 0; }
  .card-header { min-height: 82px; padding: 19px; }
  .map-header { align-items: center; }
  .map-actions { width: auto; }
  .map-actions .text-button { min-width: 0; min-height: 36px; padding: 0 11px; font-size: 11px; }
  .map-stage { min-height: 410px; }
  #shandong-map { height: 410px; padding: 14px; }
  .map-scale { bottom: 68px; }
  .map-navigation {
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .map-zoom { grid-template-columns: auto minmax(54px, 1fr) 42px auto; }
  .zoom-button { padding: 0 7px; }
  .city-name { font-size: 2.9px; }
  .city-percent { font-size: 2.3px; }
  .map-footer { padding: 16px 19px; }
  .layer-control-main { grid-template-columns: 1fr; gap: 12px; }
  .layer-view-switch { width: 100%; }
  .layer-options { align-items: stretch; flex-direction: column; gap: 10px; }
  .layer-option-toggle { width: 100%; }
  .side-stack { grid-template-columns: 1fr; }
  .control-card, .detail-card { padding: 20px; }
  .city-section { padding: 21px 18px; }
  .api-section { padding: 22px 18px; }
  .api-header { grid-template-columns: 1fr; gap: 17px; }
  .docs-button { width: 100%; }
  .api-quickstart, .endpoint-panel { padding: 17px; }
  .request-spec { grid-template-columns: 1fr; }
  .request-spec div { grid-template-columns: 95px 1fr; align-items: center; }
  .city-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .city-card { padding: 12px; }
  .result-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
