/**
 * BNK 2026 共通文字定義 1.0.2
 * 既存の配色・配置は維持する。新規ページは以下の変数と役割クラスを利用する。
 * 旧テーマの !important に対して書体だけを確実に隔離するため、専用レイヤーを使う。
 * アイコン用疑似要素・画像内文字・管理画面には書体を強制しない。
 */
:root {
  --bnk-type-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --bnk-type-display: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --bnk-type-body: 17px;
  --bnk-type-info: 14px;
  --bnk-type-caption: 13px;
  --bnk-type-small: 12px;
  --bnk-type-label: 15px;
  --bnk-type-regular: 400;
  --bnk-type-medium: 500;
  --bnk-type-semibold: 600;
  --bnk-type-bold: 700;
  --bnk-type-leading: 1.8;
  --bnk-type-leading-heading: 1.5;
  --bnk-type-leading-ui: 1.5;
  --bnk-type-tracking: 0.01em;
  --bnk-type-tracking-label: 0.14em;
}
@media (max-width:767px) { :root { --bnk-type-body:16px; } }

@layer bnk-typography {
  body,
  body :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,td,th,figcaption,blockquote,summary,label,button,input,select,textarea),
  body :is(.bnk-home,.ba-page,.bnkp,#bnk-pd-app,.bnkn,.bnk-shared-header-scope,.bnk-shared-footer-scope,.bnk-shared-contact-scope),
  body :is(.bnk-brand strong,.ba-clinic-name,.ba-eyebrow,.ba-contact-phone a,.ba-director-signature strong),
  body :is(.bnk-primary-nav a,.bnk-mobile-nav a,.bnk-header-cta,.bnk-mobile-header-contact,.bnk-mobile-contact a,.bnk-clinic-card__phone) {
    font-family:var(--bnk-type-sans) !important;
  }

  /* 再利用用の役割。段落以外のコンテナにも指定できる。 */
  .bnk-type-body { font-family:var(--bnk-type-sans)!important;font-size:var(--bnk-type-body);font-weight:400;line-height:var(--bnk-type-leading); }
  .bnk-type-heading { font-family:var(--bnk-type-sans)!important;font-weight:700;line-height:1.5;letter-spacing:.01em; }
  .bnk-type-caption { font-family:var(--bnk-type-sans)!important;font-size:var(--bnk-type-caption);line-height:1.65; }
  .bnk-type-label { font-family:var(--bnk-type-sans)!important;font-size:var(--bnk-type-label);font-weight:600;line-height:1.5; }
  .bnk-type-number { font-family:var(--bnk-type-sans)!important;font-weight:700;font-variant-numeric:lining-nums tabular-nums;letter-spacing:0; }

  /* 明朝体は情緒を伝える限定領域にだけ使用する。 */
  body .ba-page :is(.ba-hero h1,.ba-message-heading),
  body .bnkp-hero h1,
  body .bnk-type-display {
    font-family:var(--bnk-type-display)!important;
    font-weight:600!important;
    letter-spacing:.015em!important;
  }

  /* 新版コンテンツ：本文の既存サイズは原則維持する。 */
  body :where(.bnk-home,.ba-page,.bnkp,#bnk-pd-app,.bnkn) :is(h1,h2,h3,h4,h5,h6) { font-weight:700!important; }
  body .ba-page :is(.ba-hero h1,.ba-message-heading),body .bnkp .bnkp-hero h1 { font-weight:600!important; }
  body :is(.bnkp-profile h3,.bnkp-team-grid .bnkp-profile h3,.bnkp-doctor-trigger,.bnk-doctor-popover) { font-family:var(--bnk-type-sans)!important; }
  body :is(.bnk-home,.ba-page,.bnkp,#bnk-pd-app,.bnkn) :is(button,.bnk-button,.ba-link,.bnkp-text-link,summary) { font-weight:600!important; }
  body :is(.bnk-eyebrow,.ba-eyebrow,.bnkp-eyebrow) {
    font-family:var(--bnk-type-sans)!important;
    font-size:var(--bnk-type-caption)!important;
    font-weight:600!important;
    letter-spacing:var(--bnk-type-tracking-label)!important;
    line-height:1.5!important;
  }
  body .ba-page .ba-clinic-name {font-size:20px!important;font-weight:600!important;}
  body .ba-page :is(.ba-feature-title h3,.ba-locations h3) {letter-spacing:.01em!important;}
  body .bnkp-profile h3 {letter-spacing:.025em!important;}
  body #bnk-pd-app :is(.sceneHeader small,details small) {font-size:13px!important;line-height:1.65!important;}
  body :is(.ba-hours,.ba-schedule-note,.bnkp-schedule-note,.bnkp-kana) {font-size:var(--bnk-type-caption)!important;line-height:1.7!important;}
  body :is(.ba-note,.ba-examples li) {font-size:var(--bnk-type-info)!important;}
  body .bnk-home :is(.bnk-history time,.bnk-history strong,.bnk-history__year) {font-size:var(--bnk-type-info)!important;}
  body .bnk-home .bnk-section h2 {font-size:clamp(28px,3vw,42px)!important;line-height:1.45!important;letter-spacing:.015em!important;}

  /* 共有UIはページ内の倍率に影響されない絶対サイズで揃える。 */
  body .bnk-site-header :is(.bnk-header-cta,.bnk-mobile-header-contact,.bnk-header-cta span,.bnk-mobile-header-contact span) {font-weight:700!important;}
  body .bnk-site-header .bnk-header-cta {font-size:14px!important;}
  body .bnk-site-header .bnk-header-cta span {font-size:inherit!important;}
  body .bnk-site-header :is(.bnk-primary-nav a,.bnk-mobile-nav a) {font-weight:600!important;}
  body .bnk-mobile-contact a :is(strong,b) {font-family:var(--bnk-type-sans)!important;font-weight:700!important;font-variant-numeric:lining-nums tabular-nums;letter-spacing:0!important;}
  body .bnk-mobile-contact a small {font-family:var(--bnk-type-sans)!important;font-size:12px!important;line-height:1.4!important;font-weight:500!important;}
  body .bnk-shared-contact-scope :is(strong,b) {font-family:var(--bnk-type-sans)!important;font-weight:700!important;}
  body :is(.ba-phone,.ba-contact-phone a,.bnk-clinic-card__phone) {font-weight:700!important;letter-spacing:0!important;font-variant-numeric:lining-nums tabular-nums;}
  body .bnk-shared-footer-scope :is(strong,.menu>li>a) {font-weight:700!important;}

  /* 医師ページの拠点選択：日本語の語を途中で分割しない。 */
  body .bnkp-clinic-tab strong {font-family:var(--bnk-type-sans)!important;font-weight:700!important;word-break:normal!important;overflow-wrap:normal!important;line-break:strict;}
  body .bnkp-clinic-tab .bnk-clinic-name-part {display:inline;font:inherit!important;white-space:nowrap;}
  @media(max-width:767px) {
    body .bnk-site-header a.bnk-mobile-header-contact {font-size:12px!important;min-width:76px!important;width:76px!important;flex:0 0 76px!important;}
    body .bnk-site-header a.bnk-mobile-header-contact span {font-size:12px!important;line-height:1.4!important;white-space:nowrap!important;letter-spacing:0!important;}
    body .bnkp-clinic-tab strong {font-size:16px!important;line-height:1.6!important;word-break:auto-phrase!important;text-wrap:balance;}
    body .bnkp-clinic-tab small {font-size:13px!important;}
    body .bnkp-clinic-tab .bnk-clinic-name-part {display:block;}
    body .ba-page .ba-clinic-name {font-size:17px!important;}
    body .ba-eyebrow {font-size:12px!important;letter-spacing:.14em!important;}
    body .bnk-home .bnk-section h2 {font-size:28px!important;}
  }
  @media(max-width:420px) {
    body .bnk-site-header .bnk-brand {gap:8px!important;min-width:0!important;}
    body .bnk-site-header .bnk-brand strong {font-size:13px!important;letter-spacing:0!important;}
  }
  @media(max-width:360px) {
    body .bnk-site-header .bnk-site-header__inner {gap:6px!important;}
    body .bnk-site-header .bnk-brand {min-width:0!important;}
    body .bnk-site-header .bnk-brand strong {font-size:12px!important;}
    body .bnk-site-header .bnk-brand small {font-size:10px!important;letter-spacing:0!important;}
    body .bnkp-clinic-tab strong {font-size:15px!important;}
  }
}
