/* ブログ記事の本文の見た目（2026-08-24）。
 *
 * 🔴 sns 側に見た目まで作らせない。
 *   ⚠ 記事ごとにCSSを書いてもらうと、記事が増えるほど見た目がばらつく。
 *     後から直したくなっても、置かれた記事すべてを直し直すことになる。
 *   ★sns が書くのは**中身の構造だけ**（h1 / p / img / h2 / ul …）。
 *     見た目はこのファイルが決める。nginx が /blog/ の記事に差し込む。
 *
 * ⚠ スコープは `.post` の中だけ。
 *   素の h1/p に当てると、一覧ページ（index.html）の見出しまで動く。
 *   ＝ sns へのお願いは「本文を <article class="post"> で囲む」の一点。
 *
 * ⚠ .post が無い記事でも壊れない（見た目が付かないだけ）。
 */

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  color: #132a3d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.9;
  font-size: 16px;
}

/* 題名。⚠ 記事の中で一番大きいのは、これ1つだけにする。 */
.post h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* 日付。記事の先頭に <time> で置いてもらう（無くてもよい）。 */
.post > time,
.post .post-date {
  display: block;
  margin-bottom: 28px;
  color: #5c7183;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.post h2 {
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 4px solid #22d3ee;
  font-size: 21px;
  line-height: 1.6;
}

.post h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.post p {
  margin: 0 0 20px;
}

/* ⚠ 画像は必ず幅に収める。原寸のまま出すと、スマートフォンで
     横スクロールが出て本文が読めなくなる。 */
.post img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 12px;
  background: #e8f4f8;
}

.post figure {
  margin: 24px 0;
}
.post figcaption {
  margin-top: 8px;
  color: #5c7183;
  font-size: 13px;
  text-align: center;
}

.post a {
  color: #0aa0c2;
  text-underline-offset: 3px;
}
.post a:hover {
  color: #12324f;
}

.post ul,
.post ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}
.post li {
  margin-bottom: 6px;
}

.post blockquote {
  margin: 24px 0;
  padding: 12px 18px;
  border-left: 4px solid #d8e4ec;
  background: #f6f8fa;
  color: #5c7183;
}

.post code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef3f7;
  font-size: 0.92em;
}
.post pre {
  margin: 24px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #0b2236;
  color: #e6eef6;
  overflow-x: auto; /* ⚠ 長い行は枠の中で送る。ページごと横に伸ばさない。 */
}
.post pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* 表。⚠ 枠の中で横に送る（ページ全体を横スクロールさせない）。 */
.post .table-scroll {
  overflow-x: auto;
}
.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.post th,
.post td {
  padding: 8px 12px;
  border: 1px solid #d8e4ec;
  text-align: left;
}
.post th {
  background: #f6f8fa;
}

.post hr {
  margin: 40px 0;
  border: none;
  border-top: 1px solid #d8e4ec;
}

@media (max-width: 640px) {
  .post {
    padding: 28px 16px 48px;
    font-size: 15.5px;
  }
  .post h1 {
    font-size: 23px;
  }
  .post h2 {
    font-size: 19px;
    margin-top: 32px;
  }
}
