@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.4
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/* ==== 記事ページ: 広告枠 ==== */
.eb-ad {
  margin: 1em 0;
  text-align: center;
}

/* ==== 記事ページ: 本文ブロック（eb-sample-hero / eb-package / eb-links / eb-samples） ==== */
.eb-package img,
.eb-sample-hero img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.eb-links p {
  margin: .4em 0;
  font-size: 1.05em;
}

.eb-samples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 1em 0;
}

.eb-samples img {
  width: 100%;
  height: auto;
  display: block;
}

/* wpautop が <a> 群を <p> で包んだ場合でも各画像がグリッドの子になるようにする */
.eb-samples > p {
  display: contents;
}
.eb-sample-item {
  margin: 0;
}

/* ==== 記事ページ: 作品概要ブロック（eb-summary） ==== */
.eb-summary-table {
  width: 100%;
  font-size: .9em;
  border-collapse: collapse;
}

.eb-summary-table th {
  white-space: nowrap;
  width: 7em;
  text-align: left;
  background: #f5f5f5;
  padding: .4em .6em;
}

.eb-summary-table td {
  padding: .4em .6em;
}

.eb-summary-desc {
  margin: .8em 0 0;
  font-size: .95em;
  line-height: 1.7;
}

/* ==== 記事ページ: 同カテゴリの関連作品グリッド ==== */
.eb-related {
  margin: 2em 0;
}

.eb-related-title {
  font-size: 1.1em;
  margin: 0 0 .5em;
}

.eb-related-more {
  margin: 0 0 .8em;
  font-size: .9em;
}

.eb-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.eb-related-item {
  display: block;
  color: inherit;
  text-decoration: none;
}

.eb-related-item img {
  width: 100%;
  /* アイキャッチは顔位置ベースで 16:9 に切り抜き済み（scripts/image_crop.js）。
     カード一覧と同じ比率で表示して、切り抜き結果をそのまま見せる */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.eb-related-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .8em;
  line-height: 1.4;
  margin-top: .3em;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/

  /* 記事ページ: 同カテゴリの関連作品グリッドはスマホで2列 */
  .eb-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
