:root {
  --ink: #221d18;
  --ink-soft: #3f372f;
  --muted: #6e6357;
  --paper: #fffdf8;
  --paper-warm: #f8f3e9;
  --page: #efe8da;
  --line: rgba(34, 29, 24, 0.1);
  --line-strong: rgba(34, 29, 24, 0.18);
  --vermilion: #b83b2a;
  --vermilion-soft: rgba(184, 59, 42, 0.1);
  --vermilion-dark: #962c1e;
  --pine: #36644f;
  --pine-soft: rgba(54, 100, 79, 0.11);
  --ochre: #bf7a2b;
  --sea: #d4e3dd;
  --land-rest: #e6dece;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 4px 14px rgba(54, 38, 18, 0.06);
  --shadow-md: 0 16px 40px rgba(54, 38, 18, 0.08);
  --shadow-lg: 0 24px 60px rgba(34, 29, 24, 0.16);
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "KaiTi", "STKaiti", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(920px 480px at 4% -6%, rgba(255, 252, 244, 0.92), transparent 58%),
    radial-gradient(760px 440px at 96% 6%, rgba(212, 227, 221, 0.55), transparent 62%),
    var(--page);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
}

button, a, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { text-decoration: none; }

.page {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.seal {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, #c64330, #a32f20);
  color: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(184, 59, 42, 0.26), inset 0 0 0 1.5px rgba(255, 253, 248, 0.3);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.tagline {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.top-domain {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Map card */
.map-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 14px 14px 12px;
}

.map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 10px;
}

.map-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.map-hint {
  font-size: 12px;
  color: var(--muted);
}

.map-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sea);
  box-shadow: inset 0 0 0 1px rgba(34, 29, 24, 0.08);
}

#world {
  display: block;
  width: 100%;
  height: auto;
}

.map-note {
  margin: 10px 6px 2px;
  font-size: 12px;
  color: var(--muted);
}

/* SVG 地图元素 */
#world .sphere {
  fill: var(--sea);
  stroke: rgba(34, 29, 24, 0.14);
  stroke-width: 1;
}

#world .grat {
  fill: none;
  stroke: rgba(34, 29, 24, 0.08);
  stroke-width: 0.7;
}

#world .rest {
  fill: var(--land-rest);
  stroke: rgba(255, 253, 248, 0.85);
  stroke-width: 0.8;
  stroke-linejoin: round;
}

#world .region {
  cursor: pointer;
}

#world .region .land {
  fill: var(--tone);
  stroke: rgba(255, 253, 248, 0.7);
  stroke-width: 0.9;
  stroke-linejoin: round;
  transition: filter 160ms ease;
}

#world .region:hover .land,
#world .region:focus-visible .land,
#world .region.is-hot .land {
  filter: brightness(0.86) saturate(1.12) drop-shadow(0 3px 8px rgba(34, 29, 24, 0.4));
}

#world .region.is-dim .land {
  opacity: 0.45;
}

#world .region.is-dim .region-label,
#world .region.is-dim .pin-line,
#world .region.is-dim .pin-dot,
#world .region.is-dim .pin-chip {
  opacity: 0.4;
}

#world .region:focus-visible {
  outline: none;
}

#world .region:focus-visible .land {
  stroke: var(--vermilion);
  stroke-width: 1.8;
}

#world .region-label {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--label-fs, 16px);
  fill: var(--ink);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
  user-select: none;
}

#world .region:hover .region-label,
#world .region.is-hot .region-label {
  fill: var(--vermilion-dark);
}

/* 日/韩小国：圆点 + 引线 + 标签牌 */
#world .pin-line {
  stroke: rgba(34, 29, 24, 0.55);
  stroke-width: 1;
  stroke-dasharray: 2.5 2.5;
}

#world .pin-dot {
  fill: var(--tone);
  stroke: var(--paper);
  stroke-width: 1.6;
}

#world .pin-chip rect {
  fill: var(--paper);
  stroke: rgba(34, 29, 24, 0.28);
  stroke-width: 1;
  filter: drop-shadow(0 3px 6px rgba(34, 29, 24, 0.25));
}

#world .region.is-hot .pin-chip rect {
  stroke: var(--vermilion);
}

#world .pin-chip text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--label-fs, 16px);
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}

#world .region:hover .pin-chip text,
#world .region.is-hot .pin-chip text {
  fill: var(--vermilion-dark);
}

/* 悬浮提示 */
.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
  max-width: 240px;
}

.tip b {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.tip span {
  display: block;
  font-size: 11.5px;
  opacity: 0.82;
}

/* 站点卡片 */
.sites {
  margin-top: 22px;
}

.section-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-cap h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.section-cap span {
  font-size: 12px;
  color: var(--muted);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.site-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.site-card:hover,
.site-card:focus-visible,
.site-card.is-hot {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
}

.site-card .swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: inset 0 0 0 1.5px rgba(255, 253, 248, 0.7), 0 0 0 1px rgba(34, 29, 24, 0.12);
  flex-shrink: 0;
}

.site-card .copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.site-card .copy strong {
  font-family: var(--font-serif);
  font-size: 15.5px;
  letter-spacing: 0.05em;
}

.site-card .copy strong em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
  letter-spacing: 0.04em;
}

.site-card .copy small {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* Footer */
.foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* 响应式 */
@media (max-width: 860px) {
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .page { width: calc(100% - 24px); padding-top: 14px; }
  .top { padding: 12px 14px; border-radius: 18px; }
  .brand-copy h1 { font-size: 20px; }
  .tagline { font-size: 12px; }
  .top-domain { display: none; }
  .map-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .site-card { padding: 11px 12px; gap: 10px; }
  .site-card .copy strong { font-size: 14.5px; }
}
