/* グループ医院コンポーネント（Illustrator アートボード 700x400 を忠実に再現） */

.ssk-group-clinics {
  font-family: "Noto Sans JP", sans-serif;
  color: #1c3b7c;
}

.ssk-group-clinics__note {
  margin: 0 0 1rem;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #626671;
}

/* パネル = .ai アートボード（左サマリー＋カード／右ドット地図） */
.ssk-group-clinics__panel {
  position: relative;
  width: 100%;
  aspect-ratio: 700 / 400;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #a9dcf6;
  container-type: inline-size;
}

/* 背景レイヤー（テクスチャ＋波＋ロゴ。地図ドットは除去済み） */
.ssk-group-clinics__map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ssk-group-clinics__map-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SVG ドット地図レイヤー（背景と同一座標系で全面に重ねるため位置が一致） */
.ssk-group-clinics__map {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ssk-group-map,
.ssk-group-map__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ssk-group-map__prefecture circle {
  fill: #1c3b7c;
  transition: fill 0.25s ease, opacity 0.25s ease;
}

.ssk-group-map__prefecture.is-active circle {
  fill: #ebd96e;
  opacity: 1;
}

/* 沖縄 inset の囲み線（.ai 由来の白ブラケット） */
.ssk-group-map__inset-frame {
  fill: #ffffff;
}

/* SHINSHINKAI GROUP ロゴ（PC=右下 / SP=左上） */
.ssk-group-clinics__map-logo {
  position: absolute;
  z-index: 2;
  width: 10.4%;
  right: 2.2%;
  bottom: 4.6%;
  pointer-events: none;
}
.ssk-group-clinics__map-logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* 地図準備中プレースホルダー */
.ssk-group-map--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  height: 100%;
  padding: 1.6rem;
  text-align: center;
}

.ssk-group-map__placeholder-text {
  margin: 0;
  color: #1c3b7c;
  font-family: "Noto Serif JP", serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.ssk-group-map__placeholder-note {
  margin: 0;
  color: #4a5a86;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.2rem;
  line-height: 1.6;
}

.ssk-group-map__placeholder-note code {
  font-size: 1rem;
}

/* 左コンテンツ（サマリーボックス＋カード）。.ai の占有矩形に合わせて配置 */
.ssk-group-clinics__content {
  position: absolute;
  z-index: 2;
  left: 6.03%;   /* 42.2 / 700 */
  top: 10%;      /* 40 / 400 */
  width: 38.57%; /* 270 / 700 */
  height: 80%;   /* 320 / 400 */
  display: flex;
  flex-direction: column;
  gap: 1.25cqw;
}

/* サマリーボックス（紺） */
.ssk-group-clinics__summary {
  flex: 0 0 31.25%; /* 100 / 320 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6cqw;
  border-radius: 1cqw;
  background: #1c3b7c;
  color: #fff;
  text-align: center;
}

.ssk-group-clinics__summary-label {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 2.1cqw;
  letter-spacing: 0.08em;
  line-height: 1;
}

.ssk-group-clinics__summary-main {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 2.85cqw;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.ssk-group-clinics__total {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 6cqw;
  color: #ebd96e;
  margin: 0 0.1em;
  vertical-align: -0.06em;
}

/* カードグリッド（2列×4行） */
.ssk-group-clinics__grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 0.72cqw; /* 5 / 700 */
}

.ssk-group-clinics__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5cqw;
  min-width: 0;
  padding: 0 1.6cqw;
  border-radius: 0.85cqw;
  background: #fff;
  box-shadow: 0 0.15cqw 0.5cqw rgba(28, 59, 124, 0.12);
}

.ssk-group-clinics__card-name {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: 2.1cqw;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #1c3b7c;
  white-space: nowrap;
}

.ssk-group-clinics__card-count {
  margin: 0;
  display: flex;
  align-items: baseline;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5cqw;
  line-height: 1;
  color: #1c3b7c;
  white-space: nowrap;
}

.ssk-group-clinics__card-count span {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 3.6cqw;
  margin-right: 0.15em;
}

.ssk-group-clinics__empty {
  grid-column: 1 / -1;
  margin: auto;
  padding: 1cqw;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.8cqw;
  line-height: 1.7;
  text-align: center;
  color: #1c3b7c;
}

/* 管理画面プレビュー */
.ssk-group-clinics--admin .ssk-group-clinics__panel {
  max-width: 70rem;
}

/* ===== SP（縦レイアウト: 上=地図 / 下=サマリー＋カード, .ai 330x523 準拠） ===== */
@media screen and (max-width: 834px) {
  .ssk-group-clinics__panel {
    aspect-ratio: 330 / 523;
    max-width: 42rem;
    margin: 0 auto;
  }

  .ssk-group-clinics__map-logo {
    right: auto;
    bottom: auto;
    left: 6%;
    top: 3%;
    width: 17%;
  }

  /* 左ブロックから下ブロックへ（サマリー＋カードは下半分） */
  .ssk-group-clinics__content {
    left: 4.85%;     /* 16/330 */
    top: 46.65%;     /* 244/523 */
    width: 90.3%;    /* 298/330 */
    height: 49.5%;   /* 259/523 */
    gap: 1.5cqw;
  }

  .ssk-group-clinics__summary {
    flex-basis: 30.5%; /* 79/259 */
    gap: 1cqw;
    border-radius: 1.6cqw;
  }

  .ssk-group-clinics__summary-label {
    font-size: 4.4cqw;
  }

  .ssk-group-clinics__summary-main {
    font-size: 6.4cqw;
  }

  .ssk-group-clinics__total {
    font-size: 12cqw;
  }

  .ssk-group-clinics__grid {
    gap: 1.5cqw;
  }

  .ssk-group-clinics__card {
    padding: 0 3cqw;
    border-radius: 1.6cqw;
    box-shadow: 0 0.3cqw 1cqw rgba(28, 59, 124, 0.12);
  }

  .ssk-group-clinics__card-name {
    font-size: 4.6cqw;
  }

  .ssk-group-clinics__card-count {
    font-size: 3.4cqw;
  }

  .ssk-group-clinics__card-count span {
    font-size: 7.8cqw;
  }

  .ssk-group-clinics__empty {
    font-size: 3.6cqw;
  }
}
