/* ============================================================
   記事個別ページ LP風レスポンシブデザイン
   ============================================================ */

body {
    font-family: "Noto Sans JP", sans-serif;
    color: #1a1a1a;
    background: #f7f6f3;
    -webkit-font-smoothing: antialiased;
}

main section { margin: 0 !important; }

/* 旧パンくず非表示 */
.breadcrumbs { display: none !important; }

/* 自前パンくず */
.sg_breadcrumbs {
    display: block !important;
    visibility: visible !important;
    background: #fff !important;
    border-bottom: 1px solid #eee8df !important;
    margin-top: 48px !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
}

@media screen and (min-width: 751px) {
    .sg_breadcrumbs { margin-top: 60px; }
}

.sg_breadcrumbs_inner {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

@media screen and (min-width: 600px) {
    .sg_breadcrumbs_inner { padding: 0 32px; }
}

.sg_breadcrumbs ul {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 14px 0;
    margin: 0;
    flex-wrap: wrap;
}

.sg_breadcrumbs ul li {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    letter-spacing: 0.02em;
}

.sg_breadcrumbs ul li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #ccc;
    font-size: 11px;
}

.sg_breadcrumbs ul li a {
    color: #8a6d2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sg_breadcrumbs ul li a:hover { color: #c08b30; }

.sg_breadcrumbs ul li:last-child {
    color: #666;
    font-weight: 500;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (min-width: 600px) {
    .sg_breadcrumbs ul li { font-size: 13px; }
    .sg_breadcrumbs ul li:last-child { max-width: 500px; }
}

/* ============================================================
   レイアウト
   ============================================================ */

.sg_layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1100px;
    margin: auto;
    padding: 32px 20px 64px;
}

@media screen and (min-width: 600px) { .sg_layout { padding: 40px 32px 80px; } }

@media screen and (min-width: 901px) {
    .sg_layout {
        display: grid;
        grid-template-columns: 1fr 260px;
        grid-template-rows: auto auto;
        gap: 40px;
    }
}

/* ============================================================
   記事本文
   ============================================================ */

.sg_article {
    background: #fff;
    border-radius: 12px;
    padding: 28px 20px;
    border: 1px solid #eee8df;
}

@media screen and (min-width: 600px) { .sg_article { padding: 40px 36px; } }
@media screen and (min-width: 901px) { .sg_article { grid-column: 1; } }

/* カテゴリバッジ */
.sg_cat_badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #c08b30;
    background: rgba(192, 139, 48, 0.08);
    border: 1px solid rgba(192, 139, 48, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* タイトル */
.sg_title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2c241e;
    margin-bottom: 16px;
}

@media screen and (min-width: 600px) { .sg_title { font-size: 28px; } }

/* 日付 */
.sg_meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #999;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee8df;
}

.sg_meta svg { color: #bbb; }

/* 概要 */
.sg_description {
    font-size: 15px;
    font-weight: 400;
    line-height: 2;
    color: #555;
    margin-bottom: 32px;
    padding: 20px;
    background: #faf8f4;
    border-radius: 8px;
    border-left: 4px solid #c08b30;
}

/* 目次 */
.sg_toc {
    margin-bottom: 32px;
    padding: 20px;
    background: #faf8f4;
    border: 1px solid #eee8df;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
}

.sg_toc a {
    color: #2c241e;
    text-decoration: none;
}

.sg_toc a:hover { color: #c08b30; }

/* ============================================================
   本文（DBから出力されるHTML）
   ============================================================ */

.sg_body {
    font-size: 15px;
    font-weight: 400;
    line-height: 2;
    color: #333;
}

@media screen and (min-width: 600px) { .sg_body { font-size: 16px; } }

.sg_body h2 {
    margin-top: 48px;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #2c241e;
    background: #f5f1eb;
    border-left: 4px solid #c08b30;
    border-radius: 0 6px 6px 0;
}

@media screen and (min-width: 600px) { .sg_body h2 { font-size: 22px; } }

.sg_body h3 {
    margin-top: 36px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #2c241e;
    padding-bottom: 8px;
    border-bottom: 2px solid #c08b30;
}

@media screen and (min-width: 600px) { .sg_body h3 { font-size: 20px; } }

.sg_body h4 {
    margin-top: 28px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #2c241e;
}

.sg_body p {
    margin-bottom: 1.5em;
}

.sg_body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.sg_body a {
    color: #c08b30;
    text-decoration: underline;
}

.sg_body a:hover { color: #a07020; }

.sg_body ul, .sg_body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.sg_body li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.sg_body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background: #faf8f4;
    border-left: 4px solid #ddd7cd;
    border-radius: 0 6px 6px 0;
    color: #777;
    font-style: italic;
}

.sg_body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.sg_body th, .sg_body td {
    padding: 12px;
    border: 1px solid #eee8df;
    font-size: 14px;
}

.sg_body th {
    background: #f5f1eb;
    font-weight: 600;
    color: #2c241e;
}

/* ============================================================
   目次（_toc.jsで生成）
   ============================================================ */

.sg_toc .toc_title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #2c241e;
    margin-bottom: 12px;
    cursor: pointer;
}

.sg_toc .toc_title svg { color: #c08b30; }

.sg_toc .toc_toggle {
    font-size: 13px;
    font-weight: 500;
    color: #c08b30;
    cursor: pointer;
}

.sg_toc .toc_ul {
    padding-left: 0;
}

.sg_toc .toc_ul li {
    list-style: none;
    padding: 6px 0;
    border-bottom: 1px solid #eee8df;
}

.sg_toc .toc_ul li:last-child { border-bottom: none; }

.sg_toc .toc_ul li a {
    font-size: 14px;
    color: #2c241e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sg_toc .toc_ul li a:hover { color: #c08b30; }

.sg_toc .toc_ul li.li_h3 { padding-left: 16px; }
.sg_toc .toc_ul li.li_h4 { padding-left: 32px; }

/* tocが直接#tocに生成される場合 */
#toc .toc_title,
#toc ul,
#toc li,
#toc a {
    font-family: "Noto Sans JP", sans-serif;
}

#toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc li {
    padding: 7px 0;
    border-bottom: 1px solid #eee8df;
    font-size: 14px;
}

#toc li:last-child { border-bottom: none; }

#toc li a {
    color: #2c241e;
    text-decoration: none;
}

#toc li a:hover { color: #c08b30; }

/* ============================================================
   関連記事（_main_articleRelation.phpで出力）
   ============================================================ */

@media screen and (min-width: 901px) {
    .articleRelation,
    .article_relation {
        grid-column: 1;
    }
}

.articleRelation,
.article_relation {
    padding: 32px 0;
}

.articleRelation h2,
.article_relation h2,
.articleRelation .relation_header h2 {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2c241e;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #c08b30;
    background: none !important;
    text-align: left !important;
}

.articleRelation p,
.article_relation p {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}

.articleRelation ul,
.article_relation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media screen and (min-width: 600px) {
    .articleRelation ul,
    .article_relation ul {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

.articleRelation ul li,
.article_relation ul li {
    background: #fff;
    border: 1px solid #eee8df;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.articleRelation ul li:hover,
.article_relation ul li:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ============================================================
   関連記事
   ============================================================ */

.articleRelation {
    padding: 48px 0 !important;
    background: none !important;
    width: 100% !important;
}

@media screen and (min-width: 901px) {
    .articleRelation { grid-column: 1; }
}

.articleRelation .relation_header h2 {
    font-family: "Noto Sans JP", sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #2c241e !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
}

.articleRelation .relation_header h2::after {
    content: "" !important;
    display: block !important;
    width: 40px !important;
    height: 2px !important;
    background: #c08b30 !important;
    margin: 12px auto 0 !important;
}

.articleRelation .relation_header p {
    text-align: center !important;
    font-size: 13px !important;
    color: #999 !important;
    margin-bottom: 24px !important;
}

.articleRelation .articleRelation_inner {
    padding: 0 !important;
}

.articleRelation ul {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media screen and (min-width: 600px) {
    .articleRelation ul { grid-template-columns: 1fr 1fr !important; }
}

.articleRelation ul li {
    background: #fff !important;
    border: 1px solid #eee8df !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}

.articleRelation ul li:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-2px);
}

.articleRelation ul li a {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
    height: 100% !important;
    width: 100% !important;
}

/* サムネイル（グラデーション帯）を非表示 */
.articleRelation ul li a .thumbnail {
    display: none !important;
}

/* 画像も非表示 */
.articleRelation ul li a > img {
    display: none !important;
}

.articleRelation ul li a .relation__a_inner {
    padding: 20px !important;
    width: auto !important;
    padding-left: 20px !important;
}

.articleRelation .relation_ttl__p {
    font-family: "Noto Sans JP", sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #2c241e !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articleRelation .relation_txt__p {
    font-family: "Noto Sans JP", sans-serif !important;
    font-size: 13px !important;
    color: #999 !important;
    line-height: 1.7 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto !important;
    margin: 0 !important;
}

.articleRelation .relation_txt__p::before {
    display: none !important;
}

.articleRelation .relation__a_tag {
    margin-top: 10px !important;
    order: 3 !important;
}

.articleRelation .relation__a_tag span {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #c08b30 !important;
    border: 1px solid rgba(192, 139, 48, 0.3) !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    background: none !important;
}

.articleRelation .relation__a_tag,
.article_relation .relation__a_tag {
    margin-top: 8px;
}

.articleRelation .relation__a_tag span,
.article_relation .relation__a_tag span {
    font-size: 11px;
    font-weight: 600;
    color: #c08b30;
    border: 1px solid rgba(192, 139, 48, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ============================================================
   サイドバー
   ============================================================ */

.sg_sidebar {
    display: none;
}

@media screen and (min-width: 901px) {
    .sg_sidebar {
        display: block;
        grid-column: 2;
        grid-row: 1 / 3;
    }
}

.sg_sidebar a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    color: #2c241e;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid #eee8df;
}

.sg_sidebar a:hover { color: #c08b30; }

/* ============================================================
   フッターCTA非表示
   ============================================================ */

.footer_cta { display: none !important; }
