/* ============================================================
   MobiNote コラム（/guide/）共通スタイル
   LP（/index.html）のトークンをそのまま流用。
   方針: カードの敷き詰め・グラデーション・絵文字アイコンは使わない。
        罫線・余白・タイポグラフィだけで構造を作る。
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple: #6D28D9;
  --purple-light: #F5F3FF;
  --purple-mid: #DDD6FE;
  --text: #1E293B;
  --muted: #64748B;
  --bg: #F8FAFC;
  --white: #ffffff;
  --line: #E2E8F0;
  --line-soft: #EEF2F6;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV（LPと共通） ── */
nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 18px; font-weight: 800; color: var(--purple);
  letter-spacing: -0.5px; text-decoration: none;
}
.nav-link {
  font-size: 14px; font-weight: 600; color: var(--white);
  background: var(--purple); border-radius: 8px;
  padding: 8px 16px; text-decoration: none;
  transition: opacity .2s;
}
.nav-link:hover { opacity: .85; }

/* ── 共通コンテナ ── */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* ── パンくず ── */
/* 横スクロール可能なことを示すため、左右端に薄い影を出す。
   background-attachment: local/scroll の組み合わせで、
   端までスクロールしたら該当側の影が自然に消える（JS不要）。 */
.breadcrumb {
  font-size: 12px; color: var(--muted);
  padding: 20px 0 0;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
  background:
    linear-gradient(to right,  var(--bg) 45%, rgba(248,250,252,0)) left center,
    linear-gradient(to left,   var(--bg) 45%, rgba(248,250,252,0)) right center,
    linear-gradient(to right,  rgba(100,116,139,.20), rgba(100,116,139,0)) left center,
    linear-gradient(to left,   rgba(100,116,139,.20), rgba(100,116,139,0)) right center;
  background-repeat: no-repeat;
  background-size: 28px 100%, 28px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb ol { list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.breadcrumb a:hover { color: var(--purple); border-bottom-color: var(--purple-mid); }
.breadcrumb li + li::before { content: '/'; color: #CBD5E1; margin-right: 8px; }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ── 一覧ページ ヘッダー ── */
.index-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--purple); text-transform: uppercase;
  margin-bottom: 14px;
}
.index-header h1 {
  font-size: clamp(26px, 5.2vw, 34px);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.35;
  margin-bottom: 14px;
}
.index-header .lede {
  font-size: 15px; color: var(--muted); line-height: 1.9;
  max-width: 34em;
}

/* ── 記事一覧（罫線区切り・カードを敷き詰めない） ── */
.entry-list { list-style: none; }
.entry {
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}
.entry:last-child { border-bottom: none; }
.entry-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.entry-cat {
  color: var(--purple); font-weight: 700;
  border-left: 2px solid var(--purple-mid);
  padding-left: 8px;
}
.entry-title { font-size: clamp(18px, 3.4vw, 21px); font-weight: 700; line-height: 1.55; letter-spacing: -.01em; }
.entry-title a { color: var(--text); text-decoration: none; }
.entry-title a:hover { color: var(--purple); }
.entry-excerpt {
  font-size: 14px; color: var(--muted); line-height: 1.9;
  margin-top: 10px; max-width: 40em;
}
.entry-more {
  display: inline-block; margin-top: 12px;
  font-size: 13px; font-weight: 700; color: var(--purple);
  text-decoration: none;
}
.entry-more:hover { text-decoration: underline; }
.entry-more::after { content: ' →'; }

.list-note {
  font-size: 12px; color: #94A3B8; line-height: 1.9;
  padding: 28px 0 0; border-top: 1px solid var(--line);
  margin-top: 8px;
}

/* ============================================================
   記事ページ
   ============================================================ */
.article-header { padding: 28px 0 26px; border-bottom: 1px solid var(--line); }
.article-header h1 {
  font-size: clamp(24px, 5.2vw, 32px);
  font-weight: 800; line-height: 1.5; letter-spacing: -.02em;
  margin-bottom: 18px;
}
.article-header .lede {
  font-size: 15px; color: var(--muted); line-height: 2;
}
.article-dates {
  margin-top: 18px; font-size: 12px; color: #94A3B8;
  display: flex; flex-wrap: wrap; gap: 4px 16px;
}

/* 目次 */
.toc {
  margin: 32px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.toc h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 12px; text-transform: uppercase;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 8px; }
.toc li:last-child { margin-bottom: 0; }
.toc a {
  font-size: 14px; color: var(--text); text-decoration: none;
  display: flex; gap: 10px; line-height: 1.7;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--purple); font-weight: 700; font-size: 12px;
  flex-shrink: 0; padding-top: 2px;
}
.toc a:hover { color: var(--purple); }

/* 本文 */
.article-body { padding: 8px 0 0; }
.article-body h2 {
  font-size: clamp(19px, 3.8vw, 23px);
  font-weight: 800; line-height: 1.55; letter-spacing: -.01em;
  border-left: 4px solid var(--purple);
  padding-left: 14px;
  margin: 52px 0 20px;
  scroll-margin-top: 72px;
}
.article-body h3 {
  font-size: 17px; font-weight: 700; line-height: 1.6;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.article-body p {
  font-size: 16px; line-height: 2.05;
  margin-bottom: 26px;
}
.article-body a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { font-weight: 700; }
.article-body ul, .article-body ol {
  margin: 0 0 26px; padding-left: 0; list-style: none;
}
.article-body ol { counter-reset: li; }
.article-body li {
  font-size: 16px; line-height: 1.95;
  padding-left: 22px; position: relative;
  margin-bottom: 10px;
}
.article-body ul > li::before {
  content: ''; position: absolute; left: 4px; top: 14px;
  width: 6px; height: 1px; background: var(--purple);
}
.article-body ol > li { counter-increment: li; }
.article-body ol > li::before {
  content: counter(li) '.'; position: absolute; left: 0; top: 0;
  color: var(--purple); font-weight: 700; font-size: 14px;
}

/* 補足ブロック */
.note {
  border-left: 3px solid var(--purple-mid);
  background: var(--purple-light);
  padding: 18px 20px;
  margin: 0 0 26px;
}
.note p { font-size: 14px; line-height: 1.95; margin-bottom: 0; color: var(--text); }
.note p + p { margin-top: 12px; }
.note-label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--purple); margin-bottom: 8px;
}

/* 表 */
.table-scroll { overflow-x: auto; margin: 0 0 26px; -webkit-overflow-scrolling: touch; }
.article-body table {
  border-collapse: collapse; width: 100%; min-width: 420px;
  font-size: 14px; background: var(--white);
}
.article-body th, .article-body td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left; line-height: 1.7;
}
.article-body th { background: #F1F5F9; font-weight: 700; white-space: nowrap; }
/* ※ .article-body p より詳細度を上げないと font-size が効かない */
.article-body .table-caption { font-size: 12px; color: #94A3B8; margin: -18px 0 26px; line-height: 1.8; }

/* ── 表の横スクロール・ヒント ──
   (1) 表の上に小さな注記を常時出す（スクリーンリーダーにも伝わる確実な手段）
   (2) 右端をページ背景色へフェードさせ、続きがあることを視覚的に示す
       → スクロール駆動アニメーション対応ブラウザでは右端到達でフェードが消える。
         非対応ブラウザでは薄く出したままになる（JSは使わない方針のため） */
.article-body .table-hint {
  font-size: 12px; color: #94A3B8; line-height: 1.8;
  margin: 0 0 6px;
}
.table-wrap { position: relative; margin: 0 0 26px; }
.table-wrap > .table-scroll { margin-bottom: 0; }
.table-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 28px; pointer-events: none;
  background: linear-gradient(to right, rgba(248,250,252,0), var(--bg));
}
@keyframes table-edge-fade { from { opacity: 1; } to { opacity: 0; } }
@supports (animation-timeline: --probe) {
  .table-wrap { timeline-scope: --table-x; }
  .table-wrap > .table-scroll { scroll-timeline: --table-x inline; }
  /* 基底を opacity:0 にしておくと、スクロールが発生しない表（＝画面内に収まっている表）では
     タイムラインが非アクティブになりアニメーションが適用されない＝フェードが出ない。
     スクロールできる表では fill:both により開始側の値(1)が効き、右端で0になる。 */
  .table-wrap::after {
    opacity: 0;
    animation: table-edge-fade linear both;
    animation-timeline: --table-x;
    animation-range: 80% 100%;
  }
}

/* 出典 */
.sources { margin: 40px 0 0; border-top: 1px solid var(--line); padding-top: 24px; }
.sources h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase;
  margin: 0 0 12px; border: none; padding: 0;
}
/* ※ .article-body ol / li の指定を上書きするため、同等以上の詳細度で書く */
.sources ol { list-style: none; counter-reset: src li; margin-bottom: 0; }
.sources ol > li {
  counter-increment: src; font-size: 13px; color: var(--muted);
  line-height: 1.9; padding-left: 26px; position: relative; margin-bottom: 8px;
}
.sources ol > li::before {
  content: '[' counter(src) ']'; position: absolute; left: 0; top: 0;
  color: var(--purple); font-weight: 700; font-size: 12px;
}
.sources a { color: var(--muted); }

/* ── 記事末尾のアプリ紹介（記事内にはCTAを置かない・ここだけ） ── */
.article-cta {
  margin: 56px 0 0;
  border-top: 2px solid var(--text);
  padding: 26px 0 0;
}
.article-cta p {
  font-size: 14px; color: var(--muted); line-height: 1.95;
  margin-bottom: 18px; max-width: 38em;
}
.article-cta strong { color: var(--text); font-weight: 700; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--white);
  text-decoration: none; border-radius: 12px;
  padding: 12px 20px;
  transition: opacity .2s;
}
.store-btn:hover { opacity: .85; }
.store-btn svg { width: 24px; height: 24px; fill: var(--white); flex-shrink: 0; }
.store-sub { display: block; font-size: 11px; opacity: .75; }
.store-main { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }

/* 記事下ナビ */
.article-nav {
  margin: 40px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.article-nav a { color: var(--purple); text-decoration: none; font-weight: 700; }
.article-nav a:hover { text-decoration: underline; }
.article-nav a::before { content: '← '; }

/* ── FOOTER（LPと共通） ── */
footer.site-footer {
  margin-top: 72px;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  background: var(--white);
  font-size: 13px; color: var(--muted);
}
footer.site-footer a { color: #94A3B8; text-decoration: underline; margin: 0 8px; }
footer.site-footer a:hover { color: var(--muted); }
.footer-logo { font-size: 16px; font-weight: 800; color: var(--purple); margin-bottom: 12px; }
.footer-links { line-height: 2.2; }
