/*
 * 鉄道マップ全国版 — テキストコンテンツページ共通スタイル
 *
 * 適用範囲: /about, /privacy, /terms, /faq, /routes/*, /topics/*, /trips/* など
 *           マップ画面 (/) には適用しない (index.html は専用CSS)。
 *
 * 設計方針:
 *  - 読みやすさ最優先。max-width 720px のシングルカラム
 *  - 日本語フォントは OS 標準を使用 (BlinkMacSystemFont / Hiragino)
 *  - 色は薄いブルー基調 (#2563eb)。マップ画面と同系統で統一感
 *  - レスポンシブ: 600px以下でパディング・フォントサイズ調整
 */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a202c;
  --color-text-muted: #64748b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-warning-bg: #fef3c7;
  --color-warning-border: #f59e0b;
  --max-width: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   サイトヘッダー (全コンテンツページ共通)
   ───────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.site-logo {
  font-size: 16px; font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.site-logo:hover { color: var(--color-text); text-decoration: none; }
.site-nav { display: flex; gap: 20px; font-size: 14px; }
.site-nav a {
  color: var(--color-text-muted); font-weight: 500;
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--color-accent); font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   パンくず
   ───────────────────────────────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px 0;
  font-size: 13px;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb__separator { margin: 0 6px; opacity: 0.5; }

/* ─────────────────────────────────────────────────────────────
   記事本体
   ───────────────────────────────────────────────────────────── */
.article {
  max-width: var(--max-width);
  margin: 16px auto 32px;
  padding: 32px 28px 40px;
  background: var(--color-surface);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.article h1 {
  font-size: 28px; line-height: 1.4;
  margin: 0 0 8px;
}
.article h2 {
  font-size: 22px; line-height: 1.4;
  margin: 36px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-border);
}
.article h3 {
  font-size: 17px; line-height: 1.4;
  margin: 24px 0 10px;
}
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 24px; }
.article li { margin-bottom: 6px; }
.article blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg);
  color: var(--color-text-muted);
}
.article table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0; font-size: 14px;
}
.article th, .article td {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  text-align: left; vertical-align: top;
}
.article th { background: var(--color-bg); font-weight: 600; }
.article code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

.page-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

/* ─────────────────────────────────────────────────────────────
   マップへの誘導 CTA (記事中・記事末に挿入)
   ───────────────────────────────────────────────────────────── */
.map-cta {
  margin: 32px 0;
  padding: 24px;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  border-radius: 10px;
  text-align: center;
}
.map-cta__title {
  font-size: 17px; font-weight: 700;
  margin: 0 0 8px;
  color: #1e293b;
}
.map-cta__desc {
  margin: 0 0 16px;
  color: #475569;
  font-size: 14px;
}
.map-cta__button {
  display: inline-block;
  background: var(--color-accent);
  color: white !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600; font-size: 14px;
}
.map-cta__button:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   注意書きバナー (情報の鮮度・正確性を明示)
   ───────────────────────────────────────────────────────────── */
.disclaimer {
  margin: 20px 0;
  padding: 12px 16px;
  background: var(--color-warning-bg);
  border-left: 4px solid var(--color-warning-border);
  font-size: 13px;
  border-radius: 4px;
  line-height: 1.6;
}
.disclaimer strong { color: #92400e; }

/* ─────────────────────────────────────────────────────────────
   スピーチバルーン (記事中に挟む読者代弁コメント)
   ・サイト運営者の素朴な反応を見出しの前後に挟むことで、
     淡々と続く解説文の "AIっぽさ" を破り E-E-A-T を強化する。
   ・記事執筆時は .speech--draft を付けたプレースホルダを置く。
     コメント入力後に --draft を外して本番表示に。
   ───────────────────────────────────────────────────────────── */
.speech {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 0;
  max-width: 92%;
}
.speech__avatar {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: #fef3c7;
  border-radius: 50%;
  flex-shrink: 0;
}
.speech__bubble {
  position: relative;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #44403c;
}
/* 吹き出しの三角しっぽ (アバター側) */
.speech__bubble::before,
.speech__bubble::after {
  content: '';
  position: absolute;
  top: 14px;
  width: 0; height: 0;
  border-style: solid;
}
.speech__bubble::before {
  left: -8px;
  border-width: 6px 8px 6px 0;
  border-color: transparent #fed7aa transparent transparent;
}
.speech__bubble::after {
  left: -7px;
  border-width: 6px 8px 6px 0;
  border-color: transparent #fff7ed transparent transparent;
}

/* DRAFT 状態: 未編集が一目で分かる派手なスタイル。
   コメント入力後は HTML から speech--draft クラスを外す。 */
.speech--draft .speech__bubble {
  background: #fef9c3;
  border: 2px dashed #eab308;
  color: #854d0e;
  font-style: italic;
}
.speech--draft .speech__bubble::before {
  border-color: transparent #eab308 transparent transparent;
}
.speech--draft .speech__bubble::after { display: none; }

@media (max-width: 600px) {
  .speech { gap: 8px; margin: 18px 0; }
  .speech__avatar { width: 34px; height: 34px; font-size: 19px; }
  .speech__bubble { font-size: 13px; padding: 8px 12px; }
}

/* ─────────────────────────────────────────────────────────────
   お問い合わせフォーム (Google Forms iframe ラッパー)
   ───────────────────────────────────────────────────────────── */
.contact-form {
  margin: 20px 0;
}
.contact-form iframe {
  width: 100%;
  min-height: 820px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  display: block;
}
.contact-form__fallback {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   関連リンクセクション (記事末に配置)
   ───────────────────────────────────────────────────────────── */
.related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.related h2 {
  font-size: 18px;
  margin: 0 0 16px;
  padding: 0; border: none;
}
.related ul { list-style: none; padding: 0; margin: 0; }
.related li {
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}
.related li:last-child { border-bottom: none; }
.related a {
  display: block; font-weight: 600;
}
.related__desc {
  font-size: 13px; color: var(--color-text-muted);
  font-weight: normal;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────
   サイトフッター (全コンテンツページ共通)
   ───────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  padding: 40px 16px 24px;
  background: #1f2937;
  color: #cbd5e1;
  font-size: 13px;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-footer h4 {
  color: white;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: white; }
.site-footer__notice {
  font-size: 12px; color: #94a3b8;
  line-height: 1.6;
}
.site-footer__copyright {
  border-top: 1px solid #374151;
  padding-top: 20px; margin-top: 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────
   レスポンシブ (スマホ・タブレット縦)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .article {
    margin: 0 0 16px;
    border-radius: 0;
    padding: 24px 18px 32px;
    box-shadow: none;
  }
  .article h1 { font-size: 23px; }
  .article h2 { font-size: 19px; margin-top: 28px; }
  .article h3 { font-size: 16px; }
  .site-header__inner { gap: 16px; padding: 10px 14px; }
  .site-logo { font-size: 15px; }
  .site-nav { gap: 14px; font-size: 13px; }
  .breadcrumb { padding: 10px 14px 0; font-size: 12px; }
  .map-cta { padding: 20px 16px; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; }
}
