/* ==========================================================================
   Bedroom Development — 欧文の Web フォント (全ページ共通。house.css より先に読む)
   --------------------------------------------------------------------------
   Instrument Sans と IBM Plex Mono は自前で配る (どちらも SIL OFL 1.1。ライセンス文は fonts/OFL-*.txt)。
   ファイルは Google Fonts の latin サブセットそのまま (2026-11-08 に Chrome の UA で取得)。unicode-range も Google の latin と同じ。
   Instrument Sans は wght 400–700 の可変フォント 1 本。ファイル名の .v1 は版で、中身を替えたら上げる (_headers が 1 年キャッシュする)。
   和文の Web フォントは読まない (2026-11-08 user 決定 D4)。和文は端末の Hiragino → Noto Sans JP → Yu Gothic。

   *Fallback の面は、Web フォントが届くまでの端末の書体の字幅と行の高さを Web フォントに合わせ、
   差し替わるときのレイアウトのずれ (CLS) を消すためのもの。値は fontaine / capsize と同じ式:
     size-adjust     = Web フォントの平均字幅 / 端末の書体の平均字幅
                       (平均字幅 = 英文の文字頻度 (空白を含む) で重み付けした送り幅 ÷ unitsPerEm)
     ascent-override = Web フォントの hhea.ascent / unitsPerEm / size-adjust (descent・line-gap も同じ)
   Instrument Sans: ascent 0.970 / descent 0.250 / line-gap 0、平均字幅 400 = 0.4507・600 = 0.4635・700 = 0.4700
   Helvetica Neue: 平均字幅 Regular 0.4451・Bold 0.4753 (Arial は Regular 0.4396・Bold 0.4753。Regular だけ 1.2% ずれる)
   IBM Plex Mono: ascent 1.025 / descent 0.275、送り幅 0.600。Menlo 0.6021・Courier New 0.6001
   算出は fontTools (macOS 26 の /System/Library/Fonts の実ファイル)。Web フォントの版を替えたら測り直す。
   ========================================================================== */

/* latin */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-600-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Instrument Sans の代わり。400–500 は Regular、600 と 700 は Bold を、それぞれの太さの字幅に合わせる */
@font-face {
  font-family: "Instrument Sans Fallback";
  font-weight: 400 500;
  src: local("Helvetica Neue"), local("HelveticaNeue"), local("Arial"), local("ArialMT");
  size-adjust: 101.26%;
  ascent-override: 95.79%;
  descent-override: 24.69%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  font-weight: 600;
  src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"), local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 97.51%;
  ascent-override: 99.48%;
  descent-override: 25.64%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  font-weight: 700;
  src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"), local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 98.89%;
  ascent-override: 98.09%;
  descent-override: 25.28%;
  line-gap-override: 0%;
}

/* IBM Plex Mono の代わり。等幅なので字幅はほぼ同じで、行の高さだけ合わせる */
@font-face {
  font-family: "IBM Plex Mono Fallback";
  font-weight: 400 500;
  src: local("Menlo Regular"), local("Menlo-Regular"), local("Courier New"), local("CourierNewPSMT");
  size-adjust: 99.66%;
  ascent-override: 102.85%;
  descent-override: 27.59%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "IBM Plex Mono Fallback";
  font-weight: 600 700;
  src: local("Menlo Bold"), local("Menlo-Bold"), local("Courier New Bold"), local("CourierNewPS-BoldMT");
  size-adjust: 99.66%;
  ascent-override: 102.85%;
  descent-override: 27.59%;
  line-gap-override: 0%;
}
