/*
Theme Name:   Twenty Twenty-Five Child for CG Tips
Theme URI:    https://cg-tips.net/
Description:   CG Tips (cg-tips.net) 用の Twenty Twenty-Five 子テーマ。親テーマのデザインを継承し、微調整用CSSと小さなフック処理だけをここで管理する。レイアウト本体はサイトエディタ（FSE）と theme.json で管理すること。
Author:     CG Tips
Template:    twentytwentyfive
Version:     1.1.0
Requires at least:  6.7
Tested up to:   6.8
Requires PHP:   7.4
License:     GNU General Public License v2 or later
License URI:   https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:   twentytwentyfive-child
*/
/* CG Tips デザイン：Zenn風
 * 方針：ZennのPCレイアウトに寄せる。白ベース、薄いグレーの境界線、角丸カード、
 * 影は最小限、余白は広め、装飾は控えめ。複数の参考サイトの要素は混ぜない。
 * アクセントはCG Tipsの緑（濃緑 #3e7a24 / 明るい緑 #a6c36f）。青は使わない。
 * 旧方針の3カラム前提の規則は廃止し、このファイルには残さない。
 * セレクタはコアブロックのクラス（.wp-block-xxx）を優先する。
 */

/* ---------- 全体 ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { background: #fff; color: #333; }
::selection { background: #dcebc4; }
a { color: #3e7a24; }

/* ---------- ヘッダー：白背景・sticky・薄い境界線 ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 200; background: #fff; border-bottom: 1px solid #e5e7eb; }
body.admin-bar header.wp-block-template-part { top: 32px; }
header.wp-block-template-part .wp-block-group.has-contrast-background-color { background-color: #fff !important; color: #1d1d1d !important; }
header.wp-block-template-part a { color: #1d1d1d !important; text-decoration: none; }
header.wp-block-template-part a:hover { color: #3e7a24 !important; }
header.wp-block-template-part .wp-block-navigation .current-menu-item > a { color: #3e7a24 !important; }
/* ロゴ画像は暗い背景が焼き込まれているため、白ヘッダーではダークバッジとして見せる */
header.wp-block-template-part .wp-block-site-logo img { background: #1d1d1d; border-radius: 10px; padding: 8px 12px; }
.wp-block-navigation__responsive-container-open { color: #1d1d1d; }
.wp-block-navigation__responsive-container.is-menu-open { background: #fff; color: #1d1d1d; }
.wp-block-navigation__responsive-container.is-menu-open a { color: #1d1d1d; }
@media (max-width: 782px) { body.admin-bar header.wp-block-template-part { top: 46px; } }

/* ---------- フッター：明るいグレー ---------- */
footer.wp-block-template-part .wp-block-group.has-contrast-background-color { background-color: #f5f5f5 !important; color: #555 !important; }
footer.wp-block-template-part a { color: #333 !important; text-decoration: none; }
footer.wp-block-template-part a:hover { color: #3e7a24 !important; }
footer.wp-block-template-part .wp-block-site-logo img { background: #1d1d1d; border-radius: 10px; padding: 8px 12px; }

/* ---------- 記事タイトル ---------- */
.wp-block-post-title a { color: #1d1d1d; text-decoration: none; }
.wp-block-post-title a:hover { color: #3e7a24; }
.wp-block-post-featured-image + .wp-block-group,
.wp-block-post-featured-image + .wp-block-post-title,
.wp-block-post-title + .wp-block-post-featured-image { margin-block-start: 0; }

/* ---------- カテゴリバッジ（ピル型・緑系） ---------- */
.wp-block-post-terms a { display: inline-block; padding: 0.1em 0.6em; border-radius: 999px; font-size: 0.85rem; line-height: 1.6; text-decoration: none; background: #eef0ea; color: #555; }
.wp-block-post.category-news .wp-block-post-terms a { background: #eef0ea; color: #555; }
.wp-block-post.category-tutorial .wp-block-post-terms a { background: #e9f2e2; color: #3e7a24; }
.wp-block-post.category-technique .wp-block-post-terms a { background: #1d1d1d; color: #a6c36f; }
.wp-block-post.category-plugin-tool .wp-block-post-terms a { background: #f0ead8; color: #7a5c14; }
.wp-block-post.category-ai-tech .wp-block-post-terms a { background: #e6f0e6; color: #2e6b34; }
.wp-block-post.category-gear-bto .wp-block-post-terms a { background: #faf0dd; color: #8a5a12; }

/* ---------- ボタン：緑のソリッド ---------- */
.wp-block-button__link { background: #3e7a24; color: #fff; border-radius: 8px; padding: 0.7em 1.6em; font-weight: 700; text-decoration: none; }
.wp-block-button__link:hover { background: #356b1e; color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: #3e7a24; border: 1px solid #3e7a24; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: #e9f2e2; }

/* ---------- セクション見出し：タブ風 ---------- */
.cg-tab { display: block; background: none !important; color: #1d1d1d !important; font-size: 1.15rem; font-weight: 700; padding: 0 0 0.5em; margin: 0 0 4px; border-bottom: 2px solid #e5e7eb; position: relative; }
.cg-tab::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: #3e7a24; }
/* 旧ピックアップ用の囲み（現在は未使用。残す場合は白） */
.cg-section { background: #fff; padding: 0; }
/* サイド見出し（// 人気記事 など） */
.cg-side-title { color: #3e7a24; font-weight: 700; border-bottom: 2px solid #a6c36f; padding-bottom: 0.3em; margin: 2em 0 0.8em; font-size: 1.05rem; }

/* ---------- 記事カード一覧（フロント・記事一覧・カテゴリで共通） ---------- */
.wp-block-post { margin-block-end: 0; }
.cgt-latest-rows .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.cgt-latest-rows .wp-block-post-template > li { border-bottom: 1px solid #e5e7eb; padding: 22px 0; }
.cgt-latest-rows .wp-block-post-template > li:first-child { padding-top: 10px; }
.cgt-latest-rows .wp-block-post-template > li > .wp-block-group { margin: 0; }
.cgt-latest-rows .wp-block-columns { gap: 20px; align-items: flex-start; margin: 0; }
.cgt-latest-rows .wp-block-post-featured-image img { border-radius: 8px; }
.cgt-latest-rows .wp-block-post-title { font-size: 1.12rem; font-weight: 700; line-height: 1.55; margin: 0 0 0.35em; }
.cgt-latest-rows .wp-block-post-excerpt { color: #666; font-size: 0.92rem; line-height: 1.7; margin: 0.45em 0 0; }
.cgt-latest-rows .wp-block-post-excerpt__more-link { display: none; }
.cgt-latest-rows .wp-block-post-date { color: #999; font-size: 0.85rem; }
.cgt-latest-rows .wp-block-post-terms { margin: 0; }
.home .wp-block-buttons { margin-top: 24px; }
.wp-block-post-excerpt + .wp-block-post-content { margin-block-start: 0.5rem; }
.wp-block-query-title { font-size: 1.6rem; font-weight: 700; color: #1d1d1d; }
.wp-block-query-pagination a { color: #1d1d1d; text-decoration: none; }
.wp-block-query-pagination a:hover { color: #3e7a24; }
.wp-block-query-pagination .current { color: #3e7a24; font-weight: 700; }
@media (max-width: 600px) {
  .cgt-latest-rows .wp-block-columns { flex-direction: column; }
  .cgt-latest-rows .wp-block-column { flex-basis: 100% !important; }
}

/* ---------- 記事ページ：本文730px＋右目次 ---------- */
.cg-article-layout { display: flex; gap: 56px; align-items: flex-start; justify-content: center; max-width: 1120px; margin-inline: auto; }
.cg-article-main { flex: 1 1 auto; min-width: 0; max-width: 730px; }
.cg-toc-slot { flex: 0 0 280px; width: 280px; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.cg-toc-title { font-size: 15px !important; font-weight: 700; color: #1d1d1d; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid #e5e7eb; background: none !important; }
.cg-toc-list { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.65; }
.cg-toc-list li { margin: 0 0 8px; }
.cg-toc-list a { color: #666; text-decoration: none; display: block; padding: 2px 0 2px 12px; border-left: 2px solid transparent; }
.cg-toc-list a:hover { color: #3e7a24; }
.cg-toc-list a.is-active { color: #3e7a24; border-left-color: #3e7a24; font-weight: 700; }
.cg-toc-list .cg-toc-h3 a { padding-left: 26px; font-size: 13px; }
@media (max-width: 1023px) {
  .cg-article-layout { flex-direction: column; gap: 40px; }
  .cg-article-main { width: 100%; margin-inline: auto; }
  .cg-toc-slot { position: static; flex: none; width: 100%; max-width: 730px; margin: 0 auto; max-height: none; overflow: visible; border-top: 1px solid #e5e7eb; padding-top: 24px; }
}
/* 本文中のワイド・フル幅ブロックは730pxカラム内に収める（旧DEEP DIVEのブレイクアウトは廃止） */
.cg-article-main .alignwide, .cg-article-main .alignfull { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
/* 記事タイトル・見出し：太字＋余白で素直に（旧：薄緑ベタ塗り見出しを廃止） */
.single .cg-article-main > .wp-block-post-title { color: #1d1d1d; font-size: 1.9rem; line-height: 1.45; font-weight: 700; margin: 0 0 16px; }
.single .cg-article-main .wp-block-post-content h2 { background: none; border-left: none; border-bottom: 1px solid #e5e7eb; padding: 0 0 0.45em; margin: 2.2em 0 1em; font-size: 1.45rem; font-weight: 700; line-height: 1.5; color: #1d1d1d; }
.single .cg-article-main .wp-block-post-content h3 { background: none; border-bottom: none; padding: 0; margin: 1.8em 0 0.8em; font-size: 1.2rem; font-weight: 700; line-height: 1.6; color: #1d1d1d; }
/* 本文 */
.single .entry-content { font-size: 1.02rem; line-height: 1.9; color: #333; }
.single .entry-content a { color: #3e7a24; text-decoration: underline; text-underline-offset: 3px; }
.single .entry-content a:hover { color: #2c5a1a; }
.single .entry-content figure img, .single .entry-content img { border-radius: 8px; }
.single .entry-content table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.single .entry-content table th, .single .entry-content table td { border: 1px solid #e5e7eb; padding: 0.6em 0.8em; }
.single .entry-content table th { background: #f8f9fa; font-weight: 700; }
/* 本文内のRTOC目次はPCでは右サイドバーに集約するため非表示（モバイルでは本文内に残す） */
@media (min-width: 1024px) { .single #rtoc-mokuji-wrapper { display: none !important; } }
.single .cg-article-main .wp-block-post-featured-image img { border-radius: 12px; }
/* 記事下：投稿ナビゲーション */
.single nav[aria-label="投稿ナビゲーション"] { border-top: 1px solid #e5e7eb; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.single nav[aria-label="投稿ナビゲーション"] a { color: #1d1d1d; text-decoration: none; }
.single nav[aria-label="投稿ナビゲーション"] a:hover { color: #3e7a24; }
/* 記事下：新着記事（3カラムグリッドのカード） */
.single .wp-block-query .wp-block-post-template > li { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
.single .wp-block-query .wp-block-post-template > li img { border-radius: 8px; }
/* 人気記事（WP Popular Posts） */
.wpp-list { list-style: none; margin: 0; padding: 0; }
.wpp-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
.wpp-list li:last-child { border-bottom: none; }
.wpp-list img { border-radius: 6px; }
.wpp-list a { color: #1d1d1d; text-decoration: none; font-weight: 700; line-height: 1.5; }
.wpp-list a:hover { color: #3e7a24; }
/* コメント */
.single .wp-block-comments input[type="text"], .single .wp-block-comments input[type="email"], .single .wp-block-comments input[type="url"], .single .wp-block-comments textarea { border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.6em 0.8em; width: 100%; }
.single .wp-block-comments input[type="submit"] { background: #3e7a24; color: #fff; border: none; border-radius: 8px; padding: 0.7em 1.6em; font-weight: 700; cursor: pointer; }
@media (max-width: 600px) {
  .single .entry-content { font-size: 0.98rem; }
  .single .cg-article-main > .wp-block-post-title { font-size: 1.55rem; }
  .single .cg-article-main .wp-block-post-content h2 { font-size: 1.3rem; }
}

/* ---------- 本文用パーツ（投稿内で使用） ---------- */
.cg-talk { display: flex; gap: 14px; align-items: flex-start; margin: 1.2em 0; }
.cg-talk .cg-icon { flex: 0 0 56px; width: 56px; }
.cg-talk .cg-bubble { background: #f5f5f5; border: 1.5px solid #a6c36f; border-radius: 12px; padding: 12px 16px; font-size: 15px; line-height: 1.7; }
.cg-talk .cg-bubble p { margin: 0; }
.cg-marker { background: linear-gradient(transparent 62%, #dcebc4 62%); font-weight: 700; }
.cg-point { background: #f5f5f5; border: 1.5px solid #a6c36f; border-radius: 12px; padding: 14px 18px; }

/* 会話ブロックのアイコン寸法（旧デザインの84pxを維持） */
.cg-talk { margin: 1.6em 0; }
.cg-talk .cg-icon { flex: 0 0 84px; width: 84px; }
.cg-talk img { width: 84px; height: 84px; object-fit: contain; flex: none; }

/* ヘッダー検索：丸い白いアイコンボタン（Zenn風） */
header.wp-block-template-part .wp-block-site-logo img { width: 140px; height: auto; }
header.wp-block-template-part .wp-block-search__button { background: #fff !important; color: #1d1d1d !important; border: 1px solid #e5e7eb !important; border-radius: 999px !important; padding: 8px !important; width: 38px; height: 38px; min-width: 38px; line-height: 1; }
header.wp-block-template-part .wp-block-search__button:hover { border-color: #3e7a24 !important; color: #3e7a24 !important; }
header.wp-block-template-part .wp-block-search__input { border: 1px solid #e5e7eb; border-radius: 8px; }
/* 診断：一覧の抜粋がCSSで隠れていないか確認するための強制表示 */
.wp-block-post-excerpt{display:block!important;}

/* ---------- 記事ページの横はみ出し対策 ---------- */
.cg-article-layout{width:100%;box-sizing:border-box;}
.cg-article-main{min-width:0;max-width:100%;overflow-wrap:break-word;}
.cg-article-main h1.wp-block-post-title{font-size:clamp(1.45rem,4.5vw,1.9rem)!important;line-height:1.45;overflow-wrap:break-word;}
.cg-article-main .wp-block-post-content{overflow-wrap:break-word;}
.cg-article-main .wp-block-table{display:block;overflow-x:auto;max-width:100%;}
.cg-article-main table{max-width:100%;}
.cg-article-main iframe{max-width:100%;}
.cg-article-main img{max-width:100%;height:auto;}
@media(max-width:1023px){
.cg-article-layout{padding-inline:20px;}
}
/* 目次の統一：本文内のRTOC目次は常に非表示にし、サイドバー目次（.cg-toc-slot）に一本化する */
#rtoc-mokuji-wrapper{display:none!important;}

/* ---------- Zenn-style bottom sections (related / popular) ---------- */
.cg-zenn-section{margin:2.5rem 0;}
.cg-zenn-section__title{font-size:1.35rem;line-height:1.4;font-weight:700;margin:0 0 1rem;color:#1d1d1d;}
.cg-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
.cg-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;min-width:0;}
.cg-card__link{display:flex;flex-direction:column;height:100%;text-decoration:none;color:#1d1d1d;}
.cg-card__link:hover .cg-card__title{color:#3e7a24;}
.cg-card__thumb{display:block;aspect-ratio:16/9;overflow:hidden;background:#f0f0f0;}
.cg-card__thumb img{display:block;width:100%;height:100%;object-fit:cover;}
.cg-card__thumb--empty{display:block;width:100%;height:100%;background:#a6c36f;opacity:.35;}
.cg-card__body{display:flex;flex-direction:column;gap:8px;padding:14px 16px 16px;flex:1;}
.cg-card__title{display:block;font-size:1rem;line-height:1.6;font-weight:700;overflow-wrap:break-word;}
.cg-card__meta{display:block;font-size:.82rem;line-height:1.5;color:#666;}
.cg-popular__more{margin-top:20px;text-align:center;}
.cg-popular__more .wp-block-button__link{background:#3e7a24;color:#fff;border-radius:6px;}
.cg-popular__more .wp-block-button__link:hover{background:#356b1f;}
@media (max-width:640px){.cg-card-grid{grid-template-columns:1fr;}}
/* ---------- Zenn-style footer (dark #1d1d1d, green accent only) ---------- */
.cg-footer-zenn{background:#1d1d1d;color:#fff;}
.cg-footer-zenn a{color:#e5e7eb;text-decoration:none;}
.cg-footer-zenn a:hover{color:#a6c36f;text-decoration:underline;}
.cg-footer-zenn .cg-footer-zenn__desc{color:#c9c9c9;}
.cg-footer-zenn .cg-footer-zenn__col-title{color:#fff;font-weight:700;}
.cg-footer-zenn .cg-footer-zenn__copy{color:#9a9a9a;}
/* ---------- Zenn light background: pale blue-gray page, white floating cards ---------- */
body{background-color:#eef3f8;}
.cg-card{box-shadow:0 1px 3px rgba(16,24,40,.08),0 6px 16px rgba(16,24,40,.06);}
.cgt-latest-rows{list-style:none;margin:0;padding:0;}
.cgt-latest-rows>li,.cgt-latest-rows .wp-block-post{background:#fff;border:1px solid #e5e9f0;border-radius:12px;padding:16px;margin-bottom:12px;box-shadow:0 1px 3px rgba(16,24,40,.08),0 6px 16px rgba(16,24,40,.06);}
.cgt-latest-rows .wp-block-post-excerpt{display:none;}
.cgt-latest-rows .wp-block-post-title a{color:#1d1d1d;}
.cgt-latest-rows .wp-block-post-title a:hover{color:#3e7a24;}
body.single .wp-block-post-content,body.page .wp-block-post-content{background:#fff;border:1px solid #e6ebf2;border-radius:16px;padding:28px 32px;box-shadow:0 1px 3px rgba(16,24,40,.08),0 6px 16px rgba(16,24,40,.06);}
.wp-block-post-terms a{display:inline-block;border:1px solid #dfe6ee;border-radius:999px;padding:2px 10px;background:#fff;color:#3e7a24;text-decoration:none;}
.cg-zenn-tabs{display:flex;gap:4px;border-bottom:1px solid #dbe4ee;margin-bottom:24px;}
.cg-zenn-tabs a{padding:10px 16px;font-weight:700;color:#666;text-decoration:none;border-bottom:2px solid transparent;}
.cg-zenn-tabs a:hover{color:#3e7a24;}
.cg-zenn-tabs a.is-active{color:#1d1d1d;border-color:#3e7a24;}
.cg-cat-chips{display:flex;flex-wrap:wrap;gap:10px;}
.cg-cat-chips a{display:inline-block;background:#fff;border:1px solid #dbe4ee;border-radius:999px;padding:8px 16px;font-weight:700;color:#1d1d1d;text-decoration:none;box-shadow:0 1px 3px rgba(16,24,40,.06);}
.cg-cat-chips a:hover{border-color:#3e7a24;color:#3e7a24;}
.cg-feed-card{background:#fff;border:1px solid #e5e9f0;border-radius:12px;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,.08),0 6px 16px rgba(16,24,40,.06);margin-bottom:12px;}
.cg-feed-card__link{display:flex;gap:16px;padding:16px;text-decoration:none;color:#1d1d1d;}
.cg-feed-card__link:hover .cg-feed-card__title{color:#3e7a24;}
.cg-feed-card__thumb{flex:0 0 112px;width:112px;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:#f0f0f0;}
.cg-feed-card__thumb img{display:block;width:100%;height:100%;object-fit:cover;}
.cg-feed-card__body{display:flex;flex-direction:column;gap:6px;min-width:0;}
.cg-feed-card__title{font-size:1rem;line-height:1.6;font-weight:700;overflow-wrap:break-word;}
.cg-feed-card__meta{font-size:.82rem;line-height:1.5;color:#666;}
@media (max-width:640px){body.single .wp-block-post-content,body.page .wp-block-post-content{padding:20px 18px;}.cg-feed-card__thumb{flex-basis:84px;width:84px;}}

/* Overrides for earlier !important rules and mobile feed layout. */
.cgt-latest-rows .wp-block-post-excerpt{display:none!important;}
footer.wp-block-template-part .cg-footer-zenn{background:#1d1d1d!important;color:#fff!important;}
@media (max-width:600px){
.cgt-latest-rows .wp-block-columns{flex-direction:row!important;gap:16px!important;}
.cgt-latest-rows .wp-block-column:first-child{flex:0 0 112px!important;max-width:112px;}
.cgt-latest-rows .wp-block-column:last-child{flex:1!important;min-width:0;}
}
/* Footer link contrast on dark background. */
footer.wp-block-template-part .cg-footer-zenn a,footer.wp-block-template-part .cg-footer-zenn .wp-block-site-title a{color:#e5e7eb!important;text-decoration:none;}
footer.wp-block-template-part .cg-footer-zenn a:hover{color:#a6c36f!important;}
.cg-footer-zenn .wp-block-list{list-style:none;padding-left:0;}
.cg-footer-zenn .wp-block-site-title a{color:#fff!important;}

/* Feed meta date must not wrap. */
.cgt-latest-rows .wp-block-post-date{white-space:nowrap;}
.cgt-latest-rows .wp-block-columns .wp-block-group{flex-wrap:wrap!important;}
/* ---------- Front page: Zenn-style 2-column grid (2026-11-23) ---------- */
body.home{background:#edf1f4;}
body.home main.wp-block-group{background:transparent;}
.cg-zn-section{margin-top:56px;padding-top:32px;border-top:1px solid #dde4e9;}
.cg-zn-section.cg-zn-trending{margin-top:28px;padding-top:8px;border-top:0;}
.cg-zn-section .cg-zn-title{font-size:28px;line-height:1.25;font-weight:800;letter-spacing:.01em;color:#17251b;margin:0 0 20px;padding:0;border:0;background:none;box-shadow:none;}
.cg-zn-section .cg-zn-title::after{display:none;}
.cg-zenn-tabs{display:flex;gap:28px;border-bottom:1px solid #dde4e9;margin:4px 0 0;padding:0 4px;}
.cg-zenn-tabs a{display:inline-block;padding:10px 2px;margin-bottom:-1px;border-bottom:3px solid transparent;color:#5a6b62;font-size:17px;font-weight:700;text-decoration:none;}
.cg-zenn-tabs a:hover{color:#17251b;}
.cg-zenn-tabs a.is-active{color:#17251b;border-bottom-color:#3e7a24;}
main:has(#popular:target) .cg-zenn-tabs a[href="#popular"]{color:#17251b;border-bottom-color:#3e7a24;}
main:has(#popular:target) .cg-zenn-tabs a[href="#new"]{color:#5a6b62;border-bottom-color:transparent;}
main:has(#new:target) .cg-zenn-tabs a[href="#new"]{color:#17251b;border-bottom-color:#3e7a24;}
main:has(#new:target) .cg-zenn-tabs a[href="#popular"]{color:#5a6b62;border-bottom-color:transparent;}
.cg-zn-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important;}
.cg-zn-grid .cg-card{margin:0 !important;background:#fff;border:1px solid #e3e8ec;border-radius:14px;overflow:hidden;}
.cg-zn-grid .cg-card__link{display:flex !important;flex-direction:column !important;height:100%;text-decoration:none;color:inherit;}
.cg-zn-grid .cg-card__thumb{display:block !important;flex:none;width:100%;aspect-ratio:4/3;overflow:hidden;background:#dfe7ea;}
.cg-zn-grid .cg-card__thumb img{display:block;width:100% !important;height:100% !important;object-fit:cover;}
.cg-zn-grid .cg-card__body{display:flex;flex-direction:column;gap:6px;padding:12px 14px 14px;}
.cg-zn-grid .cg-card__title{font-size:15px;line-height:1.45;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.cg-zn-grid .cg-card__meta{font-size:12px;line-height:1.5;color:#6b7a72;}
.cg-zn-query-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important;list-style:none;margin:0;padding:0;}
.cg-zn-query-grid .wp-block-post{margin:0;}
.cg-zn-card{height:100%;background:#fff;border:1px solid #e3e8ec;border-radius:14px;overflow:hidden;margin:0;}
.cg-zn-card .wp-block-post-featured-image{margin:0;}
.cg-zn-card .wp-block-post-featured-image a{display:block;}
.cg-zn-card .wp-block-post-featured-image img{display:block;width:100%;height:100%;aspect-ratio:4/3;object-fit:cover;}
.cg-zn-card .wp-block-post-title{font-size:15px;line-height:1.45;font-weight:700;margin:0;padding:12px 14px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.cg-zn-card .wp-block-post-title a{color:inherit;text-decoration:none;}
.cg-zn-card__meta{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;padding:6px 14px 12px;font-size:12px;line-height:1.5;color:#6b7a72;}
.cg-zn-card__meta a{color:#3e7a24;font-weight:700;text-decoration:none;}
.cg-zn-card__meta .wp-block-post-date{color:#6b7a72;}
.cg-zn-more{margin:20px 0 0;text-align:center;}
.cg-zn-more__link{color:#3e7a24;font-size:15px;font-weight:700;text-decoration:none;}
.cg-zn-more__link:hover{text-decoration:underline;}
.cg-zn-more--pill .cg-zn-more__link{display:inline-block;padding:8px 18px;border:1px solid #3e7a24;border-radius:999px;background:#fff;}
.cg-zn-more--pill .cg-zn-more__link:hover{background:#eef5e6;text-decoration:none;}
.cg-zn-topic-tabs{display:flex;gap:20px;border-bottom:1px solid #dde4e9;margin:0 0 16px;padding:0 4px;}
.cg-zn-topic-tab{display:inline-block;padding:8px 2px;margin-bottom:-1px;border-bottom:3px solid transparent;color:#5a6b62;font-size:14px;font-weight:700;text-decoration:none;}
.cg-zn-topic-tab.is-active{color:#17251b;border-bottom-color:#3e7a24;}
.cg-zn-topic-chips{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px;}
.cg-zn-topic-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border:1px solid #e3e8ec;border-radius:999px;background:#fff;color:#22301f;font-size:13px;font-weight:700;text-decoration:none;}
.cg-zn-topic-chip__icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#a6c36f;color:#1e3a12;font-size:14px;font-weight:800;}
#topic-recommend{display:none;}
#topic-recommend:target{display:block;}
.cg-zn-topics:has(#topic-recommend:target) #topic-popular{display:none;}
.cg-zn-topics:has(#topic-recommend:target) .cg-zn-topic-tab[href="#topic-recommend"]{color:#17251b;border-bottom-color:#3e7a24;}
.cg-zn-topics:has(#topic-recommend:target) .cg-zn-topic-tab[href="#topic-popular"]{color:#5a6b62;border-bottom-color:transparent;}
.cg-zn-deepdive-panel{background:#fff;border:1px solid #e3e8ec;border-left:4px solid #3e7a24;border-radius:14px;padding:24px;}
.cg-zn-deepdive-panel__badge{display:inline-block;margin:0 0 12px;padding:4px 12px;border-radius:999px;background:#3e7a24;color:#fff;font-size:12px;font-weight:800;letter-spacing:.08em;}
.cg-zn-deepdive-panel__text{margin:0 0 8px;font-size:16px;font-weight:700;color:#17251b;}
.cg-zn-deepdive-panel__note{margin:0;font-size:14px;color:#5a6b62;}
.cg-zn-join{margin-top:56px;padding:36px 28px;border-radius:16px;background:#3e7a24;text-align:center;}
.cg-zn-join .cg-zn-join__title{margin:0 0 10px;color:#fff;font-size:30px;font-weight:800;line-height:1.25;}
.cg-zn-join__text{margin:0 0 20px;color:#eaf3e4;font-size:15px;}
.cg-zn-join .wp-block-button__link{background:#fff !important;color:#2c5a1a !important;font-weight:800;border-radius:999px;padding:12px 28px;text-decoration:none;}
@media (max-width:480px){
.cg-zn-grid{gap:10px !important;}
.cg-zn-query-grid{gap:10px !important;}
.cg-zn-grid .cg-card__body{padding:10px 10px 12px;}
.cg-zn-grid .cg-card__title{font-size:13px;}
.cg-zn-grid .cg-card__meta{font-size:11px;}
.cg-zn-card .wp-block-post-title{font-size:13px;padding:10px 10px 0;}
.cg-zn-card__meta{padding:4px 10px 12px;font-size:11px;}
.cg-zn-section .cg-zn-title{font-size:24px;}
.cg-zn-section{margin-top:44px;padding-top:24px;}
.cg-zn-join{padding:28px 18px;}
.cg-zn-join .cg-zn-join__title{font-size:24px;}
}

.cg-zn-grid .cg-card__meta .cg-card__cat{color:#3e7a24;font-weight:700;}
.cg-zn-grid .cg-card__meta time{white-space:nowrap;}
.cg-zn-card__meta .wp-block-post-date{white-space:nowrap;}
.cg-zn-card__meta .wp-block-post-terms a{white-space:nowrap;}