@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 / .eb-cta 等）のスタイルは ads.css にまとめてある */

/* ==== 記事ページ: 本文ブロック（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-watch） ====
   サンプル画像の下に置く、動画サイトへの導線。画像1枚にリンクを張っただけでは
   そこから動画を見られることが伝わらないため、明示的なボタンを出す
   （エロタレストの掲載条件「動画視聴が容易に行える」への対応）。 */
.eb-watch {
  margin: .6em 0 1.2em;
  text-align: center;
}

/* wpautop が <a> を <p> で包んでも余白が二重にならないようにする */
.eb-watch p {
  margin: 0;
}

.eb-watch-button {
  display: inline-block;
  min-width: 60%;
  padding: .7em 1.6em;
  border-radius: 4px;
  background: #d94f70;
  color: #fff;
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .15s ease;
}

.eb-watch-button:hover {
  background: #c23d5d;
  color: #fff;
  text-decoration: none;
}

.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){
  /*必要ならばここにコードを書く*/

  /* 記事ページ: 「動画を見る」ボタンはスマホでは横幅いっぱいにする */
  .eb-watch-button {
    display: block;
    min-width: 0;
  }
}

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

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