/* ==========================================================
   京都AI×SNS支援 ブログ共通スタイル
   LP(index.html)のデザイントークンを踏襲
   ========================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #faf7f0;
  --bg-warm: #f4e8d0;
  --beige: #ecd9be;
  --beige-dark: #d4b896;
  --navy: #2a211a;
  --navy-dark: #1f1813;
  --gold: #d97757;
  --gold-light: #e69b82;
  --gold-dark: #b85f44;
  --text: #2a2520;
  --text-soft: #4a4239;
  --muted: #7a7066;
  --line: #ede2d0;
  --line-soft: #f4ecdc;
  --shadow-sm: 0 2px 8px rgba(42, 33, 26, 0.05);
  --shadow-md: 0 6px 24px rgba(42, 33, 26, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* ページ本体は横スクロールさせない（横に伸びるのは .table-scroll の中だけ） */
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: "Noto Sans JP", "游ゴシック", "Yu Gothic", sans-serif;
  line-height: 1.95;
  color: var(--text);
  background: var(--bg);
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Noto Serif JP", "游明朝", "Yu Mincho", serif;
  color: var(--text);
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: 0.01em;
}
a { color: var(--gold-dark); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .7; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ============== HEADER ============== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 100;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px; background: var(--bg-warm); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-family: "Noto Serif JP", serif; font-weight: 700; font-size: 16px;
}
.logo-text { line-height: 1.3; font-family: "Noto Serif JP", serif; }
.logo-text .sup { display: block; font-size: 10px; color: var(--muted); letter-spacing: .18em; }
.logo-text .main { display: block; font-size: 14px; font-weight: 600; color: var(--navy); }
.site-nav { display: flex; gap: 26px; font-size: 13.5px; }
.site-nav a { color: var(--text-soft); }
.header-cta {
  background: var(--gold); color: #fff !important; padding: 11px 22px;
  border-radius: 999px; font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.header-cta:hover { background: var(--gold-dark); opacity: 1; }
@media (max-width: 900px) { .site-nav { display: none; } }

/* ============== 記事レイアウト ============== */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px 100px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); padding: 26px 0 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 6px; }

.article-head { padding: 10px 0 34px; border-bottom: 1px solid var(--line-soft); margin-bottom: 40px; }
.article-head h1 { font-size: 31px; line-height: 1.5; margin-bottom: 18px; }
@media (max-width: 768px) { .article-head h1 { font-size: 24px; } }
.article-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 16px; }
.article-meta .tag {
  background: var(--bg-warm); color: var(--navy); padding: 3px 12px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500;
}

.lede {
  background: var(--bg-soft); border-left: 4px solid var(--gold);
  padding: 24px 26px; border-radius: 4px; margin-bottom: 40px; font-size: 16.5px;
}
.lede p + p { margin-top: 14px; }

.article-body h2 {
  font-size: 24px; margin: 64px 0 12px; padding-bottom: 14px;
  border-bottom: 2px solid var(--bg-warm);
}
@media (max-width: 768px) { .article-body h2 { font-size: 20px; } }
.article-body h3 { font-size: 19px; margin: 42px 0 10px; color: var(--navy); }
@media (max-width: 768px) { .article-body h3 { font-size: 17px; } }
.article-body h4 { font-size: 16.5px; margin: 30px 0 8px; }
.article-body p { margin: 16px 0; }
.article-body ul, .article-body ol { margin: 18px 0 18px 1.4em; }
.article-body li { margin: 9px 0; }
.article-body strong { font-weight: 700; background: linear-gradient(transparent 62%, var(--bg-warm) 62%); }

/* 直後の結論（GEO用パッセージ） */
.answer {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 18px 22px; margin: 18px 0 26px; box-shadow: var(--shadow-sm);
  font-weight: 500;
}

/* 表 */
.table-scroll {
  overflow-x: auto; margin: 24px 0; max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.article-body table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14.5px; }
/* 列数の多い表（補助金一覧など）は1文字改行を避けるため広めに取る */
.table-scroll.wide table { min-width: 760px; }
.article-body th, .article-body td {
  border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top;
}
.article-body th { background: var(--bg-soft); font-weight: 700; }
/* 比較表の見出し列（行頭のth）だけ折り返さない */
.article-body tbody th { white-space: nowrap; }
/* スクロールできることを示す控えめなヒント */
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--beige-dark); border-radius: 999px; }
.table-scroll::-webkit-scrollbar-track { background: var(--line-soft); border-radius: 999px; }
.table-hint { font-size: 12.5px; color: var(--muted); margin: -14px 0 22px; }
@media (min-width: 820px) { .table-hint { display: none; } }
.article-body tbody tr:nth-child(even) { background: #fdfcf9; }

/* 吹き出し */
.balloon { display: flex; gap: 14px; align-items: flex-start; margin: 30px 0; }
.balloon .face {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-warm); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--navy); font-family: "Noto Serif JP", serif;
}
.balloon .bubble {
  position: relative; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 18px; font-size: 15.5px;
}
.balloon .bubble::before {
  content: ""; position: absolute; left: -8px; top: 16px;
  border-width: 7px 8px 7px 0; border-style: solid; border-color: transparent var(--line) transparent transparent;
}
.balloon.me { flex-direction: row-reverse; }
.balloon.me .bubble { background: #fff8f4; border-color: var(--beige); }
.balloon.me .bubble::before { left: auto; right: -8px; border-width: 7px 0 7px 8px; border-color: transparent transparent transparent var(--beige); }
.balloon.me .face { background: var(--gold-light); color: #fff; }

/* 注意ボックス */
.note-box {
  background: #fffaf5; border: 1px solid var(--beige); border-radius: 6px;
  padding: 20px 22px; margin: 26px 0; font-size: 15.5px;
}
.note-box .note-title { font-weight: 700; color: var(--gold-dark); margin-bottom: 8px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line-soft); padding: 22px 0; }
.faq-item .q { font-weight: 700; font-size: 16.5px; margin-bottom: 8px; color: var(--navy); }
.faq-item .q::before { content: "Q. "; color: var(--gold); }
.faq-item .a { font-size: 15.5px; color: var(--text-soft); }

/* CTA */
.cta-box {
  background: var(--bg-soft); border-radius: 10px; padding: 36px 30px;
  margin: 56px 0 40px; text-align: center;
}
.cta-box h3 { font-size: 20px; margin-bottom: 12px; }
.cta-box p { font-size: 15.5px; color: var(--text-soft); margin-bottom: 22px; }
.cta-btn {
  display: inline-block; background: var(--gold); color: #fff !important;
  padding: 16px 40px; border-radius: 999px; font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-md);
}
.cta-btn:hover { background: var(--gold-dark); opacity: 1; }
.cta-sub { display: block; margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* 著者ボックス */
.author-box {
  border: 1px solid var(--line); border-radius: 10px; padding: 28px 26px; margin: 50px 0 0;
  background: #fff;
}
.author-box .author-name { font-family: "Noto Serif JP", serif; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.author-box .author-role { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.author-box ul { margin: 0 0 0 1.3em; font-size: 14.5px; }
.author-box li { margin: 6px 0; }

/* 関連記事 */
.related { margin-top: 56px; }
.related h2 { font-size: 20px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--bg-warm); }
.card {
  display: block; border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 14px; background: #fff; transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); opacity: 1; }
.card .card-title { font-family: "Noto Serif JP", serif; font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: 6px; }
.card .card-desc { font-size: 13.5px; color: var(--muted); }

/* ブログ一覧 */
.blog-hero { background: var(--bg-soft); padding: 60px 0 54px; text-align: center; }
.blog-hero h1 { font-size: 30px; margin-bottom: 12px; }
.blog-hero p { font-size: 15.5px; color: var(--text-soft); max-width: 620px; margin: 0 auto; }
@media (max-width: 768px) { .blog-hero h1 { font-size: 23px; } }
.post-list { max-width: 820px; margin: 0 auto; padding: 56px 20px 90px; }
.post-item { border-bottom: 1px solid var(--line-soft); padding: 26px 0; display: block; }
.post-item:hover { opacity: 1; }
.post-item .date { font-size: 12.5px; color: var(--muted); }
.post-item h2 { font-size: 20px; margin: 6px 0 8px; border: none; padding: 0; }
.post-item:hover h2 { color: var(--gold-dark); }
.post-item p { font-size: 14.5px; color: var(--text-soft); }
@media (max-width: 768px) { .post-item h2 { font-size: 17.5px; } }

/* ============== FOOTER ============== */
footer { border-top: 1px solid var(--line-soft); padding: 34px 0; font-size: 13px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
@media (max-width: 768px) { .footer-row { padding: 0 20px; } }
