/* ------ Page_common / kanrenmenu（背景画像＋料金の数字）2026-12-01 ------
   漢字タイポスの文字（キャッチ、名前、バッジ、単位、「円」）は背景画像に入れ、料金の数字と税込だけを HTML の文字にする。
   料金は管理画面「料金」の値。どのページでも使えるよう独立したファイルにし、inc/kanrenmenu-banner.php で全ページに読み込む。
   display の指定は詳細度を要素1つ分（0,0,1）にしている。.PC / .SP（画面幅で出し分け、0,1,0）には負け、
   reset の span { display: inline }（0,0,1。このファイルが後から読まれるので）には勝つ。
   位置と大きさはバナーごとに inc/kanrenmenu-banner.php で持ち、style 属性の変数で渡す。
   % はバナーの幅・高さに対する割合、大きさは cqi（バナー幅の 1%）なので、どの幅でも画像との位置関係が変わらない */
@font-face {
  font-family: "AdobeTextPro-num";
  src: url("../fonts/AdobeTextPro-Semibold-num.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0030-0039, U+002C, U+002E, U+002D;
}

a:where(.kb),
span:where(.kb) {
  display: block;
}

.kb {
  container-type: inline-size;
  color: #333;
  text-decoration: none;
}

.kb:focus-visible {
  outline: 3px solid #39afb7;
  outline-offset: 2px;
}

/* 本文の料金入り画像の代わり（リンクなし）。元の <img> と同じく、幅いっぱいまで・元画像の幅まで */
span:where(.kb--static) {
  display: inline-block;
}

.kb--static {
  width: min(100%, var(--kb-w) * 1px);
  vertical-align: top;
}

.kb .kb__card {
  display: block;
  position: relative;
  aspect-ratio: var(--kb-w, 740) / var(--kb-h, 260);
  margin: 0;
  overflow: hidden;
}

.kb .kb__card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 画像の中の文字を、読み上げと検索のために文字としても持つ（見た目は隠す） */
.kb .kb__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.kb .kb__num,
.kb .kb__tax {
  position: absolute;
  margin: 0;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
  color: var(--c, #ee5371); /* 色はバナーごとに style 属性の --c で変えられる */
}

/* 数字：右端を画像の「円」の左に、ベースラインを「円」の下端にそろえる。
   text-box で文字の箱を「数字の上端〜ベースライン」に切りそろえるので、フォントが何でも下のラインがずれない */
.kb .kb__num {
  right: var(--r);
  bottom: var(--b);
  font-family: "AdobeTextPro-num", "Adobe Text Pro", "Times New Roman", serif;
  font-size: var(--fs);
  font-weight: 400;
  letter-spacing: -.02em;
  text-box: trim-both cap alphabetic;
}

/* text-box 未対応（Firefox）：Adobe Text Pro の字形に合わせた値で近づける */
@supports not (text-box: trim-both cap alphabetic) {
  .kb .kb__num {
    bottom: calc(var(--b) - var(--fs) * .1);
    line-height: .72;
  }
}

.kb .kb__tax {
  font-family: "Hiragino Kaku Gothic StdN", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: max(var(--fs), 8px);
  font-weight: var(--tw, 700);
}

/* 税込：「円」の下に右そろえ */
.kb .kb__tax--below {
  right: var(--r);
  top: var(--t);
}

/* 税込：「円」の右に並べる（アグネス） */
.kb .kb__tax--right {
  left: var(--l);
  bottom: var(--b);
  text-box: trim-both cap alphabetic;
}
