/* City Guide。Map / Home と同じ変数とパネル調。Three.js は無い。 */
:root {
  --ink: #042b5a;
  --ink-soft: #4d6480;
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(4, 43, 90, 0.14);
  --accent: #043a80;
  --teal: #09a7b2;
  --orange: #f99704;
  --purple: #6c5cb3;
  --tint: #e3f4f6;
  --shadow: 0 6px 28px rgba(4, 43, 90, 0.14);
  --radius: 14px;
}

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

body {
  min-height: 100vh;
  background: #dbe6f0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
}

a { color: var(--accent); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(4, 43, 90, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
pre {
  background: #0b1f3d;
  color: #e6eef8;
  padding: 12px 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 12px 0;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}

.guide {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4px 14px calc(48px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* --- 目次 --- */
.toc {
  position: sticky; top: 78px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 0.78rem;
}
.toc-home { display: block; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 8px; }
.toc-part h2 {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); margin: 10px 0 4px;
}
.toc ol { list-style: none; }
.toc .chapter-row > a { flex: 1; min-width: 0; }
.toc li a {
  display: block; padding: 4px 8px; border-radius: 7px;
  color: var(--ink); text-decoration: none; line-height: 1.45;
}
.toc li a:hover { background: var(--tint); color: var(--accent); }
.toc li a[aria-current="page"] { background: var(--ink); color: #fff; }

/* --- 本文 --- */
main {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px 30px;
}
main h1 { font-size: 1.5rem; line-height: 1.35; margin-bottom: 14px; }
main h2 { font-size: 1.05rem; margin: 26px 0 8px; padding-top: 6px; border-top: 1px solid var(--line); }
main h3 { font-size: 0.92rem; margin: 18px 0 6px; }
main p { margin: 0 0 12px; font-size: 0.94rem; }
main ul, main ol { margin: 0 0 12px 1.4em; font-size: 0.94rem; }
main li { margin-bottom: 4px; }
main blockquote {
  margin: 0 0 12px; padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(9, 167, 178, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
}
main blockquote p { margin: 0; }
main table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 0.86rem; }
main th, main td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
main th { background: rgba(4, 43, 90, 0.04); font-weight: 700; }

.crumb { font-size: 0.74rem; color: var(--ink-soft); margin-bottom: 4px; }
.crumb a { color: inherit; }

.lead { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 18px; }
.inline-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4em; height: 1.4em; border-radius: 50%; border: 1px solid var(--line);
  font: 700 0.8em/1 Georgia, serif; font-style: italic; vertical-align: -0.15em;
}

/* --- 目次ページ --- */
.index-part h2 { border-top: none; margin-top: 18px; }
.chapters { list-style: none; margin: 0; display: grid; gap: 8px; }
.chapters li {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
}
.chapters li a { text-decoration: none; }
.chapter-title { font-weight: 700; font-size: 0.96rem; }
.claim { font-size: 0.82rem; color: var(--ink-soft); margin: 2px 0 0; }

/* --- 完了チェック --- */
[data-guide-controls][hidden] { display: none; }
.chapter-row { display: flex; align-items: center; gap: 4px; }
.chapter-check {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 28px; min-height: 32px; padding: 4px;
  flex-shrink: 0; cursor: pointer; border-radius: 6px;
}
.chapter-check input {
  width: 17px; height: 17px; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}
.chapter-check:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.progress-summary { font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 8px; }
.progress-note { font-size: 0.78rem; color: var(--ink-soft); margin: 4px 0 0; }
.chapter-completion { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.chapter-completion .chapter-check { font-size: 0.9rem; font-weight: 700; }
.chapters .claim { margin-left: 32px; }

/* --- 前後 --- */
.pager {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 0.84rem;
}
.pager a { text-decoration: none; font-weight: 700; }
.pager .next { text-align: right; margin-left: auto; }

/* --- モバイル --- */
@media (max-width: 820px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 10px; padding-right: 10px; }
  .toc { position: static; }
  .chapter-check { min-width: 36px; min-height: 44px; justify-content: center; }
  .chapters .claim { margin-left: 40px; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 2px; }
  main { padding: 18px 16px 22px; }
}
