/*
 * 外枠の見た目（第2段階-2）。シンプルで軽く、スマホで読みやすい形。本格的な刷新は切り替えの後に別で行う。
 * 書体：端末の標準の書体（iPhone・Mac はヒラギノ角ゴ、Android は Noto Sans CJK、Windows は游ゴシック／メイリオ）。
 *       Webフォントは読み込まない（日本語のWebフォントは数百KB〜MBあり、表示が遅れ、文字のちらつき・ずれが起きるため）。
 */
:root { --ink: #222; --sub: #666; --line: #e5e5e5; --accent: #2a7a4f; --link: #1a5a96; --bg-soft: #f7f7f5; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #fff; line-height: 1.85; font-size: 16px; overflow-wrap: anywhere;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; max-width: 100%; }
td, th { border: 1px solid #ccc; padding: 6px 8px; vertical-align: top; }
th { background: var(--bg-soft); }
pre { overflow-x: auto; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header-inner { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 8px; }
.site-logo { margin: 0; flex: 1; line-height: 0; }
.site-logo img { width: 220px; height: auto; }
.header-search { text-decoration: none; font-size: 20px; padding: 6px; }
.sp-menu { position: relative; }
.sp-menu summary { list-style: none; cursor: pointer; font-size: 24px; padding: 4px 8px; user-select: none; }
.sp-menu summary::-webkit-details-marker { display: none; }
.sp-menu nav { position: absolute; right: 0; top: 100%; z-index: 10; width: min(88vw, 320px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 8px 16px 16px; }
.sp-menu ul { list-style: none; margin: 0; padding: 0; }
.sp-menu li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sp-cats-title { font-weight: 700; margin: 12px 0 6px; font-size: .9rem; }
.sp-cat-btn { display: block; margin: 6px 0; padding: 8px 12px; border-radius: 6px; background: var(--bg-soft); color: var(--ink); text-decoration: none; font-size: .9rem; }
.sp-cat-btn.is-disabled { color: #999; }
.pc-menu { display: none; }
@media (min-width: 900px) {
  .sp-menu { display: none; }
  .pc-menu { display: block; border-top: 1px solid var(--line); }
  .pc-menu ul { list-style: none; margin: 0 auto; padding: 0 16px; max-width: 1120px; display: flex; flex-wrap: wrap; }
  .pc-menu a { display: block; padding: 10px 16px; text-decoration: none; color: var(--ink); font-size: .9rem; }
  .pc-menu a:hover { background: var(--bg-soft); }
}

/* パンくず */
.breadcrumb { max-width: 1120px; margin: 0 auto; padding: 8px 16px 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; font-size: .78rem; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }

/* 本文とサイドバー（スマホでは本文の下） */
.layout { max-width: 1120px; margin: 0 auto; padding: 12px 16px 32px; }
.layout main { min-width: 0; max-width: 760px; margin: 0 auto; }
.layout:not(.has-sidebar) main { max-width: 900px; }
@media (min-width: 1024px) {
  .layout.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .layout.has-sidebar main { max-width: none; margin: 0; }
}
.sidebar { margin-top: 32px; }
@media (min-width: 1024px) { .sidebar { margin-top: 0; } }
.side-widget { margin-bottom: 24px; }
.side-title { font-weight: 700; font-size: .9rem; margin: 0 0 8px; border-left: 4px solid var(--accent); padding-left: 8px; }
.search-form { display: flex; gap: 6px; }
.search-form input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
.search-form button { height: 40px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }

/* 記事 */
.entry-title { font-size: 1.5rem; line-height: 1.45; margin: .3em 0 .4em; }
.entry-title.is-hidden { display: none !important; }
.entry-meta { font-size: .8rem; color: var(--sub); margin: 0 0 1.2em; }
.entry-content h2 { font-size: 1.3rem; line-height: 1.45; margin: 2em 0 .8em; padding: .5em .7em; background: var(--bg-soft); border-left: 5px solid var(--accent); }
.entry-content h3 { font-size: 1.15rem; line-height: 1.45; margin: 1.8em 0 .7em; padding-bottom: .3em; border-bottom: 2px solid var(--line); }
.entry-content h4 { font-size: 1.05rem; margin: 1.5em 0 .6em; }
.entry-content h2[id], .entry-content h3[id], .entry-content h4[id] { scroll-margin-top: 12px; }
.entry-content table { display: block; overflow-x: auto; }
.entry-content iframe, .entry-content video { max-width: 100%; }

/* 広告の枠（本番のドメインでだけ中身が入る） */
.ad-slot { margin: 24px 0; }
.ad-slot-title { font-size: .7rem; color: #767676; margin: 0 0 4px; text-align: center; }
.ad-slot:has(ins:empty) .ad-slot-title { display: none; }

/* 記事の下 */
.post-foot { margin-top: 32px; }
.author-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; }
.author-box-title { font-size: .8rem; color: var(--sub); margin: 0 0 8px; }
.author-box-inner { display: flex; gap: 12px; align-items: flex-start; }
.author-box-inner img { width: 64px; height: 64px; border-radius: 50%; flex: 0 0 64px; }
.author-box-name { font-weight: 700; margin: 0; }
.author-box-bio { font-size: .85rem; margin: 4px 0 0; white-space: pre-line; color: #444; }
.tagst { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; font-size: .8rem; }
.tagst a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--ink); }
.tagst .tag-cat { background: var(--bg-soft); }
.related-title { font-size: 1.1rem; margin: 0 0 12px; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .related-list { grid-template-columns: repeat(3, 1fr); } }
.related-list a { display: block; text-decoration: none; color: var(--ink); }
.related-list img, .related-list .no-thumb { display: block; width: 100%; aspect-ratio: 202 / 150; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
.related-cat { display: inline-block; font-size: .65rem; background: #555; color: #fff; padding: 0 6px; border-radius: 3px; margin-top: 6px; }
.related-date { font-size: .7rem; color: var(--sub); margin-left: 6px; }
.related-name { display: block; font-size: .85rem; font-weight: 700; line-height: 1.5; margin-top: 2px; }
.related-more { text-align: right; font-size: .85rem; }
.p-navi { display: grid; gap: 8px; margin-top: 24px; }
.p-navi a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .85rem; }
.p-navi span { display: block; font-size: .7rem; color: var(--sub); }
.p-navi .next { text-align: right; }

/* 一覧 */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.post-list .thumb { flex: 0 0 120px; min-width: 0; display: block; }
.post-list .thumb img { width: 100%; height: auto; border-radius: 4px; }
.post-list li > div { min-width: 0; }
.post-list h2 { font-size: 1rem; margin: 0; line-height: 1.5; }
.post-list .date { font-size: .75rem; color: var(--sub); margin: 0; }
.post-list .excerpt { font-size: .85rem; color: #444; margin: 4px 0 0; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 24px; }
.author-bio { display: flex; gap: 12px; align-items: flex-start; white-space: pre-line; font-size: .9rem; }
.author-bio img { flex: 0 0 72px; width: 72px; border-radius: 50%; }

/* お問い合わせ（Googleフォームへの案内） */
.contact-form-link { border: 2px solid var(--accent); border-radius: 10px; padding: 16px; margin: 1.5em 0; text-align: center; background: #f3f8f5; }
.contact-form-link a { display: inline-block; margin-top: 8px; padding: 12px 24px; background: var(--accent); color: #fff; border-radius: 8px; text-decoration: none; font-weight: 700; }
.contact-form-note { font-size: .8rem; color: var(--sub); margin: 8px 0 0; }

/* サイト内検索 */
.search-page .pagefind-ui { --pagefind-ui-primary: #2a7a4f; --pagefind-ui-font: inherit; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 20px 16px 28px; font-size: .8rem; color: var(--sub); text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--sub); }
.copyright a { text-decoration: none; }
