* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #303030;
  background: #f5f4ef;
  overflow-x: hidden;
}

.page {
  width: min(1160px, 96vw);
  margin: 28px auto;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  max-width: 980px;
  margin: 0 0 20px;
  color: #5f615f;
  line-height: 1.8;
  font-weight: 700;
}

.lead .linked-sample {
  display: inline-block;
  width: .95em;
  height: .95em;
  vertical-align: -0.12em;
  background: #e8f1fa;
  border: 1.5px solid #4a7fb5;
  border-radius: 3px;
}

.map-section {
  background: #fff;
  border: 1px solid #dedbd2;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.map-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.map-wrap {
  position: relative;
  /* 正方形地図のため高さ=幅。iframe(高さ780px)内でスクロール不要となるよう
     ビューポート高さでも上限制御（各国マップと同運用） */
  width: min(100%, 860px, calc(100vh - 230px));
  margin: 0 auto;
}

.map-img {
  display: block;
  width: 100%;
  height: auto;
}

/* 国選択ボタン: 黒丸＋国名ピル。<a target="_top"> で親ページごと遷移 */
.country-link {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-decoration: none;
  --label-x: 0px;
  --label-y: -26px;
}

.country-link::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #1a5fa8;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.country-link span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + var(--label-x)), calc(-50% + var(--label-y)));
  display: inline-block;
  border: 1.5px solid #1a5fa8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .98);
  color: #14487e;
  padding: .38em .75em;
  font-size: clamp(11px, 1.7vw, 15px);
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
  white-space: nowrap;
  text-align: center;
}

.country-link:hover span,
.country-link:focus span {
  background: #1a5fa8;
  border-color: #1a5fa8;
  color: #fff;
  outline: none;
}

.country-link:focus-visible {
  outline: 2px solid #1a5fa8;
  outline-offset: 8px;
}

.country-link:hover::after,
.country-link:focus::after {
  transform: translate(-50%, -50%) scale(1.3);
}

.turkey {
  left: 26.2%;
  top: 25.6%;
}

.iran {
  left: 71.4%;
  top: 43.5%;
}

@media (max-width: 560px) {
  .page {
    margin: 18px auto;
  }

  .map-section {
    padding: 10px;
    border-radius: 14px;
  }

  .country-link span {
    padding: .42em .7em;
    font-size: 11px;
  }
}


/* ==== レイアウト刷新 2026-07-09（国別マップde5と同仕様） ====
   可変iframe高さに合わせ、flex縦積み＋aspect-ratioで地図を
   「幅にも残り高さにも収まる最大サイズ」に自動フィット */
html, body { height: 100%; }
.page { margin: 0 auto; padding: 16px 0; height: 100%; display: flex; flex-direction: column; }
.lead { margin: 0 0 14px; }
.lead p { margin: 0; }
.lead-more summary { display: none; cursor: pointer; color: #1f5e73; width: fit-content; }
.map-section { flex: 1; min-height: 0; }
.map-scroll { height: 100%; }
.map-wrap { aspect-ratio: 1 / 1; width: auto; max-width: min(100%, 860px); max-height: 100%; margin: 0 auto; }
@media (max-width: 768px) {
  .page { width: 100%; padding: 8px 0; }
  h1 { padding: 8px 12px 0; font-size: 20px; }
  .lead { padding: 0 12px; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
  .lead-more summary { display: list-item; }
  .map-wrap { width: 100%; max-width: none; max-height: none; margin: 0 auto; }
}
