/* ============================================================
   数字で見るPE-BANK ― v2 コンポーネントスタイル
   service/numbers/index.html から numbers-v2.js と一緒に読み込む
   フォント（Noto Sans JP / Oswald）は HTML側で <link> 読み込み
   ============================================================ */

/* ============================================================
   デザイントークン（色・フォントサイズ）
   ※ ここを変えると全コンポーネントに反映されます
   ============================================================ */
:root {
  --color-red: #E60012;
  /* メインの赤（数字・1位バー） */
  --color-red-2: #F26B6E;
  /* 2位 */
  --color-red-3: #F49A9C;
  /* 3位 */
  --color-pink-bar: #E8C8C8;
  /* 4位以降のバー */
  --color-pink-bg: #FBE4E4;
  /* ドーナツの土台 */
  --color-orange: #F5A623;
  /* ドーナツのリング */
  --color-text: #2D2E3E;
  /* 見出し・ラベル */
  --color-text-mute: #8A8A8A;
  /* 補助テキスト */
  --color-bg: #FFFFFF;
  /* 英数字はOswald、日本語はNoto Sans JP に自動的に振り分け（font-family の優先順位で実現） */
  --font-jp: "Oswald", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-num: "Oswald", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================
   ベースリセット（#numbers1 / #numbers2 内にスコープ）
   グローバル空間に影響しないよう、両セクション内限定で適用
   ============================================================ */
#numbers1,
#numbers2 {
  font-family: var(--font-jp);
  color: var(--color-text);
  line-height: 1.6;
}

#numbers1 *,
#numbers2 * {
  box-sizing: border-box;
}

/* margin/padding はテーマ既存の余白を尊重したいので * では消さない。
   各コンポーネントで必要なときに個別に指定する。 */

/* ↓ プロトタイプ専用 .section-title（実ページでは使われないので削除済み） */

/* ============================================================
   コンポーネントA：単一数字カード
   使い方：見出しと数字を書き換えるだけ。アイコンは <img> を差し替え。
   ============================================================ */
.stat-number {
  display: flex;
  flex-direction: column;
  /* 縦組み：ラベルが必ず一番上 */
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: left;
  height: 100%;
}

.stat-number__label {
  align-self: flex-start;
  /* ラベル左上 */
  font-size: 18px;
  /* 全体統一サイズ */
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 28px;
  /* ラベル下を広めに */
}

.stat-number__row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.stat-number__icon {
  flex: 0 0 auto;
  width: 120px;
  /* 既定値。HTML側で style="width: 50px" などで上書き可 */
  height: auto;
}

.stat-number__body {
  text-align: left;
  flex: 1;
}

.stat-number__body {
  flex: 1;
}

.stat-number__label {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.stat-number__value {
  font-family: var(--font-num);
  font-size: 56px;
  /* 改行回避のため少し縮小（旧:72px） */
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stat-number__value .unit {
  font-family: var(--font-jp);
  font-size: 22px;
  /* 旧:28px */
  color: var(--color-text);
  font-weight: 700;
  margin-left: 6px;
}

.stat-number__value .num {
  /* スクロール連動カウントアップ用 */
  display: inline-block;
  min-width: 1ch;
}

/* ============================================================
   コンポーネントB：満足度カード（パーセンテージ表記のみ）
   ※ 旧アニメーション円グラフは廃止（ラベル＋大きなアイコン＋％の単純構成）
   ============================================================ */
.stat-donut {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.stat-donut__chart-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

/* （旧）リング描画用の領域。今はアイコン用のシンプルなコンテナに転用 */
.stat-donut__chart {
  position: relative;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
}

/* ドーナツリングのSVGだけに適用（中央アイコンには影響させない） */
.stat-donut__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

/* リングの太さは下記 1ヶ所を変えるだけで track / fill 両方に反映 */
.stat-donut__ring {
  --ring-width: 7;
}

.stat-donut__ring .track {
  fill: none;
  stroke: var(--color-pink-bg);
  stroke-width: var(--ring-width);
}

.stat-donut__ring .fill {
  fill: none;
  stroke: var(--color-orange);
  stroke-width: var(--ring-width);
  stroke-linecap: butt;
  /* 直線（先端を丸めない） */
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.4s cubic-bezier(.2, .8, .2, 1);
}

.stat-donut.is-visible .fill {
  /* JSが data-percent を読んで stroke-dasharray を上書き */
}

.stat-donut__icon {
  width: 100%;
  height: auto;
  display: block;
}

/* 単独ラベル（左上配置） */
.stat-donut__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  text-align: left;
}

.stat-donut__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-donut__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.stat-donut__value {
  font-family: var(--font-num);
  font-size: 64px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
}

.stat-donut__value .unit {
  font-family: var(--font-jp);
  font-size: 22px;
  color: var(--color-text);
  margin-left: 4px;
}

/* ============================================================
   コンポーネントD：横棒グラフ
   使い方：<li data-percent="19.0">Java</li> を増減 / 編集
   ============================================================ */
.stat-bars {
  display: grid;
  grid-template-columns: 100px 1fr;
  /* 左：見出し / 右：グラフ */
  gap: 24px;
  align-items: center;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-bars__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
}

.stat-bars__heading img {
  width: 64px;
  height: auto;
  display: block;
}

.stat-bars__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* バー間を詰める */
  position: relative;
  padding: 0;
  margin: 0;
}

/* 言語ラベルとグラフの間に通しの黒い縦線（グラフ側にビタ付け） */
.stat-bars__list::before {
  content: "";
  position: absolute;
  left: 160px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-text);
  z-index: 1;
}

.stat-bars__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  /* 値列は廃止、バーcellの中で値を後置 */
  align-items: center;
  font-size: 16px;
  gap: 0;
  height: 36px;
  line-height: 1;
}

.stat-bars__name {
  text-align: right;
  padding-right: 10px;
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
  font-size: 12px;
}

/* バーセル：バー + 値の flex 並び。
   バー幅はJSがセル幅と値幅を測定して動的に算出（オーバーフローしない設計） */
.stat-bars__bar-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
  overflow: hidden;
}

.stat-bars__bar {
  height: 12px;
  background: var(--bar-color, var(--color-pink-bar));
  width: 0;
  flex: 0 0 auto;
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

/* JS が var(--w) に「px値」（cell幅 - 値幅 - gap を最大とした比例値）をセット */
.stat-bars__list.is-visible .stat-bars__bar {
  width: var(--w, 0);
}

.stat-bars__value {
  flex: 0 0 auto;
  line-height: 1;
  white-space: nowrap;
}

.stat-bars__item:nth-child(1) {
  --bar-color: var(--color-red);
}

.stat-bars__item:nth-child(1) .stat-bars__value {
  color: var(--color-red);
  font-weight: 700;
}

.stat-bars__item:nth-child(2) {
  --bar-color: var(--color-red-2);
}

.stat-bars__item:nth-child(2) .stat-bars__value {
  color: var(--color-red-2);
  font-weight: 700;
}

.stat-bars__item:nth-child(3) {
  --bar-color: var(--color-red-3);
}

.stat-bars__item:nth-child(3) .stat-bars__value {
  color: var(--color-red-3);
  font-weight: 700;
}

.stat-bars__value {
  font-family: var(--font-num);
  font-size: 22px;
  /* 全体的に大きく */
  color: var(--color-text-mute);
  text-align: right;
  padding-left: 8px;
}

/* TOP3 はさらに大きく */
.stat-bars__item:nth-child(-n+3) .stat-bars__value {
  font-size: 30px;
}

.stat-bars__item:nth-child(-n+3) .stat-bars__value .unit {
  font-size: 14px;
}

.stat-bars__value .unit {
  font-family: var(--font-jp);
  font-size: 12px;
  margin-left: 2px;
}

/* ============================================================
   コンポーネントC：複数セグメントドーナツ
   使い方：<li data-percent="15.4" data-color="#FBE4E4">1年未満</li> を増減
   セグメント数は何個でもOK（合計100%になるよう編集してください）
   ============================================================ */
.stat-donut-multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}

/* チャートを右側に配置するモディファイア */
.stat-donut-multi--chart-right .stat-donut-multi__chart {
  order: 2;
}

.stat-donut-multi--chart-right .stat-donut-multi__legend {
  order: 1;
}

.stat-donut-multi__chart {
  position: relative;
  width: 200px;
  height: 200px;
  flex: 0 0 auto;
}

/* 小型バリアント（男女比など） */
.stat-donut-multi--small .stat-donut-multi__chart {
  width: 140px;
  height: 140px;
}

.stat-donut-multi__chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.stat-donut-multi__chart .segment {
  fill: none;
  stroke-width: var(--ring-width, 7);
  stroke-linecap: butt;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.2s cubic-bezier(.2, .8, .2, 1);
}

.stat-donut-multi__chart .center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  text-align: center;
  pointer-events: none;
}

.stat-donut-multi__legend {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  flex: 1;
}

.stat-donut-multi__legend li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--color-text);
}

.stat-donut-multi__legend li::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: var(--seg-color, #ccc);
  border-radius: 2px;
}

.stat-donut-multi__legend .pct {
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  line-height: 1;
}

.stat-donut-multi__legend .pct .unit {
  font-family: var(--font-jp);
  font-size: 12px;
  margin-left: 2px;
  color: var(--color-text-mute);
}

.stat-donut-multi__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
  flex-basis: 100%;
}

/* セグメントが1つだけ＝凡例も1列でOK */
.stat-donut-multi__legend.cols-1 {
  grid-template-columns: 1fr;
}

/* バリアント：縦組みリスト（■なし・大きい数字） */
.stat-donut-multi--inline-labels .stat-donut-multi__legend {
  grid-template-columns: 1fr;
  gap: 6px;
  /* テキスト間（女性⇔男性）詰める */
}

.stat-donut-multi--inline-labels .stat-donut-multi__legend li {
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  /* 「女性」「男性」を小さく */
  font-weight: 700;
  white-space: nowrap;
  color: var(--seg-color, var(--color-text));
}

.stat-donut-multi--inline-labels .stat-donut-multi__legend li::before {
  display: none;
}

.stat-donut-multi--inline-labels .stat-donut-multi__legend .pct {
  font-size: 48px;
  /* 数字を大きく */
  color: var(--seg-color, var(--color-text));
}

.stat-donut-multi--inline-labels .stat-donut-multi__legend .pct .unit {
  color: var(--seg-color, var(--color-text));
  font-size: 18px;
}

/* グラフ⇔テキスト間を詰める（gap: 32 → 12） */
.stat-donut-multi--inline-labels {
  gap: 12px;
}

/* ============================================================
   コンポーネントA-2：吹き出し背景カード（例：最大契約金額）
   gold.png（吹き出し+金塊）を背景にした特殊カード
   ============================================================ */
.stat-bubble {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  /* 画像がフル幅にならないようカードパディング */
  aspect-ratio: 308 / 195;
  /* background-image はHTML側で style="background-image: url(...)" を指定 */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-origin: content-box;
  /* 背景画像がパディングを尊重 */
  background-clip: content-box;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
}

.stat-bubble__body {
  /* 吹き出し内（左側中央）にテキストを配置 */
  position: absolute;
  top: 50%;
  left: 4%;
  width: 60%;
  transform: translateY(-50%);
  text-align: center;
}

.stat-bubble__label {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.stat-bubble__value {
  font-family: var(--font-num);
  font-size: 50px;
  /* 64 → 50 縮小 */
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-bubble__value .unit {
  font-family: var(--font-jp);
  font-size: 20px;
  /* 24 → 20 */
  color: var(--color-text);
  margin-left: 4px;
}

.stat-bubble__note {
  font-size: 11px;
  /* 13 → 11 */
  color: var(--color-text);
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.5;
}

.stat-bubble__note strong {
  color: var(--color-red);
}

@media (max-width: 640px) {
  .stat-bubble__label {
    font-size: 14px;
  }

  .stat-bubble__value {
    font-size: 36px;
  }

  .stat-bubble__value .unit {
    font-size: 16px;
  }

  .stat-bubble__note {
    font-size: 11px;
  }
}

/* ============================================================
   コンポーネントE：比較カード（例：平均年収）
   使い方：data-target を書き換えるだけで数字＋比較バーが連動
   ============================================================ */
.stat-compare {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-compare__icon {
  flex: 0 0 auto;
  width: 100px;
  height: auto;
}

.stat-compare__body {
  flex: 1;
  min-width: 0;
}

.stat-compare__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.stat-compare__value {
  font-family: var(--font-num);
  font-size: 64px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-compare__value .unit {
  font-family: var(--font-jp);
  font-size: 24px;
  color: var(--color-text);
  margin-left: 4px;
}

.stat-compare__sub {
  font-size: 13px;
  color: var(--color-text-mute);
  margin-top: 4px;
}

.stat-compare__note {
  font-size: 12px;
  color: var(--color-text-mute);
  margin-top: 12px;
}

.stat-compare__note strong {
  color: var(--color-text);
  font-weight: 500;
  font-family: var(--font-num);
  font-size: 14px;
}

.stat-compare__note .source {
  font-size: 11px;
  margin-left: 6px;
}

/* 比較バー（オプション）：PE-BANK 847 vs 全国 432 を視覚化 */
.stat-compare__bars {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.stat-compare__bar-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
}

.stat-compare__bar-row .name {
  color: var(--color-text-mute);
}

.stat-compare__bar-row .bar {
  height: 8px;
  background: var(--bar-color, var(--color-pink-bar));
  width: 0;
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

.stat-compare__bar-row .val {
  font-family: var(--font-num);
  color: var(--color-text);
  font-weight: 500;
}

.stat-compare__bar-row.is-primary .bar {
  background: var(--color-red);
}

.stat-compare__bar-row.is-primary .val {
  color: var(--color-red);
}

.stat-compare.is-visible .bar {
  width: var(--w, 0%);
}

.stat-compare__arrow {
  width: 60px;
  height: auto;
  margin-left: 8px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.4s ease-out 0.6s;
}

.stat-compare.is-visible .stat-compare__arrow {
  opacity: 1;
}

/* ============================================================
   コンポーネントF：日本地図カード（例：居住エリア）
   使い方：
     ・SVG内の <path> は data-region でエリア識別。色はCSS変数で一括管理
     ・<li data-region="kanto" style="--x:64%;--y:75%">…</li> でラベル位置調整
   ============================================================ */
.stat-japan-map {
  padding: 30px 30px 50px;
  /* 下余白を広げる */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --col-hokkaido-tohoku: #9ADA86;
  --col-chubu: #979EFB;
  --col-chugoku-shikoku: #8BB5D4;
  --col-kanto: #E4C106;
  --col-kansai: #E2917B;
  --col-kyushu: #D89BC2;
}

.stat-japan-map__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.stat-japan-map__stage {
  position: relative;
  width: 100%;
  max-width: 350px;
  /* 地図を縮小 */
  margin: 0 auto;
  aspect-ratio: 349.55 / 228.66;
  /* SVGのviewBox比率 */
}

.stat-japan-map__stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateY(-12%);
  /* 地図を少し上に移動 */
}

/* SVG内のpathに統一色を当てる */
.stat-japan-map svg [data-region="hokkaido-tohoku"] {
  fill: var(--col-hokkaido-tohoku);
}

.stat-japan-map svg [data-region="chubu"] {
  fill: var(--col-chubu);
}

.stat-japan-map svg [data-region="chugoku-shikoku"] {
  fill: var(--col-chugoku-shikoku);
}

.stat-japan-map svg [data-region="kanto"] {
  fill: var(--col-kanto);
}

.stat-japan-map svg [data-region="kansai"] {
  fill: var(--col-kansai);
}

.stat-japan-map svg [data-region="kyushu"] {
  fill: var(--col-kyushu);
}

.stat-japan-map svg .region {
  transition: opacity 0.2s, filter 0.2s;
}

.stat-japan-map svg .region:hover {
  filter: brightness(1.05);
}

/* ラベル */
.stat-japan-map__labels {
  list-style: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stat-japan-map__labels li {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease-out 0.4s;
}

.stat-japan-map.is-visible .stat-japan-map__labels li {
  opacity: 1;
}

.stat-japan-map__labels .name {
  display: block;
  font-size: 16px;
  /* ラベル大きく */
  font-weight: 700;
  color: var(--label-color, var(--color-text));
  /* エリア色に */
  margin-bottom: 4px;
}

.stat-japan-map__labels .pct {
  display: block;
  font-family: var(--font-num);
  font-size: 36px;
  /* % 大きく */
  font-weight: 500;
  color: var(--label-color, var(--color-text));
  line-height: 1;
}

.stat-japan-map__labels .pct .unit {
  font-family: var(--font-jp);
  font-size: 14px;
  color: var(--label-color, var(--color-text-mute));
  font-weight: 700;
  margin-left: 1px;
}

/* ============================================================
   コンポーネントG：ランキングTOP3（例：人気サービス）
   使い方：<li data-rank="1">サービス名</li>
   表彰台レイアウト（1位中央上 / 2位左下 / 3位右下）
   ============================================================ */
.stat-rank {
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-rank__title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text);
}

.stat-rank__title .num-3 {
  font-family: var(--font-num);
  font-size: 22px;
  margin-left: 4px;
}

.stat-rank__podium {
  position: relative;
  display: grid;
  /* 中央列は表彰台幅にぴったり、左右はコンテンツ幅 → 隙間最小に */
  /* grid-template-columns: auto 170px auto; */
  grid-template-columns: 170px 170px 170px;
  grid-template-areas: ".    rank1 .   "
    "rank2 base  rank3";
  gap: 12px 16px;
  align-items: center;
  justify-content: center;
  /* 全体を中央寄せ */
  margin: 0 auto;
}

/* メダル+項目名 全アイテム共通：横並び */
.stat-rank__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.stat-rank.is-visible .stat-rank__item {
  opacity: 1;
}

.stat-rank__item--1 {
  grid-area: rank1;
  transition-delay: 0.2s;
}

.stat-rank__item--2 {
  grid-area: rank2;
  transition-delay: 0.4s;
}

.stat-rank__item--3 {
  grid-area: rank3;
  transition-delay: 0.6s;
}

/* メダル：全アイテム24px幅で統一 */
.stat-rank__medal {
  width: 24px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0;
  flex: 0 0 auto;
}

.stat-rank__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-red);
  display: inline-block;
  vertical-align: middle;
}

/* 1位のみ項目名のサイズを一段大きく */
.stat-rank__item--1 .stat-rank__name {
  font-size: 22px;
}

.stat-rank__name .mark {
  font-size: 12px;
  vertical-align: super;
  color: var(--color-text-mute);
  margin-left: 2px;
}

/* 表彰台（v2のpodium.png）：最大170px */
.stat-rank__podium-img {
  grid-area: base;
  width: 100%;
  max-width: 170px;
  height: auto;
  display: block;
  margin: 0 auto;
  align-self: end;
}

.stat-rank__note {
  font-size: 11px;
  color: var(--color-text-mute);
  text-align: center;
  /* margin-top: 16px; */
  align-self: flex-end;
}

/* ============================================================
   コンポーネントH：三数値レンジカード（例：平均年齢）
   使い方：data-target を3箇所書き換えるだけ
   レイアウト：中央に平均、左下に最小、右上に最大、ピンクの矢印で範囲を表現
   ============================================================ */
.stat-range {
  position: relative;
  padding: 30px 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 260px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stat-range__label {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  flex: 0 0 auto;
}

/* 矢印を中央配置するためのフレックスエリア */
.stat-range__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 矢印画像wrap：基準ボックス（テキストの絶対配置の起点） */
.stat-range__arrow-wrap {
  position: relative;
  width: 140px;
  /* 矢印幅 */
  /* 高さは画像のアスペクト比に従う */
  margin: auto;
}

/* arrow.png 矢印 */
.stat-range__arrow {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* 41才：矢印の天地中央・左 */
.stat-range__main {
  position: absolute;
  top: -35%;
  left: -20%;
  z-index: 2;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1;
}

.stat-range__main .num {
  font-family: var(--font-num);
  font-size: 72px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-range__main .unit {
  font-family: var(--font-jp);
  font-size: 26px;
  color: var(--color-text);
  font-weight: 700;
  margin-left: 4px;
}

.stat-range__sub {
  font-size: 14px;
  color: var(--color-red-3);
  font-weight: 700;
  z-index: 2;
  white-space: nowrap;
}

.stat-range__sub .num {
  font-family: var(--font-num);
  font-size: 22px;
  color: var(--color-red-3);
  font-weight: 500;
  margin: 0 2px;
}

/* 最年少：矢印の左下（左下方向に出る） */
.stat-range__sub--min {
  position: absolute;
  top: 100%;
  right: 100%;
  margin-top: -8px;
  margin-right: -16px;
}

/* 最年長：矢印の右上 */
.stat-range__sub--max {
  position: absolute;
  bottom: 100%;
  left: 100%;
  margin-bottom: 0;
  margin-left: -16px;
}

/* ============================================================
   コンポーネントC':引き出し線配置版（ドーナツの周りにラベル）
   使い方：<li data-percent="15.4" data-color="#FBE4E4">1年未満</li> を増減
   （CSSのみで完結。位置はJSで自動計算）
   ============================================================ */
.stat-donut-around {
  padding: 20px 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-donut-around__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

/* ステージ：タイトル直下に被せ、ドーナツ拡大で内部余白を圧縮 */
.stat-donut-around__stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: -28px auto -28px;
  /* 上下とも詰める */
  aspect-ratio: 1 / 1;
  /* 1:1（正方形） */
}

.stat-donut-around__stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stat-donut-around__stage .seg-rotate {
  transform-origin: 50px 50px;
  transform: rotate(-90deg);
}

.stat-donut-around__stage .segment {
  fill: none;
  stroke-width: 13;
  /* 厚みを増す（≒64px相当） */
  stroke-linecap: butt;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.2s cubic-bezier(.2, .8, .2, 1);
}

.stat-donut-around__stage .leader {
  stroke-width: 0.5;
  stroke-linecap: butt;
  opacity: 0;
  transition: opacity 0.4s ease-out 0.6s;
}

.stat-donut-around.is-visible .leader {
  opacity: 1;
}

.stat-donut-around__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.3;
  pointer-events: none;
}

.stat-donut-around__labels {
  list-style: none;
  position: absolute;
  inset: 0;
}

.stat-donut-around__labels li {
  position: absolute;
  /* 初期はレイアウト崩れ防止のため全て中央に。JSで位置・整列を上書き */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease-out 0.8s;
}

/* JSで side="right"/"left" を付与 → 左右に応じてテキストが伸びる方向を切替 */
.stat-donut-around__labels li[data-side="right"] {
  text-align: left;
}

.stat-donut-around__labels li[data-side="left"] {
  text-align: right;
}

.stat-donut-around.is-visible .stat-donut-around__labels li {
  opacity: 1;
}

.stat-donut-around__labels .name {
  display: block;
  font-size: 17px;
  /* 数字部分(ラベル名)を大きく */
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.stat-donut-around__labels .pct {
  display: block;
  font-family: var(--font-num);
  font-size: 40px;
  /* %数字を大きく */
  font-weight: 500;
  /* 全ての%色を「5年以上10年未満」の色（#E60012 メインの赤）に統一 */
  color: var(--color-red);
  line-height: 1;
}

.stat-donut-around__labels .pct .unit {
  font-family: var(--font-jp);
  font-size: 16px;
  color: var(--color-red);
  /* 単位もメイン赤に統一 */
  font-weight: 700;
  margin-left: 1px;
}

/* ============================================================
   コンポーネントA-4：吹き出しカード（背景画像版）
   - 画像（kigyo/ankensu/nenshu/gold等）を背景にし、テキストを絶対配置
   - data-text-side="right"|"left" で左右どちらにテキストを置くか指定
   ============================================================ */
.stat-bubble-card {
  position: relative;
  width: 100%;
  padding: 16px;
  /* カードパディング */
  background-color: transparent;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-origin: content-box;
  /* 背景画像をパディング内に収める */
  background-clip: content-box;
  aspect-ratio: 308 / 195;
  box-sizing: border-box;
}

.stat-bubble-card__body {
  position: absolute;
  top: 50%;
  width: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  /* 2行テキストは中央揃え */
}

/* 右側白スペース（kigyo / ankensu）：少し左寄せ */
.stat-bubble-card[data-text-side="right"] .stat-bubble-card__body {
  left: 66%;
}

/* 左側白スペース（nenshu）：右にずらす */
.stat-bubble-card[data-text-side="left"] .stat-bubble-card__body {
  left: 35%;
}

.stat-bubble-card__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.stat-bubble-card__value {
  font-family: var(--font-num);
  font-size: 48px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stat-bubble-card__value .prefix {
  font-family: var(--font-jp);
  font-size: 18px;
  color: var(--color-text);
  font-weight: 700;
  margin-right: 2px;
}

.stat-bubble-card__value .unit {
  font-family: var(--font-jp);
  font-size: 20px;
  color: var(--color-text);
  margin-left: 4px;
}

.stat-bubble-card__sub {
  font-size: 12px;
  color: var(--color-text-mute);
  margin-top: 6px;
}

.stat-bubble-card__note {
  font-size: 11px;
  color: var(--color-text);
  /* 黒 */
  font-weight: 700;
  /* bold */
  margin-top: 10px;
  line-height: 1.4;
}

.stat-bubble-card__note strong {
  font-family: var(--font-num);
  /* 数字はOswald */
  font-weight: 500;
  /* weight 500 */
  color: var(--color-text);
}

/* 平均年収用：最大契約金額(.stat-bubble) と同サイズに揃える */
.stat-bubble-card--large .stat-bubble-card__body {
  text-align: center;
}

.stat-bubble-card--large .stat-bubble-card__label {
  font-size: 18px;
}

.stat-bubble-card--large .stat-bubble-card__value {
  font-size: 50px;
}

.stat-bubble-card--large .stat-bubble-card__value .unit {
  font-size: 20px;
}

.stat-bubble-card--large .stat-bubble-card__sub {
  font-size: 12px;
}

.stat-bubble-card--large .stat-bubble-card__note {
  font-size: 11px;
}

@media (max-width: 640px) {
  .stat-bubble-card__value {
    font-size: 36px;
  }

  .stat-bubble-card--large .stat-bubble-card__value {
    font-size: 40px;
  }
}

/* ============================================================
   コンポーネントA-3：縦組みカード（設立 / 拠点 用）
   - 左上にラベル
   - 中央にアイコン
   - 中央寄せの本文（赤い数字+補足）
   ============================================================ */
.stat-vstack {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
  height: 100%;
  position: relative;
}

.stat-vstack__label {
  align-self: flex-start;
  /* ラベルだけ左上に */
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.4em;
  margin-bottom: 16px;
}

.stat-vstack__icon {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 16px;
}

/* 赤背景・白文字の吹き出しバッジ（例：「1989年」） */
.stat-vstack__badge {
  display: inline-block;
  background: var(--color-red);
  color: #fff;
  padding: 4px 18px;
  border-radius: 14px;
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 500;
  position: relative;
  margin-bottom: 8px;
}

.stat-vstack__badge::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-red);
  border-bottom: 0;
}

/* メイン文（赤色強調・大数字付き） */
.stat-vstack__main {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1.1;
}

.stat-vstack__main .big {
  font-size: 48px;
  vertical-align: -2px;
}

.stat-vstack__main .num {
  font-size: 48px;
  margin: 0 2px;
}

.stat-vstack__main .unit {
  font-family: var(--font-jp);
  color: var(--color-red);
  font-weight: 700;
}

/* 下部の都市リスト（拠点用） */
.stat-vstack__cities {
  font-size: 13px;
  color: var(--color-text);
  margin-top: 10px;
  line-height: 1.7;
}

/* レスポンシブ */
@media (max-width: 640px) {

  .stat-number,
  .stat-donut,
  .stat-donut-multi {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-bars {
    grid-template-columns: 1fr;
  }

  .stat-bars__heading {
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .stat-bars__heading img {
    margin: 0;
  }

  .stat-bars__item {
    grid-template-columns: 80px 1fr;
    font-size: 13px;
  }

  .stat-donut-multi__legend {
    grid-template-columns: 1fr;
  }

  .stat-vstack__main {
    font-size: 22px;
  }

  .stat-vstack__main .big,
  .stat-vstack__main .num {
    font-size: 36px;
  }
}

/* ============================================================
   コンポーネントI：サービス登録者数（年別棒グラフ + 上向き矢印）
   構成：タイトル左上 / 右上に大きな数字+突破！ / 下に縦棒グラフ + 矢印
   使い方：<li data-year="2017" data-value="20000"> を増減（最大2030まで等）
   ============================================================ */
.stat-growth {
  position: relative;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-growth__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  z-index: 3;
}

/* タイトル右の補足（例:「（2025年現在）」）。PCはインラインで小さく細く、SPで改行 */
.stat-growth__title-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-mute);
  margin-left: 6px;
}

/* 50,000人 突破！ をタイトル直下に絶対配置、グラフと被らせる */
.stat-growth__main {
  position: absolute;
  top: 80px;
  /* タイトル下に余白を確保 */
  left: 30px;
  line-height: 1.05;
  z-index: 5;
  pointer-events: none;
}

.stat-growth__num {
  display: inline-block;
  line-height: 1;
}

.stat-growth__num .num {
  font-family: var(--font-num);
  font-size: 60px;
  font-weight: 500;
  color: var(--color-red);
  letter-spacing: -0.02em;
}

.stat-growth__num .unit {
  font-family: var(--font-jp);
  font-size: 22px;
  color: var(--color-text);
  /* 黒 */
  font-weight: 700;
  margin-left: 4px;
}

.stat-growth__caption {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  /* 黒 */
  margin-top: 4px;
}

.stat-growth__chart {
  position: relative;
  margin-top: 140px;
  /* 50,000人 突破！(absolute) 表示分の余白を確保 */
  padding-left: 56px;
  /* Y軸ラベル領域 */
  padding-bottom: 28px;
  /* 年ラベル領域（バー下辺の外側） */
  height: auto;
  /* バー高さ + paddingで決まる */
}

.stat-growth__bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  list-style: none;
  height: 180px;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #c4c4c4;
  /* バー下辺にビタ付けのベースライン */
  overflow: visible;
  /* 年ラベルを下に逃がす */
}

.stat-growth__bars li {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stat-growth__bars .bar {
  width: 70%;
  max-width: 50px;
  background: var(--bar-color, #DDDDDD);
  height: 0;
  transition: height 1.2s cubic-bezier(.2, .8, .2, 1);
}

.stat-growth.is-visible .bar {
  height: var(--h, 0%);
}

/* 年ラベル：bars の外側（baselineの下）に絶対配置 → バー本体は full 180px を確保 */
.stat-growth__bars .year {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-mute);
  font-family: var(--font-num);
  white-space: nowrap;
}

/* Y軸目盛ラベル（チャート左端の縦帯） */
.stat-growth__y-axis {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 180px;
  pointer-events: none;
}

.stat-growth__y-axis .tick {
  position: absolute;
  right: 8px;
  bottom: var(--y, 0%);
  transform: translateY(50%);
  font-size: 11px;
  color: var(--color-text-mute);
  font-family: var(--font-num);
  white-space: nowrap;
  line-height: 1;
}

/* 横方向グリッド線（Y軸ラベルと同じ高さで右に伸ばす） */
.stat-growth__grid {
  position: absolute;
  left: 56px;
  right: 0;
  top: 0;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  /* バーよりは背面、bars(z:2)未満 */
}

.stat-growth__grid .line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--y, 0%);
  border-top: 1px dashed #ebebeb;
}

/* 勢いアロー: 左端バー上→右から2番目バー上をテーパーリボンで結ぶ
   NOTE: SVGは replaced element なので right:0 + width:auto だと intrinsic 幅 (height + viewBoxアスペクト=180px)
        に縮まる場合あり。calc() で明示的に幅を取らせる。 */
.stat-growth__momentum {
  position: absolute;
  left: 56px;
  top: 0;
  width: calc(100% - 56px);
  height: 180px;
  display: block;
  overflow: visible;
  /* polygon が SVG上端からはみ出せるように（終点 y<0 で chart 上部空間に伸びる） */
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.6s ease-out 1s, transform 0.8s cubic-bezier(.2, .8, .2, 1) 1s;
}

.stat-growth.is-visible .stat-growth__momentum {
  opacity: 1;
  transform: translateY(0);
}

/* 最大値バー上の実数値ラベル（バー本体に absolute で乗せる） */
.stat-growth__bars .bar {
  position: relative;
}

.stat-growth__bar-value {
  position: absolute;
  left: 50%;
  bottom: 100%;
  /* バー上端の真上 */
  transform: translateX(-50%);
  margin-bottom: 8px;
  /* バー上端からの距離 */
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-red);
  white-space: nowrap;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.4s ease-out 1.2s;
  z-index: 4;
}

.stat-growth.is-visible .stat-growth__bar-value {
  opacity: 1;
}

/* レスポンシブ */
@media (max-width: 640px) {

  .stat-number,
  .stat-donut,
  .stat-donut-multi {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-bars {
    grid-template-columns: 1fr;
  }

  .stat-bars__heading {
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .stat-bars__heading img {
    margin: 0;
  }

  .stat-bars__item {
    grid-template-columns: 80px 1fr;
    font-size: 13px;
  }

  .stat-donut-multi__legend {
    grid-template-columns: 1fr;
  }

  .stat-vstack__main {
    font-size: 22px;
  }

  .stat-vstack__main .big,
  .stat-vstack__main .num {
    font-size: 36px;
  }

  .stat-range {
    padding: 24px;
    min-height: 220px;
  }

  .stat-range__main .num {
    font-size: 48px;
  }

  .stat-range__main .unit {
    font-size: 18px;
  }
}

/* ============================================================
   テーマ既存CSS との衝突解消（service.css の .numbers / .col に上書き）
   - .numbers > div { display:flex; align-items:center; text-align:center }
     を一部相殺し、コンポーネント側のレイアウトを優先させる
   ============================================================ */
.numbers>div {
  align-items: stretch;
  /* 高さの違うコンポーネントが上揃えになる */
  text-align: left;
  /* 中央寄せをデフォルト解除（必要な箇所だけ個別指定） */
  gap: 20px;
}

.numbers>div>.col {
  display: flex;
  /* col内のコンポーネントを縦伸ばし */
}

.numbers>div>.col>* {
  width: 100%;
}

/* 単独占有（colなし）のコンポーネントは横幅100%に */
.numbers>div>.stat-bars,
.numbers>div>.stat-japan-map,
.numbers>div>.stat-donut-around,
.numbers>div>.stat-rank,
.numbers>div>.stat-range,
.numbers>div>.stat-growth {
  width: 100%;
  flex: 1 1 auto;
}

/* ランキングTOP3 関連は中央寄せのまま（user指示）。
   それ以外のタイトル系は左寄せ（左上配置の要件） */
.numbers .stat-rank__title,
.numbers .stat-rank__note {
  text-align: center;
}

.numbers .stat-donut-multi__title,
.numbers .stat-donut-around__title,
.numbers .stat-japan-map__title {
  text-align: left;
  width: 100%;
  align-self: flex-start;
  flex-basis: auto;
}

/* スマホ：theme側のmedia(max-width:1025px)で .numbers > div が block になるので、
   コンポーネントは縦積みになる。col同士の隙間も維持。 */
@media (max-width: 1025px) {
  .numbers>div>.col~.col {
    margin-top: 20px;
  }
}

/* ============================================================
   レスポンシブ対応：タブレット / スマホ
   既存の theme @1025px が .col を block 縦積みにする前提で、
   コンポーネント内部の調整を以下で行う
   ============================================================ */

/* ---- タブレット（1024px以下） ---- */
@media (max-width: 1024px) {

  /* 案件傾向：見出し列を少し狭く */
  .stat-bars {
    grid-template-columns: 110px 1fr;
    gap: 16px;
  }

  .stat-bars__heading img {
    width: 56px;
  }

  /* PE-BANK歴：ステージ最大幅を縮小しラベルが収まるよう余白確保 */
  .stat-donut-around__stage {
    max-width: 420px;
  }

  /* 居住エリア：地図をやや小さく */
  .stat-japan-map__stage {
    max-width: 320px;
  }

  /* 男女比：チャートサイズ調整、中央寄せ */
  .stat-donut-multi {
    justify-content: center;
  }

  .stat-donut-multi--small .stat-donut-multi__chart {
    width: 130px;
    height: 130px;
  }

  /* 平均年齢：矢印を少し小さく */
  .stat-range__arrow-wrap {
    width: 130px;
  }

  .stat-range__main .num {
    font-size: 60px;
  }

  .stat-range__main .unit {
    font-size: 24px;
  }

  /* 人気サービス：カード余白を圧縮 */
  .stat-rank__podium {
    gap: 10px 12px;
  }

  /* 設立 / 拠点：画像とテキストの間隔をしっかり広く */
  .stat-vstack__icon {
    margin-bottom: 12px !important;
  }

  .stat-vstack__cities {
    margin-top: 18px;
  }

  .stat-vstack__badge {
    margin-bottom: 14px;
  }

  .stat-number__icon {
    margin-right: 16px !important;
  }

  .stat-number__icon[style*="84px"] {
    margin-left: 0 !important;
  }

  /* 吹き出し付き背景透明カード：すべて同じmax-widthで統一・中央配置 */
  .stat-bubble {
    max-width: 480px;
    /* 最大契約金額も同じサイズに揃える */
    margin: 0 auto;
  }

  .stat-bubble-card {
    max-width: 480px;
    margin: 0 auto;
  }

  /* リモート/フリー/男女比：本文を中央寄せ。ラベルは左上のまま */
  .stat-number__row {
    justify-content: center;
    margin: 0 auto;
  }

  .stat-number__body {
    flex: 0 0 auto;
  }

  /* 男女比：テキスト＋グラフを横並びかつ中央寄せ */
  .stat-donut-multi__legend {
    flex: none;
  }

  .stat-donut-multi {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .stat-donut-multi__title {
    flex-basis: 100%;
  }
}

/* ---- スマホ（640px以下） ---- */
@media (max-width: 640px) {

  /* カード共通の padding 圧縮 */
  .stat-number,
  .stat-vstack,
  .stat-donut,
  .stat-japan-map,
  .stat-donut-around,
  .stat-rank,
  .stat-range,
  .stat-bars {
    padding: 20px;
  }

  /* 数字カード（縦組み）：ラベルは左上、icon+valueは中央寄せ */
  .stat-number__label {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .stat-number__value {
    font-size: 44px;
  }

  .stat-number__value .unit {
    font-size: 18px;
  }

  .stat-number__icon {
    width: 80px !important;
  }

  .stat-number__icon[style*="50px"],
  .stat-number__icon[style*="84px"] {
    width: 50px !important;
  }

  .stat-number__row {
    gap: 16px;
    justify-content: center;
    /* 中央寄せ */
  }

  .stat-number__body {
    flex: 0 0 auto;
  }

  /* 縦組みカード（設立・拠点） */
  .stat-vstack__label {
    font-size: 16px;
    margin-bottom: 12px;
    letter-spacing: 0.2em;
  }

  .stat-vstack__icon {
    width: 90px;
  }

  .stat-vstack__main {
    font-size: 22px;
  }

  .stat-vstack__main .big,
  .stat-vstack__main .num {
    font-size: 36px;
  }

  .stat-vstack__cities {
    font-size: 12px;
  }

  /* 吹き出しカード */
  .stat-bubble {
    padding: 12px;
  }

  .stat-bubble__label {
    font-size: 14px;
  }

  .stat-bubble__value {
    font-size: 36px;
  }

  .stat-bubble__value .unit {
    font-size: 16px;
  }

  .stat-bubble__note {
    font-size: 10px;
  }

  .stat-bubble-card {
    padding: 10px;
  }

  .stat-bubble-card__label {
    font-size: 13px;
  }

  .stat-bubble-card__value {
    font-size: 32px;
  }

  .stat-bubble-card__value .prefix {
    font-size: 14px;
  }

  .stat-bubble-card__value .unit {
    font-size: 14px;
  }

  .stat-bubble-card__sub {
    font-size: 11px;
  }

  .stat-bubble-card__note {
    font-size: 10px;
  }

  .stat-bubble-card--large .stat-bubble-card__label {
    font-size: 14px;
  }

  .stat-bubble-card--large .stat-bubble-card__value {
    font-size: 36px;
  }

  .stat-bubble-card--large .stat-bubble-card__value .unit {
    font-size: 16px;
  }

  /* 満足度カード */
  .stat-donut__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .stat-donut__value {
    font-size: 48px;
  }

  .stat-donut__chart {
    width: 60px;
    height: 60px;
  }

  .stat-donut__chart-row {
    gap: 16px;
  }

  /* 案件傾向：縦積み（見出し上、グラフ下） */
  .stat-bars {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-bars__heading {
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
    text-align: left;
  }

  .stat-bars__heading img {
    width: 36px;
    margin: 0 !important;
  }

  .stat-bars__item {
    font-size: 13px;
    height: 28px;
  }

  .stat-bars__item:nth-child(-n+3) .stat-bars__value {
    font-size: 20px;
    padding-left: 0;
  }

  /* 縦線とバーの被りを解消（隙間を確保） */
  .stat-bars__bar {
    margin-left: 0;
  }

  .stat-bars__bar-cell {
    margin-left: 0;
  }

  .stat-bars__list::before {
    left: 80px;
  }

  /* PE-BANK歴：ラベルは左上に来るよう左padding小さく、stageを小さくしてラベル収容 */
  .stat-donut-around {
    padding: 16px 20px;
  }

  /* 左右均等、左padding小さくしてタイトル左上に */
  .stat-donut-around__stage {
    max-width: 160px;
    margin: -8px auto -8px;
  }

  .stat-donut-around__labels .name {
    font-size: 11px;
  }

  .stat-donut-around__labels .pct {
    font-size: 20px;
  }

  .stat-donut-around__labels .pct .unit {
    font-size: 10px;
  }

  .stat-donut-around__center img {
    width: 40px !important;
  }

  /* 男女比：横並び（タイトル上、ラベル左、グラフ右） */
  .stat-donut-multi {
    padding: 20px;
    gap: 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .stat-donut-multi__title {
    flex-basis: 100%;
  }

  .stat-donut-multi--small .stat-donut-multi__chart {
    width: 110px;
    height: 110px;
  }

  .stat-donut-multi--inline-labels .stat-donut-multi__legend .pct {
    font-size: 38px;
  }

  /* 満足度カード：ラベル以外の要素を中央寄せ */
  .stat-donut {
    align-items: stretch;
  }

  .stat-donut__chart-row {
    justify-content: center;
    align-self: stretch;
  }

  .stat-donut__title {
    text-align: left;
    align-self: flex-start;
  }

  /* 居住エリア：モバイル時は HTML側の --x-mobile / --y-mobile を参照
     初期値はPC（--x/--y）と同じ。位置を変えたいときは HTML の --x-mobile / --y-mobile を編集 */
  .stat-japan-map {
    padding: 20px 16px 60px;
  }

  .stat-japan-map__stage {
    max-width: 220px;
  }

  .stat-japan-map__labels li {
    left: var(--x-mobile, var(--x, 50%));
    top: var(--y-mobile, var(--y, 50%));
  }

  .stat-japan-map__labels .name {
    font-size: 11px;
  }

  .stat-japan-map__labels .pct {
    font-size: 22px;
  }

  /* 平均年齢 */
  .stat-range {
    padding: 20px;
    min-height: 180px;
  }

  .stat-range__arrow-wrap {
    width: 130px;
  }

  .stat-range__main .num {
    font-size: 48px;
  }

  .stat-range__main .unit {
    font-size: 18px;
  }

  .stat-range__sub {
    font-size: 12px;
  }

  .stat-range__sub .num {
    font-size: 18px;
  }

  /* サービス登録者数 */
  .stat-growth {
    padding: 20px;
  }

  .stat-growth__head {
    flex-direction: column;
    align-items: stretch;
  }

  /* タイトル補足（「（2025年現在）」）を改行表示。50,000人 突破！ と被らせない */
  .stat-growth__title-sub {
    display: block;
    font-size: 11px;
    margin-left: 0;
    margin-top: 2px;
  }

  .stat-growth__main {
    top: 76px;
    left: 20px;
  }

  .stat-growth__num .num {
    font-size: 40px;
  }

  .stat-growth__num .unit {
    font-size: 16px;
  }

  .stat-growth__caption {
    font-size: 16px;
  }

  .stat-growth__chart {
    margin-top: 100px;
    /* 2行タイトル + 50,000人 突破！ を吸収 */
    padding-left: 28px;
    /* Y軸領域をさらに狭く（年ラベル衝突回避） */
    padding-bottom: 22px;
  }

  .stat-growth__bars {
    height: 140px;
    gap: 2px;
  }

  /* 年ラベル: モバイルは 4桁 → '17 等の2桁表記に置換（data-short をJSが付与） */
  .stat-growth__bars .year {
    font-size: 0;
    /* 元の "2017" を隠す */
    margin-top: 5px;
  }

  .stat-growth__bars .year::before {
    content: attr(data-short);
    font-size: 10px;
    color: var(--color-text-mute);
    font-family: var(--font-num);
  }

  .stat-growth__y-axis {
    width: 28px;
    height: 140px;
  }

  .stat-growth__y-axis .tick {
    font-size: 9px;
    right: 4px;
  }

  .stat-growth__grid {
    left: 28px;
    height: 140px;
  }

  .stat-growth__momentum {
    left: 28px;
    width: calc(100% - 28px);
    height: 140px;
  }

  .stat-growth__bar-value {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .stat-range__sub--min {
    margin-top: -2px;
  }

  /* 比較カード（旧） */
  .stat-compare {
    padding: 20px;
    gap: 16px;
  }

  .stat-compare__icon {
    width: 80px;
  }

  .stat-compare__label {
    font-size: 14px;
  }

  .stat-compare__value {
    font-size: 44px;
  }

  .stat-compare__value .unit {
    font-size: 18px;
  }

  /* 人気サービス：1-3位を縦積み。メダル左端揃え・グループ中央寄せ */
  .stat-rank {
    padding: 20px;
  }

  .stat-rank__title {
    font-size: 14px;
  }

  .stat-rank__title .num-3 {
    font-size: 18px;
  }

  .stat-rank__podium {
    /* flex column + align-items: flex-start で各itemを左揃え。
       width: fit-content + margin auto で全体を中央寄せ */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* item 左端を揃える */
    width: fit-content;
    /* グループ幅 = 最長アイテム */
    max-width: 100%;
    margin: 0 auto;
    gap: 6px;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  .stat-rank__item {
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    /* itemは親（fit-content幅）にフィット */
  }

  .stat-rank__item--1,
  .stat-rank__item--2,
  .stat-rank__item--3 {
    grid-area: auto;
  }

  /* gridエリア指定を解除 */
  .stat-rank__name {
    font-size: 14px !important;
  }

  .stat-rank__item--1 .stat-rank__name {
    font-size: 16px !important;
  }

  .stat-rank__medal {
    width: 20px;
    margin: 0 !important;
  }

  .stat-rank__podium-img {
    max-width: 140px;
    margin: 12px auto 0;
    grid-area: auto;
    align-self: center;
    /* 表彰台は中央寄せ */
  }

  .stat-rank__note {
    font-size: 10px;
  }
}

/* ---- 小型スマホ（420px以下） ---- */
@media (max-width: 420px) {
  /* 人気サービスは640pxの縦積み構造を継承（左端揃え＋中央寄せ） */

  /* 案件傾向：言語ラベル列を更に狭く */
  .stat-bars__item {
    grid-template-columns: 80px 1fr;
  }

  .stat-bars__name {
    padding-right: 6px;
    font-size: 9px;
  }

  /* PE-BANK歴：ステージ更に小さく */
  .stat-donut-around__stage {
    max-width: 180px;
  }

  .stat-donut-around__labels .name {
    font-size: 10px;
  }

  .stat-donut-around__labels .pct {
    font-size: 22px;
  }

  /* 居住エリア：ラベルさらに小さく */
  .stat-japan-map__labels .name {
    font-size: 10px;
  }

  .stat-japan-map__labels .pct {
    font-size: 22px;
  }
}