:root {
  color-scheme: light;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --ink: #162333;
  --muted: #647386;
  --line: #d9e3ec;
  --line-strong: #b9c8d6;
  --cyan: #1aa6b7;
  --cyan-soft: rgba(26, 166, 183, 0.14);
  --green: #2b9c74;
  --green-soft: rgba(43, 156, 116, 0.14);
  --shadow: 0 24px 70px rgba(46, 69, 90, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 35, 54, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(18, 35, 54, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #f8fbfd 0%, #eef5f8 52%, #f8fbfc 100%);
  background-size: 32px 32px, 32px 32px, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 52px;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.map-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.map-backdrop::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(248, 251, 253, 0.62) 68%),
    linear-gradient(180deg, rgba(248, 251, 253, 0.2), rgba(248, 251, 253, 0.82));
  content: "";
}

.topbar,
.dashboard {
  position: relative;
  z-index: 1;
}

.topbar {
  text-align: center;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 1;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  font-weight: 760;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 20px;
  align-items: start;
  width: min(980px, 100%);
  margin: 0 auto;
}

.service-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.service-alipay {
  border-top: 3px solid var(--cyan);
}

.service-wechat {
  border-top: 3px solid var(--green);
}

.service-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  text-align: center;
}

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

.province-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.province-link:hover,
.province-link:focus-visible,
.province-link.is-active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  outline: none;
  transform: translateY(-1px);
}

.service-wechat .province-link:hover,
.service-wechat .province-link:focus-visible,
.service-wechat .province-link.is-active {
  border-color: var(--green);
  background: var(--green-soft);
}

.province-link strong,
.province-link span {
  display: block;
  min-width: 0;
}

.province-link strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.province-link span {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.province-link::after {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: var(--line-strong);
  content: "";
  transform: rotate(45deg);
}

.china-map {
  width: min(1180px, 112vw);
  max-width: none;
  opacity: 0.58;
  transform: translateY(18px);
  filter: drop-shadow(0 28px 54px rgba(48, 86, 104, 0.13));
}

.province {
  fill: rgba(204, 224, 229, 0.92);
  stroke: rgba(36, 69, 92, 0.9);
  stroke-width: 1.75;
  transition:
    fill 180ms ease,
    opacity 180ms ease,
    stroke 180ms ease;
  vector-effect: non-scaling-stroke;
}

.province.is-target {
  fill: rgba(159, 221, 230, 0.92);
  stroke: rgba(5, 136, 154, 0.96);
}

.province.is-active {
  fill: rgba(43, 156, 116, 0.3);
  stroke: rgba(43, 156, 116, 1);
}

.province-boundary {
  fill: none;
  pointer-events: none;
  stroke: rgba(37, 69, 92, 0.62);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.province-boundary.is-target {
  stroke: rgba(8, 143, 160, 0.72);
}

.province-boundary.is-active {
  stroke: rgba(43, 156, 116, 1);
  stroke-width: 2;
}

.node-hit {
  fill: transparent;
}

.node-ring {
  fill: none;
  stroke: rgba(26, 166, 183, 0.18);
  stroke-width: 10;
}

.node-dot {
  fill: var(--surface-strong);
  stroke: var(--cyan);
  stroke-width: 3;
  filter: url("#nodeGlow");
  transition:
    r 180ms ease,
    stroke 180ms ease,
    fill 180ms ease;
}

.node-label {
  fill: var(--ink);
  opacity: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 4;
  stroke-linejoin: round;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.node.is-active .node-dot {
  r: 7;
  fill: var(--green);
  stroke: var(--surface-strong);
}

.node.is-active .node-ring {
  stroke: rgba(43, 156, 116, 0.34);
}

.node.is-active .node-label {
  opacity: 1;
}

.map-error {
  position: fixed;
  left: 50%;
  top: 20px;
  z-index: 2;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .page-shell {
    justify-content: flex-start;
    width: min(1240px, calc(100% - 28px));
    padding-top: 34px;
  }

  .dashboard {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
  }

  .china-map {
    width: 150vw;
    transform: translate(13vw, 120px);
  }

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

@media (max-width: 520px) {
  .page-shell {
    width: min(1240px, calc(100% - 20px));
    gap: 22px;
    padding-top: 28px;
  }

  .service-panel {
    padding: 16px;
  }

  .province-link {
    min-height: 44px;
  }
}
