/* 静的ページ（使い方・ご利用にあたって・プライバシー・行き方ガイド）の共通の見た目。
   色はアプリと同じく端末に合わせ、メニューの「表示の色」（localStorage の theme → <html data-theme>）があればそれに従う */
:root { --fg: #111; --bg: #fff; --muted: #666; --line: #ddd; --accent: #1565c0; --box: #f3f6fa; --head: #0d47a1; --headfg: #fff; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fg: #eee; --bg: #121212; --muted: #aaa; --line: #333; --accent: #64b5f6; --box: #1e2329; --head: #0b2547; color-scheme: dark; } }
:root[data-theme="dark"] { --fg: #eee; --bg: #121212; --muted: #aaa; --line: #333; --accent: #64b5f6; --box: #1e2329; --head: #0b2547; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.7 system-ui, -apple-system, sans-serif; color: var(--fg); background: var(--bg); }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー：ロゴ（地図を開く）と言語 */
/* ヘッダーは上に貼り付けておく（下へ読み進めたあとも、言語の切り替えと「地図を開く」にすぐ届く。
   スマホのブラウザはスクロールでアドレスバーが出入りし、ページの先頭まで戻りにくいことがある） */
.site-head { background: var(--head); color: var(--headfg); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
h2, h3, [id] { scroll-margin-top: 96px; } /* 目次から飛んだ見出しがヘッダーの下に隠れないように */
.site-head .wrap { display: flex; align-items: center; gap: 12px; min-height: 52px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.site-head .logo { display: flex; align-items: center; gap: 8px; color: var(--headfg); text-decoration: none; font-weight: 800; font-size: 18px; }
.site-head .logo img { width: 26px; height: 26px; }
.site-head .open { margin-left: auto; color: var(--headfg); background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 999px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.site-head .langs { width: 100%; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.site-head .langs a { color: var(--headfg); opacity: .85; }
.site-head .langs b { opacity: 1; }

main.wrap { padding-top: 8px; padding-bottom: 32px; }
h1 { font-size: 22px; margin: 16px 0 8px; line-height: 1.4; }
h2 { font-size: 19px; margin: 36px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
h3 { font-size: 16px; margin: 22px 0 6px; }
ol li, ul li { margin: 4px 0; }
small, .note, .src { color: var(--muted); }
.note, .src { font-size: 12px; }

/* フッター：ほかのページと問い合わせ */
.site-foot { border-top: 1px solid var(--line); background: var(--box); font-size: 14px; }
.site-foot .wrap { padding-top: 16px; padding-bottom: 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

/* 運営者情報 */
dl.operator { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; }
dl.operator dt { color: var(--muted); }
dl.operator dd { margin: 0; }

/* 使い方ページ */
nav.toc { background: var(--box); border-radius: 10px; padding: 10px 14px; }
nav.toc ul { margin: 0; padding-left: 1.2em; }
figure { margin: 12px 0; }
figure img { width: 100%; max-width: 360px; border: 1px solid var(--line); border-radius: 10px; display: block; }
figcaption { font-size: 13px; color: var(--muted); }
.box { background: var(--box); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.b { display: inline-block; min-width: 40px; text-align: center; padding: 1px 8px; border-radius: 5px; font-weight: 800; font-size: 13px; color: #fff; background: #0d47a1; border: 2px solid #fff; box-shadow: 0 0 0 1px #0d47a1; vertical-align: middle; }
.b.ghost { color: #0d47a1; background: #e3ecf8; border: 2px dashed #1565c0; box-shadow: none; }
.b.stale { opacity: .55; }
.b.fwd { border-right: 6px solid #ffd600; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #1565c0; vertical-align: middle; }
.ln { display: inline-block; width: 28px; height: 5px; border-radius: 3px; background: #1565c0; vertical-align: middle; }
.here { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #1e88e5; border: 2px solid #fff; box-shadow: 0 0 0 1px #1e88e5; vertical-align: middle; }

/* 行き方ガイド */
.ans { background: var(--box); padding: 12px; border-radius: 8px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; }
th:first-child, td.num { position: sticky; left: -16px; background: var(--bg); }
td.num { font-weight: 800; font-size: 18px; }
td.dest { white-space: normal; min-width: 10em; max-width: 16em; }
th.grp { text-align: center; border-bottom: 1px solid var(--muted); }
td.ref { color: var(--muted); }
.app { display: inline-block; margin: 12px 0; padding: 10px 16px; background: #1565c0; color: #fff; border-radius: 8px; text-decoration: none; }
