/* ポケ探の読み物ページの共通スタイル（2026-10-04）
   地図アプリ（index.html）と同じ白ベース＋紫。色・文字・角丸はここだけで決める。
   ヘッダー・パンくず・フッターの HTML は scripts/siteChrome.js が作る（手書きページは
   <!-- site:header --> 〜 <!-- /site:header --> の間を `node scripts/siteChrome.js apply` で差し替える） */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #F3F4F7; --line: #E2E5EB;
  --text: #141824; --sub: #596070; --faint: #7C8392;
  --accent: #4F46E5; --accent-ink: #3730A3; --accent-soft: #EEF0FF; --on-accent: #FFFFFF;
  --in: #15803D; --in-fill: #16A34A; --in-bg: #E6F5EB;
  --out: #C62828; --out-fill: #DC2626; --out-bg: #FDEBEB;
  --unk: #565D6B; --unk-bg: #EEF0F3;
  --ns: #8A5A00; --ns-bg: #FFF5D1;
  --focus: #F59E0B;
  --shadow: 0 2px 10px rgba(20, 24, 36, .10), 0 0 0 1px rgba(20, 24, 36, .05);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px; line-height: 1.75; letter-spacing: .02em;
  word-break: keep-all; overflow-wrap: anywhere; /* 文節（<wbr>）でだけ改行。長すぎる語だけ例外的に折る */
}
img, video { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── ヘッダー（アプリと同じロゴ・右に「地図で探す」） ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.site-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none;
  font-size: 19px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.site-logo:hover { text-decoration: none; }
.site-logo-icon { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--accent); display: grid; place-items: center; flex: none; }
.site-logo-icon::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.site-cta { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.site-cta:hover { background: var(--accent-ink); text-decoration: none; }

/* ── パンくず ── */
.crumb { font-size: 13px; color: var(--sub); margin: 14px 0 0; }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb li + li::before { content: '›'; margin-right: 6px; color: var(--faint); }
.crumb a { color: var(--sub); }

/* ── 見出し・本文 ── */
h1 { font-size: 23px; line-height: 1.45; letter-spacing: .01em; margin: 10px 0 10px; font-weight: 900; }
h2 { font-size: 19px; line-height: 1.45; margin: 44px 0 14px; padding-left: 12px; border-left: 4px solid var(--accent); font-weight: 900; }
h3 { font-size: 16px; line-height: 1.5; margin: 24px 0 8px; font-weight: 700; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.4em; }
li { margin: 4px 0; }
.lead { color: var(--sub); font-size: 15px; }
.updated, .note { font-size: 12.5px; color: var(--sub); }
.updated { margin: 0 0 16px; }
strong, b { font-weight: 700; }
mark { background: linear-gradient(transparent 60%, #FFF0A8 60%); color: inherit; padding: 0 1px; }

/* ── 答えの箱（ページの冒頭で結論を出す） ── */
.answer { border-radius: var(--radius); background: var(--accent-soft); padding: 14px 16px; margin: 0 0 18px; }
.answer > :last-child { margin-bottom: 0; }
.answer-title { font-weight: 900; color: var(--accent-ink); margin: 0 0 6px; }

/* ── ボタン ── */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15.5px; text-decoration: none; text-align: center; border: 0; cursor: pointer; }
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn-ghost { background: var(--bg); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }

/* ── カード・入口の一覧 ── */
.cards { display: grid; gap: 10px; margin: 0 0 16px; }
@media (min-width: 640px) { .cards.two { grid-template-columns: 1fr 1fr; } }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface);
  color: var(--text); text-decoration: none; transition: box-shadow .15s, border-color .15s; }
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15.5px; color: var(--text); }
a.card .card-title::after { content: ''; flex: none; width: 8px; height: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.card-sub { display: block; font-size: 13px; color: var(--sub); margin-top: 2px; line-height: 1.6; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: middle; }
.tag.in { background: var(--in-bg); color: var(--in); }
.tag.out { background: var(--out-bg); color: var(--out); }

/* ── 数字の箱 ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 6px; text-align: center; }
.stat-num { display: block; font-size: 22px; font-weight: 900; color: var(--accent); line-height: 1.3; }
.stat-label { display: block; font-size: 11px; color: var(--sub); line-height: 1.4; }

/* ── 表 ── */
.table-wrap { overflow-x: auto; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.data-table th { background: var(--surface2); color: var(--sub); padding: 8px 7px; font-size: 11.5px; font-weight: 700; text-align: left; overflow-wrap: normal; }
.data-table td { padding: 8px 7px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:nth-child(even) td { background: #FAFAFC; }
.data-table td small { display: block; font-size: 11px; color: var(--sub); }
.data-table .num { text-align: center; white-space: nowrap; }
.in-count { color: var(--in); font-weight: 700; }
.out-count { color: var(--out); font-weight: 700; }

/* ── よくある質問 ── */
.faq { border-top: 1px solid var(--line); padding: 14px 0 2px; }
.faq h3 { margin-top: 0; }
.faq h3::before { content: 'Q. '; color: var(--accent); }

/* ── リンクの一覧 ── */
ul.links { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
ul.links li { margin: 0; }
ul.links li + li { border-top: 1px solid var(--line); }
ul.links a { display: block; padding: 12px 16px; font-weight: 700; font-size: 14.5px; }

/* ── 動画（使い方） ── */
.video { display: block; width: 100%; max-width: 320px; aspect-ratio: 9 / 16; margin: 0 auto 16px; border-radius: 16px; background: #000; box-shadow: var(--shadow); } /* 枠の縦横比を先に決めて、表示のずれを防ぐ */

/* ── 手順 ── */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 0 40px; margin: 0 0 14px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 900; font-size: 14px; display: grid; place-items: center; line-height: 1; }

/* ── フッター ── */
.site-footer { margin-top: 56px; background: var(--surface2); border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; color: var(--sub); }
.site-footer .cols { display: grid; gap: 20px; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: repeat(3, 1fr); } }
.site-footer h2 { font-size: 13px; margin: 0 0 6px; padding: 0; border: 0; color: var(--text); font-weight: 900; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-footer li { margin: 0; }
.site-footer a { color: var(--sub); }
.site-footer .bottom { margin: 24px 0 0; font-size: 12px; }
.site-footer .bottom .site-logo { font-size: 16px; }
.site-footer .bottom .site-logo-icon { width: 18px; height: 18px; }
