:root {
  --surface: #fcfcfb;
  --page: #f4f6fa;
  --ink: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #898781;
  --border: rgba(11,11,11,0.10);
  --accent: #2a78d6;
  --accent-dark: #184f95;
  --off: #d7dae1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 8px 24px rgba(20,30,60,0.06);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: linear-gradient(135deg, #0d2a4d 0%, #184f95 55%, #2a78d6 100%);
  color: #fff;
  padding: 36px 0 28px;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

.site-header .subtitle {
  margin: 0;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
}

.updated-line {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

.layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 40px;
  align-items: start;
}

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
}

.map-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 18px 18px 10px;
}

.map {
  width: 100%;
  height: 480px;
}

.legend {
  display: flex;
  gap: 20px;
  padding: 12px 4px 6px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-on { background: var(--accent); }
.dot-off { background: var(--off); }

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 20px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.card-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.country-empty {
  color: var(--ink-secondary);
  font-size: 0.92rem;
  padding: 12px 0;
}

.country-result {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.country-result img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: #f4f4f2;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex: none;
}

.country-result .info { min-width: 0; }

.country-result .country-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}

.country-result .product-title {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.country-result a.buy-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
}

.country-result a.buy-link:hover { background: var(--accent-dark); }

.country-nodata {
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.country-nodata .flag-name {
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.top10-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top10-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top10-list .rank {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--page);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top10-list img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #f4f4f2;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex: none;
}

.top10-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.top10-list a:hover { color: var(--accent); text-decoration: underline; }

.skeleton {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.site-footer {
  padding: 24px 0 40px;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

/* jsVectorMap tooltip tweak */
.jvm-tooltip {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
}
