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

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

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/


/* (ページトップへ)「戻る」ボタンを下メニューと被らせない。PC、スマホとも。 */
#page_top, .page_top_btn {
    bottom: 80px;
}

/* スマホ縦画面の場合 768px以下の場合 */
/* トップ画像の高さをmarginのtopとbottomで調整。shorthand（まとめ指定）にすると上書きで負ける */
@media screen and (max-width: 768px) {
    #header .site-name,
    #header .site-description,
    .logo-text {
        /* タイトルの高さをインドネシアブログ用に調整した 2026/04/12 */
        margin: 79px 0 10px 0 !important;
        padding: 40px 0 0 0 !important;
    }
}

/* PCの場合 769px以上の場合 */
@media screen and (min-width: 769px) {
    /* @media screen and (min-width: 1023px) { */
    /* ヘッダーのタイトルエリアを詰める */
    #header .site-name,
    #header .site-description,
    .logo-text {
        /*         margin: 0 !important; */
        padding: 0 !important;
    }
    /* タイトル全体の上下余白が広すぎるため、狭くした */
    /*         #header .header-container {
            padding-top: 6px !important;
            padding-bottom: 6px !important;
        } */
}

/* トップページのサイドバーを消す(PCの場合) */
body.home #sidebar,
.privacy-policy #sidebar,
.page-id-150 #sidebar
{
    display: none;
}
body.home #main ,
.privacy-policy #main,
.privacy-policy #main,
.page-id-150 #main
{
    width: 100%;
    max-width: 100%;
}

/* 本文の上の隙間が無駄に広いので0にした(PC、スマホとも) */
.main {
    padding-top: 0;
}


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

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

/*768px以下*/
@media screen and (max-width: 768px) {
}

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

/* サブタイトルを薄く・少し小さくした */
.entry-content .post-subtitle {
    font-size: 0.88em;
    color: #777;
}

/* クリップボードへ「コピー」するボタン */
.code-block {
    position: relative;
}
.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background 0.1s, transform 0.05s;
}
.copy-btn:hover {
    background: #ddd;
}
.copy-btn:active {
    background: #bbb;
    transform: translateY(1px);
}

/* 背景画像を入れる(スマホだけヘッダー) */
@media screen and (max-width: 768px) {
    #header-container {
        position: relative;
        background-size: cover;
        /*         background-repeat: no-repeat; */
        background-image:
            /* トップ画像の高さをインドネシアブログ用に調整した 2026/04/12 */
            /* タイトル文字が見えにくいためトップページ画像の下側を暗くした */
                linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.7)),
                url("https://xs068000.xsrv.jp/wp-content/uploads/2025/11/chart-girl.jpg");
        background-position: center 38%;
        height: 110px;
    }
    .site-name-text {
        font-size: 24px !important;
        color: #fff;
        text-shadow:
                0 2px  4px rgba(0,0,0,0.6),
                0 6px 16px rgba(0,0,0,0.4);
    }
    /* 画像の顔に文字が被るので下へ下げた。2026/04/12 */
    .site-name-text {
        position: absolute;
        top: 46%;
        left: 0;
        line-height: 1.3;
        /* Cocoon スキン のタイトルの下にドットのアンダーラインが入るので消した 2026/04/12 */
        text-emphasis-style: none !important;
    }
    .wp-block-cover {
        display: none !important;
    }
    main.main, div.sidebar {
        padding-top: 0;
    }
    .date-tags {
        margin-bottom: 0;
    }
    .entry-content {
        margin-top: 0;
    }
    /*  #page_top, .page_top_btn {
        bottom: 70px;
      } */
    div#sidebar {
        /*         display: block; */
    }
}

/* トップページ本文を折りたたむ */
/* 初期状態は非表示（チラ見え防止） */
#concept-content {
    display: none;
}
.concept-box {
    border: 1px solid #ddd;
    padding: 12px;
    margin-bottom: 20px;
    background: #fafafa;
}
#concept-toggle {
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}
#concept-content {
    margin-top: 10px;
}

/* トップページの上の隙間を減らす */
.content {
    margin-top: 0;
}

/* スマホ下メニュー「サイドバー」を「記事一覧」に変更 */
.sidebar-menu-caption {
    font-size: 0 !important;
}

.sidebar-menu-caption::after {
    content: "記事一覧";
    font-size: 12px;
}

/* 行間の余白marginが広すぎると感じたため小さくする */
.entry-content p{
    margin-bottom:1.2em;
}

/* 特定記事だけ目次番号を消したい */
.postid-735 .toc ol,
.postid-830 .toc ol,
.postid-832 .toc ol,
.postid-940 .toc ol
{
    list-style: none !important;
}
/* 消えた番号の代わりに中黒「・」を付ける */
/* .postid-735 .toc li::before{
  content: "・";
  margin-right: 0.4em;
}
*/

#header-container::before {
    background: rgba(255,0,0,0.5);
}


/* スマホで最新記事を横並びにする */
@media screen and (max-width: 768px) {

    .wp-block-latest-posts li {
        display: flex;
        flex-wrap: wrap;
        /*         gap: 20px; */
    }

    .wp-block-latest-posts__featured-image img {
        height: auto;
        display: block;
    }

    /* タイトル */
    .wp-block-latest-posts__post-title {
        margin: 0;
    }

    /* 日付 */
    .wp-block-latest-posts__post-date {
        width: 60%;
        font-size: 11px;
        margin-top: -4px;
    }

    /* 抜粋 */
    .wp-block-latest-posts__post-excerpt {
        width: 100%;
        line-height: 1.4;
        margin-top: 4px;
    }
    .wp-block-latest-posts.is-grid li,
    .article ul li, .article ol li {
        /*         margin: 1px 0 0 0 !important; */
        border: solid 1px rgb(200 200 220);
    }
    .article ul, .article ol {
        padding-left: 0;
        margin: 0 0 0 0;
    }
    main.main, div.sidebar {
        padding: 2px 5px;
        margin: 0 0;
    }
    /* 「このブログについて」の余白が大きいので削除した */
    /*   concept-box {
        padding: 0;
        margin-bottom: 0px;
      } */
    .article h2, .article h3, .article h4, .article h5, .article h6 {
        margin-bottom: 0;
        padding: 0;
    }
    .concept-box {
        padding: 0;
        margin-bottom: 0;
    }
    .article h3 {
        font-size: 16px;
    }
    .entry-title, .article h2 {
        /* スキン「てがきノート」の枠のラインにかからない程度にするため 2026/04/11 */
        font-size: 17px;
        padding: 5px;
    }


    .wp-block-latest-posts.is-grid {
        display: flex !important;
    }
    ul.wp-block-latest-posts {
        display: flex;
        flex-wrap: wrap;
        /*       gap: 12px; */
    }

    ul.wp-block-latest-posts li {
        width: calc(50% - 6px);
    }
    ul.wp-block-latest-posts.is-grid {
        display: block !important;
    }

    ul.wp-block-latest-posts {
        column-count: 2;
        column-gap: 8px;
    }

    ul.wp-block-latest-posts li {
        break-inside: avoid;
        margin-bottom: 12px;
    }

    ul.wp-block-latest-posts {
        counter-reset: post;
    }

    ul.wp-block-latest-posts li {
        counter-increment: post;
    }

    ul.wp-block-latest-posts li::before {
        content: counter(post);
        font-weight: bold;
        display: block;
    }

    .wp-block-latest-posts__featured-image {
        margin-bottom: 4px !important;
    }

    .wp-block-latest-posts__post-title {
        margin-top: 0 !important;
    }
    .wp-block-latest-posts__featured-image img {
        display: block;
    }
    .wp-block-latest-posts__featured-image img {
        display: block;
    }
}

/* h2 タイトルのバックグラウンドの枠線の色を薄くし、読みやすくする 2026/04/12 */
.article h2, .related-entry-heading, .comment-title, .article h2:before, .article h2:after, .related-entry-heading:before, .comment-title:before, .related-entry-heading:after, .comment-title:after {
    border: solid 1px #77777761;
}

@media screen and (max-width: 768px) {
    .sns-share.ss-top.ss-col-6 a, .sns-share.ss-bottom.ss-col-6 a, .sns-share.ss-top.ss-col-5 a, .sns-share.ss-bottom.ss-col-5 a {
        width: 16% !important;
    }
}