#food-map-app {
  --fm-bg: #ffffff;
  --fm-panel: #f6f9fc;
  --fm-border: #c9dcee;
  --fm-text: #000000;
  --fm-text-dim: #0466C8;
  --fm-text-faint: #5b7fa6;
  --fm-deep: #0466C8;
  --fm-sky: #2f9ce8;
  --fm-nodata: #b0b0b0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fm-text);
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0 32px;
}
#food-map-app * { box-sizing: border-box; }

#food-map-app .fm-header {
  border-bottom: 2px solid var(--fm-border);
  padding-bottom: 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
#food-map-app .fm-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: #000000; }
#food-map-app .fm-header p { margin: 4px 0 0; font-size: 13px; color: var(--fm-text-faint); max-width: 560px; line-height: 1.5; }
#food-map-app .fm-source-tag { font-size: 11px; color: var(--fm-text-faint); }

#food-map-app .fm-controls {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--fm-panel); border: 1.5px solid var(--fm-border); border-radius: 6px;
  padding: 12px 16px; margin-bottom: 16px;
}
#food-map-app .fm-scenario-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
#food-map-app .fm-scenario-buttons button {
  padding: 6px 12px; border-radius: 6px; border: 1.5px solid var(--fm-deep);
  background: #ffffff; color: var(--fm-deep); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
#food-map-app .fm-scenario-buttons button.fm-active { background: var(--fm-deep); color: #ffffff; }
#food-map-app .fm-scenario-buttons button:hover:not(.fm-active) { background: #eaf4fd; }

#food-map-app .fm-scenario-desc {
  font-size: 12px; color: var(--fm-text-faint); max-width: 260px; line-height: 1.4;
  border-left: 1px solid var(--fm-border); padding-left: 16px;
}

#food-map-app .fm-year-control { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; }
#food-map-app .fm-year-display { font-size: 18px; font-weight: 700; color: var(--fm-deep); width: 50px; text-align: right; }
#food-map-app .fm-play-btn {
  background: var(--fm-border); border: none; color: #000; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#food-map-app .fm-play-btn:hover { background: var(--fm-deep); color: #fff; }
#food-map-app input[type=range] { flex: 1; accent-color: var(--fm-deep); height: 4px; }

#food-map-app .fm-main { display: flex; gap: 18px; flex-wrap: wrap; }
#food-map-app .fm-col-map { flex: 3 1 480px; min-width: 0; position: relative; }
#food-map-app .fm-col-side {
  flex: 1 1 240px; max-width: 300px; min-width: 220px;
  background: var(--fm-panel); border: 1.5px solid var(--fm-border); border-radius: 6px; padding: 14px 16px;
}
#food-map-app .fm-col-side h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fm-text-faint); margin: 12px 0 6px; font-weight: 700; }
#food-map-app .fm-col-side h3:first-child { margin-top: 0; }
#food-map-app ul.fm-rank-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
#food-map-app ul.fm-rank-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #e3edf7; }
#food-map-app ul.fm-rank-list .fm-val { color: var(--fm-deep); font-weight: 700; }

#food-map-app svg.fm-map { width: 100%; height: auto; border: 1.5px solid var(--fm-border); border-radius: 6px; background: #ffffff; display: block; }
#food-map-app svg.fm-map path { cursor: pointer; stroke: #8ba9c4; stroke-width: 0.4; }
#food-map-app svg.fm-map path:hover { stroke: #000000; stroke-width: 1.1; }
#food-map-app svg.fm-map circle.fm-dot { cursor: pointer; stroke: #8ba9c4; stroke-width: 0.8; }
#food-map-app svg.fm-map circle.fm-dot:hover { stroke: #000000; stroke-width: 1.4; }

#food-map-app .fm-legend { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--fm-text-faint); }
#food-map-app .fm-legend .fm-bar { height: 8px; width: 140px; border-radius: 4px; }

#food-map-app .fm-tooltip {
  position: absolute; pointer-events: none; background: #ffffff; border: 1.5px solid var(--fm-deep);
  color: #000000; border-radius: 6px; padding: 8px 11px; font-size: 12px; line-height: 1.5;
  opacity: 0; transition: opacity 0.1s ease; z-index: 10; box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
#food-map-app .fm-tooltip .fm-t-country { font-weight: 700; color: var(--fm-deep); margin-bottom: 2px; }
#food-map-app .fm-tooltip .fm-t-row { display: flex; justify-content: space-between; gap: 16px; }
#food-map-app .fm-tooltip .fm-t-dim { color: var(--fm-text-faint); }

#food-map-app footer { margin-top: 14px; font-size: 11px; color: var(--fm-text-faint); line-height: 1.5; }

@media (max-width: 760px) {
  #food-map-app .fm-main { flex-direction: column; }
  #food-map-app .fm-col-side { max-width: none; }
}
