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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
img {
    margin-bottom: 15px !important;
}
.logo-text {
    padding: 10px 0 10px !important;
}
@media screen and (max-width: 834px) {
    main.main, div.sidebar {
        padding-top: 3px !important;
    }
}
/* --- 漫画サイト用スタイル開始 --- */
/* 1. コンバージョンボタン（キラっと光る演出付き） */
.comic-btn-wrap {
    text-align: center;
    margin: 20px 0;
}
.comic-btn {
    display: inline-block;
    background: #00c853; /* 鮮やかな緑 */
    background: linear-gradient(to bottom, #00e676, #00c853);
    color: #fff !important;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s;
    border-bottom: 4px solid #009624;
    position: relative;
    overflow: hidden;
}
.comic-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-bottom: 2px solid #009624;
    opacity: 0.95;
    color: #fff;
}
/* キラッと光るアニメーション */
.comic-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    animation: shiny 3s infinite;
}
@keyframes shiny {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    20% { transform: translate(100%, 100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}
/* 黄色マーカー */
.swl-marker.mark_yellow {
    background: linear-gradient(transparent 60%, #ffff66 60%);
    font-weight: bold;
    padding: 0 5px;
}

/* 2. 画像ギャラリー */
.comic-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}
.comic-gallery img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.comic-gallery img:hover {
    transform: scale(1.02);
}

/* 3. あらすじ開閉（続きを読む） */
.story-expander {
    position: relative;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
}
.story-content-box {
    max-height: 150px; /* 閉じた時の高さ */
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative;
}
/* ぼかしエフェクト */
.story-content-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(250,250,250,0), rgba(250,250,250,1) 90%);
    pointer-events: none;
    transition: opacity 0.3s;
}
.story-read-more-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    color: #555;
    font-size: 0.9em;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}
.story-read-more-btn::before { content: "あらすじを全文読む ∨"; font-weight: bold; }

/* 開いた時の挙動 */
#story-toggle:checked ~ .story-content-box { max-height: none; }
#story-toggle:checked ~ .story-content-box::after { opacity: 0; height: 0; }
#story-toggle:checked ~ .story-read-more-btn::before { content: "あらすじを閉じる ∧"; }


/* 4. 海賊版対策アコーディオン */
.piracy-accordion-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff5f5; /* 薄い警告色 */
    margin: 30px 0;
}
label.piracy-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f8f8;
    cursor: pointer;
    font-weight: bold;
    border-left: 5px solid #d14444; /* 左に赤い線 */
    transition: background 0.3s;
}
label.piracy-accordion-trigger:hover { background: #eee; }
.trigger-icon { font-size: 1.2em; transition: transform 0.3s; }

/* 開いた時 */
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger { background: #d14444; color: #fff; }
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger .trigger-icon { transform: rotate(45deg); color: #fff; }
.piracy-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: #fff;
}
#accordion-toggle-piracy:checked ~ .piracy-accordion-content { max-height: 2000px; }
.piracy-inner-content { padding: 20px; }
.warning-header {
    background: #d14444;
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 15px;
}
.risk-box {
    border: 2px dashed #d14444;
    padding: 15px;
    border-radius: 5px;
    background: #fff;
    margin: 15px 0;
}

/* 5. タグ・ジャンル一覧（左寄せ） */
.genre-link-container { text-align: left; margin: 30px 0; }
.genre-search-label { font-weight: bold; display: block; margin-bottom: 10px; color: #555; }
.genre-link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-link-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    color: #444;
    transition: all 0.2s;
}
.genre-link-tag:hover {
    background: #fff;
    border-color: #d14444;
    color: #d14444;
}
/* =========================================
   SWELL風緑ブロックボタン
   ========================================= */

/* 1. 基本となるブロックボタンのスタイル */
.swell-block-button {
    text-align: center;
    margin: 1.5em 0; /* 上下の余白 */
}

/* 2. ボタン本体 (<a>タグ) の共通スタイル */
.swell-block-button a {
    display: block;
    padding: 15px 30px;
    border-radius: 9999px; /* 角丸を最大限に */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 軽い影で立体感を出す */
    border: none;
}

/* 3. 緑色 (green) の配色設定 */
.swell-block-button.green_ a {
    color: #fff; /* 文字色を白に */
    /* ベースカラー */
    background: #62a83e;
    /* グラデーション */
    background-image: linear-gradient(to bottom, #74bf4f 0%, #62a83e 100%);
}

/* 4. ホバー時のアクション */
.swell-block-button.green_ a:hover {
    color: #fff;
    /* ホバーで色を濃く（少し沈む表現） */
    background-image: linear-gradient(to bottom, #62a83e 0%, #74bf4f 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); /* 影を小さく */
    transform: translateY(1px); /* 少し下に動かす */
}

/* 5. サイズバリエーション: -size-l (大) */
.swell-block-button.-size-l a {
    padding: 18px 35px;
    font-size: 1.25em; /* さらに文字を大きく */
}

/* 6. サイズバリエーション: -size-s (小) */
.swell-block-button.-size-s a {
    display: inline-block; /* 小さいサイズは横幅をコンテンツに合わせる */
    width: auto;
    padding: 10px 25px;
    font-size: 0.95em;
}

/* 7. 装飾バリエーション: is-style-btn_shiny (光沢/シャイニー) */
.swell-block-button.is-style-btn_shiny a {
    position: relative;
    overflow: hidden;
}

.swell-block-button.is-style-btn_shiny a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3); /* 白い光沢レイヤー */
    transform: skewX(-45deg) translateX(-150%);
    transition: transform 0.5s;
    pointer-events: none; /* クリックを邪魔しないように */
}

/* シャイニー効果: ホバーで光が流れる */
.swell-block-button.is-style-btn_shiny a:hover::before {
    transform: skewX(-45deg) translateX(150%);
}
/* =========================================
   関連作品リスト（最終調整版：横長 3:2 サムネイル）
   ========================================= */

/* 関連作品コンテナ全体 */
.p-relatedPosts {
    margin-top: 50px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

/* 見出しの左線と左パディングを完全に削除 */
.p-relatedPosts h3.c-secTitle,
.p-relatedPosts .c-secTitle {
    border: none !important; 
    border-left: none !important; 
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important; 
    padding-left: 0 !important; 
    margin: 0 0 10px 0 !important; 
    font-size: 1.2em !important;
    font-weight: bold !important;
    color: #333 !important;
    text-align: left !important;
    display: block !important;
    background: none !important;
}

/* 投稿リストのグリッドレイアウト設定 */
.p-postList {
    display: grid !important;
    /* PC: 4列固定 (最小150px、最大1fr) */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 15px !important;
}

/* 1. リストアイテム（カード）の基本スタイル */
.p-postList__item {
    margin-bottom: 0 !important;
    border: 1px solid #eee !important; 
    border-radius: 6px !important; 
    overflow: hidden !important; 
    transition: box-shadow 0.3s ease !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    height: 100% !important; 
    padding: 0 !important;
}

/* 3. リンク要素全体をカードにする (Flexboxを維持) */
.p-postList__item a.p-postList__link {
    display: flex !important; 
    flex-direction: column !important;
    text-decoration: none !important;
    color: #333 !important;
    height: 100% !important;
}

/* 4. ★★★ サムネイルエリアの安定化と 3:2 横長比率への変更 ★★★ */
.p-postList__thumb {
    width: 100% !important;
    height: 0 !important; 
    /* 横長 (3:2) の比率を強制 (2/3 = 0.6667) */
    padding-bottom: 66.67% !important; 
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 0 !important; 
}

/* 5. サムネイル画像（imgタグ）の表示調整 */
.p-postList__thumb img {
    position: absolute !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    margin: 0 !important;
    padding: 0 !important;
}

/* 6. テキストエリア（タイトルを格納）の調整 */
.p-postList__body {
    padding: 8px 10px !important; 
    min-height: auto !important; 
    flex-grow: 1 !important; 
    margin: 0 !important; 
    background: none !important;
}

/* 7. タイトル行数の制限とデザイン調整 */
.p-postList__title {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important; 
    
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important; 
    overflow: hidden !important;
    
    margin: 0 !important; 
    padding: 0 !important;
    
    line-height: 1.3 !important; 
    font-size: 14px !important; 
    font-weight: bold !important; 
    color: #333 !important;
    height: auto !important; 
}

/* --- スマホ表示の調整 (600px以下) --- */
@media screen and (max-width: 600px) {
    .p-postList {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px !important;
    }
    .p-postList__item {
        border-radius: 4px !important; 
    }
    .p-postList__body {
        padding: 6px 8px !important; 
    }
    .p-postList__title {
        font-size: 13px !important;
    }
}

/* --- スマホ表示の調整 (600px以下) --- */
@media screen and (max-width: 600px) {
    .p-postList {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px !important;
    }
    .p-postList__item {
        border-radius: 4px !important; 
    }
    .p-postList__body {
        padding: 6px 8px !important; 
    }
    .p-postList__title {
        font-size: 13px !important;
    }
}
/* --- 漫画サイト用スタイル終了 --- */
/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

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

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