/* 本文ブロックの最大幅を中央寄せで固定（必要なら） */
.post,
.work-body,
.markdown-body {
  max-width: 900px;  /* ←好みで調整（800〜960pxくらい） */
  margin: 0 auto;
  padding: 0 16px;
}

/* 本文内の画像をコンテナ幅以内に収める */
.post img,
.work-body img,
.markdown-body img {
  display: block;
  max-width: 100%;
  width: min(100%, 900px); /* ←絶対上限を設定 */
  height: auto;
  margin: 1rem auto;
  object-fit: contain;
}

/* ヒーロー画像だけ少し広めにしたい場合（任意） */
.work-hero img {
  display: block;
  width: min(100%, 1200px);
  height: auto;
  margin: 0 auto 1rem;
}

/* Illustrations list */
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:24px;
}

.card{
  display:flex;
  gap:16px;
  padding:16px;
  border-radius:16px;
  text-decoration:none;
}

.card-thumb{
  flex:0 0 160px;
  aspect-ratio: 1 / 1;
  overflow:hidden;
  border-radius:12px;
  margin:0;
}

.card-thumb-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Single page content */
main img, .content img{
  max-width:100%;
  height:auto;
  display:block;
}


/* カード内のタグ表示 */
.cards .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.cards .tags li {
  font-size: 12px;
  line-height: 1;
  border: 1px solid #444;
  border-radius: 999px;
  padding: 4px 8px;
  opacity: .9;
}
.cards .tags li a { color: inherit; text-decoration: none; }
.cards .tags li a:hover { text-decoration: underline; }

/* Single illustration page layout */
.work-head{
  margin-bottom: 20px;
}

.work-hero{
  margin: 20px 0 28px;
  border-radius: 16px;
  overflow: hidden;
}

.work-hero img{
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
}

/* Markdown content images */
.work-content img, .content img, main img{
  max-width: 100%;
  height: auto;
  display: block;
}
/* Single illustration */
.work-hero, .work-figure{
  margin: 20px 0 28px;
  border-radius: 16px;
  overflow: hidden;
}

.work-hero img, .work-figure img{
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
}

/* Markdown images safety */
.work-content img, .content img, main img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tags list */
.tags{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tags a{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration:none;
}
