/* ========== タイトル画像 ========== */
.guide-map-title {
  max-width: 960px;
  margin: 60px auto 0;
  text-align: center;
}
.guide-map-title img {
  width: 100%;
  max-width: 636px;
  height: auto;
}
@media screen and (max-width: 768px) {
  .guide-map-title {
    margin: 40px auto 30px;
    padding: 0 20px;
  }
}

/* ========== 全国マップ 共通 ========== */
#mainMap {
  background: url(/guide/img/fig_main_map.png) no-repeat center top;
  display: block;
  height: 872px;
  margin: 0 auto;
  margin-top: 30px;
  max-width: 960px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  font-family: "Noto Sans JP", sans-serif;
}

/* PC/SP 切り替え（#mainMap 内限定） */
#mainMap .u-desktop { display: block; }
#mainMap .u-mobile  { display: none; }
#mainMap .pc-only   { display: block; }
#mainMap .sp-only,
#mainMap .sp-only.btnPlusMain { display: none; }

#mainMap .mainMap_btn {
  display: block;
  position: absolute;
  left: 0;
  top: 160px;
  width: 112px;
  text-decoration: none;
  z-index: 5;
}
#mainMap .mainMap_btn img {
  width: 100%;
  height: auto;
  display: block;
}
#mainMap .mainMap_btn::before,
#mainMap .mainMap_btn::after {
  display: none;
}

#mainMap .mainMap_tab { display: none; }

#mainMap .mainMap_ttl {
  font-size: 28px;
  font-weight: 700;
  left: 0;
  line-height: 1;
  position: absolute;
  top: 56px;
  color: #3E3F3F;
  margin: 0;
}
#mainMap .mainMap_ttl-sp { display: none; }

#mainMap .mainMap_txt {
  font-size: 14px;
  font-weight: 400;
  left: 0;
  line-height: 1.4;
  position: absolute;
  top: 111px;
  margin: 0;
}

#mainMap dl {
  border: #ccc solid 1px;
  left: 0;
  margin: auto;
  padding: 0 0 10px;
  position: absolute;
  right: 0;
  width: 150px;
  background: #fff;
}

#mainMap_area1 { top: 59px;  transform: translateX(395px); }
#mainMap_area1 a { display: block; }
#mainMap_area2 { top: 178px; transform: translateX(395px); }
#mainMap_area3 { top: 448px; transform: translateX(330px); }
#mainMap_area4 { top: 156px; transform: translateX(0); }
#mainMap_area5 { top: 604px; transform: translateX(125px); }
#mainMap_area6 { top: 235px; transform: translateX(-170px); }
#mainMap_area7 { top: 310px; transform: translateX(-340px); }
#mainMap_area8 { top: 658px; transform: translateX(-120px); }
#mainMap_area9 { top: 541px; transform: translateX(-395px); }

#mainMap dl dt { float: none; }
#mainMap dl dt a {
  border-top-style: solid;
  border-top-width: 5px;
  font-size: 21px;
  line-height: 1;
  padding: 8px 0 16px;
  text-align: center;
  text-decoration: none;
  display: block;
}
#mainMap_area1 dt a { border-top-color: #5571a8; color: #5974a7; }
#mainMap_area2 dt a { border-top-color: #32a3d6; color: #32a3d6; }
#mainMap_area3 dt a { border-top-color: #61a977; color: #61a977; }
#mainMap_area4 dt a { border-top-color: #c1c133; color: #c1c133; }
#mainMap_area5 dt a { border-top-color: #a0c68f; color: #a0c68f; }
#mainMap_area6 dt a { border-top-color: #eaad5a; color: #eaad5a; }
#mainMap_area7 dt a { border-top-color: #e67eae; color: #e67eae; }
#mainMap_area8 dt a { border-top-color: #e68e7e; color: #e68e7e; }
#mainMap_area9 dt a { border-top-color: #f2b7d4; color: #f2b7d4; }

#mainMap dl dd { margin: 0; }
#mainMap dl dd a {
  color: #333;
  display: block;
  font-size: 14px;
  line-height: 1;
  padding: 6px 18px;
  text-decoration: none;
}
#mainMap dl dd a:before {
  content: "> ";
  display: inline-block;
  margin-right: 0.35em;
  transform: rotate(90deg);
  transform-origin: center;
}

#mainMap dl dt a.pc-only {
  pointer-events: none;
  cursor: default;
}
#mainMap dl dt a.pc-only:hover { background: transparent; }

#mainMap dl dt a:hover,
#mainMap dl dd a:hover { background: #eee; }

#mainMap dl dd a.is-selected,
#mainMap dl dd a.is-selected:hover {
  background: #F19B2C;
  color: #fff;
}
#mainMap dl dd a.is-selected:before { color: #fff; }

/* GPSモーダル */
#mainMap .modal.js-modal {
  display: none;
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10000;
}
#mainMap .modal__bg {
  background: rgba(0,0,0,.8);
  height: 100vh;
  position: absolute;
  width: 100%;
  z-index: 10;
}
#mainMap .modal__content {
  background: #fff;
  left: 50%;
  padding: 40px;
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 30%;
  min-width: 360px;
  z-index: 11;
  text-align: center;
  border-radius: 8px;
}
#mainMap .btn-yes {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  color: #fff;
  background-color: #00F9A9;
  transition: .4s;
  width: 40%;
  font-size: 14px;
}
#mainMap .btn-yes:hover { background-color: #64F9C1; }
#mainMap .btn-no {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  color: #fff;
  background-color: #444;
  transition: .4s;
  width: 40%;
  font-size: 14px;
}
#mainMap .btn-no:hover { background-color: #888; }
#mainMap #text-info  { font-size: 18px; margin: 0 0 10px; }
#mainMap #text-Caution { font-size: 14px; color: #f00; margin-top: 15px; margin-bottom: 10px; }
#mainMap #text-info2 { font-size: 13px; margin-top: 10px; }

/* ========== マップ幅が 960px 未満のとき（タブレット横の PC 表示のみ） ==========
   ビューポート 1300px 以下で切り替えると、ブラウザ拡大（150% 等）で CSS 幅だけが
   狭くなり、実際の #mainMap は max-width:960 で変わらないのに「狭い画面用」座標に
   切り替わって地図がずれる。コンテナ幅に合わせ max-width:960 で切り替える。
   min-width:769 は SP レイアウト（768 以下）との二重適用を避ける。 */
@media screen and (max-width: 960px) and (min-width: 769px) {
  #mainMap { background-size: 800px; }
  #mainMap dl { width: 130px; }
  #mainMap_area1 { top: 100px; transform: translateX(300px); }
  #mainMap_area2 { top: 222px; transform: translateX(320px); }
  #mainMap_area3 { top: 465px; transform: translateX(300px); }
  #mainMap_area4 { top: 160px; transform: translateX(20px); }
  #mainMap_area5 { top: 570px; transform: translateX(120px); }
  #mainMap_area6 { top: 235px; transform: translateX(-129px); }
  #mainMap_area7 { top: 310px; transform: translateX(-277px); }
  #mainMap_area8 { top: 615px; transform: translateX(-100px); }
  #mainMap_area9 { top: 535px; transform: translateX(-320px); }
}

/* ========== SP（768px以下） ========== */
@media screen and (max-width: 768px) {
  #mainMap .u-desktop { display: none !important; }
  #mainMap .u-mobile  { display: block !important; }
  #mainMap .pc-only   { display: none !important; }
  #mainMap .sp-only   { display: block !important; }
  #mainMap span.sp-only.btnPlusMain { display: inline-block !important; }

  #mainMap {
    background: none;
    height: auto;
    margin: 0 auto;
    width: 100%;
    padding: 0;
  }

  #mainMap .mainMap_btn { display: none; }
  #mainMap .mainMap_ttl { display: none; }
  #mainMap .mainMap_txt { display: none; }

  #mainMap .mainMap_tab {
    align-items: center;
    display: flex;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
  }
  #mainMap .mainMap_tab li { width: 50%; }
  #mainMap .mainMap_tab li a {
    background: #f6f5f2;
    border-bottom: 1px solid #ccc;
    border-top: none;
    color: #7a776a;
    display: block;
    font-size: 16px;
    font-weight: bold;
    padding: 20px 0;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }
  #mainMap .mainMap_tab li:first-child a { border-right: 1px solid #ccc; }
  #mainMap .mainMap_tab li.tab_active a {
    background: #fff;
    border-bottom: none;
    border-top: 1px solid #ccc;
    color: #686048;
  }

  #mainMap .mainMap_ttl-sp {
    background: #fff;
    color: #333;
    font-size: 18px;
    line-height: 1.556;
    margin: 40px auto 15px;
    text-align: center;
    width: 100%;
    display: block;
  }

  #mainMap dl {
    border: none;
    padding: 0;
    margin: 0 !important;
    position: relative;
    width: 100%;
    left: auto;
    right: auto;
    background: none;
  }
  #mainMap dl + dl {
    margin: 0 !important;
  }
  #mainMap_area1,
  #mainMap_area2,
  #mainMap_area3,
  #mainMap_area4,
  #mainMap_area5,
  #mainMap_area6,
  #mainMap_area7,
  #mainMap_area8,
  #mainMap_area9 {
    left: auto;
    top: auto;
    transform: translateX(0);
  }

  #mainMap dl dt { float: none; position: relative; height: 67px; overflow: hidden; }
  #mainMap dl dt.open { height: auto; overflow: visible; }
  #mainMap dl dt a {
    background: #f7f7f7;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0;
    padding: 24px 0 24px 38px;
    position: relative;
    text-align: left;
    display: block;
    box-sizing: border-box;
  }
  #mainMap dl dt a::before {
    content: "";
    display: block;
    height: 25px;
    left: 15px;
    position: absolute;
    top: 21px;
    width: 10px;
  }
  #mainMap dl dt a::after {
    color: #333;
    content: "＋";
    font-size: 14px;
    font-weight: 300;
    position: absolute;
    right: 24px;
  }

  #mainMap dl dd { display: none; margin: 0; }
  #mainMap dl dd a {
    font-size: 15px;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    padding: 24px 0 24px 48px;
    position: relative;
  }
  #mainMap dl dd a:before {
    content: "＞";
    display: inline-block;
    font-size: 14px;
    position: absolute;
    right: 24px;
    transform: rotate(90deg);
    transform-origin: center;
  }

  /* アコーディオン開いた時 */
  #mainMap dt.open { position: relative; }
  #mainMap dt.open a.sp-only {
    color: #fff;
    border-bottom: none;
  }
  #mainMap dt.open a.sp-only::before { background: #fff !important; }
  #mainMap dt.open a.sp-only::after { color: #fff; content: "―"; font-size: 14px; }
  #mainMap dt.open span.btnPlusMain { display: none !important; }

  /* 北海道は直リンク（アコーディオンなし） */
  #mainMap #mainMap_area1 dt a::after {
    content: "＞";
    display: inline-block;
    transform: rotate(90deg);
    transform-origin: center;
  }
  #mainMap_area1 dt a::before { background: #5974a7; }
  #mainMap_area1 dd a { display: none !important; }

  /* エリア別カラー */
  #mainMap_area2 dt.open a.sp-only { background: #32a3d6; }
  #mainMap_area2 dt a::before { background: #32a3d6; }
  #mainMap_area2 dd a { background: #e0f1f9; }

  #mainMap_area3 dt.open a.sp-only { background: #61a977; }
  #mainMap_area3 dt a::before { background: #61a977; }
  #mainMap_area3 dd a { background: #e7f2eb; }

  #mainMap_area4 dt.open a.sp-only { background: #c1c133; }
  #mainMap_area4 dt a::before { background: #c1c133; }
  #mainMap_area4 dd a { background: #f6f6e1; }

  #mainMap_area5 dt.open a.sp-only { background: #a0c68f; }
  #mainMap_area5 dt a::before { background: #a0c68f; }
  #mainMap_area5 dd a { background: #ecf4e9; }

  #mainMap_area6 dt.open a.sp-only { background: #eaad5a; }
  #mainMap_area6 dt a::before { background: #eaad5a; }
  #mainMap_area6 dd a { background: #fcf3e6; }

  #mainMap_area7 dt.open a.sp-only { background: #e67eae; }
  #mainMap_area7 dt a::before { background: #e67eae; }
  #mainMap_area7 dd a { background: #fbecf3; }

  #mainMap_area8 dt.open a.sp-only { background: #e68e7e; }
  #mainMap_area8 dt a::before { background: #e68e7e; }
  #mainMap_area8 dd a { background: #fae8e5; }

  #mainMap_area9 dt.open a.sp-only { background: #f2b7d4; }
  #mainMap_area9 dt a::before { background: #f2b7d4; }
  #mainMap_area9 dd a { background: #fdf0f7; }

  #mainMap dl dd a.is-selected,
  #mainMap dl dd a.is-selected:hover {
    background: #F19B2C;
    color: #fff;
  }
  #mainMap dl dd a.is-selected:before { color: #fff; }

  /* GPSモーダル SP */
  #mainMap .modal__content { width: 80%; min-width: auto; padding: 30px 20px; }
}
