@charset "utf-8";
/* =========================================================
   全国マップ（PC）— #screenNational_PC
   エリアをクリックすると着色され、都道府県カードが開く
   ========================================================= */

.jpmap {
  --jpmap-line: #1a3b5c;
  --jpmap-accent: #1fa3b5;
  --jpmap-bg: #ffffff;
  --jpmap-card-w: 182px;

  font-family: "Noto Sans JP", sans-serif;
  max-width: 1120px;
  margin: 0 auto 48px;
  color: var(--jpmap-line);
}

/* ---- 見出し（タブ状） ---- */
.jpmap__head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.jpmap__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 26px 10px 18px;
  background: var(--jpmap-line);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 8px 8px 0 0;
  line-height: 1.2;
}

.jpmap__tab img { width: 34px; height: auto; display: block; }

.jpmap__lede {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
}

.jpmap__lede em {
  font-style: normal;
  font-weight: 700;
  background: #ffd54a;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ---- ステージ ---- */
.jpmap__frame {
  border: 3px solid var(--jpmap-line);
  border-radius: 4px;
  background: var(--jpmap-bg);
  padding: 18px 24px 24px;
}

.jpmap__stage {
  position: relative;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  aspect-ratio: 942 / 477;
}

.jpmap__base,
.jpmap__houses,
.jpmap__region {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.jpmap__base,
.jpmap__houses { inset: 0; width: 100%; height: 100%; }

.jpmap__region {
  opacity: 0;
  transition: opacity .18s ease;
  will-change: opacity;
}

.jpmap__region.is-hover  { opacity: .6; }
.jpmap__region.is-active { opacity: 1; }

/* ---- クリック領域（SVG） ---- */
.jpmap__hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jpmap__zone {
  fill: rgba(0, 0, 0, 0);
  cursor: pointer;
  outline: none;
}

.jpmap__zone:focus-visible {
  stroke: var(--jpmap-accent);
  stroke-width: 3;
}

/* ---- 引き出し線 ---- */
.jpmap__lead {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.jpmap.has-lead .jpmap__lead { opacity: 1; }

.jpmap__lead line {
  stroke: var(--jpmap-accent);
  stroke-width: 1.5;
}

/* ---- 都道府県カード ---- */
.jpmap__card {
  position: absolute;
  left: var(--card-left);
  top: var(--card-top);
  width: var(--jpmap-card-w);
  background: #fff;
  border: 2px solid var(--jpmap-accent);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  overflow: hidden;
  z-index: 3;
}

.jpmap__card[hidden] { display: none; }

.jpmap__cardHead {
  position: relative;
  margin: 0;
  padding: 6px 8px;
  background: var(--jpmap-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.jpmap__close {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}

.jpmap__close:hover { background: rgba(255, 255, 255, .4); }

.jpmap__prefs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
}

.jpmap__prefs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 2px;
  border: 1px solid var(--jpmap-accent);
  border-radius: 4px;
  background: #fff;
  color: var(--jpmap-line);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.jpmap__prefs a:hover {
  background: var(--jpmap-accent);
  color: #fff;
}

/* 単独県（北海道）は1カラム */
.jpmap__card--single .jpmap__prefs { grid-template-columns: 1fr; }

/* ---- SP では従来のSP版を使う（サイト全体のPC/SP境界は 1000px） ---- */
@media (max-width: 999px) {
  .jpmap { display: none; }
}

@media (min-width: 1000px) and (max-width: 1199px) {
  .jpmap { --jpmap-card-w: 150px; }
  .jpmap__prefs a { font-size: 12px; min-height: 26px; }
  .jpmap__cardHead { font-size: 13px; }
}

/* =========================================================
   全国エリア選択（SP） — #jpmapSp
   背景の地図は固定。ボタンだけ「エリア → 都道府県」と入れ替わる
   ========================================================= */

.jpmapSp {
  display: none;
  --sp-navy: #16385c;
  --sp-blue: #dfefff;
  --sp-mark: #ffd54a;
  font-family: "Noto Sans JP", sans-serif;
}

@media (max-width: 999px) {
  .jpmapSp { display: block; }
}

.jpmapSp__panel {
  position: relative;
  max-width: 420px;
  margin: 50px auto 32px;
  padding: 0;
  background: #fff;
  border: 3px solid var(--sp-navy);
  border-radius: 16px;
}

.jpmapSp__icon {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 47px;
  height: auto;
  display: block;
  pointer-events: none;
}

.jpmapSp__head {
  margin: 0;
  padding: 16px 12px;
  background: var(--sp-navy);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.2;
  border-radius: 12px 12px 0 0;
}

.jpmapSp__body {
  position: relative;
  overflow: hidden;
  margin: 7px;
  padding: 20px 14px 22px;
  border-radius: 8px;
  background-color: var(--sp-blue);
  background-image: var(--sp-map);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
}

/* 全ビューを同じマスに重ねる。切り替えても高さが変わらず、背景の見え方も固定される */
.jpmapSp__stack { display: grid; }

.jpmapSp__view {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.jpmapSp__view.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.jpmapSp__lede {
  margin: 0 0 16px;
  color: var(--sp-navy);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.jpmapSp__lede em {
  font-style: normal;
  background: var(--sp-mark);
  padding: 2px 6px;
  border-radius: 3px;
}

.jpmapSp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

/* 奇数個のときは最後の1つを中央に置く */
.jpmapSp__grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: 62%;
  margin-inline: auto;
}

.jpmapSp__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 5px rgba(22, 56, 92, .16);
  color: var(--sp-navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.jpmapSp__btn:hover,
.jpmapSp__btn:focus-visible {
  color: var(--sp-navy);
  text-decoration: none;
}

.jpmapSp__btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(22, 56, 92, .2);
}

.jpmapSp__back {
  display: block;
  margin: 16px auto 0;
  padding: 8px 16px;
  border: 1px solid var(--sp-navy);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  color: var(--sp-navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.jpmapSp__back:active { background: #fff; }
