@media (min-width: 769px) {
    /* 追従を邪魔する親のoverflowを徹底排除 */
    .site-content, .content-area, .right-sidebar, .inside-right-sidebar {
        overflow: visible !important;
    }

    /* まとめて一本釣り */
    #kimoota-sticky-unit {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
        z-index: 100;
        /* 重要：自分自身の高さは「中身」に合わせる */
        height: auto !important;
    }
}

@media (max-width: 768px) {
    .inside-right-sidebar {
        min-height: 0 !important;
        height: auto !important;
    }
}

/* ユニット内の各ウィジェット（aside） */
.kimoota-sticky-item {
    background-color: #fff; /* 背景色 */
    padding: 30px;          /* GPのデフォルトは大体このくらい */
    margin-bottom: 20px;    /* ウィジェット間の隙間 */
    border-radius: 4px;     /* もし角を丸めるなら */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 軽い影で浮かせるとモダン */
}

/* タイトルの装飾（テーマの設定に合わせる） */
#kimoota-sticky-unit .widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #333; /* 下線を引くなら */
}

/* ダークテーマ用：自作ウィジェット内のテキスト装飾 */
.kimoota-custom-widget p {
    font-size: 14px;
    line-height: 1.7;    /* 小さい文字こそ行間を広く */
    color: #ccc;          /* 真っ白(#fff)を避けた、落ち着いたグレー白 */
    margin-bottom: 1.2em;
    font-weight: 400;     /* ダークテーマでは文字が膨張して見えるので標準重で */
    letter-spacing: 0.03em; /* 視認性向上のための微細な調整 */
}

/* リンクがある場合は、少し明るくして視認性を確保 */
.kimoota-custom-widget p a {
    color: #00aaff;       /* ConoHa系なら青系、またはテーマのアクセントカラー */
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.kimoota-custom-widget p a:hover {
    border-bottom: 1px solid #00aaff;
}

/************************************
** 著者SNS：洗練されたアウトラインver
************************************/

/* 全体コンテナ */
.kimoota-author-sns-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    background-color: transparent;
    border-top: 1px solid #333; /* 線をさらに細く、暗くして馴染ませる */
    border-bottom: 1px solid #333;
    padding: 25px 0;
    max-width: 400px;
    margin: 0 auto;
}

/* SNS各項目 */
.kimoota-author-sns-wrapper .sns-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SVGアイコンコンテナ */
.kimoota-author-sns-wrapper .sns-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

/* --- アイコン（SVG）の初期状態：繊細なアウトライン --- */
.kimoota-author-sns-wrapper .sns-icon svg {
    fill: none !important;      /* 中を抜く */
    stroke: #888;              /* 初期状態は少し暗めのグレーで存在感を消す */
    stroke-width: 1.2;         /* 線を細くして繊細に */
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

/* --- テキストラベル：シンプルに --- */
.kimoota-author-sns-wrapper .sns-label {
    font-size: 11px;           /* 小さめにして「添える」感じに */
    color: #888;               /* アイコンと色を合わせる */
    text-align: center;
    white-space: nowrap;
    font-weight: bold;
    letter-spacing: 0.05em;    /* 少しだけ字間を広げてモダンに */
    transition: all 0.3s ease;
}

/* --- ホバー時：上品にサーモンピンクが浮かび上がる --- */
.kimoota-author-sns-wrapper .sns-item:hover {
    transform: translateY(-5px);
}

/* アイコン：線だけがピンクに光る */
.kimoota-author-sns-wrapper .sns-item:hover .sns-icon svg {
    stroke: #E9967A;           /* サーモンピンクの線 */
    filter: drop-shadow(0 0 3px rgba(233, 150, 122, 0.3)); /* ほんのりとした残光 */
}

/* テキスト：色だけがスッと変わる */
.kimoota-author-sns-wrapper .sns-item:hover .sns-label {
    color: #E9967A;
}

/* 個別アイコンの微調整（線の重なりを防ぐ） */
.kimoota-author-sns-wrapper .x-icon svg { transform: scale(1.0); }
.kimoota-author-sns-wrapper .pen-icon svg { transform: scale(0.85); }

/************************************

** このはちゃんいない時

************************************/
/* モバイル時にページナビが消えても、サイドバーの並びを崩さない */
@media screen and (max-width: 1080px) {

    /* 1. ページナビ周辺の余計な余白をリセット */
    .nav-links, 
    .pagination {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 2. 「このはちゃん出し分け」による連続した空隙をネガティブマージンで吸収 */
    /* モバイルでPC用が消えた後の「ガクッ」とした段差を相殺します */
    .sidebar .widget_custom_html {
        margin-bottom: 20px !important; /* 標準的な余白に固定 */
    }

    /* カスタムHTMLが連続して配置されている場合、その隙間を強引にゼロにする */
    .sidebar .widget_custom_html + .widget_custom_html {
        margin-top: -20px !important; 
    }
}