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

/*追加CSSより移植*/
/* 全体のコンテナ */
.sora-container {
    padding: 60px 10px;
    background: #ffffff;
}


/* グリッドレイアウト */
.sora-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 横3列 */
    grid-template-rows: repeat(2, 280px); /* 縦2列、高さ280px */
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* カードの共通デザイン */
.sora-card {
    color: #ffffff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 45px; /* 角丸を深めに設定 */
    transition: all 0.3s ease;
    text-align: center;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ホバー時の演出 */
.sora-card:hover {
    filter: brightness(1.15);
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* 個別色指定（1枚目〜6枚目） */
.sora-card:nth-child(1) { background-color: #e53935; } /* 赤 */
.sora-card:nth-child(2) { background-color: #fb8c00; } /* 橙 */
.sora-card:nth-child(3) { background-color: #1e88e5; } /* 青 */
.sora-card:nth-child(4) { background-color: #2d5a7a; } /* 紺 */
.sora-card:nth-child(5) { background-color: #43a047; } /* 緑 */
.sora-card:nth-child(6) { background-color: #fdd835; color: #333 !important; } /* 黄 */

/* スマホ対応の調整 */
@media (max-width: 768px) {
    .sora-grid {
        grid-template-columns: 1fr; /* 縦1列 */
        grid-template-rows: auto;
        gap: 15px;
    }
    .sora-center-logo {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin-bottom: 25px;
        text-align: center;
        grid-row: 1; /* ロゴを一番上に */
        padding: 10px 20px;
        display: inline-block;
        width: 100%;
        box-sizing: border-box;
    }
    .sora-card {
        height: 120px;
        border-radius: 25px;
        font-size: 1.1rem;
    }
}

/* =========================================
   全ページ共通カスタムヘッダー
   ========================================= */
.custom-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky; /* 画面上部に固定 */
    top: 0;
    z-index: 999; /* 他の要素より手前に */
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 両端揃え */
    padding: 0 20px;
    height: 70px; /* 少し高さを確保 */
    position: relative;
    background: #fff;
    z-index: 1000; /* ドロワーより手前に */
}

/* --- 1. 左側：ロゴエリア --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.logo-img {
    height: 40px; /* ロゴの高さ制限 */
    width: auto;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #000000;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* --- 2. 中央（PC）：ナビゲーション --- */
.header-center-pc {
    display: flex;
    gap: 30px;
}
.header-center-pc a {
    text-decoration: none !important;
    color: #333333 !important;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s;
}
.header-center-pc a:hover {
    color: #2d5a7a !important;
}

/* --- 3. 右側（PC）/ 中央（スマホ）：ボタンエリア --- */
.header-auth-area {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ボタンデザイン */
.nav-btn {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none !important;
    white-space: nowrap; /* 折り返し禁止 */
    transition: all 0.3s ease;
}
.nav-btn:not(.signup):not(.logout) {
    border: 2px solid #2d5a7a;
    color: #2d5a7a !important;
    background: #fff;
}
.nav-btn:not(.signup):not(.logout):hover {
    background: #f0f8ff;
}
.nav-btn.signup {
    background: #2d5a7a;
    color: #ffffff !important;
    border: 2px solid #2d5a7a;
}
.nav-btn.signup:hover {
    background: #1e4560;
    border-color: #1e4560;
}

/* --- 4. ハンバーガーボタン（PCでは非表示） --- */
.hamburger-btn {
    display: none; /* デフォルト非表示 */
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    padding: 0;
    z-index: 1001;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}
.hamburger-btn span:nth-child(1) { top: 0; }
.hamburger-btn span:nth-child(2) { top: 11px; }
.hamburger-btn span:nth-child(3) { bottom: 0; }

/* ハンバーガーが開いた時の変形 */
.hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.is-active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* --- 5. スマホ用メニュー（ドロワー） --- */
.mobile-drawer {
    position: absolute;
    top: 70px; /* ヘッダーの高さ分下げる */
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    transform: translateY(-150%); /* 上に隠しておく */
    transition: transform 0.3s ease;
    z-index: 900;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.mobile-drawer.is-active {
    transform: translateY(0); /* 出現 */
}
.mobile-drawer a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    text-align: center;
}

/* =========================================
   レスポンシブ対応（スマホレイアウト）
   ========================================= */
@media (max-width: 768px) {
    /* 中央のPC用ナビを消す */
    .header-center-pc {
        display: none;
    }

    /* ハンバーガーを表示 */
    .hamburger-btn {
        display: block;
        margin-left: 10px;
    }

    /* ロゴの調整 */
    .logo-img { height: 30px; }
    .logo-text { font-size: 1.2rem; }
    
    /* ボタンのサイズ調整（スマホで横並びにするため小さく） */
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .header-auth-area {
        gap: 6px;
        margin-left: auto; /* 左のロゴから離し、右寄せの挙動を作る */
        margin-right: 5px; /* ハンバーガーとの隙間 */
    }

    /* レイアウト調整：
       Flexコンテナ内で
       [ロゴ] --(auto margin)-- [ボタン] [ハンバーガー]
       という並びになります。
    */
    .header-inner {
        padding: 0 10px; /* 左右の余白を狭く */
        height: 60px;
    }
    
    .mobile-drawer {
        top: 60px; /* ヘッダー高さ変更に追従 */
    }
}

/* 既存Cocoon要素の非表示設定（変更なし） */
.page .header, .home.page .entry-title, .page .post-date, .page .post-update, .home.page .sns-share, .home.page .sns-follow, .single .header, .archive.category .header {
    display: none !important;
}
.home.page .main { width: 100% !important; padding: 0 !important; }

/* UMの必須項目アスタリスクを赤くする */
.um .um-field-label span.um-req {
    color: #e53935 !important; /* 明るい赤色 */
    margin-left: 4px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* 1. 目次を非表示にする（トップページのみ） */
.home .toc {
    display: none !important;
}

/* 2. 各カテゴリーの色付きの見出しを大きくする */
.guide-item h3 {
    display: inline-block;
    color: #ffffff;
    padding: 6px 20px; /* 余白を少し広げてどっしりさせる */
    margin-bottom: 15px;
    font-size: 1.3rem;  /* 1.1から1.3へ拡大 */
    font-weight: bold;
    border-radius: 5px; /* 少し角を丸くすると画像に近くなります */
}

/* 3. （）内の文字を小さくする設定 */
.guide-item p .small-text {
    font-size: 0.8em; /* 親の文字に対して80%の大きさ */
    color: #555;      /* 少しだけ色を薄くして視覚的に差をつける */
}

/* --- 以下、共通設定（必要に応じて維持） --- */
.category-guide {
    padding: 60px 20px;
    background: #ffffff;
}
.guide-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}
.item-red h3 { background-color: #e53935; }
.item-orange h3 { background-color: #fb8c00; }
.item-blue h3 { background-color: #1e88e5; }
.item-navy h3 { background-color: #2d5a7a; }
.item-green h3 { background-color: #43a047; }
.item-yellow h3 { background-color: #fdd835; color: #333; }
.guide-item p { font-size: 0.95rem; line-height: 1.6; }
.guide-note { font-size: 0.8rem !important; color: #777; margin-top: 5px; }

@media (max-width: 768px) {
    .guide-grid { grid-template-columns: 1fr; }
}

/* 上のカードエリアの下余白を削る */
.sora-container {
    padding-bottom: 20px !important; /* 60pxから20pxに短縮 */
}

/* 下の具体例エリアの上余白を削る */
.category-guide {
    padding-top: 0 !important; /* 60pxから0pxに */
}

/* -----------------------------------------
   note風投稿エディター強化版 (エラー回避版)
   ----------------------------------------- */

/* 16. フォントを MS Pゴシックに固定 */
.note-editor-wrapper, 
.note-editor-wrapper input, 
.note-editor-wrapper select,
.note-editor-wrapper button,
.note-editor-wrapper .mce-content-body {
    font-family: "MS PGothic", "ＭＳ Ｐゴシック", "MS CP932", sans-serif !important;
}

/* エディター全体コンテナ */
.note-editor-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 40px auto;
    padding-top: 80px; /* 右上ボタンとコンテンツの間の縦幅を拡大 */
}

/* 15. ボタンエリア（右上に配置） */
.editor-local-actions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* テキスト風ボタン（変更履歴、下書き保存） */
.btn-text {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.btn-text:hover { color: #333; }

/* 公開ボタン（緑） */
.btn-primary {
    background: #2cb696;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-primary:hover { background: #23947a; }

/* 削除ボタン（赤系） */
.btn-delete {
    background: none;
    border: none;
    color: #e53935;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}
.btn-delete:hover { opacity: 0.7; text-decoration: underline; }

/* 17. レイアウト（サイドバー + メイン） */
.editor-container {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.editor-sidebar-left {
    width: 180px;
    padding-top: 10px;
}

.toc-sticky {
    position: sticky;
    top: 100px;
    border-left: 1px solid #eee;
    padding-left: 15px;
}

.toc-title { font-size: 0.8rem; color: #999; margin-bottom: 10px; }
.toc-list { font-size: 0.9rem; color: #666; line-height: 1.8; }
.toc-item:hover { color: #2cb696; cursor: pointer; text-decoration: underline; }

/* 14. 執筆メインエリア */
.editor-main {
    flex: 1;
    max-width: 720px;
}

/* カテゴリー選択：エラーの出ないシンプル枠線デザイン */
.note-category-selector {
    margin-bottom: 30px; 
}

.note-category-selector select {
    border: 1px solid #2cb696;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2cb696;
    background: #ffffff;
    padding: 8px 15px;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    transition: all 0.2s;
}

.note-category-selector select:hover {
    background-color: #f0fffb;
}

.note-title-input {
    width: 100%;
    border: none !important;
    font-size: 36px !important;
    font-weight: bold;
    margin-bottom: 20px;
    outline: none;
    padding: 0;
}

/* ツールバーアイコン */
.mce-i-custom_media_btn, .mce-i-image {
    color: #2cb696 !important;
}

/* ファイルリンク */
.file-link {
    display: block;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    margin: 10px 0;
}

/* エディタ右上の「ビジュアル/テキスト」タブを完全に消し、余白を整える */
.wp-editor-tabs {
    display: none !important;
}

/* ツールバーの枠を少しきれいに整える */
.wp-editor-container {
    border: 1px solid #eee !important;
    border-radius: 4px;
}

/* 保存完了通知のスタイル */
.save-notice {
    background: #e6f7f3;
    color: #2cb696;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #b2e5d9;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* プレビューボタンのホバー演出など */
#btn-preview:hover {
    color: #2cb696;
    text-decoration: underline;
}

/* プレビューウィンドウ内で画像などがはみ出さないための調整 */
.entry-content img {
    max-width: 100%;
    height: auto;
}

/* 独自のバリデーションエラーメッセージ */
.custom-error-msg {
    color: #ffb340;
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block;
    animation: fadeInError 0.3s ease-in-out;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* エラー時の入力欄の枠線 */
.note-title-input[style*="border-color"], 
select[style*="border-color"] {
    border-width: 2px !important;
    background-color: #fff9f0 !important;
}

/* 履歴ビュー全体の重なり順を一番上にする（カスタムヘッダー対策） */
#history-fullscreen-view {
    z-index: 99999 !important; 
}

/* プレビューエリア内のスクロールをスムーズに */
#history-preview-area {
    scroll-behavior: smooth;
}

/* 戻るボタンのホバー効果 */
#btn-history-back:hover {
    color: #2cb696 !important;
}

/* 履歴リスト内の日付ラベル */
.history-date-group {
    padding: 10px 20px;
    background: #f0f0f0;
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

/* 履歴ビュー全体の重なり順を一番上にする（カスタムヘッダー対策） */
#history-fullscreen-view {
    z-index: 99999 !important; 
}

/* プレビューエリア内のスクロールをスムーズに */
#history-preview-area {
    scroll-behavior: smooth;
}

/* 戻るボタンのホバー効果 */
#btn-history-back:hover {
    color: #2cb696 !important;
}

/* 履歴リスト内の日付ラベル */
.history-date-group {
    padding: 10px 20px;
    background: #f0f0f0;
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

/* サイドバー内のアイテムをより見やすく */
.history-sidebar-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.history-sidebar-item.active {
    background: #fff !important;
    border-left: 4px solid #2cb696;
}

/* 復元ボタンのホバー */
#btn-restore-final:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* マイページ全体コンテナ */
.mypage-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: "MS PGothic", sans-serif;
}

/* 上部タブバー (条件20) */
.mypage-tabs {
    display: flex;
    border: 2px solid #000;
    margin-bottom: 30px;
}
.tab-item {
    flex: 1;
    padding: 15px;
    text-align: center;
    border-right: 2px solid #000;
    cursor: pointer;
    font-weight: bold;
    background: #fff;
    transition: background 0.2s;
}
.tab-item:last-child { border-right: none; }
.tab-item.active { background: #d9e9f2; } /* ラフスケッチの水色 */

/* コンテンツ表示切り替え */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* プロフィールエリア (条件21) */
.profile-main-row {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    margin-bottom: 20px;
}
.profile-avatar img {
    border-radius: 50%;
    border: 2px solid #000;
}
.profile-name {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    flex-grow: 1;
}

/* 歯車メニュー */
.profile-settings { position: relative; }
.gear-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}
.gear-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    width: 180px;
    background: #fff;
    border: 2px solid #000;
    z-index: 100;
}
.gear-menu.active { display: block; }
.gear-menu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}
.gear-menu a:hover { background: #f5f5f5; }

/* プロフィール詳細全体のコンテナ */
.profile-details-container {
    margin-top: 10px;
    padding: 0;
    text-align: left;
    display: block; /* 念のため追加：確実に縦並びにする */
    clear: both;    /* 念のため追加：回り込みを解除する */
}

/* 各項目の行設定：中身を縦に並べることを保証 */
.profile-item-row {
    margin-bottom: 25px;
    display: flex;          /* 一旦 flex に設定 */
    flex-direction: column; /* 要素を縦に並べる（これで必ず見出しの下に本文が来る） */
    align-items: flex-start;/* 中身をすべて強制的に左端に寄せる */
}

/* ラベル（見出し部分） */
.profile-item-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
    display: inline-block;
    padding-bottom: 2px;
    border-bottom: 2px solid #000;
    margin-bottom: 8px; 
    line-height: 1.2;
    text-align: left;
}

/* 内容（本文部分） */
.profile-item-content {
    width: 100%;       /* 横幅いっぱいに広げる */
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: left;  /* 文字を左詰めにする */
    padding-left: 0 !important;
}

/* URLリンク */
.profile-url-box a {
    color: #0066c0; /* 一般的なリンク色 */
    text-decoration: none;
}

.profile-url-box a:hover {
    text-decoration: underline;
}

/* スマホ表示の調整 */
@media (max-width: 768px) {
    .profile-item-row {
        margin-bottom: 25px;
    }
    .profile-item-label {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
}

/* 投稿一覧のヘッダー（アバターと名前） */
.posts-list-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.profile-avatar-small img { border-radius: 50%; border: 1px solid #000; }
.profile-name-small { font-size: 1.5rem; margin: 0; }

/* 凡例と行の共通設定 */
.posts-table-head, .post-list-row {
    display: grid;
    grid-template-columns: 120px 1fr 180px 80px; /* アイキャッチ/タイトル/日時/いいね */
    gap: 10px;
    align-items: center;
    text-align: center;
}

/* 凡例（ヘッダー） */
.posts-table-head {
    font-weight: bold;
    padding: 10px 0;
    border-bottom: none;
}

/* 投稿1行の枠線 (ラフスケッチ再現) */
/* 凡例のデザイン調整 */
.posts-table-head.soft-style {
    display: grid;
    grid-template-columns: 140px 1fr 180px 80px;
    padding: 15px 10px;
    font-size: 0.95rem;
    color: #666;
}

/* 投稿リストの行（柔らかいデザイン） */
.post-list-row-soft {
    display: grid;
    grid-template-columns: 140px 1fr 180px 80px;
    gap: 15px;
    align-items: center;
    text-decoration: none !important;
    color: #333 !important;
    padding: 25px 10px;
    border-top: 1px solid #000; /* 囲み線ではなく、上の区切り線のみ */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* ヌルっとした動きにする */
}

.post-list-row-soft:last-child {
    border-bottom: 1px solid #000; /* リストの最後だけ下線を引く */
}

.post-list-row-soft:hover {
    background-color: #ffffff; /* 背景は白のまま、影で浮かせる */
    transform: translateY(-3px); /* 3pxだけ上にふんわり浮かす */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); /* 非常に薄く広範囲な影 */
    border-color: transparent; /* 浮いた時に境界線を消すとより自然です */
    position: relative;
    z-index: 1; /* 影が上下の行に重なるように調整 */
}

/* アイキャッチの角を少し丸くする */
.thumb-wrapper img, .no-img-soft {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px; /* 柔らかい印象を与える角丸 */
}

.no-img-soft {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #999;
}

/* カテゴリーを「カプセル型」にする */
.post-cat-soft {
    display: inline-block;
    font-size: 0.8rem;
    padding: 4px 18px;
    color: #fff;
    border-radius: 20px; /* 卵型の形状 */
    margin-bottom: 8px;
    font-weight: bold;
}

.post-main-title-soft {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.4;
}

/* 日時といいねのフォント調整 */
.col-date-soft, .col-likes-soft {
    text-align: center;
    font-size: 1.05rem;
    color: #444;
}

@media (max-width: 768px) {
    .posts-table-head.soft-style { display: none; }
    .post-list-row-soft {
        grid-template-columns: 100px 1fr;
        padding: 20px 0;
    }
}

/* タイトルとカテゴリー */
.col-title { text-align: left; padding-left: 10px; }
.post-cat {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 10px;
    color: #fff;
    border-radius: 3px;
    margin-bottom: 5px;
}
.post-main-title { font-weight: bold; font-size: 1.1rem; }

/* 条件25: ページネーション（小さな四角） */
.custom-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.custom-pagination .page-numbers {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 31px; /* 枠線分を考慮 */
    text-align: center;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-weight: bold;
}
.custom-pagination .current {
    background: #d9e9f2; /* 選択中の水色 */
}

/* カテゴリー色対応（トップページの設定と連動） */
/* ※カテゴリーIDに合わせて調整してください */
.cat-4 { background-color: #e53935; } /* 赤 */
.cat-5 { background-color: #fb8c00; } /* 橙 */
.cat-6 { background-color: #1e88e5; } /* 青 */
.cat-7 { background-color: #2d5a7a; } /* 紺 */
.cat-8 { background-color: #43a047; } /* 緑 */
.cat-9 { background-color: #fdd835; color: #333; } /* 黄 */

@media (max-width: 768px) {
    .posts-table-head { display: none; } /* スマホでは凡例を隠す */
    .post-list-row {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }
    .col-date, .col-likes { font-size: 0.8rem; grid-row: 2; }
}

/* 1. プロフィール内の目次を非表示にする */
/* 投稿本文内の目次は残し、マイページのプロフィールエリアのみを対象にします */
.tab-content#tab-content-profile .toc {
    display: none !important;
}

/* 2. ユーザー名背景の灰色を白にする */
/* VX（ユーザー名）の入っているボックスの背景と枠線をリセットします */
.profile-name {
    background-color: #ffffff !important; /* 背景を白に */
    border: none !important;             /* もし枠線があれば消す */
    padding: 0 !important;              /* 余計な余白をリセット */
    box-shadow: none !important;        /* 影があれば消す */
}

/* 3. 歯車の直径を2倍にする */
.gear-btn {
    font-size: 48px !important; /* 元の24pxから48px（2倍）へ */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;  /* クリック領域も確保 */
    height: 60px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* 歯車が大きくなったので、クリック時の回転演出など加えるとより良くなります（任意） */
.gear-btn:hover {
    transform: rotate(45deg);
}

/* 投稿管理タブ専用スタイル */
.manage-filter-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* ドロップダウン（条件28） */
.status-selector-wrapper {
    position: relative;
    display: inline-block;
}
.status-dropdown-btn {
    background: #fff;
    border: 1px solid #000;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 14px;
}
.status-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #000;
    z-index: 10;
    min-width: 120px;
}
.status-dropdown-content a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
}
.status-dropdown-content a:hover { background: #eee; }
.status-selector-wrapper:hover .status-dropdown-content { display: block; }

/* テーブルレイアウト調整 */
.col-status { flex: 0 0 120px; text-align: center; }
.col-actions { flex: 0 0 150px; display: flex; flex-direction: column; gap: 8px; align-items: center; }

.status-box-border {
    border: 1px solid #000;
    padding: 15px 5px;
    width: 100px;
    margin: 0 auto;
    background: #fff;
}

/* 条件26: 編集・分析ボタン */
.btn-manage,
.btn-analyze-isolated {
    display: inline-block;
    width: 100px;
    text-align: center;
    padding: 6px 0;
    border-radius: 20px; /* 画像通りの楕円形 */
    text-decoration: none;
    font-size: 14px;
    color: #333;
}
.btn-edit { background-color: #a8e4a0; }    /* 緑系 */
.btn-analyze-isolated { background-color: #b3e5fc; } /* 青系 */

/* 管理行の高さ調整 */
.manage-row {
    padding: 20px 0;
    border-bottom: 2px solid #000;
}

/* 管理行のベース（枠線などはここで管理） */
.manage-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #000;
    background: transparent; /* 行自体は浮かせない */
}

/* 左側：コンテンツエリア（リンクを兼ねる） */
.manage-content-link {
    display: flex;
    align-items: center;
    flex: 1; /* 残りの幅をすべて占有 */
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 8px; /* 浮き上がった時の角丸 */
    transition: all 0.3s ease;
}

/* ★左側エリアだけホバー時に浮き上がらせる */
.manage-content-link:hover {
    background-color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

/* 右側：ボタンエリア（固定） */
.col-actions {
    flex: 0 0 150px; /* 幅を固定 */
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding-left: 10px;
    z-index: 1; /* 左側の影がボタンの下に潜り込むように */
}

/* カラム幅の調整（既存の投稿一覧と合わせる） */
.manage-content-link .col-thumb { flex: 0 0 120px; }
.manage-content-link .col-title { flex: 1; padding: 0 20px; }
.manage-content-link .col-status { flex: 0 0 100px; text-align: center; }

/* --- 「投稿を管理」タブ専用の上書き設定 --- */

/* --- 「投稿を管理」タブ 修正版 --- */

/* 1. 行全体のベース（余白を0にして区切り線に密着させる） */
.post-list-row-soft.manage-row {
    display: flex;
    align-items: center;
    padding: 0 !important; /* 行自体の余白を消す（条件2：上下の線まで広げるため） */
    border-bottom: 2px solid #000;
    background: transparent;
    transform: none !important;
    box-shadow: none !important;
}

/* 2. 左側エリアのレイアウト調整（条件1：状態の位置を戻す） */
.manage-left-content {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    color: #333 !important; /* 基本の文字色を黒に固定 */
    padding: 20px 15px; /* ここで上下の厚みを出す */
    transition: all 0.3s ease;
    border-radius: 0; /* 浮き上がる前は角丸なし */
}

/* カラム幅をヘッダーと厳密に合わせる */
.manage-left-content .col-thumb { flex: 0 0 120px; }
.manage-left-content .col-title { flex: 1; padding: 0 20px; }
.manage-left-content .col-status { flex: 0 0 120px; text-align: center; }

/* 3. ★「公開済み」のみ浮き上がらせる（条件2・3への対応） */
.manage-left-content.status-publish:hover {
    background-color: #ffffff !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    z-index: 2;
    border-radius: 10px; /* 浮き上がった時だけ少し角を丸くすると自然です */
}

/* ホバー時に文字が赤くなるのを防ぐ（条件3） */
.manage-left-content:hover .post-main-title-soft,
.manage-left-content:hover .status-box-border {
    color: #333 !important; /* 赤字にならず黒（#333）を維持 */
}

/* 4. 右側ボタンエリア（固定） */
.col-actions {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 0 10px;
}

/* 状態ボックスの微調整 */
.status-box-border {
    border: 1px solid #000;
    padding: 12px 5px;
    width: 100px;
    margin: 0 auto;
    background: #fff;
    color: #333;
    display: inline-block;
}

/* ヘッダー内の「状態」列の調整 */
.header-filter-status {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px; /* 「状態」の文字と▼の隙間 */
    position: relative; /* ドロップダウンの基準点 */
}

/* ドロップダウンボタンを小さく、シンプルに */
.header-filter-status .status-dropdown-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 10px; /* 小さめの矢印に */
    padding: 0 5px;
    color: #666;
}

/* ドロップダウンメニューの出現位置を微調整 */
.header-filter-status .status-dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* 「状態」のすぐ下に表示 */
    right: 0;
    background: #fff;
    border: 1px solid #000;
    z-index: 100;
    min-width: 100px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-filter-status .status-dropdown-content a {
    font-size: 13px;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.header-filter-status .status-selector-wrapper:hover .status-dropdown-content {
    display: block;
}

/* --- 管理タブ専用：ヘッダー列の幅をpx単位で固定 --- */

/* 1. 管理タブの中のヘッダー全体 */
#tab-content-manage .posts-table-head {
    display: flex !important;
    padding: 10px 15px !important; /* リスト側のpadding-left(15px)と一致 */
    box-sizing: border-box;
}

/* 2. アイキャッチ列 */
#tab-content-manage .posts-table-head .col-thumb {
    flex: 0 0 120px !important;
    width: 120px !important;
}

/* 3. タイトル列（px単位で固定） */
#tab-content-manage .posts-table-head .col-title {
    flex: 0 0 350px !important; /* 例：450pxで固定。実際のサイト幅に合わせて調整してください */
    width: 350px !important;
    padding: 0 20px !important;
}

/* 4. 状態列 */
#tab-content-manage .posts-table-head .col-status {
    flex: 0 0 120px !important;
    width: 120px !important;
}

/* 5. アクション列（右側のボタンエリアとの余白用） */
#tab-content-manage .posts-table-head .col-actions {
    flex: 0 0 150px !important;
    width: 150px !important;
}

/* --- 投稿管理：編集警告用モーダル --- */
.sorashirushi-edit-alert-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 少し暗めにして没入感を出す */
    z-index: 9999; /* 確実に最前面に表示 */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* 背景をぼかすとお洒落になります */
}

/* モーダルがアクティブな時 */
.sorashirushi-edit-alert-overlay.is-active {
    display: flex;
}

.sorashirushi-edit-alert-box {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.sorashirushi-edit-alert-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
    font-weight: bold;
}

.sorashirushi-edit-alert-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ボタン共通設定 */
.sorashirushi-edit-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, opacity 0.2s;
    min-width: 120px;
}

.sorashirushi-edit-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* 「はい」ボタン：警告なので少し目立たせる */
.sorashirushi-edit-btn-confirm {
    background-color: #000; /* 黒ベースで引き締める */
    color: #fff;
}

/* 「キャンセル」ボタン */
.sorashirushi-edit-btn-cancel {
    background-color: #f0f0f0;
    color: #666;
}

/* 「下書き」と「承認待ち」の左側エリアをクリック不可にする */
.manage-left-content.status-draft,
.manage-left-content.status-pending {
    pointer-events: none; /* クリックを物理的に無効化 */
    cursor: default;       /* カーソルを指の形にしない */
}

/*分析画面のUI*/
.analysis-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #f8f9fa;
    z-index: 10000;
    overflow-y: auto; /* 条件35: スクロール可能 */
}
.analysis-overlay.is-active { display: block; }

.analysis-header {
    padding: 20px 40px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky; top: 0; z-index: 10;
}
.back-btn {
    background: none; border: none; font-size: 18px; cursor: pointer; color: #333;
}

.analysis-body {
    max-width: 1200px; margin: 40px auto; padding: 0 20px;
}
.analysis-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
}
.analysis-card {
    background: #fff; border-radius: 12px; padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.chart-container { height: 300px; width: 100%; }
.analysis-footer-space { height: 200px; } /* 条件35用余白 */

/* --- モバイル対応：スマホではグラフを縦に並べる --- */
@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr; /* 2段組から1段組へ */
        gap: 20px;
    }
    .analysis-body {
        margin: 20px auto; /* 上下の余白を少し詰める */
    }
}

/* --- 条件39：エラーメッセージのスタイル --- */
.chart-container {
    position: relative; /* メッセージの配置基準 */
}

.chart-error {
    color: #888;
    font-size: 14px;
    background: rgba(240, 240, 240, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed #ccc;
    pointer-events: none; /* 下の要素の邪魔をしない */
}

/* グラフ表示時のフェードインを滑らかにする（任意） */
#viewsChart, #likesChart {
    transition: opacity 0.3s ease;
}

/* =============================================
 * 1. 背景を真っ白にし、標準要素を完全に消す
 * ============================================= */
/* サイト全体の背景と記事エリアの背景を白に固定 */
body, #content, .main, .article, .entry-content {
    background-color: #fff !important;
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

/* Cocoon標準のパーツを非表示（投稿者名や日付が二重に出ないようにする） */
.single .entry-header,
.single .eye-catch,
.single .date-tags,
.single .author-info, /* Cocoon標準のプロフィールボックス */
.single .sns-share {
    display: none !important;
}

/* =============================================
 * 2. 投稿本文自作レイアウト
 * ============================================= */
.sorashirushi-custom-post {
    max-width: 800px;
    margin: 0 auto;
    background: #fff !important;
}

/* 自作アイキャッチ画像 */
.custom-eyecatch img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* 自作タイトルの調整 */
.custom-title {
    text-align: center !important;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 20px 0 30px 0 !important;
    border: none !important;
    background: transparent !important;
    color: #333 !important; /* 文字色を確実に表示 */
}

/* 投稿者情報エリア（枠線と背景を徹底排除） */
.custom-meta .author-box {
    display: flex !important; /* 強制的に表示 */
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    border: none !important;      /* 枠線を消す */
    background: transparent !important; /* 背景を透明に */
    padding: 0 !important;
}

.custom-meta img {
    border-radius: 50% !important;
    border: none !important;
}

/* 投稿者情報の親要素（上下に並べる設定） */
.custom-author-info {
    display: flex !important;
    flex-direction: column !important; /* 上下に並べる */
    justify-content: center;
    background: transparent !important;
    border: none !important;
}

/* 上段：ユーザー名（太字で少し大きく） */
.custom-author-name {
    display: block !important;
    font-weight: 600 !important; /* noteに近い太さ */
    color: #333 !important;
    font-size: 1rem !important;
    line-height: 1.4;
    margin-bottom: 2px; /* 日時との隙間 */
}

/* 下段：投稿日時（小さく、色を薄く） */
.custom-author-date {
    display: block !important;
    font-size: 0.8rem !important;
    color: #666 !important; /* 少し薄いグレー */
    line-height: 1.2;
}

/* ついでにプロフィール画像との位置バランスを微調整 */
.custom-meta .author-box {
    display: flex !important;
    align-items: center; /* 画像の高さ中央にテキストを合わせる */
    gap: 12px;
}

/* =============================================
 * 3. 投稿本文内の見出し（大見出し・小見出し）
 * ============================================= */
.custom-entry-content h2 {
    font-size: 1.6rem !important;  /* ★大見出しのサイズ（例：1.6rem） */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 2em !important;
    margin-bottom: 1em !important;
    color: #333 !important;
}

.custom-entry-content h3 {
    font-size: 1.3rem !important;  /* ★小見出しのサイズ（例：1.3rem） */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 1.5em !important;
    margin-bottom: 1em !important;
    color: #333 !important;
}

/* スマホ（768px以下）での見出しサイズ設定 */
@media screen and (max-width: 768px) {
    .custom-entry-content h2 { font-size: 1.4rem !important; }
    .custom-entry-content h3 { font-size: 1.2rem !important; }
}

/* 見出しの装飾（縦線や下線）を消す */
.custom-entry-content h2::before, .custom-entry-content h2::after,
.custom-entry-content h3::before, .custom-entry-content h3::after {
    display: none !important;
}

/* =============================================
 * 4. アクションボタン・コメント欄
 * ============================================= */
/* =============================================
 * 4-1. アクションボタン（いいね・ブクマ）
 * ============================================= */
.custom-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    align-items: center;
}

.act-btn {
    background: #fff;
    border: 2px solid;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex !important; 
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.like-btn { border-color: #ff4d4d; color: #ff4d4d; }
.like-btn.liked { background: #ff4d4d !important; color: #fff !important; }

/* --- 保存した投稿（ブックマーク）タブ専用スタイル --- */

/* 凡例（ヘッダー）のグリッド調整 */
.posts-table-head.saved-posts-style {
    display: grid;
    /* 投稿者 / アイキャッチ / タイトル / 日時 */
    grid-template-columns: 120px 140px 1fr 140px; 
    gap: 15px;
    padding: 15px 10px;
    font-size: 0.95rem;
    color: #666;
    font-weight: bold;
    text-align: center;
}


.edit-profile-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.edit-section {
    margin-bottom: 25px;
}

.edit-section label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.edit-section textarea, 
.edit-section input[type="url"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.save-btn {
    background-color: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.cancel-link {
    margin-left: 15px;
    color: #666;
    text-decoration: none;
}

.mailchange-link {
    white-space: nowrap;
    font-size: 13px;
    color: #0066cc;
    text-decoration: underline;
}

.field-error {
    color: #e0245e;
    font-size: 12px;
    margin-top: 5px;
    display: block; /* 改行させて入力欄の真下へ */
}

/* エラーがある入力欄の枠線を赤くする場合（オプション） */
.field-group input:has(+ .field-error) {
    border-color: #e0245e;
    background-color: #fff1f4;
}

/* --- カード全体設定 --- */
.scroll-card {
    flex: 0 0 280px;      /* カードの幅 */
    background: #fff;
    border-radius: 8px;   /* カード全体の角丸（不要なら0に） */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    margin-right: 4px;   /* 横並び時の余白 */
    border: 1px solid #f0f0f0; /* 薄い枠線 */
}

/* リンクエリア（ホバー時の下線を消す） */
.card-link-area {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- 1. サムネイル画像 --- */
.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9; /* 16:9の比率を固定 */
    overflow: hidden;
    background: #eee;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
/* ホバー時に画像を少しズームさせる演出（お好みで） 
.scroll-card:hover .card-thumb img {
    transform: scale(1.05);
}*/

/* --- 2. タイトル（3行制限・...表示） --- */
.card-body {
    padding: 12px 16px 0; /* 上と左右に余白 */
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.5; /* 行間を1.5に固定 */
    
    /* 1. 3行制限の再設定（!importantで強制） */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3 !important;
    
    /* 2. 「はみ出した分を消す」を徹底 */
    /* overflow: hidden !important; */
    
    /* 3. 【重要】高さを固定しない、または max-height にする */
    height: auto; 
    /*max-height: 4.8em;  1.5 * 3 = 4.5em */

    /* 4. 念のため余計な装飾をリセット */
    /* padding: 0 !important; */
    /* padding-top: 12px !important;  上の余白だけ戻す  */
    /* border: none !important; */

    /* word-break: break-all; */
}

/* --- 3. フッターエリア --- */
.card-footer {
    padding: 12px 16px 16px; /* 下部に少し広めの余白 */
    margin-top: auto;        /* タイトルが短くてもフッターを下に寄せる */
}

/* ユーザー情報と日付の行 */
.card-meta-row {
    display: flex;
    justify-content: space-between; /* 両端揃え（左に名前、右に日付） */
    align-items: center;
    margin-bottom: 12px; /* ボタンとの間隔 */
    font-size: 13px;
    color: #666;
}
.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
}
.card-avatar {
    width: 32px; /* 画像に合わせて少し大きめに */
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #ccc;
}
.card-author-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-date {
    font-size: 12px;
    color: #999;
}

/* --- 4. アクションボタン（丸型） --- */
.card-actions-row {
    display: flex;
    gap: 10px; /* ボタン同士の間隔 */
}
.card-btn {
    border: none !important;      /* 枠線を完全に消去 */
    outline: none !important;     /* クリック時の青や黒の枠も消去 */
    box-shadow: none !important;  /* もし影がついていたら消去 */
    width: 40px;  /* 正円のサイズ */
    height: 40px;
    border-radius: 50%; /* 丸くする */
    background: #f5f5f5; /* 背景：薄いグレー */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888; /* アイコンの色 */
    transition: all 0.2s;
    font-size: 16px;
    padding: 0;
    position: relative;
}

/* ホバー時 */
.card-btn:hover {
    background: #e0e0e0;
}

/* 数字（いいね数）の調整 */
.card-like-btn .count {
    font-size: 12px;
    font-weight: bold;
    margin-left: 4px; /* アイコンの横に少し隙間 */
    display: inline-block;
}
.card-like-btn .count:empty {
    display: none;
}
/* 数字がある場合は丸ではなく少し横長にするか、
   画像通り「丸の中に数字は入れず横に出す」場合はwidthをautoにします。
   ★今回は画像のデザイン（丸いボタン）を優先し、
   数字が出てもボタンが崩れないよう調整します */
.card-like-btn {
    width: auto;       /* 数字が入るため幅を自動に */
    min-width: 40px;   /* 最低幅を正円サイズに */
    padding: 0 10px;   /* 数字が入った時の左右余白 */
    border-radius: 20px; /* カプセル型に変化 */
}
/* 数字がない時は正円に戻す */
.card-like-btn:has(.count:empty) {
    width: 40px;
    padding: 0;
    border-radius: 50%;
}

/* --- アクティブ（いいね/保存済み）状態 --- */
/* 投稿本文のCSSに合わせて色を設定 */
.card-like-btn.liked {
    background: #ffebee; /* 薄い赤背景 */
    color: #e0245e;      /* 赤文字 */
}
.card-bookmark-btn.is-active {background: #007bff; }

/* =========================================
   お問い合わせフォーム
   ========================================= */
.contact-form-wrapper {
    max-width: 700px;
    margin: 40px auto;
    font-family: sans-serif;
}

.form-row {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
}

.form-row label {
    width: 200px;
    font-size: 1.1rem;
    font-weight: normal;
    padding-top: 10px; /* 入力欄と高さを合わせる */
}

.form-input {
    flex: 1;
}

/* 入力フィールド共通 */
.form-input input[type="text"],
.form-input input[type="email"],
.form-input select,
.form-input textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #000; /* 画像に合わせて太めの黒枠 */
    border-radius: 0;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-input select {
    background: #fff;
    height: 45px;
}

.form-input textarea {
    resize: vertical;
}

/* プライバシーポリシー欄 */
.privacy-box {
    background-color: #e2f0d9; /* 薄い緑色 */
    border: 2px solid #000;
    padding: 20px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.privacy-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.privacy-text {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.privacy-check {
    text-align: center;
    font-size: 1.1rem;
}

.privacy-check input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 10px;
}

/* 送信ボタン */
.form-submit {
    text-align: center;
}

.form-submit button {
    background-color: #9fc5e8; /* 非活性時の薄い青 */
    color: #000;
    font-size: 1.4rem;
    font-weight: bold;
    padding: 10px 60px;
    border: 2px solid #000;
    border-radius: 10px;
    cursor: not-allowed;
    transition: all 0.3s;
}

/* チェックが入った時のボタン活性状態 */
.form-submit button.active {
    background-color: #6fa8dc; /* 少し濃い青 */
    cursor: pointer;
}
.form-submit button.active:hover {
    opacity: 0.8;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .form-row {
        display: block;
    }
    .form-row label {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
}

/* =========================================
   お問い合わせ完了画面
   ========================================= */
.contact-thanks-wrapper {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

.thanks-message {
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.8;
}

.receipt-box {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    display: inline-block;
    margin-bottom: 40px;
}

.receipt-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.receipt-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d5a7a;
    letter-spacing: 0.1em;
}

.back-home-btn-area .nav-btn {
    display: inline-block;
    padding: 12px 40px;
    /* ヘッダーボタンのデザインを継承している前提 */
}

/* --------
authorページの調整 
-------------*/
/* authorページのみ、テーマ標準のヘッダータイトル周りを隠す */
.author .header-container-in,
.author .site-name-text,
.author .tagline {
    display: none !important;
}

/* もしCocoonの大きなヘッダー画像エリアも消したい場合 */
.author .header {
    display: none !important;
}

/* 1. Content Block（規約リンク）の下側の余白を消す */
.um-field-content_block {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. チェックボックス（同意）の上側の余白を消す */
.um-field-confirm_terms_ver1 {
    padding-top: 5px !important; /* 少しだけ隙間を開ける */
    margin-top: 0 !important;
}

/* 3. 「同意する」のラベルとチェックボックスの縦位置を微調整（必要に応じて） */
.um-field-confirm_terms_ver1 .um-field-area {
    margin-top: 0 !important;
}

/* ******************
利用規約のスタイル設定 
*********************/
.terms-container {
    line-height: 1.8;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
}

/* 条（見出し） */
.terms-container h3 {
    border-left: 4px solid #333;
    padding: 10px 15px;
    background: #f4f4f4;
    font-size: 1.25em;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* 項（1. 2. 3.）のリスト設定 */
.terms-ol {
    list-style: none;
    counter-reset: kou-counter; /* 項のカウンターリセット */
    padding-left: 0;
}

.terms-ol > li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 15px;
}

.terms-ol > li::before {
    counter-increment: kou-counter;
    content: counter(kou-counter) " "; /* 番号と半角スペース */
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 号（(1) (2) (3)）のリスト設定 */
.terms-sub-ol {
    list-style: none;
    counter-reset: go-counter; /* 号のカウンターリセット */
    padding-left: 0;
    margin-top: 10px;
}

.terms-sub-ol > li {
    position: relative;
    padding-left: 2.5em;
    margin-bottom: 8px;
}

.terms-sub-ol > li::before {
    counter-increment: go-counter;
    content: "(" counter(go-counter) ") "; /* (数字)と半角スペース */
    position: absolute;
    left: 0.5em;
}

/* レスポンシブ調整 */
@media screen and (max-width: 768px) {
    .terms-container h3 {
        font-size: 1.15em;
        padding: 8px 12px;
    }
    .terms-ol > li {
        padding-left: 1.8em;
    }
}