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

/* =========================================
   1. 基本レイアウト・全体調整
   ========================================= */
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; }
}

.swl-marker.mark_yellow {
    background: linear-gradient(transparent 60%, #ffff66 60%);
    font-weight: bold; padding: 0 5px;
}

/* =========================================
   2. 共通コンバージョンボタン（緑・光沢）
   ========================================= */
.swell-block-button { text-align: center; margin: 1.5em 0; }
.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.2);
    position: relative; overflow: hidden;
    color: #fff !important; background: #62a83e;
    background-image: linear-gradient(to bottom, #74bf4f 0%, #62a83e 100%);
    border: none !important;
}
.swell-block-button a:hover {
    background-image: linear-gradient(to bottom, #62a83e 0%, #74bf4f 100%);
    transform: translateY(2px);
}
.is-style-btn_shiny a::before {
    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; pointer-events: none;
}
@keyframes shiny {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    20% { transform: translate(100%, 100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

/* =========================================
   3. 共通ギャラリー（グリッド）
   ========================================= */
.gallery-container {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px;
}
.gallery-item { width: calc(50% - 5px); box-sizing: border-box; }
@media (min-width: 768px) {
    .gallery-item { width: calc(33.333% - 7px); }
}
.gallery-item img { width: 100%; height: auto; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* =========================================
   4. あらすじ開閉（続きを読む）
   ========================================= */
#story-toggle { display: none !important; }
.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%);
}
.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; }
#story-toggle:checked ~ .story-read-more-btn::before { content: "あらすじを閉じる ∧"; }

/* =========================================
   5. 海賊版防止アコーディオン（修正完了）
   ========================================= */
#accordion-toggle-piracy { display: none !important; }
.piracy-accordion-container { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; margin: 30px 0; }
label.piracy-accordion-trigger {
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 15px !important; background: #f8f8f8 !important; cursor: pointer;
    font-weight: bold !important; border-left: 5px solid #d14444 !important; margin: 0 !important;
}
.trigger-icon { font-size: 1.2em; transition: transform 0.3s; }
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger { background: #d14444 !important; color: #fff !important; }
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger .trigger-icon { transform: rotate(45deg); color: #fff !important; }
.piracy-accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; }
#accordion-toggle-piracy:checked ~ .piracy-accordion-content { max-height: 2000px; border-top: 1px solid #ddd; }
.piracy-inner-content { padding: 20px; background: #fff5f5; }
.warning-header { background: #d14444; color: #fff; text-align: center; padding: 10px; 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; color: #d14444; font-weight: bold; }

/* =========================================
   6. 関連作品リスト（カード型：再修正版）
   ========================================= */
.p-relatedPosts { margin-top: 50px !important; margin-bottom: 20px !important; }
.p-relatedPosts h3.c-secTitle { border: none !important; padding: 0 !important; margin: 0 0 15px 0 !important; font-size: 1.25em !important; font-weight: bold !important; }

/* グリッドコンテナ */
.p-postList {
    display: flex !important; flex-wrap: wrap !important;
    gap: 15px !important; justify-content: flex-start !important;
}

/* カード本体 */
.p-postList__item {
    width: calc(33.333% - 10px) !important; /* PC3列 */
    border: 1px solid #eee !important; border-radius: 8px !important;
    overflow: hidden !important; background: #fff !important; margin: 0 !important;
}

@media screen and (max-width: 600px) {
    .p-postList__item { width: calc(50% - 8px) !important; } /* スマホ2列 */
}

.p-postList__link { text-decoration: none !important; color: #333 !important; display: block !important; }

/* サムネイル比率 3:2 */
.p-postList__thumb {
    width: 100% !important; height: 0 !important; padding-bottom: 66.67% !important;
    position: relative !important; overflow: hidden !important; background: #f0f0f0 !important;
}
.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; }

/* タイトルエリア（CocoonのH3枠線を消去） */
.p-postList__body { padding: 10px !important; border: none !important; background: none !important; }
.p-postList__title {
    font-size: 14px !important; font-weight: bold !important; margin: 0 !important; padding: 0 !important;
    border: none !important; /* ★ここが重要：Cocoonの線を消す */
    background: none !important; line-height: 1.4 !important;
    display: -webkit-box !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; overflow: hidden !important;
    height: auto !important;
}

/* =========================================
   7. タグ・ジャンル一覧
   ========================================= */
.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; font-size: 0.85em; color: #444; text-decoration: none; transition: all 0.2s; }
.genre-link-tag:hover { background: #fff; border-color: #d14444; color: #d14444; }

/* =========================================
   1. 基本レイアウト・全体調整
   ========================================= */
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; }
}

.swl-marker.mark_yellow {
    background: linear-gradient(transparent 60%, #ffff66 60%);
    font-weight: bold; padding: 0 5px;
}

/* =========================================
   2. 共通コンバージョンボタン（緑・光沢）
   ========================================= */
.swell-block-button { text-align: center; margin: 1.5em 0; }
.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.2);
    position: relative; overflow: hidden;
    color: #fff !important; background: #62a83e;
    background-image: linear-gradient(to bottom, #74bf4f 0%, #62a83e 100%);
    border: none !important;
}
.swell-block-button a:hover {
    background-image: linear-gradient(to bottom, #62a83e 0%, #74bf4f 100%);
    transform: translateY(2px);
}
.is-style-btn_shiny a::before {
    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; pointer-events: none;
}
@keyframes shiny {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    20% { transform: translate(100%, 100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

/* =========================================
   3. 共通ギャラリー（グリッド）
   ========================================= */
.gallery-container {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px;
}
.gallery-item { width: calc(50% - 5px); box-sizing: border-box; }
@media (min-width: 768px) {
    .gallery-item { width: calc(33.333% - 7px); }
}
.gallery-item img { width: 100%; height: auto; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* =========================================
   4. あらすじ開閉（続きを読む）
   ========================================= */
#story-toggle { display: none !important; }
.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%);
}
.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; }
#story-toggle:checked ~ .story-read-more-btn::before { content: "あらすじを閉じる ∧"; }

/* =========================================
   5. 海賊版防止アコーディオン（修正完了）
   ========================================= */
#accordion-toggle-piracy { display: none !important; }
.piracy-accordion-container { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; margin: 30px 0; }
label.piracy-accordion-trigger {
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 15px !important; background: #f8f8f8 !important; cursor: pointer;
    font-weight: bold !important; border-left: 5px solid #d14444 !important; margin: 0 !important;
}
.trigger-icon { font-size: 1.2em; transition: transform 0.3s; }
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger { background: #d14444 !important; color: #fff !important; }
#accordion-toggle-piracy:checked ~ label.piracy-accordion-trigger .trigger-icon { transform: rotate(45deg); color: #fff !important; }
.piracy-accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; }
#accordion-toggle-piracy:checked ~ .piracy-accordion-content { max-height: 2000px; border-top: 1px solid #ddd; }
.piracy-inner-content { padding: 20px; background: #fff5f5; }
.warning-header { background: #d14444; color: #fff; text-align: center; padding: 10px; 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; color: #d14444; font-weight: bold; }

/* =========================================
   6. 関連作品リスト（カード型：再修正版）
   ========================================= */
.p-relatedPosts { margin-top: 50px !important; margin-bottom: 20px !important; }
.p-relatedPosts h3.c-secTitle { border: none !important; padding: 0 !important; margin: 0 0 15px 0 !important; font-size: 1.25em !important; font-weight: bold !important; }

/* グリッドコンテナ */
.p-postList {
    display: flex !important; flex-wrap: wrap !important;
    gap: 15px !important; justify-content: flex-start !important;
}

/* カード本体 */
.p-postList__item {
    width: calc(33.333% - 10px) !important; /* PC3列 */
    border: 1px solid #eee !important; border-radius: 8px !important;
    overflow: hidden !important; background: #fff !important; margin: 0 !important;
}

@media screen and (max-width: 600px) {
    .p-postList__item { width: calc(50% - 8px) !important; } /* スマホ2列 */
}

.p-postList__link { text-decoration: none !important; color: #333 !important; display: block !important; }

/* サムネイル比率 3:2 */
.p-postList__thumb {
    width: 100% !important; height: 0 !important; padding-bottom: 66.67% !important;
    position: relative !important; overflow: hidden !important; background: #f0f0f0 !important;
}
.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; }

/* タイトルエリア（CocoonのH3枠線を消去） */
.p-postList__body { padding: 10px !important; border: none !important; background: none !important; }
.p-postList__title {
    font-size: 14px !important; font-weight: bold !important; margin: 0 !important; padding: 0 !important;
    border: none !important; /* ★ここが重要：Cocoonの線を消す */
    background: none !important; line-height: 1.4 !important;
    display: -webkit-box !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; overflow: hidden !important;
    height: auto !important;
}

/* =========================================
   7. タグ・ジャンル一覧
   ========================================= */
.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; font-size: 0.85em; color: #444; text-decoration: none; transition: all 0.2s; }
.genre-link-tag:hover { background: #fff; border-color: #d14444; color: #d14444; }