@charset "utf-8";

/* ====================================================
   /blog/ — 読み物用の明るいテーマ
   トップ（黒・名刺）とは役割を分け、長文の可読性を優先する。
   参考にしたトーン: 白背景・細身・広い字間・大きな余白
   本文は 16px / 行間 2.0（日本語の長文を読ませるため、
   参考サイトの 12px はそのまま採用していない）
   ==================================================== */

:root {
  --ink: #181818;
  --ink-mid: #5f5f5f;
  --ink-weak: #9a9a9a;
  --paper: #ffffff;
  --rule: rgba(24, 24, 24, 0.10);
  --rule-soft: rgba(24, 24, 24, 0.07);
}

html { -webkit-text-size-adjust: 100%; }

body.blog {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

body.blog a { color: inherit; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ---------- ヘッダー ---------- */
.b-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.b-head__logo {
  font-size: 13px;
  letter-spacing: 0.34em;
  font-weight: 300;
  text-decoration: none;
}

/* ブログ内では左上をブログのトップにする（「余日 JOURNAL」）。サイトのトップへは右上の HOME から */
.b-head__sub {
  margin-left: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
}

.b-head__logo:hover .b-head__sub { color: var(--ink); }

.b-head__nav {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
}

.b-head__nav a { text-decoration: none; }
.b-head__nav a:hover { color: var(--ink); }

/* ---------- ページ見出し ---------- */
.b-title {
  font-size: 22px;
  letter-spacing: 0.3em;
  font-weight: 300;
  margin: 56px 0 56px;
}

/* ---------- 記事一覧 ---------- */
.b-list { list-style: none; margin: 0; padding: 0; }

.b-item {
  border-bottom: 1px solid var(--rule-soft);
  padding: 0 0 28px;
  margin: 0 0 28px;
}

.b-item:last-child { border-bottom: none; }

.b-item__link { text-decoration: none; display: block; }

.b-item__date {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-weak);
  margin: 0 0 10px;
}

.b-item__title {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  margin: 0 0 10px;
}

.b-item__link:hover .b-item__title { opacity: 0.6; }

.b-item__excerpt {
  font-size: 13px;
  line-height: 2;
  color: var(--ink-mid);
  margin: 0;
}

/* ---------- 記事本文 ---------- */
.b-article__date {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-weak);
  margin: 56px 0 16px;
}

.b-article__title {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin: 0 0 48px;
}

.b-body { font-size: 16px; line-height: 2; }
.b-body p { margin: 0 0 28px; }

.b-body h2 {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.04em;
  margin: 56px 0 24px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--rule);
}

.b-body h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  margin: 40px 0 16px;
}

.b-body ul, .b-body ol { margin: 0 0 28px; padding-left: 1.4em; }
.b-body li { margin: 0 0 10px; }

.b-body blockquote {
  border-left: 2px solid var(--ink);
  padding: 2px 0 2px 20px;
  margin: 0 0 28px;
}

.b-body blockquote p {
  font-size: 15px;
  color: #4a4a4a;
  margin: 0;
}

.b-body img { max-width: 100%; height: auto; display: block; margin: 0 0 28px; }

.b-body a { text-decoration: underline; text-underline-offset: 3px; }
.b-body a:hover { text-decoration: none; }

/* リンクの印。下線だけだと、今後の強調の下線と見分けがつかなくなるため付ける
   外部サイト＝外へ出る矢印、サイト内＝鎖。ページ内の移動（#）とメールには付けない
   アイコンは線画のSVG（Font Awesome と同じ見せ方で、フォントの読み込みは発生しない） */
.b-body a[href^="http"]:not([href^="https://yojitu.com"]),
.b-body a[href^="/"] {
  --b-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1'/%3E%3C/svg%3E");
}

.b-body a[href^="http"]:not([href^="https://yojitu.com"]) {
  --b-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-9 9'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

.b-body a[href^="http"]:not([href^="https://yojitu.com"])::after,
.b-body a[href^="/"]::after {
  content: "";
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  margin-left: 0.28em;
  vertical-align: -0.04em;
  background-color: currentColor;
  -webkit-mask: var(--b-link-icon) no-repeat center / contain;
  mask: var(--b-link-icon) no-repeat center / contain;
  opacity: 0.5;
}

/* ---------- 引用（出典つき）----------
   出典の文言をそのまま載せるときに使う。言い換えたときは本文に書き、出典はリンクで示す */
.b-quote { margin: 4px 0 32px; }

.b-body .b-quote blockquote {
  position: relative;
  margin: 0;
  padding: 18px 22px 18px 46px;
  border-left: 2px solid var(--ink);
  background: rgba(24, 24, 24, 0.03);
}

.b-quote blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
  color: var(--ink-weak);
}

.b-body .b-quote blockquote p { font-size: 15px; line-height: 1.95; color: #4a4a4a; margin: 0; }
.b-body .b-quote blockquote p + p { margin-top: 10px; }

.b-quote figcaption {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--ink-weak);
}

.b-quote figcaption a { color: inherit; }

/* 英語の原文を引用したときの訳 */
.b-body .b-quote .b-quote__tr { margin-top: 8px; font-size: 13px; line-height: 1.9; color: var(--ink-mid); }

/* ---------- 出典番号（本文の [1] など）と、番号付きの参考文献 ---------- */
.b-cite {
  font-size: 0.66em;
  line-height: 0;
  vertical-align: super;
  letter-spacing: 0;
  margin-left: 1px;
  white-space: nowrap;
}

.b-body .b-cite a { text-decoration: none; color: var(--ink-weak); }
.b-body .b-cite a:hover { color: var(--ink); }

.b-body ol.b-refs > li::before { content: "[" counter(b-ol) "]"; }
.b-body ol.b-refs > li { padding-left: 2.6em; }
.b-refs li[id] { scroll-margin-top: 32px; }
.b-refs li:target { background: rgba(24, 24, 24, 0.045); }

/* ---------- フッター ---------- */
.b-foot {
  border-top: 1px solid var(--rule);
  margin: 80px 0 0;
  padding: 28px 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-weak);
}

.b-foot a { text-decoration: none; }
.b-foot a:hover { color: var(--ink); }

/* ---------- SP（訪問者の半数以上がiPhone） ---------- */
@media screen and (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .b-title { font-size: 18px; margin: 40px 0 40px; }
  .b-article__title { font-size: 21px; margin: 0 0 36px; }
  .b-body { font-size: 15px; }
  .b-body h2 { font-size: 17px; margin: 44px 0 20px; }
  .b-item__title { font-size: 16px; }
  .b-foot { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ====================================================
   2026-09-30 追記
   - 本文の字送りを広げる（詰まって読みづらいという指摘への対応）
   - reset.css が list-style:none にしているため箇条書きの印を作り直す
   - 記事ページに右サイドバーの目次（スクロール追従）
   ==================================================== */

/* ---------- 本文の字送り ---------- */
.b-body { letter-spacing: 0.06em; }
.b-body p { letter-spacing: 0.06em; }
.b-body li { letter-spacing: 0.06em; }

/* 見出しは本文より少し詰めて、塊として見せる */
.b-body h2 { letter-spacing: 0.03em; }
.b-body h3 { letter-spacing: 0.03em; }

/* 長文の可読性のため、本文では palt を切る（詰まりの一因） */
.b-body { font-feature-settings: normal; }

/* ---------- 箇条書き ---------- */
.b-body ul { list-style: none; padding-left: 0; }
.b-body ul > li {
  position: relative;
  padding-left: 1.5em;
  margin: 0 0 14px;
  line-height: 2;
}
.b-body ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 10px;
  height: 1px;
  background: var(--ink-weak);
}

.b-body ol { list-style: none; padding-left: 0; counter-reset: b-ol; }
.b-body ol > li {
  position: relative;
  padding-left: 1.9em;
  margin: 0 0 14px;
  line-height: 2;
  counter-increment: b-ol;
}
.b-body ol > li::before {
  content: counter(b-ol);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-weak);
}

/* ---------- 記事レイアウト（本文＋右サイドバー） ---------- */
.b-layout { display: block; }

.b-toc { display: none; }

.b-toc__title {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
  margin: 0 0 16px;
}

.b-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.b-toc li { margin: 0 0 12px; }

.b-toc a {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--ink-mid);
  text-decoration: none;
  padding-left: 12px;
  border-left: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.b-toc a:hover { color: var(--ink); }

.b-toc a.is-current {
  color: var(--ink);
  border-left-color: var(--ink);
}

/* 目次を出すのは十分な幅があるときだけ */
@media screen and (min-width: 1000px) {
  .wrap--article { max-width: 980px; }

  .b-layout {
    display: grid;
    grid-template-columns: minmax(0, 640px) 210px;
    gap: 50px;
    align-items: start;
  }

  .b-toc {
    display: block;
    position: sticky;
    top: 48px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
}

/* 見出しへのジャンプ時に上が詰まらないように */
.b-body h2[id] { scroll-margin-top: 32px; }

/* ---------- 表（記事本文）。色は付けず、線だけで区切る ---------- */
.b-table { margin: 32px 0; overflow-x: auto; }

.b-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.b-table th,
.b-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.b-table th {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-weak);
  border-bottom-color: var(--rule);
  white-space: nowrap;
}

/* 狭い画面では縮めずに横スクロールさせる */
@media screen and (max-width: 640px) {
  .b-table table { min-width: 520px; }
}

/* ---------- ほかの記事（記事末尾・includes/blog-related.php） ---------- */
.b-related {
  margin: 64px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
}

.b-related__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
  margin: 0 0 6px;
}

.b-related__list { list-style: none; margin: 0; padding: 0; }
.b-related__list li { border-bottom: 1px solid var(--rule-soft); }
.b-related__list li:last-child { border-bottom: none; }
.b-related__list a { display: block; padding: 18px 0; text-decoration: none; }

.b-related__date {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-weak);
  margin: 0 0 6px;
}

.b-related__title { font-size: 15px; line-height: 1.8; }
.b-related__list a:hover .b-related__title { opacity: 0.6; }

/* ---------- 共有ボタン（文字のみ・ブランド色は使わない） ---------- */
.b-share {
  margin: 64px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
}

.b-share__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
  margin: 0 0 14px;
}

.b-share__items {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.b-share__items a,
.b-share__items button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-mid);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease;
}

.b-share__items a:hover,
.b-share__items button:hover { color: var(--ink); }

.b-share__items button.is-copied { color: var(--ink); }

@media screen and (max-width: 768px) {
  .b-share__items { gap: 18px; }
}

/* ---------- 著者情報 ---------- */
.b-author {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  margin: 0 0 48px;
}

.b-author__name {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

.b-author__desc {
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  margin: 0;
}

/* ---------- 図版 ---------- */
.b-fig { margin: 40px 0; }
.b-fig svg { width: 100%; height: auto; display: block; }
.b-fig__tall { display: none; }

/* 横長の図は、狭い画面で縮めると文字が6px前後になり読めない。
   縦長版（.b-fig__tall）がある図はそちらに切り替え、ない図は横スクロールにして文字の大きさを保つ */
@media screen and (max-width: 640px) {
  .b-fig { overflow-x: auto; }
  .b-fig svg { min-width: 560px; }
  .b-fig--has-tall .b-fig__wide { display: none; }
  .b-fig--has-tall .b-fig__tall { display: block; min-width: 0; }
}
.b-fig__cap {
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-weak);
  margin: 12px 0 0;
}

/* ---------- 共有ボタン ----------
   単色アイコン。ブランド色は使わず、トンマナに合わせています。
   1280px以上では本文左の余白に縦並びで固定表示し、
   それ未満では記事末尾に横並びで出します。 */

.b-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-weak);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.b-share__btn:hover { color: var(--ink); border-color: var(--rule); }
.b-share__btn.is-copied { color: var(--ink); border-color: var(--ink); }
.b-share__btn svg { display: block; }

/* 記事末尾（既定） */
.b-share {
  margin: 64px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
}

.b-share__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-weak);
  margin: 0 0 12px;
}

.b-share__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: -8px;
}

/* 左サイドの固定表示 */
.b-share--float { display: none; }

@media screen and (min-width: 1280px) {
  /* シェアバーを枠内に含め、本文＋目次と合わせて中央に来るようにします。
     枠 1080px = 左レール 140px + 本文 640px + 間隔 50px + 目次 210px + 右 40px */
  .wrap--article { max-width: 1080px; padding-left: 140px; padding-right: 40px; }

  .b-share--float {
    display: block;
    position: fixed;
    left: max(24px, calc((100vw - 1080px) / 2 + 42px));
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    border: none;
    z-index: 50;
  }

  .b-share--float .b-share__label {
    writing-mode: vertical-rl;
    margin: 0 0 14px;
    padding-left: 9px;
  }

  .b-share--float .b-share__items {
    flex-direction: column;
    gap: 6px;
    margin-left: 0;
  }

  /* 左に出したので末尾のものは隠します */
  .b-share--inline { display: none; }
}

@media screen and (max-width: 768px) {
  .b-share__items { gap: 4px; margin-left: -6px; }
  .b-share__btn { width: 40px; height: 40px; }
}

/* ---------- スマホの目次（右下のボタンから開くパネル） ---------- */
.b-toc-fab,
.b-toc-sheet,
.b-toc-veil { display: none; }

@media screen and (max-width: 999px) {
  .b-toc-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 120;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-mid);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
  }

  .b-toc-fab:hover,
  .b-toc-fab.is-open { color: var(--ink); border-color: var(--ink); }

  .b-toc-veil {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(255, 255, 255, 0.72);
  }

  .b-toc-sheet {
    display: block;
    position: fixed;
    right: 20px;
    bottom: 78px;
    z-index: 130;
    width: min(320px, calc(100vw - 40px));
    max-height: min(60vh, 460px);
    overflow-y: auto;
    padding: 20px 22px 22px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
  }

  .b-toc-sheet[hidden],
  .b-toc-veil[hidden] { display: none; }

  .b-toc-sheet ol { list-style: none; margin: 0; padding: 0; }
  .b-toc-sheet li { margin: 0 0 14px; }
  .b-toc-sheet li:last-child { margin-bottom: 0; }

  .b-toc-sheet a {
    display: block;
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: 0.03em;
    color: var(--ink-mid);
    text-decoration: none;
    padding-left: 12px;
    border-left: 1px solid transparent;
  }

  .b-toc-sheet a.is-current {
    color: var(--ink);
    border-left-color: var(--ink);
  }
}

/* 共有ボタンと目次ボタンが重ならないようにします */
@media screen and (max-width: 999px) {
  .b-share { padding-bottom: 8px; }
}

/* ---------- フッターのリンク群 ---------- */
.b-foot__links { display: flex; gap: 20px; }
.b-foot__links a { color: var(--ink-weak); text-decoration: none; }
.b-foot__links a:hover { color: var(--ink); }

/* ---------- パンくず ---------- */
.b-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-weak);
}
.b-crumb a { color: var(--ink-weak); text-decoration: none; }
.b-crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.b-crumb__sep { color: var(--ink-weak); }
.b-crumb__current {
  color: var(--ink-mid);
  max-width: 24em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media screen and (max-width: 768px) {
  .b-crumb { margin: 22px 0 0; font-size: 10px; }
  .b-crumb__current { max-width: 14em; }
}

/* ---------- 注記ブロック ---------- */
.b-note {
  border: 1px solid var(--rule);
  padding: 20px 22px;
  margin: 36px 0;
}
.b-note p {
  font-size: 14px;
  line-height: 2;
  color: var(--ink-mid);
  margin: 0;
}
.b-note a { text-decoration: underline; text-underline-offset: 3px; }
.b-note p + p { margin-top: 10px; }
@media screen and (max-width: 768px) {
  .b-note { padding: 16px 18px; }
  .b-note p { font-size: 13px; }
}

/* ---------- 参考資料 ---------- */
.b-body .b-refs > li { font-size: 13px; line-height: 1.9; color: var(--ink-mid); }
.b-body .b-refs a { color: var(--ink); }
