@charset "UTF-8";

/*
 * 記事本文の追加スタイルを定義する。
 */
/* トップページ以外の本文画像の枠線と画像の間に余白を設ける。 */
body:not(.home) #main .entry-content img:not(.emoji):not(.wp-smiley) {
  box-sizing: border-box;
  padding: 4px;
}

/* 固定トップページの本文画像（AMPなど）に適用する。 */
body.home #main > article > .article-header .eye-catch,
body.home #main > article > .entry-content > :is(.wp-block-image, .wp-block-cover):first-child {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: #dce5eb;
  box-shadow: none;
  margin-bottom: clamp(28px, 4vw, 48px);
}

body.home #main > article > .article-header .eye-catch img,
body.home #main > article > .entry-content > .wp-block-image:first-child img {
  display: block;
  width: 100%;
  height: clamp(280px, 32vw, 440px);
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* カバー内の文字は画面幅に合わせて余白を取り、読みやすくする。 */
body.home #main > article > .entry-content > .wp-block-cover:first-child {
  padding: clamp(24px, 5vw, 64px);
}

body.home #main > article > .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container {
  max-width: 760px;
  margin-inline: auto;
  text-wrap: pretty;
}

/* コードブロック内を除き、文章中のコードを小さな枠で囲む。 */
.entry-content code:not(pre code) {
  background-color: #eef3f7;
  color: #3e586f;
  border: 1px solid #c7d2dc;
  border-radius: 4px;
  padding: 0.12em 0.38em;
  font-size: 90%;
  font-weight: 600;
}

/* WordPress表ブロックのセルと行の色をそろえる。 */
.entry-content .wp-block-table :is(th, td) {
  padding: 12px 16px;
  border-color: #d6e0e8;
  line-height: 1.65;
}

.entry-content .wp-block-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.entry-content .wp-block-table th {
  background-color: #eef3f7;
  color: #3e586f;
  font-weight: 600;
}

/* 小さい画面ではセルの余白を詰める。 */
@media screen and (max-width: 768px) {
  .entry-content .wp-block-table :is(th, td) {
    padding: 10px 12px;
  }
}
