/* タクメニュー — ガイド記事（エディトリアル設計）
   ══════════════════════════════════════════════════════════════════
   ■ 読む人: 検索から来た比較検討中の飲食店オーナー（ほぼスマホ）と、AIクローラー。
   ■ このファイルと scripts/build-guides.mjs の2箇所が記事デザインの全て。
     変更したら `npm run build:guides` で全記事が再生成される。
     個々の記事HTMLを直接編集しないこと（次の生成で消える）。

   ■ メリハリの設計（「均質な文字の壁」を壊す4つの装置）
     1. 節番号 — h2にCSSカウンタで 01/02/… を振る。位置の感覚が生まれる
     2. 帯の切替 — 本文は白、目次・表ヘッダ・FAQは沈色、CTAは墨。トーンで区切る
     3. 行長の規律 — 本文は最大42em。読みやすい行長は全角38〜45字
     4. 余白の階調 — 節間64px > 小見出し上32px > 段落間16px。間隔差=構造
   ══════════════════════════════════════════════════════════════════ */

.guide-page { background: var(--bg); }

/* ══════════ ナビ（記事専用シェル）══════════ */
.g-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.g-nav__in {
  max-width: 1020px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 12px; height: 60px;
}
/* 390px幅で「タクメニュー」と「ガイド一覧」が2行に折り返して壊れて見えていた。
   ロゴを縮まない要素にし、リンクは折り返さない指定にする。 */
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; flex: 0 0 auto; min-height: 44px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; }
.brand__tx { display: flex; flex-direction: column; line-height: 1.05; font-weight: 900; font-size: 17px; letter-spacing: -.015em; white-space: nowrap; }
.brand__tx em { font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); }
.g-nav__lk {
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft); text-decoration: none;
  white-space: nowrap; flex: 0 0 auto;
  display: inline-flex; align-items: center; min-height: 44px;
}
.g-nav__lk:hover { color: var(--ink); }
@media (max-width: 560px) { .g-nav__lk--wide { display: none; } }
/* 380px未満は「ガイド一覧」も畳む。CTAとロゴだけは必ず残す */
@media (max-width: 379px) { .g-nav__lk { display: none; } .brand__tx { font-size: 15.5px; } }
.g-nav__cta {
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 9px 15px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.g-nav__cta:hover { background: #000; }

/* ══════════ 記事ヘッダ ══════════ */
.article-wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.article-head { padding: 40px 0 8px; }
.article-head h1 {
  font-size: clamp(25px, 5.4vw, 36px); font-weight: 900; line-height: 1.45;
  letter-spacing: -.02em; margin-top: 14px;
}
.crumbs { font-size: 12.5px; color: var(--ink-faint); }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.article-meta { margin-top: 14px; font-size: 13px; color: var(--ink-faint); display: flex; gap: 14px; flex-wrap: wrap; }
.article-lead { margin-top: 18px; font-size: 16px; color: var(--ink-2); line-height: 2; }

/* 「この記事でわかること」— 結論の先出し。左の細いバーだけで示す（枠の多重を避ける） */
.takeaways {
  margin-top: 26px; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); padding: 16px 20px;
}
.takeaways__t { font-weight: 900; font-size: 12px; letter-spacing: .1em; color: var(--brand-dark); margin-bottom: 8px; }
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { font-size: 14.5px; margin: 6px 0; line-height: 1.8; }

/* 目次 — 沈色の面で本文と区別。番号は既定のolを活かす */
.toc { margin: 20px 0 8px; background: var(--bg-sunk); border-radius: var(--radius); padding: 18px 22px; }
.toc__t { font-weight: 900; font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { font-size: 14px; margin: 6px 0; font-weight: 500; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ══════════ 本文 ══════════ */
.article {
  padding: 8px 0 48px;
  font-size: 16px; line-height: 2; color: var(--ink);
  counter-reset: sec;
}
.article p { margin: 16px 0; }
.article ul, .article ol { margin: 16px 0; padding-left: 26px; }
.article li { margin: 8px 0; line-height: 1.9; }
.article a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.article strong { color: var(--ink); font-weight: 700; }
.article small { color: var(--ink-faint); }

/* 節見出し — 帯やグラデではなく「番号＋余白＋罫」で構造を示す。
   節上の64pxの余白が段落間(16px)との対比で「章が変わった」ことを伝える。 */
.article h2 {
  counter-increment: sec;
  font-size: clamp(20px, 4.4vw, 25px); font-weight: 900; line-height: 1.5;
  margin: 64px 0 18px; padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  background: none; border-left: none; border-radius: 0;
  scroll-margin-top: 76px;
}
.article h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-size: 13px; font-weight: 900; letter-spacing: .12em;
  color: var(--brand); margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.article h3 {
  font-size: clamp(17px, 3.8vw, 19.5px); font-weight: 800;
  margin: 36px 0 12px; padding-left: 13px; position: relative;
}
.article h3::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 4px; height: 1.05em; border-radius: 2px; background: var(--brand-tint);
}

/* 表 — ヘッダは墨。オレンジのヘッダは書類ではなくチラシに見える */
.tblwrap { overflow-x: auto; margin: 20px 0; position: relative; }
.tblwrap::after { content: "→ 横にスクロールできます"; display: block; font-size: 12.5px; color: var(--ink-faint); text-align: right; margin-top: 6px; }
@media (min-width: 720px) { .tblwrap::after { display: none; } }
.article table {
  width: 100%; border-collapse: separate; border-spacing: 0; min-width: 560px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; font-size: 14px;
}
.article th, .article td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.75; }
.article tbody tr:last-child th, .article tbody tr:last-child td { border-bottom: none; }
.article thead th { background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; border-bottom: none; }
.article tbody tr:nth-child(even) { background: var(--bg-sunk); }
.article th:first-child, .article td:first-child {
  position: sticky; left: 0; background: var(--card); z-index: 1;
  box-shadow: 2px 0 0 var(--line);
}
.article thead th:first-child { background: var(--ink); }
.article tbody tr:nth-child(even) td:first-child,
.article tbody tr:nth-child(even) th:first-child { background: var(--bg-sunk); }

/* ══════════ FAQ — LPと同じ「1枚＋区切り線」文法 ══════════ */
.article-faq { margin: 56px 0 0; }
.article-faq h2 { font-size: 21px; font-weight: 900; margin-bottom: 14px; border: none; padding: 0; }
.article-faq h2::before { content: none; }
.article-faq details { background: var(--card); border: 1px solid var(--line); border-bottom: none; padding: 0 18px; margin: 0; }
.article-faq details:first-of-type { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.article-faq details:last-of-type { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.article-faq summary { padding: 16px 0; font-weight: 700; font-size: 14.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-right: 3px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .18s ease;
}
.article-faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.article-faq details p { padding: 0 0 16px; color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.9; }

/* ══════════ 記事下 ══════════ */
.author-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-sunk); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 44px 0 0;
}
.author-box img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 9px; }
.author-box .who { font-weight: 800; font-size: 14px; }
.author-box p { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.85; }

.article-sources { margin-top: 34px; font-size: 12.5px; color: var(--ink-faint); }
.article-sources h2 { font-size: 14px; font-weight: 800; color: var(--ink-soft); margin-bottom: 8px; border: none; padding: 0; }
.article-sources h2::before { content: none; }
.article-sources ul { padding-left: 20px; margin: 6px 0; }
.article-sources li { margin: 4px 0; }
.article-sources a { color: var(--ink-faint); }

/* CTA — 墨のベタ面。オレンジのグラデ帯は使わない */
.article-cta {
  background: var(--ink); color: #fff;
  border-radius: var(--radius-lg); padding: 32px 24px; margin: 44px 0 0; text-align: center;
}
.article-cta h2 { font-size: 20px; font-weight: 900; border: none; margin: 0 0 8px; padding: 0; letter-spacing: -.01em; }
.article-cta h2::before { content: none; }
.article-cta p { margin: 0 0 18px; font-size: 14px; color: rgba(255, 255, 255, .8); line-height: 1.9; }
.article-cta .btn { background: #fff; color: var(--ink); min-height: var(--tap-lg); }
.article-cta .btn:hover { background: #f1f0ed; }

/* ══════════ ガイド一覧 ══════════ */
.guide-list { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 760px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--ink); text-decoration: none;
  transition: border-color .15s ease;
}
.guide-card:hover { border-color: var(--ink-faint); }
.guide-card .t { font-weight: 800; font-size: 15.5px; line-height: 1.6; letter-spacing: -.01em; }
.guide-card .d { margin-top: 7px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.guide-card .m { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); }

/* ══════════ フッタ（記事専用シェル）══════════ */
.g-foot { background: #141210; color: #a8a29a; margin-top: 72px; padding: 44px 0 32px; font-size: 13px; }
.g-foot__in { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
.g-foot .brand { color: #fff; }
.g-foot .brand__tx em { color: rgba(255, 255, 255, .55); }
.g-foot__desc { margin: 14px 0 0; line-height: 1.9; max-width: 480px; }
.g-foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.g-foot__links a { color: #e6e1da; text-decoration: none; display: inline-block; padding: 6px 0; }
.g-foot__links a:hover { color: #fff; text-decoration: underline; }
.g-foot__c { margin-top: 22px; font-size: 12px; color: #6f6a63; }

/* ══════════ 記事内の動画 ══════════
   スタッフ用ガイドのように「見せたほうが速い」ものを本文に置くためのもの。
   16:9を先に確保しておくので、読み込みで下の文章が跳ねない。 */
.g-video { margin: 22px 0; }
.g-video video {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); display: block;
  box-shadow: var(--shadow-md);
}
.g-video figcaption {
  margin-top: 10px; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft);
}

/* ══════════ 補足・但し書き ══════════
   数字の出どころや条件など、本文の主張に添える注記。
   本文と同じ見た目にすると読み飛ばされ、枠で囲むと本文より目立つ。
   左の罫線1本だけで「本文から一段下がった話」であることを示す。 */
.article p.note {
  border-left: 3px solid var(--line-strong);
  padding: 2px 0 2px 14px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--ink-2);
}
