@charset "utf-8";
/* ============================================================
   記事ページ（single）  —  article.css
   前提: es-base.css（トップと同じトークン／ヘッダー／フッター）の後に読み込む
   トークンは再定義しない。ここは記事ページ固有のみ。
   ============================================================ */

.reveal { opacity: 1 !important; transform: none !important; }

:root {
  --c-care: var(--mag);
  --c-local: var(--blue);
  --c-cost: var(--green);
  --c-staff: #a4761f;
  --read: 720px;          /* 本文の測り */
  --aside: 268px;         /* サイドの幅 */
}

/* ── パンくず ─────────────────────────────────────────── */
.crumbs { border-bottom: 1px solid var(--line); background: var(--paper); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 13px 0; font-size: 12.5px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--mag); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li + li::before { content: "／"; margin-right: 8px; color: #bcae9a; }
.crumbs [aria-current] { color: var(--ink); }

/* ── 記事ヘッダー ─────────────────────────────────────── */
.article-head { padding: clamp(34px, 5vw, 64px) 0 0; }
.article-head-inner { max-width: var(--read); }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.kind { font-size: 11.5px; letter-spacing: .1em; font-weight: 700; white-space: nowrap; padding-left: 12px; position: relative; color: var(--c-care); }
.kind::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.kind.is-local { color: var(--c-local); }
.kind.is-cost { color: var(--c-cost); }
.kind.is-staff { color: var(--c-staff); }
.article-meta time { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.article-meta .updated { font-size: 12.5px; color: var(--ink-2); }
.article-title {
  font-family: var(--mincho); font-weight: 600;
  font-size: clamp(26px, 3.7vw, 42px); line-height: 1.5; letter-spacing: .01em;
  margin: 0 0 22px; color: var(--ink);
}
.article-summary {
  border-left: 3px solid var(--mag); padding: 4px 0 4px 20px;
  margin: 0 0 clamp(28px, 4vw, 42px); font-size: 15.5px; line-height: 2; color: var(--ink-2);
}
.article-hero { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: clamp(30px, 4vw, 50px); }
.article-hero img { width: 100%; height: auto; display: block; }

/* ── 2カラム ─────────────────────────────────────────── */
.article-layout {
  display: grid; grid-template-columns: minmax(0, var(--read)) var(--aside);
  gap: clamp(30px, 4vw, 64px); align-items: start;
  padding-bottom: clamp(40px, 5vw, 70px);
}

/* ── サイド ──────────────────────────────────────────── */
.side { position: sticky; top: calc(var(--header-height) + 20px); }
.side-toc {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  padding: 20px 20px 16px; margin-bottom: 18px;
  max-height: calc(100vh - var(--header-height) - 250px); overflow-y: auto;
  overscroll-behavior: contain;
}
.side-toc h2 { font-family: var(--mincho); font-size: 14px; font-weight: 600; margin: 0 0 12px; letter-spacing: .06em; }
.side-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.side-toc > ol > li { counter-increment: toc; border-top: 1px dotted var(--line); padding-bottom: 2px; }
.side-toc > ol > li:first-child { border-top: 0; }
.side-toc > ol > li > a { display: grid; grid-template-columns: 1.9em 1fr; gap: 2px; padding: 9px 0 7px; font-size: 12.8px; line-height: 1.65; color: var(--ink-2); text-decoration: none; }
.side-toc > ol > li > a::before { content: counter(toc, decimal-leading-zero); color: var(--mag); font-size: 10.5px; padding-top: .25em; letter-spacing: .04em; }
.side-toc a:hover { color: var(--mag); }
/* h3（入れ子） */
.side-toc ol ol { padding: 0 0 8px 1.9em; }
.side-toc ol ol li { border: 0; }
.side-toc ol ol a { display: block; position: relative; padding: 5px 0 5px 12px; font-size: 12px; line-height: 1.6; color: var(--ink-2); text-decoration: none; opacity: .82; }
.side-toc ol ol a::before { content: ""; position: absolute; left: 0; top: .95em; width: 6px; height: 1px; background: #bcae9a; }
.side-ask { border-radius: 12px; background: var(--ink); color: var(--cream); padding: 22px 20px; }
.side-ask p { margin: 0 0 14px; font-size: 13px; line-height: 1.85; }
.side-ask strong { display: block; font-family: var(--mincho); font-size: 15.5px; margin-bottom: 8px; font-weight: 600; }
.side-ask .button { width: 100%; justify-content: center; font-size: 13.5px; padding: 12px 10px; }
.side-ask .tel { display: block; margin-top: 12px; text-align: center; font-size: 12.5px; color: rgba(251, 246, 236, .72); text-decoration: none; }
.side-ask .tel b { display: block; font-size: 17px; color: var(--yellow); font-variant-numeric: tabular-nums; letter-spacing: .01em; margin-top: 2px; }

/* モバイル用の折りたたみ目次（PCでは隠す） */
.toc-mobile { display: none; }

/* ── 本文 ────────────────────────────────────────────── */
.article-body { font-size: 16.5px; line-height: 2.05; color: var(--ink); }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.7em; }
.article-body a { color: var(--mag-deep); text-underline-offset: 3px; }
.article-body strong { font-weight: 700; background: linear-gradient(transparent 64%, rgba(243, 229, 43, .55) 64%); }

.article-body h2 {
  font-family: var(--mincho); font-weight: 600;
  font-size: clamp(21px, 2.4vw, 27px); line-height: 1.55; letter-spacing: .01em;
  margin: 3em 0 1em; padding-top: 1.1em; border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.article-body h3 {
  font-family: var(--mincho); font-weight: 600; font-size: 18.5px; line-height: 1.7;
  margin: 2.4em 0 .9em; padding-left: 14px; position: relative;
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.article-body h3::before { content: ""; position: absolute; left: 0; top: .34em; bottom: .34em; width: 3px; background: var(--mag); border-radius: 2px; }
.article-body h4 { font-size: 16px; font-weight: 700; margin: 2em 0 .7em; }

.article-body ul, .article-body ol { margin: 0 0 1.7em; padding-left: 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body ul:not([class]) { list-style: none; padding-left: 0; }
.article-body ul:not([class]) > li { position: relative; padding-left: 1.35em; }
.article-body ul:not([class]) > li::before { content: ""; position: absolute; left: .3em; top: .85em; width: 6px; height: 6px; border-radius: 50%; background: var(--mag); }

/* 表 */
.article-body .s_table,
.article-body .wp-block-table {
  overflow-x: auto;
  margin: 0 0 1.9em;
  -webkit-overflow-scrolling: touch;
}
.article-body .table-scroll { overflow-x: auto; margin: 0 0 1.9em; -webkit-overflow-scrolling: touch; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.85; min-width: 480px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 12px 15px; text-align: left; vertical-align: top; }
.article-body thead th { background: #f3e9d8; font-weight: 700; font-size: 13.5px; letter-spacing: .02em; white-space: nowrap; }
.article-body tbody tr:nth-child(even) { background: rgba(255, 253, 247, .7); }

/* 引用・注記 */
.article-body blockquote {
  margin: 0 0 1.8em; padding: 20px 24px; background: var(--paper);
  border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0;
  font-size: 15px; color: var(--ink-2);
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* 本文中のチェックリスト（既存 .earth-checklist のインライン装飾を上書き） */
.article-body .earth-checklist { border-top-color: var(--line) !important; }
.article-body .earth-checklist__item { border-bottom-color: var(--line) !important; }
.article-body .earth-checklist__box { border-color: var(--mag) !important; border-radius: 4px !important; }
.article-body .earth-checklist__text { color: var(--ink); }

.article-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ── 記事末の相談CTA ─────────────────────────────────── */
.ask {
  margin-top: clamp(40px, 5vw, 60px);
  border: 1px solid var(--line); border-radius: 16px; background: var(--cream);
  padding: clamp(28px, 4vw, 44px); text-align: center;
}
.ask .section-kicker { justify-content: center; }
.ask h2 { font-family: var(--mincho); font-weight: 600; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.6; margin: 12px 0 12px; }
.ask p { margin: 0 auto 22px; max-width: 30em; font-size: 15px; color: var(--ink-2); line-height: 1.95; }
.ask-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── タグ ────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin: clamp(30px, 4vw, 44px) 0 0; }
.tags a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; background: var(--paper); }
.tags a:hover { border-color: var(--mag); color: var(--mag); }

/* ── 前後の記事 ──────────────────────────────────────── */
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(26px, 3vw, 36px); }
.adjacent a { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 18px 20px; text-decoration: none; color: inherit; }
.adjacent a:hover { border-color: var(--mag); }
.adjacent span { display: block; font-size: 11px; letter-spacing: .14em; color: var(--mag); font-weight: 700; margin-bottom: 7px; }
.adjacent.is-next a { text-align: right; }
.adjacent h3 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.7; font-family: var(--mincho); }

/* ── 関連記事 ────────────────────────────────────────── */
.related { border-top: 1px solid var(--line); background: var(--paper); padding: clamp(44px, 5vw, 72px) 0; }
.related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 32px); }
.related-head h2 { font-family: var(--mincho); font-weight: 600; font-size: clamp(20px, 2.4vw, 27px); margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.rel-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.rel-figure { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); margin-bottom: 14px; }
.rel-figure img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2, .7, .3, 1); }
.rel-card:hover .rel-figure img { transform: scale(1.05); }
.rel-meta { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.rel-meta time { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rel-card h3 { font-family: var(--mincho); font-weight: 600; font-size: 16px; line-height: 1.7; margin: 0; }
.rel-card:hover h3 { color: var(--mag-deep); }

/* ── タブレット ──────────────────────────────────────── */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 40px; }
  .side-toc { display: none; }
  .side-ask { grid-column: 1 / -1; }
  .toc-mobile { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin: 0 0 2.4em; }
  .toc-mobile > summary { cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--mincho); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
  .toc-mobile > summary::-webkit-details-marker { display: none; }
  .toc-mobile > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--mag); border-bottom: 2px solid var(--mag); transform: rotate(45deg) translateY(-2px); transition: transform .25s; }
  .toc-mobile[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
  .toc-mobile ol { margin: 0; padding: 0 20px 16px; list-style: none; counter-reset: toc; }
  .toc-mobile > ol > li { counter-increment: toc; border-top: 1px dotted var(--line); }
  .toc-mobile > ol > li > a { display: grid; grid-template-columns: 2em 1fr; padding: 11px 0 9px; font-size: 14px; line-height: 1.7; color: var(--ink-2); text-decoration: none; }
  .toc-mobile > ol > li > a::before { content: counter(toc, decimal-leading-zero); color: var(--mag); font-size: 11px; padding-top: .3em; }
  .toc-mobile ol ol { padding: 0 0 8px 2em; }
  .toc-mobile ol ol li { border: 0; }
  .toc-mobile ol ol a { display: block; position: relative; padding: 6px 0 6px 13px; font-size: 13px; line-height: 1.65; color: var(--ink-2); text-decoration: none; opacity: .85; }
  .toc-mobile ol ol a::before { content: ""; position: absolute; left: 0; top: 1em; width: 7px; height: 1px; background: #bcae9a; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── スマートフォン ──────────────────────────────────── */
@media (max-width: 767px) {
  .article-title { font-size: 25px; line-height: 1.55; }
  .article-hero { border-radius: 12px; }
  .article-body { font-size: 16px; line-height: 1.98; }
  .article-body h2 { font-size: 20px; margin-top: 2.4em; }
  .article-body h3 { font-size: 17px; }
  .side { grid-template-columns: 1fr; }
  .adjacent { grid-template-columns: 1fr; }
  .adjacent.is-next a { text-align: left; }
  .related-grid { grid-template-columns: 1fr; gap: 26px; }
  .ask-actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .rel-figure img { transition: none; }
  .rel-card:hover .rel-figure img { transform: none; }
}
