/* ===== 店舗一覧（お近くの院を探す） ===== */

/* ワンカラム */
.post-type-archive-shops #sidebar { display: none !important; }
.post-type-archive-shops #content {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.smg-shopsearch { color: #555; }
.smg-shopsearch *, .smg-shopsearch *::before, .smg-shopsearch *::after { box-sizing: border-box; }

/* アンカーボタン */
.smg-jump {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 0 48px;
}
.smg-jump a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 260px;
  padding: 14px 16px 14px 28px;
  border: 1px solid #f76552;
  border-radius: 40px;
  background: #fff;
  color: #706565;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.smg-jump a:hover { background: #fbe7e3; }
.smg-jump__arrow {
  position: relative;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f76552;
  flex: 0 0 26px;
}
.smg-jump__arrow::after {
  content: "";
  position: absolute;
  left: 50%; top: 45%;
  width: 7px; height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* MAP */
.smg-mapbox {
  position: relative;
  padding: 24px;
  border-radius: 20px;
  background: #fbe7e3;
  margin-bottom: 70px;
  scroll-margin-top: 120px;
}
.smg-map {
  width: 100%;
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  background: #eee;
  z-index: 0;
}
.smg-reset {
  position: absolute;
  top: 36px; right: 36px;
  z-index: 500;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.smg-reset:hover { background: #f8f8f8; }

/* 都道府県タブ */
.smg-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  border-top: 1px solid #f3c9c1;
  border-left: 1px solid #f3c9c1;
  background: #fff;
}
.smg-tab {
  flex: 1 1 0;
  min-width: 140px;
  padding: 16px 8px 30px;
  position: relative;
  border: 0;
  border-right: 1px solid #f3c9c1;
  border-bottom: 1px solid #f3c9c1;
  background: #fff;
  color: #555;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.smg-tab:hover, .smg-tab[aria-expanded="true"] { background: #fff4f1; }
.smg-tab__label { display: inline-flex; align-items: center; gap: 6px; }
.smg-tab__pm {
  position: absolute;
  left: 50%; bottom: 8px;
  width: 16px; height: 16px;
  margin-left: -8px;
  border: 1px solid #aaa;
  border-radius: 50%;
}
.smg-tab__pm::before, .smg-tab__pm::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 1px;
  background: #777;
  transform: translate(-50%, -50%);
}
.smg-tab__pm::after { transform: translate(-50%, -50%) rotate(90deg); }
.smg-tab[aria-expanded="true"] .smg-tab__pm::after { display: none; }

.smg-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

/* タブのパネル */
.smg-panel {
  padding: 20px 24px 24px;
  background: #fff4f1;
  border: 1px solid #f3c9c1;
  border-top: 0;
}
.smg-panel[hidden] { display: none; }
.smg-panel__shops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.smg-panel ul { margin: 0; padding: 0; list-style: none; }
.smg-panel li { margin: 0; padding: 0; list-style: none; }
.smg-panel li::before { display: none; }
.smg-panel__shop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #e6c9c2;
  color: #555;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.smg-panel__shop:hover { color: #f76552; }
.smg-pin {
  position: relative;
  width: 12px; height: 12px;
  flex: 0 0 12px;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  transform: rotate(-45deg);
}
.smg-pin::after {
  content: "";
  position: absolute;
  left: 3.5px; top: 3.5px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fff;
}
.smg-panel__all {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 28px 8px 0;
  border-bottom: 1px solid #706565;
  color: #706565;
  font-size: 13px;
  text-decoration: none;
  position: relative;
}
.smg-panel__all::after {
  content: "→";
  position: absolute;
  right: 0; top: 8px;
}

/* 一覧 */
.smg-list { margin-bottom: 80px; scroll-margin-top: 120px; }
.smg-list__label {
  display: table;
  margin: 0 auto 36px;
  padding: 8px 26px;
  border-radius: 6px;
  background: #706565;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  position: relative;
}
.smg-list__label::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -14px;
  width: 1px; height: 14px;
  background: #706565;
}
.smg-pref { margin-bottom: 50px; scroll-margin-top: 120px; }
#content .smg-pref__title {
  margin: 0 0 6px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #f76552;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  line-height: 1.4;
}
#content .smg-pref__title::before,
#content .smg-pref__title::after { display: none; content: none; }

.smg-rows {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.smg-row {
  margin: 0;
  padding: 18px 8px 16px;
  border-bottom: 1px solid #f3c9c1;
  list-style: none;
}
.smg-row::before { display: none; }
.smg-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.smg-row__name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
}
.smg-row__city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #777;
}
.smg-row__name a {
  color: #555;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.smg-row__name a:hover { color: #f76552; }
.smg-row__tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.smg-row__tel::before {
  content: "";
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.smg-row__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: #666;
  text-decoration: none;
}
.smg-row__addr { font-size: 13px; line-height: 1.7; }
.smg-row__go {
  position: relative;
  width: 34px; height: 22px;
  flex: 0 0 34px;
  border-radius: 12px;
  background: #f76552;
  transition: opacity .2s;
}
.smg-row__go::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: translate(-65%, -50%) rotate(45deg);
}
.smg-row__bottom:hover .smg-row__go { opacity: .7; }

/* 地図の吹き出し */
.smg-iw { font-size: 13px; line-height: 1.6; color: #555; max-width: 240px; }
.smg-iw strong { display: block; font-size: 14px; margin-bottom: 4px; }
.smg-iw a { color: #f76552; font-weight: 700; }

/* Leaflet用ピン */
.smg-lpin { background: none; border: 0; }
.smg-lpin span {
  position: relative;
  display: block;
  width: 26px; height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.smg-lpin span::after {
  content: "";
  position: absolute;
  left: 7px; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* 非表示（絞り込み） */
.smg-shopsearch [hidden] { display: none !important; }

/* エリアで絞り込む */
.smg-areas {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed #e6c9c2;
}
.smg-areas__head {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #706565;
}
.smg-areas__block + .smg-areas__block { margin-top: 12px; }
.smg-areas__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f76552;
}
.smg-areas__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.smg-area {
  padding: 6px 14px;
  border: 1px solid #f3c9c1;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.smg-area span { margin-left: 2px; font-size: 12px; font-weight: 400; }
.smg-area:hover { background: #fbe7e3; }
.smg-area.is-active { background: #f76552; border-color: #f76552; color: #fff; }

/* 絞り込み中バー */
.smg-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  padding: 12px 18px;
  border-radius: 8px;
  background: #fbe7e3;
  font-size: 15px;
}
.smg-filterbar strong { color: #f76552; }
.smg-filterbar button {
  padding: 6px 14px;
  border: 1px solid #f76552;
  border-radius: 20px;
  background: #fff;
  color: #f76552;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* テーマの a:link（青・下線）を打ち消す */
.smg-shopsearch a:link,
.smg-shopsearch a:visited { text-decoration: none; }
.smg-shopsearch .smg-jump a:link,
.smg-shopsearch .smg-jump a:visited { color: #706565; }
.smg-shopsearch a.smg-panel__shop:link,
.smg-shopsearch a.smg-panel__shop:visited,
.smg-shopsearch .smg-row__name a:link,
.smg-shopsearch .smg-row__name a:visited,
.smg-shopsearch a.smg-row__tel:link,
.smg-shopsearch a.smg-row__tel:visited { color: #555; }
.smg-shopsearch a.smg-panel__all:link,
.smg-shopsearch a.smg-panel__all:visited { color: #706565; }
.smg-shopsearch a.smg-row__bottom:link,
.smg-shopsearch a.smg-row__bottom:visited { color: #666; }
.smg-shopsearch a.smg-panel__shop:hover,
.smg-shopsearch .smg-row__name a:hover { color: #f76552; }
.smg-shopsearch .smg-iw a:link,
.smg-shopsearch .smg-iw a:visited { color: #f76552; }

/* ===== 埋め込み用（トップページ等）：見出し付き ===== */
.smg-shopsearch--embed { max-width: 1200px; margin: 0 auto 80px; padding: 0 20px; }
.smg-mapbox {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.38) 0 6px, rgba(255,255,255,0) 6px 14px),
    #f9c8c6;
}
.smg-mapbox--titled { margin-top: 60px; padding-top: 70px; border-radius: 40px; }
.smg-shopsearch .smg-mapbox__title {
  position: absolute; left: 0; right: 0; top: -30px;
  margin: 0; padding: 0; border: 0; background: none;
  text-align: center; font-size: 40px; font-weight: 900; letter-spacing: .14em; line-height: 1.4;
  color: #4a2f2f;
}
.smg-shopsearch .smg-mapbox__title::before,
.smg-shopsearch .smg-mapbox__title::after { display: none; content: none; }
.smg-mapbox__card { position: relative; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 4px 16px rgba(180,80,80,.12); }
.smg-mapbox__card .smg-reset { top: 26px; right: 26px; }

/* ===== スマホ ===== */
@media screen and (max-width: 768px) {
  .smg-jump { gap: 10px; margin-bottom: 32px; }
  .smg-jump a { min-width: 0; flex: 1; padding: 12px 10px 12px 16px; font-size: 14px; gap: 8px; }
  .smg-mapbox { padding: 12px; border-radius: 14px; margin-bottom: 50px; }
  .smg-map { height: 380px; }
  .smg-reset { top: 20px; right: 20px; font-size: 12px; padding: 6px 12px; }
  .smg-mapbox__card { padding: 8px; }
  .smg-mapbox__card .smg-reset { top: 16px; right: 16px; }
  .smg-shopsearch--embed { padding: 0 12px; }
  .smg-mapbox--titled { margin-top: 44px; padding-top: 48px; border-radius: 26px; }
  .smg-shopsearch .smg-mapbox__title { top: -20px; font-size: 26px; letter-spacing: .08em; }
  .smg-tab { flex: 1 1 50%; min-width: 0; font-size: 14px; }
  .smg-panel { padding: 12px 16px 18px; }
  .smg-panel__shops { grid-template-columns: 1fr; }
  .smg-rows { grid-template-columns: 1fr; }
  .smg-filterbar { flex-direction: column; align-items: flex-start; font-size: 14px; }
  .smg-row__top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .smg-row__name a { font-size: 16px; }
  .smg-row__tel { font-size: 16px; }
}
