/* まとめ記事用専用スタイル */

.single-matome .post_content blockquote.wp-block-quote {
    background-color: transparent !important;
    border-left: none !important;
    border: none !important;
    border-radius: 0;
    padding: 0;
    margin-bottom: 2em;
    position: relative;
    box-shadow: none !important;
}

/* レスのアンカー（>>1 など）をそれっぽく */
.single-matome .post_content blockquote.wp-block-quote p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.single-matome .post_content blockquote.wp-block-quote p::before {
    content: "1 : ID:???";
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    font-family: inherit;
}

/* 複数レスがある場合のフェイクID生成用（CSSカウンタ） */
.single-matome .post_content {
    counter-reset: res-counter;
}

.single-matome .post_content blockquote.wp-block-quote {
    counter-increment: res-counter;
}

.single-matome .post_content blockquote.wp-block-quote p::before {
    content: counter(res-counter) " : それでも動く名無し ID:matome" counter(res-counter);
}

/* SWELLの見出しを少しカジュアルに */
.single-matome .post_content h2 {
    background: #005A9C;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 20px;
    margin-top: 40px;
}

/* 管理人の吹き出しの色味を少し変える */
.single-matome .swell-block-balloon {
    margin: 3em 0;
}

.single-matome .swell-block-balloon__text {
    background-color: #e6fced;
    border-color: #b2ebb6;
}

.single-matome .swell-block-balloon__text::before {
    border-top-color: #e6fced;
}

/* -------------------------------------------
 * 最新記事ショートコード用スタイル
 * ------------------------------------------- */
.s5m-recent-post-list {
    list-style: none !important;
    padding: 0;
    margin: 0 0 2em !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s5m-recent-post-list li {
    margin: 0 !important;
    padding: 0 !important;
}

.s5m-recent-post-list a {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.s5m-recent-post-list a:hover {
    background: #f8f9fa;
    border-color: #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.s5m-recent-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 60px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.s5m-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.s5m-recent-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media screen and (max-width: 599px) {
    .s5m-recent-thumb {
        width: 80px;
        height: 50px;
        margin-right: 12px;
    }

    .s5m-recent-title {
        font-size: 14px;
    }
}

/* NoImage フォールバック用スタイル */
.s5m-no-image {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* カテゴリ一覧（板一覧）用スタイル */
.s5m-category-list {
    list-style: none !important;
    padding: 0;
    margin: 0 0 1.5em !important;
}

.s5m-category-list li {
    margin-bottom: 8px !important;
}

.s5m-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    color: #444;
    border: 1px solid #eaeaea;
    transition: all 0.2s ease;
}

.s5m-category-list a:hover {
    background: #fdfdfd;
    border-color: #d1d1d1;
    transform: translateX(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.s5m-cat-name {
    font-size: 15px;
    font-weight: 500;
}

.s5m-cat-count {
    background: #0073aa;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* 元スレリンク（ソース）表示用スタイル */
.s5m-source-link {
    margin-top: 3em;
    padding: 15px 20px;
    background: #fdfdfd;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    word-break: break-all;
}

.s5m-source-link span {
    font-weight: bold;
    color: #333;
    display: inline-block;
    margin-bottom: 5px;
}

.s5m-source-link a {
    color: #005A9C;
    text-decoration: underline;
    transition: color 0.2s;
}

.s5m-source-link a:hover {
    color: #003d6b;
}