@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.3
*/

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

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

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

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

  /* =========================================
     共通レイアウト
     全セクション共通
  ========================================= */
  #intro-section,
  #demo-section,
  #copy-section,
  #file-section,
  #download-section{
    max-width:960px;
    margin:0 auto;
    padding:0 16px;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans JP","Yu Gothic UI",sans-serif;
    color:#0f172a;
  }

/* =========================================
   共通見出し
   h2共通デザイン
========================================= */
#intro-section h2,
#demo-section h2,
#copy-section h2,
#file-section h2,
#download-section h2,
#category-section h2,
.related-entry-heading,
.comment-title{
  position:relative;
  display:block;
  width:100%;
  margin:34px 0 24px;
  padding:18px 22px 18px 26px;
  border-left:6px solid #2563eb;
  background:linear-gradient(90deg,#eef6ff 0%,#f8fbff 100%);
  color:#0f172a;
  font-size:clamp(20px,2.2vw,27px);
  font-weight:900;
  line-height:1.45;
  letter-spacing:-0.02em;
  text-align:left;
  box-sizing:border-box;
}

#intro-section h2::after,
#demo-section h2::after,
#copy-section h2::after,
#file-section h2::after,
#download-section h2::after,
#category-section h2::after,
.related-entry-heading::after,
.comment-title::after{
  content:none;
}

  /* =========================================
     共通本文
     説明文用
  ========================================= */
  #intro-section p,
  #file-section p,
  #download-section p{
    line-height:1.9;
    margin:10px 0 16px;
  }

  /* =========================================
     共通本文
     インラインコードのデザイン
  ========================================= */
  #intro-section p code,
  #demo-section p code,
  #file-section p code,
  #download-section p code{
    font-size:18px; /* 文字サイズ */
    color:#1d4ed8; /* 文字色：濃い青 */
    background:#eff6ff; /* 背景色：薄い青 */
    padding:2px 5px; /* 文字の上下・左右の余白 */
    border-radius:4px; /* 背景の角丸 */
  }

  /* =========================================
     ①イントロ
     注意書き
  ========================================= */
  #intro-section .notes{
    margin:12px 0;
  }

  #intro-section .note{
    border:1px solid #e5e7eb;
    background:#f8fafc;
    border-radius:10px;
    padding:10px 12px;
    font-size:12px;
  }

  #intro-section .note strong{
    display:block;
    margin-bottom:4px;
  }

  #intro-section .note hr{
    border:none;
    border-top:1px dashed #dbe2ea;
    margin:8px 0;
  }

  /* =========================================
     ②デモ
     カラー変数
  ========================================= */
  #demo-section{
    --border:#e5e7eb;
    --accent:#0b6bff;
  }

  /* =========================================
     ③コードコピー
     カラー変数
  ========================================= */
  #copy-section{
    --ink:#0f172a;
    --muted:#64748b;
    --accent:#0b6bff;
    --border:#e5e7eb;
  }

  /* コード全体カード */
  #copy-section .codecard{
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    margin:16px 0 24px;
  }

  /* タブエリア */
  #copy-section .code-tabs{
    display:flex;
    gap:6px;
    padding:8px;
    background:#f8fafc;
    border-bottom:1px solid var(--border);
  }

  /* タブボタン */
  #copy-section .code-tab{
    appearance:none;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    padding:6px 10px;
    font-size:12px;
    color:var(--ink);
    cursor:pointer;
  }

  /* 選択中タブ */
  #copy-section .code-tab[aria-selected="true"]{
    background:var(--accent);
    border-color:var(--accent);
    color:#fff;
  }

  /* タブフォーカス */
  #copy-section .code-tab:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
  }

  /* コピーエリア */
  #copy-section .code-actions{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:8px;
  }

  /* コピーボタン */
  #copy-section .copy-btn{
    font-size:12px;
    padding:6px 10px;
    border:1px solid var(--border);
    background:#fff;
    border-radius:8px;
    cursor:pointer;
  }

  #copy-section .zip-btn{
    font-size:12px;
    padding:6px 10px;
    border:1px solid var(--border);
    background:#fff;
    border-radius:8px;
    cursor:pointer;
  }

  /* タブ切替 */
  #copy-section .tabpanel{
    display:none;
  }

  #copy-section .tabpanel[aria-hidden="false"]{
    display:block;
  }

  /* コード表示エリア */
  #copy-section pre{
    margin:0;
    background:#fff;
  }

  /* コード本体 */
  #copy-section .codecard code{
    display:block;
    height:200px;
    overflow:auto;
    padding:12px 14px;
    white-space:pre;
    tab-size:2;
    font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono","Courier New",monospace;
  }

  /* =========================================
     ④ファイル構成と設置方法
     コードブロック
  ========================================= */
  #file-section pre{
    margin:12px 0 16px;
    padding:16px 20px; /* コードブロック内の余白 */
    background:#f5f8ff; /* 背景色：薄い青 */
    border:1px solid #dbe4f0; /* 枠線の色 */
    border-radius:10px;
    overflow:auto;
  }

  #file-section pre code{
    font:14px/1.8 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono","Courier New",monospace; /* 文字サイズと行間 */
    color:#1e293b; /* 文字色 */
    background:transparent; /* 背景色はpre側を使用 */
    padding:0;
    white-space:pre;
  }

  /* =========================================
     ⑤ファイルダウンロード
     ダウンロードエリア
  ========================================= */
  #download-section .download-box{
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:16px;
    background:#f8fafc;
  }

  /* ダウンロードボタン */
  #download-section .download-btn{
    display:inline-block;
    padding:10px 16px;
    border-radius:8px;
    background:#0b6bff;
    color:#fff !important;
    text-decoration:none !important;
    font-size:14px;
    font-weight:700;
  }

  /* ダウンロードボタンホバー */
  #download-section .download-btn:hover{
    opacity:.9;
  }    

/* 一覧・関連記事のアイキャッチを切り抜かず全体表示 */
.entry-card-thumb,
.related-entry-card-thumb,
.card-thumb,
.e-card-thumb {
    height: auto !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
}

.entry-card-thumb img,
.related-entry-card-thumb img,
.card-thumb img,
.e-card-thumb img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.related-entry-card,
.entry-card {
    height: auto !important;
}

/* 関連記事・記事一覧のアイキャッチを常に全体表示 */
.related-entry-card,
.entry-card {
    display: flex !important;
    align-items: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
}

.related-entry-card-thumb,
.entry-card-thumb,
.card-thumb,
.e-card-thumb {
    flex: 0 0 240px !important;
    width: 240px !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
}

.related-entry-card-thumb img,
.entry-card-thumb img,
.card-thumb img,
.e-card-thumb img,
.related-entry-card-thumb-image,
.entry-card-thumb-image,
.card-thumb-image,
.e-card-thumb-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.related-entry-card-content,
.entry-card-content {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
}


.related-entry-card-thumb img,
.entry-card-thumb img,
.card-thumb img,
.e-card-thumb img{
    width:100% !important;
    height:auto !important;
    object-fit:contain !important;
}

/* 記事本文のh3見出し */
.article h3,
.entry-content h3{
  margin:5px 0 18px;
  padding:0;
  border:none;
  background:none;
  color:#0f172a;
  font-size:22px;
  font-weight:800;
  line-height:1.5;
}

/* 投稿ページ全体の表示幅を広げる */
.single-post .content-in.wrap{
  width: 1200px !important; /* 投稿ページ全体の最大幅。広げるなら1300px、狭めるなら1000pxなどに変更 */
  max-width: 1200px !important; /* 最大幅。上のwidthと同じ数値にする */
  margin-left: auto !important; /* 左右中央寄せ */
  margin-right: auto !important; /* 左右中央寄せ */
}

/* メイン本文エリアを親幅いっぱいに広げる */
.single-post #main.main{
  width: 100% !important; /* 親要素の幅いっぱいに表示 */
  max-width: 1200px !important; /* メイン本文の最大幅。全体幅と同じ数値にする */
  margin-left: auto !important; /* 左右中央寄せ */
  margin-right: auto !important; /* 左右中央寄せ */
}

/* 記事本文と各セクションの幅を統一する */
.single-post .article,
.single-post .entry-content,
.single-post #intro-section,
.single-post #demo-section,
.single-post #copy-section,
.single-post #file-section,
.single-post #download-section{
  width: 100% !important; /* 親要素の幅いっぱいに表示 */
  max-width: 1200px !important; /* 各セクションの最大幅。全体幅と同じ数値にする */
  margin-left: auto !important; /* 左右中央寄せ */
  margin-right: auto !important; /* 左右中央寄せ */
  box-sizing: border-box !important; /* paddingを幅に含める */
}

/* スマホでは画面幅に戻す */
@media screen and (max-width: 768px){
  .single-post .content-in.wrap,
  .single-post #main.main,
  .single-post .article,
  .single-post .entry-content,
  .single-post #intro-section,
  .single-post #demo-section,
  .single-post #copy-section,
  .single-post #file-section,
  .single-post #download-section{
    width: 100% !important; /* スマホでは画面幅いっぱいに表示 */
    max-width: 100% !important; /* はみ出し防止 */
  }
}

/* =========================================
   記事上部アイキャッチを少し小さくする
========================================= */
.eye-catch{
  width:90%;
  margin:0 auto 32px;
}

.eye-catch img{
  width:100%;
  display:block;
}

/* =========================================
⑤ 関連カテゴリー・トップページカード
========================================= */
.mh-category-wrap{
  margin:56px 0;
}

.mh-category-card{
  display:flex;
  align-items:center;
  gap:24px;
  padding:18px;
  border-radius:22px;
  background:#ffffff;
  border:1px solid #e5e7eb;
  text-decoration:none;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
  transition:transform .25s, box-shadow .25s, border-color .25s;
}

.mh-category-card:hover{
  transform:translateY(-4px);
  border-color:#2563eb;
  box-shadow:0 18px 44px rgba(37,99,235,.16);
}

.mh-category-image{
  display:block;
  width:230px;
  border-radius:14px;
  flex-shrink:0;
}

.mh-category-body{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding-right:18px;
}

.mh-category-content{
  flex:1;
}

.mh-category-title{
  margin:0 0 10px;
  color:#0f172a;
  font-size:26px;
  font-weight:900;
  line-height:1.4;
}

.mh-category-text{
  margin:0;
  color:#475569;
  font-size:15px;
  line-height:1.8;
  font-weight:600;
}

.mh-category-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  padding:12px 24px;
  border:2px solid #2563eb;
  border-radius:999px;
  background:#ffffff;
  color:#2563eb;
  font-size:15px;
  font-weight:900;
  transition:background .25s,color .25s,box-shadow .25s;
}

.mh-category-card:hover .mh-category-button{
  background:#2563eb;
  color:#ffffff;
  box-shadow:0 10px 24px rgba(37,99,235,.22);
}

@media screen and (max-width:640px){

  .mh-category-card{
    flex-direction:column;
    align-items:flex-start;
  }

  .mh-category-image{
    width:100%;
  }

  .mh-category-body{
    width:100%;
    flex-direction:column;
    align-items:flex-start;
    gap:18px;
    padding-right:0;
  }

  .mh-category-button{
    width:100%;
  }

}

/* =========================================
   コードコピー・ダウンロードの使い方案内
========================================= */
.copy-guide{
  margin:0 0 20px;
  padding:14px 18px;
  border-radius:8px;
  background:#f5f8fc;
  color:#475569;
  font-size:14px;
  line-height:1.7;
}

.copy-guide strong{
  display:block;
  margin:0 0 4px;
  color:#0f172a;
  font-size:15px;
  font-weight:800;
}

.copy-guide p{
  margin:0;
}

/* =========================================
   ZIPダウンロード 広告モーダル
========================================= */
.zip-ad-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
}

.zip-ad-modal.is-open{
    display:flex;
}

.zip-ad-modal__overlay{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.65);
}

.zip-ad-modal__content{
    position:relative;
    z-index:1;
    width:100%;
    max-width:380px;
    padding:24px;
    border-radius:16px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.20);
    box-sizing:border-box;
    text-align:center;
}

.zip-ad-modal__close{
    position:absolute;
    top:8px;
    right:10px;
    width:36px;
    height:36px;
    padding:0;
    border:0;
    background:transparent;
    color:#64748b;
    font-size:28px;
    line-height:36px;
    cursor:pointer;
}

.zip-ad-modal__ad{
    width:300px;
    height:250px;
    max-width:100%;
    margin:20px auto;
    overflow:hidden;
}

.zip-ad-modal__download{
    display:block;
    width:100%;
    margin:16px 0 0;
    padding:12px 16px;
    border:0;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    font-size:15px;
    font-weight:700;
    line-height:1.5;
    cursor:pointer;
}

.zip-ad-modal__download:hover{
    background:#1e40af;
}

.zip-ad-modal__download:disabled{
    opacity:.6;
    cursor:default;
}

@media (max-width:480px){

    .zip-ad-modal{
        padding:12px;
    }

    .zip-ad-modal__content{
        max-width:340px;
        padding:18px;
    }

}


/* =========================================
   漫画サイト 共通デザイン
   既存CSSは変更しない
   カラー：オレンジ・白・ダークグレー
   スマートフォン優先
========================================= */

/* =========================================
   1. 共通カラー・基本設定
========================================= */
.comic-page,
.comic-search,
.comic-sidebar-widget {
  --comic-accent: #ea580c;
  --comic-accent-dark: #c2410c;
  --comic-accent-light: #fff7ed;
  --comic-background: #f8f7f5;
  --comic-surface: #ffffff;
  --comic-text: #262626;
  --comic-muted: #737373;
  --comic-border: #e7e5e4;
  --comic-radius: 12px;
  color: var(--comic-text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.comic-page *,
.comic-page *::before,
.comic-page *::after,
.comic-search *,
.comic-sidebar-widget * {
  box-sizing: border-box;
}

.comic-page {
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.comic-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.comic-page a {
  color: var(--comic-accent-dark);
  text-decoration: none;
}

.comic-page a:hover {
  text-decoration: underline;
}

.comic-page a:focus-visible,
.comic-search button:focus-visible,
.comic-search input:focus-visible {
  outline: 3px solid #fb923c;
  outline-offset: 3px;
}

/* =========================================
   2. 漫画記事専用の2カラム
   旧CSSの1カラム指定より優先
========================================= */
@media screen and (min-width: 1024px) {
  body.single-post:has(.comic-page) .content-in.wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 20px !important;
    width: calc(100% - 40px) !important;
    max-width: 1560px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  body.single-post:has(.comic-page) #main.main {
    display: block !important;
    flex: 1 1 0 !important;
    width: calc(100% - 320px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.single-post:has(.comic-page) #sidebar.sidebar {
    display: block !important;
    flex: 0 0 300px !important;
    width: 300px !important;
    max-width: 300px !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
}

/* =========================================
   3. 漫画記事の共通見出し
   h2～h5は使用しない
========================================= */
.comic-page .comic-section {
  margin: 0 0 44px;
  min-width: 0;
}

.comic-page .comic-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0 0 13px;
  border: 0;
  border-bottom: 2px solid var(--comic-border);
  background: transparent;
  color: var(--comic-text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.comic-page .comic-section-title::before {
  content: "";
  display: block;
  width: 5px;
  height: 26px;
  flex: 0 0 5px;
  border-radius: 3px;
  background: var(--comic-accent);
}

.comic-page .comic-subtitle {
  display: block;
  margin: 0 0 13px;
  color: var(--comic-text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.55;
}

.comic-page .comic-small-title {
  display: block;
  margin: 0 0 9px;
  color: var(--comic-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.comic-page .comic-section-description {
  margin: -8px 0 22px;
  color: var(--comic-muted);
  font-size: 14px;
  line-height: 1.8;
}

/* =========================================
   4. 作品基本情報
========================================= */
.comic-page .comic-hero {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 0 0 42px;
  padding: 24px;
  border: 1px solid var(--comic-border);
  border-radius: var(--comic-radius);
  background: var(--comic-surface);
}

.comic-page .comic-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--comic-border);
  border-radius: 8px;
  background: #fafaf9;
}

.comic-page .comic-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comic-page .comic-hero-content {
  min-width: 0;
}

.comic-page .comic-work-title {
  margin: 0 0 15px;
  color: var(--comic-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.45;
}

.comic-page .comic-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  margin: 0 0 14px;
  padding: 3px 11px;
  border-radius: 6px;
  background: #f5f5f4;
  color: #57534e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.comic-page .comic-status-complete {
  background: #dcfce7;
  color: #166534;
}

.comic-page .comic-status-ongoing {
  background: #fff7ed;
  color: #9a3412;
}

.comic-page .comic-meta {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.comic-page .comic-meta-row {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--comic-border);
}

.comic-page .comic-meta-row:last-child {
  border-bottom: 0;
}

.comic-page .comic-meta-label {
  color: var(--comic-muted);
  font-size: 13px;
  font-weight: 700;
}

.comic-page .comic-meta-value {
  min-width: 0;
  color: var(--comic-text);
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================
   5. 作品紹介・あらすじ
========================================= */
.comic-page .comic-description {
  color: var(--comic-text);
  font-size: 16px;
  line-height: 2;
}

.comic-page .comic-description p {
  margin: 0 0 17px;
}

.comic-page .comic-description p:last-child {
  margin-bottom: 0;
}

.comic-page .comic-notice {
  margin: 20px 0;
  padding: 15px 18px;
  border-left: 4px solid var(--comic-accent);
  border-radius: 0 8px 8px 0;
  background: var(--comic-accent-light);
  color: #7c2d12;
  font-size: 14px;
  line-height: 1.8;
}

/* =========================================
   6. 全巻セット・版別カード
========================================= */
.comic-page .comic-set-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.comic-page .comic-set-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 15px;
  padding: 21px;
  border: 1px solid var(--comic-border);
  border-radius: var(--comic-radius);
  background: var(--comic-surface);
}

.comic-page .comic-set-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.comic-page .comic-set-title {
  display: block;
  min-width: 0;
  color: var(--comic-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
}

.comic-page .comic-set-publisher {
  display: block;
  margin-top: 4px;
  color: var(--comic-muted);
  font-size: 12px;
}

.comic-page .comic-set-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--comic-accent-light);
  color: var(--comic-accent-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.comic-page .comic-set-description {
  flex: 1 1 auto;
  margin: 0;
  color: #57534e;
  font-size: 14px;
  line-height: 1.85;
}

/* =========================================
   7. 購入リンク・ボタン
========================================= */
.comic-page .comic-buy-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.comic-page .comic-buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--comic-accent);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  text-decoration: none !important;
  transition: background .2s, transform .2s;
}

.comic-page .comic-buy-button:hover {
  background: var(--comic-accent-dark);
  transform: translateY(-1px);
}

.comic-page .comic-buy-amazon {
  background: #232f3e;
}

.comic-page .comic-buy-amazon:hover {
  background: #111827;
}

.comic-page .comic-buy-rakuten {
  background: #bf0000;
}

.comic-page .comic-buy-rakuten:hover {
  background: #970000;
}

.comic-page .comic-buy-bookoff {
  background: #136c39;
}

.comic-page .comic-buy-bookoff:hover {
  background: #0c4f29;
}

.comic-page .comic-buy-note {
  margin: 12px 0 0;
  color: var(--comic-muted);
  font-size: 12px;
  line-height: 1.8;
}

/* =========================================
   8. 既刊作品・新刊情報
========================================= */
.comic-page .comic-release-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid #fed7aa;
  border-radius: var(--comic-radius);
  background: var(--comic-accent-light);
}

.comic-page .comic-release-label {
  display: block;
  margin-bottom: 5px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.comic-page .comic-release-value {
  display: block;
  color: #7c2d12;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
}

.comic-page .comic-release-detail {
  margin: 8px 0 0;
  color: #92400e;
  font-size: 13px;
}

/* =========================================
   9. 漫画専用検索フォーム
========================================= */
.comic-search {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: #ffffff;
}

.comic-search:focus-within {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .12);
}

.comic-search .comic-search-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #262626;
  font-size: 16px;
}

.comic-search .comic-search-input::placeholder {
  color: #a8a29e;
}

.comic-search .comic-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 48px;
  padding: 10px 15px;
  border: 0;
  border-radius: 0;
  background: #ea580c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.comic-search .comic-search-button:hover {
  background: #c2410c;
}

/* =========================================
   10. サイドバー専用ウィジェット
========================================= */
.comic-sidebar-widget {
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--comic-border);
  border-radius: 12px;
  background: #ffffff;
}

.comic-sidebar-widget .comic-sidebar-title {
  display: block;
  margin: 0 0 15px;
  padding: 0 0 11px;
  border-bottom: 2px solid var(--comic-border);
  color: #262626;
  font-size: 16px;
  font-weight: 800;
}

.comic-sidebar-widget .comic-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.comic-sidebar-widget .comic-sidebar-link {
  display: block;
  padding: 11px 2px;
  border-bottom: 1px solid var(--comic-border);
  color: #44403c;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

.comic-sidebar-widget .comic-sidebar-link:last-child {
  border-bottom: 0;
}

.comic-sidebar-widget .comic-sidebar-link:hover {
  color: #c2410c;
}

.comic-sidebar-widget .comic-sidebar-banner {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.comic-sidebar-widget .comic-sidebar-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* =========================================
   11. 漫画一覧・関連作品カード
========================================= */
.comic-page .comic-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.comic-page .comic-work-card {
  display: block;
  min-width: 0;
  padding: 0;
  color: var(--comic-text);
  text-decoration: none;
}

.comic-page .comic-work-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--comic-border);
  border-radius: 8px;
  background: #fafaf9;
}

.comic-page .comic-work-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .2s;
}

.comic-page .comic-work-card:hover .comic-work-image img {
  transform: scale(1.03);
}

.comic-page .comic-work-name {
  display: block;
  margin: 9px 0 3px;
  color: var(--comic-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.comic-page .comic-work-author {
  display: block;
  color: var(--comic-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* =========================================
   12. Cocoon記事一覧の旧CSSを上書き
   漫画トップ・カテゴリー・検索結果のみ
========================================= */
body:is(.home, .category-comic, .search) .entry-card,
body.single-post:has(.comic-page) .related-entry-card {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
}

body:is(.home, .category-comic, .search) .entry-card-thumb,
body.single-post:has(.comic-page) .related-entry-card-thumb {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 1 auto !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
  border-radius: 8px;
  background: #fafaf9;
}

body:is(.home, .category-comic, .search) .entry-card-thumb img,
body.single-post:has(.comic-page) .related-entry-card-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
}

body:is(.home, .category-comic, .search) .entry-card-content,
body.single-post:has(.comic-page) .related-entry-card-content {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

/* =========================================
   13. タブレット対応
========================================= */
@media screen and (max-width: 1023px) {
  body.single-post:has(.comic-page) .content-in.wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.single-post:has(.comic-page) #main.main {
    flex: 0 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.single-post:has(.comic-page) #sidebar.sidebar {
    display: block !important;
    flex: 0 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .comic-page .comic-work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* =========================================
   14. スマートフォン対応
========================================= */
@media screen and (max-width: 767px) {
  .comic-page {
    font-size: 15px;
    line-height: 1.85;
  }

  .comic-page .comic-section {
    margin-bottom: 34px;
  }

  .comic-page .comic-section-title {
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 11px;
    font-size: 19px;
  }

  .comic-page .comic-section-title::before {
    height: 23px;
  }

  .comic-page .comic-subtitle {
    font-size: 17px;
  }

  .comic-page .comic-hero {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 15px;
    margin-bottom: 34px;
    padding: 15px;
  }

  .comic-page .comic-work-title {
    margin-bottom: 10px;
    font-size: 21px;
  }

  .comic-page .comic-meta-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px 0;
  }

  .comic-page .comic-meta-label {
    font-size: 11px;
  }

  .comic-page .comic-meta-value {
    font-size: 13px;
  }

  .comic-page .comic-description {
    font-size: 15px;
    line-height: 1.95;
  }

  .comic-page .comic-set-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .comic-page .comic-set-card {
    gap: 13px;
    padding: 17px;
  }

  .comic-page .comic-set-title {
    font-size: 16px;
  }

  .comic-page .comic-release-box {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .comic-page .comic-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .comic-page .comic-work-name {
    font-size: 13px;
  }

  .comic-page .comic-work-author {
    font-size: 11px;
  }

  .comic-sidebar-widget {
    padding: 16px;
  }
}

/* =========================================
   15. 小型スマートフォン対応
========================================= */
@media screen and (max-width: 360px) {
  .comic-page .comic-hero {
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .comic-page .comic-work-title {
    font-size: 19px;
  }

  .comic-page .comic-set-header {
    flex-wrap: wrap;
  }

  .comic-page .comic-work-grid {
    gap: 10px;
  }
}

/* =========================================
   16. 動きを減らす設定への対応
========================================= */
@media (prefers-reduced-motion: reduce) {
  .comic-page .comic-buy-button,
  .comic-page .comic-work-image img {
    transition: none;
  }

  .comic-page .comic-buy-button:hover,
  .comic-page .comic-work-card:hover .comic-work-image img {
    transform: none;
  }
}

/* =========================================
   17. 漫画サイト ヘッダー・検索フォーム
========================================= */

/* ヘッダー全体 */
#header {
  background: #ffffff;
}

/* ヘッダー内部 */
#header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  width: calc(100% - 40px);
  max-width: 1560px;
  min-height: 100px;
  margin: 0 auto;
  padding: 18px 0;
  box-sizing: border-box;
}

/* サイトロゴ */
#header-in .logo {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0;
}

/* 検索フォーム配置エリア */
.comic-header-search {
  flex: 1 1 0;
  width: 100%;
  max-width: 700px;
  min-width: 0;
}

/* 検索フォーム全体 */
.comic-header-search .comic-search {
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  border: 2px solid #c52b18;
  border-radius: 6px;
  background: #ffffff;
}

/* 検索フォーム選択時 */
.comic-header-search .comic-search:focus-within {
  border-color: #a51d0f;
  box-shadow: 0 0 0 3px rgba(197, 43, 24, .12);
}

/* 検索入力欄 */
.comic-header-search .comic-search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: #ffffff;
  color: #262626;
  font-size: 15px;
}

/* プレースホルダー */
.comic-header-search .comic-search-input::placeholder {
  color: #999999;
}

/* 検索ボタン */
.comic-header-search .comic-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 100px;
  min-height: 46px;
  padding: 10px 15px;
  border: 0;
  border-radius: 0;
  background: #c52b18;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* 検索ボタン ホバー */
.comic-header-search .comic-search-button:hover {
  background: #a51d0f;
}

/* 検索アイコン */
.comic-header-search .comic-search-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* キャッチフレーズ */
#header-in .tagline {
  flex: 0 0 100%;
  margin: 0;
}

/* =========================================
   スマートフォン対応
========================================= */
@media screen and (max-width: 767px) {

  #header-in {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: calc(100% - 24px);
    min-height: 0;
    padding: 12px 0;
  }

  .comic-header-search {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .comic-header-search .comic-search-input {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 16px;
  }

  .comic-header-search .comic-search-button {
    flex: 0 0 70px;
    min-height: 42px;
    gap: 5px;
    font-size: 13px;
  }

  .comic-header-search .comic-search-button svg {
    width: 17px;
    height: 17px;
  }

}