/* ============================================================
   CreamCode 共通のCSS（HPの全ページで同じ物だけ）
   色・文字・余白の変数／ボタン／文章だけのページ（プライバシーポリシー等）・ブログの一覧と記事
   ヘッダー・フッター・ページの先頭へ戻るは chrome.css（AI活用イメージと共通）
   ページ固有の見た目は、各ページの <style> に置く（設計メモ §12）
   色の名前：-bg・-text・-mute・-link は、読みやすさの機械確認の対象
   ============================================================ */
:root {
  --bg: #ffffff;
  --soft-bg: #f3f5f7;
  --text: #242e3c;
  --mute: #4a5261;
  --link: #14688c;

  --rule: #3aabd6;
  --grid: rgba(58, 171, 214, 0.16);
  --grid-strong: rgba(58, 171, 214, 0.30);
  --marker: rgba(58, 171, 214, 0.34);
  --tint: rgba(58, 171, 214, 0.12);
  --hair: #d6dbe1;
  --stamp: #e8946a;
  --stamp-deep: #de8355;
  --band: #242e3c;
  --paper: #ffffff;

  --wrap: 1280px;
  --head-h: 68px;
  --disp: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase;
  line-break: strict;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--rule); outline-offset: 3px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.note { color: var(--mute); font-size: 0.94rem; }
.nb { display: inline-block; }
.center { text-align: center; }

/* 読み上げ・キーボード用：本文へ飛ぶ */
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 14px; border: 2px solid var(--text); }

/* ボタン（押せる物には矢印） */
.btn {
  display: inline-block;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.3;
  text-decoration: none;
  padding: 0.95em 1.7em;
  border: 2px solid var(--text);
}
.btn-main { background: var(--stamp); color: #4a2410; border: 1px solid #4a2410; }
.btn-main:hover { background: var(--stamp-deep); }
.btn-main::after { content: "→"; margin-left: 0.6em; }

/* ---------- 文章だけのページ（プライバシーポリシー・送信完了・404） ---------- */
.doc-in { max-width: 860px; padding: 72px 0 96px; }
.doc h1 { font-family: var(--disp); font-weight: 900; font-size: 2.12rem; line-height: 1.4; margin: 0 0 36px; }
.doc-body h2 { font-family: var(--disp); font-weight: 900; font-size: 1.36rem; line-height: 1.5; margin: 48px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.doc-body p { margin: 0 0 1.1em; }
.doc-body table { border-collapse: collapse; width: 100%; margin: 10px 0 20px; }
.doc-body th, .doc-body td { border: 1px solid var(--hair); padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.7; }
.doc-body th { background: var(--soft-bg); font-weight: 700; }
.doc-body figure { margin: 0; overflow-x: auto; }
.doc-body .btn { margin-top: 12px; }
/* 見つからないページ（今の本番の404の並び＝見出し・絵・文・TOPへ。すべて中央） */
.nf .doc-in { text-align: center; }
.nf h1 { font-size: 1.65rem; }
.nf-img { margin: 0 auto 28px; width: min(452px, 100%); }
.nf-img img { width: 100%; }
.nf-go { margin-top: 32px; }
@media (max-width: 900px) {
  .doc-in { padding: 48px 0 72px; }
  .doc h1 { font-size: 1.65rem; }
}

/* ---------- ブログ（一覧・記事） ---------- */
.blog-in { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding: 44px 0 96px; align-items: start; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 0.94rem; color: var(--mute); }
.crumbs li + li::before { content: "›"; margin: 0 0.6em; color: var(--mute); }
.crumbs a { color: var(--mute); }
.blog-title { font-family: var(--disp); font-weight: 900; font-size: 2.12rem; line-height: 1.4; margin: 18px 0 8px; }
.blog-lead { color: var(--mute); }
.cat { display: inline-block; font-family: var(--disp); font-weight: 700; font-size: 0.94rem; color: var(--text); text-decoration: none; padding: 1px 10px; border: 1px solid var(--text); background: var(--bg); line-height: 1.6; }
a.cat:hover { background: var(--soft-bg); }

/* 一覧のカード */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; margin-top: 36px; }
.card a.card-link { display: block; color: var(--text); text-decoration: none; }
.card .eye { border: 2px solid var(--text); background: var(--soft-bg); }
.card .eye img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card .card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; color: var(--mute); font-size: 0.94rem; }
.card h2, .card h3 { font-family: var(--disp); font-weight: 900; font-size: 1.18rem; line-height: 1.55; margin: 8px 0 0; }
.card a.card-link:hover h2, .card a.card-link:hover h3 { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.card .excerpt { margin-top: 8px; color: var(--mute); line-height: 1.75; }

/* ページ送り */
.pager { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 56px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 14px; border: 2px solid var(--text); font-family: var(--disp); font-weight: 700; text-decoration: none; color: var(--text); background: var(--bg); }
.pager span[aria-current="page"] { background: var(--text); color: var(--paper); }
.pager a:hover { background: var(--soft-bg); }

/* 記事 */
.post-head h1 { font-family: var(--disp); font-weight: 900; font-size: 2.12rem; line-height: 1.5; margin: 18px 0 14px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--mute); font-size: 0.94rem; }
.post-eye { margin: 28px 0 0; border: 2px solid var(--text); }
.post-eye img { width: 100%; height: auto; }
.post-body { margin-top: 40px; line-height: 1.95; }
.post-body > * + * { margin-top: 1.3em; }
.post-body h2 { font-family: var(--disp); font-weight: 900; font-size: 1.55rem; line-height: 1.5; margin-top: 2.6em; padding: 10px 0 10px 18px; border-left: 6px solid var(--rule); background: var(--soft-bg); }
.post-body h3 { font-family: var(--disp); font-weight: 700; font-size: 1.24rem; line-height: 1.55; margin-top: 2em; padding-bottom: 6px; border-bottom: 2px solid var(--hair); }
.post-body strong { font-weight: 700; background: linear-gradient(transparent 64%, var(--marker) 64%); }
.post-body ul { padding-left: 1.4em; list-style: disc; }
.post-body ol { padding-left: 1.6em; list-style: decimal; }
.post-body li + li { margin-top: 0.3em; }
.post-body figure { margin-inline: 0; }
.post-body figure img { width: 100%; height: auto; }
.post-body hr { border: 0; border-top: 1px solid var(--hair); margin-block: 2.4em; }
.post-body .wp-block-table { overflow-x: auto; }
.post-body table { border-collapse: collapse; width: 100%; min-width: var(--table-width, auto); line-height: 1.7; }
.post-body th, .post-body td { border: 1px solid var(--hair); padding: 10px 12px; text-align: left; vertical-align: top; }
.post-body th { background: var(--soft-bg); font-weight: 700; }
.post-body .scroll-hint { display: none; color: var(--mute); font-size: 0.94rem; }
.post-body .scroll-hint::after { content: " →"; }

/* 目次（本文の中だけ） */
.toc { border: 2px solid var(--text); padding: 22px 26px 20px; background: var(--bg); }
.toc-title { font-family: var(--disp); font-weight: 900; font-size: 1.12rem; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; counter-reset: toc; }
.toc > ol > li { counter-increment: toc; padding: 6px 0; border-top: 1px solid var(--hair); }
.toc > ol > li:first-child { border-top: 0; }
.toc > ol > li > a::before { content: counter(toc) ". "; font-family: var(--disp); font-weight: 700; color: var(--link); }
.toc li a { color: var(--text); text-decoration: none; }
.toc li a:hover { text-decoration: underline; }
.toc ol ol { padding-left: 1.4em; margin-top: 2px; }
.toc ol ol li { font-size: 0.94rem; line-height: 1.7; padding: 3px 0; color: var(--mute); }
.toc ol ol li::before { content: "– "; }

/* 記事の最後の相談の帯（記事ごとに出す／出さないを選ぶ） */
.post-cta { margin-top: 56px; padding: 32px 30px; background: var(--band); color: var(--paper); }
.post-cta p { color: var(--paper); }
.post-cta .cta-title { font-family: var(--disp); font-weight: 900; font-size: 1.36rem; line-height: 1.5; }
.post-cta .btn-main { margin-top: 20px; border-color: var(--stamp); }

/* シェア */
.share { margin-top: 56px; padding-top: 22px; border-top: 2px solid var(--text); }
.share-title { font-family: var(--disp); font-weight: 700; }
.share ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.share a, .share button { display: inline-block; font: inherit; font-family: var(--disp); font-weight: 700; font-size: 0.94rem; color: var(--text); text-decoration: none; background: var(--bg); border: 2px solid var(--text); padding: 0.5em 1em; cursor: pointer; line-height: 1.4; }
.share a:hover, .share button:hover { background: var(--soft-bg); }
.share .copied { margin-top: 8px; color: var(--mute); font-size: 0.94rem; }

/* 前後の記事 */
.post-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.post-pn a { display: block; padding: 16px 18px; border: 2px solid var(--text); color: var(--text); text-decoration: none; line-height: 1.6; }
.post-pn a:hover { background: var(--soft-bg); }
.post-pn .dir { display: block; font-family: var(--disp); font-weight: 700; color: var(--link); font-size: 0.94rem; }
.post-pn .next { text-align: right; grid-column: 2; }

/* 関連する記事 */
.related { margin-top: 64px; }
.related > h2 { font-family: var(--disp); font-weight: 900; font-size: 1.36rem; padding-bottom: 10px; border-bottom: 2px solid var(--text); }
.related .cards { margin-top: 24px; gap: 28px 24px; }
.related .card h3 { font-size: 1.06rem; }

/* サイドバー */
.side { display: grid; gap: 40px; position: sticky; top: calc(var(--head-h) + 24px); }
.side h2 { font-family: var(--disp); font-weight: 900; font-size: 1.12rem; padding-bottom: 8px; border-bottom: 2px solid var(--text); margin: 0; }
.side-list li { padding: 12px 0; border-bottom: 1px solid var(--hair); line-height: 1.6; }
.side-list a { color: var(--text); text-decoration: none; }
.side-list a:hover { text-decoration: underline; }
.side-list time { display: block; color: var(--mute); font-size: 0.94rem; }
.side-banner a { display: block; border: 2px solid var(--text); }
.side-banner img { width: 100%; height: auto; }

@media (max-width: 900px) {
  .blog-in { grid-template-columns: 1fr; gap: 64px; padding: 28px 0 72px; }
  .side { position: static; }
  .blog-title, .post-head h1 { font-size: 1.65rem; }
  .post-body h2 { font-size: 1.36rem; }
  .post-body .scroll-hint { display: block; }
  .cards { gap: 36px 24px; }   /* タブレットでも2列のまま（11/17 MJ） */
  .post-pn { grid-template-columns: 1fr; }
  .post-pn .next { grid-column: auto; }
}
@media (max-width: 560px) {
  .cards, .related .cards { grid-template-columns: 1fr; }
}
