/* 散歩族 / SANPOZOKU — 一般向けの編集デザイン */
:root {
  --paper: #F6F2EA; --paper-2: #EFE9DD; --ink: #1F1D1A; --ink-2: #3A3631; --muted: #6E675E;
  --green: #4E6B52; --copper: #A0623A; --copper-2: #C08457; --line: #DCD3C3; --card: #FBF8F2;
  --serif-ja: "Noto Serif JP", "Yu Mincho", serif; --serif-en: "Source Serif 4", "Noto Serif JP", Georgia, serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
  --measure: 38rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171614; --paper-2: #201E1B; --ink: #EDE7DC; --ink-2: #D6CFC2; --muted: #A69E92;
    --green: #8DB092; --copper: #D49A6A; --copper-2: #E0AE84; --line: #3A3631; --card: #1E1C19;
  }
}
:root[data-theme="dark"] {
  --paper: #171614; --paper-2: #201E1B; --ink: #EDE7DC; --ink-2: #D6CFC2; --muted: #A69E92;
  --green: #8DB092; --copper: #D49A6A; --copper-2: #E0AE84; --line: #3A3631; --card: #1E1C19;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif-ja); line-height: 1.95;
  font-size: 17px; font-feature-settings: "palt" 0; overflow-x: hidden; }
body.en { font-family: var(--serif-en); line-height: 1.7; font-size: 18px; }
a { color: var(--copper); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--copper-2); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; } /* 年代比較などで非表示の要素が img の display 指定に負けないように */
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 99; }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 20px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 14px; }
.brand { font-family: var(--serif-ja); font-weight: 700; letter-spacing: .12em; color: var(--ink); text-decoration: none; font-size: 18px; }
.brand small { font-family: var(--sans); font-weight: 500; letter-spacing: .2em; font-size: 10px; color: var(--muted); margin-left: 8px; }
.head-nav { display: flex; gap: 14px; align-items: center; }
.head-nav a { color: var(--ink-2); text-decoration: none; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.owner-bar { font-family: var(--sans); font-size: 12px; background: var(--ink); color: var(--paper); padding: 6px 20px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.owner-bar a, .owner-bar button { color: var(--paper); background: none; border: 1px solid #fff4; border-radius: 4px; padding: 2px 8px; font: inherit; cursor: pointer; text-decoration: none; }

/* hero */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; color: #FAF6EE; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 25%, #000a 100%); }
.hero-inner { position: relative; z-index: 2; padding: 0 20px 56px; max-width: 1100px; margin: 0 auto; width: 100%; }
.kicker { font-family: var(--sans); letter-spacing: .18em; font-size: 12px; text-transform: uppercase; opacity: .9; }
.hero h1 { font-size: clamp(30px, 5.4vw, 60px); line-height: 1.3; margin: 12px 0 10px; font-weight: 700; letter-spacing: .02em; }
.en .hero h1 { letter-spacing: 0; line-height: 1.12; }
.hero .sub { font-size: clamp(16px, 2.2vw, 21px); opacity: .92; max-width: 46rem; }
.hero .credit { position: absolute; right: 12px; bottom: 8px; z-index: 2; font-family: var(--sans); font-size: 11px; opacity: .75; }

.hook { max-width: var(--measure); margin: 64px auto 24px; padding: 0 20px; font-size: clamp(22px, 3.1vw, 30px); line-height: 1.7; font-weight: 600; }
.en .hook { line-height: 1.4; }
.lede { max-width: var(--measure); margin: 0 auto 40px; padding: 0 20px; color: var(--ink-2); }

/* listening bar */
.listen { max-width: 980px; margin: 0 auto 40px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-family: var(--sans); font-size: 14px; }
.listen h2 { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; margin: 0 0 8px; color: var(--green); }
.listen audio { width: 100%; margin: 6px 0 4px; }
.chap-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chap-list button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.chap-list button[aria-current="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.listen .note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.mode { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }

/* chapters */
.chapter { max-width: 1100px; margin: 0 auto; padding: 32px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.chapter header { max-width: var(--measure); margin: 0 auto; width: 100%; }
.ch-num { font-family: var(--sans); color: var(--copper); letter-spacing: .2em; font-size: 12px; }
.chapter h2 { font-size: clamp(22px, 3vw, 30px); margin: 4px 0 8px; line-height: 1.45; }
.en .chapter h2 { line-height: 1.25; }
.look { max-width: var(--measure); margin: 6px auto 8px; width: 100%; font-family: var(--sans); font-size: 14px; background: var(--paper-2); border-left: 3px solid var(--green); padding: 10px 14px; border-radius: 0 8px 8px 0; color: var(--ink-2); }
.look b { color: var(--green); margin-right: 6px; }
.body { max-width: var(--measure); margin: 0 auto; width: 100%; }
.body p { margin: 0 0 1.1em; }
.ref a { text-decoration: none; font-family: var(--sans); font-size: 10px; color: var(--copper); padding: 0 1px; }
.src-num { font-family: var(--sans); color: var(--copper); font-size: 12px; margin-right: 6px; }
figure.fig { margin: 18px auto 26px; max-width: 980px; width: 100%; }
figure.fig img { border-radius: 6px; width: 100%; }
figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.onsite-btn { font: inherit; font-family: var(--sans); font-size: 13px; border: 1px dashed var(--green); color: var(--green); background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; margin-top: 4px; }
.onsite-btn[hidden] { display: none; }
.locked { max-width: var(--measure); margin: 0 auto; width: 100%; position: relative; color: var(--muted); }
.locked::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(#0000, var(--paper)); }

/* pivot */
.pivot { background: var(--ink); color: var(--paper); margin: 40px 0; padding: 72px 20px; }
.pivot .inner { max-width: 50rem; margin: 0 auto; }
.pivot .label { font-family: var(--sans); color: var(--copper-2); letter-spacing: .2em; font-size: 12px; }
.pivot p.line { font-size: clamp(22px, 3.2vw, 34px); line-height: 1.6; margin: 12px 0 0; font-weight: 600; }
.en .pivot p.line { line-height: 1.35; }

/* era compare */
.compare { max-width: 980px; margin: 18px auto 30px; padding: 0 20px; }
.compare .stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: #000; touch-action: pan-y; }
.compare .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .stage img.top { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: var(--paper); box-shadow: 0 0 0 1px #0004; pointer-events: none; }
.compare .tags { position: absolute; inset: 10px 10px auto 10px; display: flex; justify-content: space-between; font-family: var(--sans); font-size: 12px; pointer-events: none; }
.compare .tags span { background: #000a; color: #fff; padding: 3px 8px; border-radius: 4px; }
.compare .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-family: var(--sans); font-size: 13px; }
.compare input[type=range] { flex: 1 1 220px; accent-color: var(--copper); }
.compare .era-btns button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.compare .era-btns button[aria-pressed="true"] { background: var(--copper); color: #fff; border-color: var(--copper); }

/* map */
.mapwrap { max-width: 980px; margin: 10px auto 30px; padding: 0 20px; }
#map { height: 440px; border-radius: 8px; border: 1px solid var(--line); z-index: 1; }
.map-legend { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 6px; }
.poi-list { list-style: none; padding: 0; margin: 8px 0 0; font-family: var(--sans); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.poi-list button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 3px 10px; cursor: pointer; }

/* video, shorts */
.video { max-width: 980px; margin: 30px auto; padding: 0 20px; }
.video video { width: 100%; border-radius: 8px; background: #000; }
.shorts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.shorts video { width: 100%; aspect-ratio: 9/16; border-radius: 8px; background: #000; }
.section-title { max-width: 980px; margin: 48px auto 10px; padding: 0 20px; font-family: var(--sans); letter-spacing: .16em; font-size: 13px; color: var(--green); }

/* buy */
.buy { max-width: 980px; margin: 40px auto; padding: 28px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.buy h2 { margin: 0; font-size: 22px; }
.buy .price { font-family: var(--sans); color: var(--muted); }
.btn { display: inline-block; font-family: var(--sans); font-size: 15px; background: var(--copper); color: #fff; border: 0; border-radius: 8px; padding: 12px 20px; cursor: pointer; text-decoration: none; }
.btn.secondary { background: none; color: var(--ink); border: 1px solid var(--line); }
.test-note { font-family: var(--sans); font-size: 12px; color: var(--muted); }

/* sources */
details.sources { max-width: 980px; margin: 18px auto; padding: 0 20px; font-family: var(--sans); font-size: 14px; }
details.sources summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.src-item { border-top: 1px solid var(--line); padding: 10px 0; }
.src-item:target { background: color-mix(in srgb, var(--copper) 12%, transparent); }
.cat { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 6px; border: 1px solid var(--line); }
.cat.fact { border-color: var(--green); color: var(--green); }
.cat.hypothesis { border-color: var(--copper); color: var(--copper); }
.ev { color: var(--muted); font-size: 13px; margin: 4px 0 0 12px; }

/* cards & index */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.intro { padding: 72px 20px 24px; max-width: 1100px; margin: 0 auto; }
.intro h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.35; margin: 0 0 12px; }
.intro p { max-width: 40rem; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; margin: 24px 0 56px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; display: grid; }
.card img { aspect-ratio: 16/9; max-height: 420px; object-fit: cover; width: 100%; }
@media (min-width: 900px) { .cards:has(> .card:only-child) .card { grid-template-columns: 1.4fr 1fr; align-items: center; } .cards:has(> .card:only-child) .card img { height: 100%; max-height: 460px; } .cards:has(> .card:only-child) .c-body { padding: 28px 32px; } .cards:has(> .card:only-child) h3 { font-size: 28px; } }
.card .c-body { padding: 18px 20px 22px; }
.card h3 { margin: 6px 0; font-size: 22px; line-height: 1.45; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; margin-bottom: 72px; }
.region { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--card); }
.region .q { font-size: 15px; color: var(--ink-2); margin-top: 6px; line-height: 1.7; }
.region .status { font-family: var(--sans); font-size: 11px; color: var(--green); letter-spacing: .12em; }
footer.site { border-top: 1px solid var(--line); padding: 28px 20px 48px; font-family: var(--sans); font-size: 12px; color: var(--muted); }
footer.site .wrap { display: grid; gap: 6px; }

@media (max-width: 640px) {
  body { font-size: 16px; } body.en { font-size: 17px; }
  .hero { min-height: min(78vh, 620px); }
  #map { height: 360px; }
  .site-head { padding: 8px 14px; }
  .head-nav .hide-sm { display: none; }
  .hook { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .8s ease, transform .8s ease; }
.fade-in.on { opacity: 1; transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- 歩く体験：コースカード・道のりレール・地点・スタンプ・ミニプレイヤー ---- */
.course { max-width: 980px; margin: 0 auto 28px; padding: 22px 20px 20px; font-family: var(--sans); }
.course h2 { font-size: 13px; letter-spacing: .16em; color: var(--green); margin: 0 0 12px; }
.course-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.stat b { font-family: var(--serif-ja); font-size: 30px; line-height: 1.1; color: var(--ink); font-weight: 700; }
.en .stat b { font-family: var(--serif-en); }
.stat b small { font-size: 14px; margin-left: 2px; color: var(--muted); font-weight: 500; }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.course-start { margin: 14px 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.course-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.course-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

.walk-rail { position: sticky; top: 0; z-index: 35; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); font-family: var(--sans); margin: 0 0 8px; }
.rail-inner { max-width: 1100px; margin: 0 auto; padding: 6px 14px; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.rail-now { display: flex; align-items: center; gap: 10px; min-width: 0; font: inherit; background: none; border: 0; padding: 4px 2px; color: var(--ink); cursor: pointer; text-align: left; }
.rail-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--copper); color: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.rail-text { display: grid; min-width: 0; line-height: 1.35; }
.rail-stop { font-size: 11px; color: var(--green); font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-title { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-caret { color: var(--muted); font-size: 11px; transition: transform .2s; }
.rail-now[aria-expanded="true"] .rail-caret { transform: rotate(180deg); }
.rail-profile { position: relative; height: 40px; }
.rail-profile svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rail-profile path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rail-profile path.todo { stroke: var(--muted); stroke-opacity: .45; stroke-width: 2; stroke-dasharray: 2 5; }
.rail-profile path.done { stroke: var(--copper); stroke-width: 3; }
.rail-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--paper); border: 2px solid var(--muted); }
.rail-dot.passed { border-color: var(--copper); background: var(--copper); }
.rail-dot.stamped { border-color: var(--green); background: var(--green); }
.rail-elev { position: absolute; font-size: 10px; color: var(--muted); transform: translate(-50%, -170%); white-space: nowrap; letter-spacing: .02em; }
.rail-elev.below { transform: translate(-50%, 45%); }
.walker { position: absolute; width: 16px; height: 16px; margin: -17px 0 0 -8px; transition: left .25s ease-out, top .25s ease-out; }
.walker::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--copper); border: 2px solid var(--paper); box-shadow: 0 1px 3px #0005; }
.walker::after { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); }
.walk-rail.walking .walker { animation: sz-step .32s ease-in-out infinite alternate; }
@keyframes sz-step { from { margin-top: -17px; } to { margin-top: -20px; } }
.rail-stamps { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rail-list { max-width: 1100px; margin: 0 auto; padding: 4px 14px 12px; max-height: min(60vh, 520px); overflow: auto; }
.rail-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-list a { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.rail-list a:hover, .rail-list a[aria-current="step"] { background: var(--paper-2); }
.rail-list .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--copper); color: var(--copper); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.rail-list a[aria-current="step"] .n { background: var(--copper); color: var(--paper); }
.rail-list .tx { display: grid; line-height: 1.4; min-width: 0; }
.rail-list .s { font-size: 11px; color: var(--green); font-weight: 700; }
.rail-list .t { font-size: 14px; }
.rail-note { font-size: 11px; color: var(--muted); margin: 8px 6px 0; line-height: 1.6; }

/* 判子（スタンプ） */
.hanko { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed currentColor; color: var(--muted);
  font-family: var(--serif-ja); font-weight: 700; font-size: 16px; line-height: 1; flex: none; opacity: .55; }
.hanko.mini { width: 20px; height: 20px; font-size: 10px; border-width: 1.5px; }
.hanko.on, [aria-pressed="true"] > .hanko, .stamped > .slot > .hanko { color: var(--copper); border-style: solid; opacity: 1;
  background: color-mix(in srgb, var(--copper) 10%, transparent); transform: rotate(-12deg); }
.hanko.pop { animation: sz-stamp .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes sz-stamp { 0% { transform: scale(1.9) rotate(8deg); opacity: 0; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }

/* 地点（章見出し） */
.waypoint { display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.wp-pin { position: relative; isolation: isolate; width: 34px; height: 34px; display: grid; place-items: center; color: var(--paper); font-size: 12px; font-weight: 700; flex: none; }
.wp-pin::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--copper); }
.wp-stop { font-size: 13px; color: var(--green); font-weight: 700; letter-spacing: .03em; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; line-height: 1.5; }
.wp-elev { font-weight: 500; color: var(--muted); font-size: 12px; }
.chapter header .waypoint + h2 { margin-top: 10px; }

/* 見る → スタンプ */
.look { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.look-text b { color: var(--green); margin-right: 6px; }
.stamp-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: 11px; color: var(--ink-2); background: none; border: 0; cursor: pointer; padding: 2px 4px; min-width: 64px; }
.stamp-btn[aria-pressed="true"] { color: var(--copper); font-weight: 700; }
.stamp-btn:hover .hanko { opacity: 1; }

/* きょうのさんぽ */
.walk-end { max-width: 940px; margin: 48px auto 24px; padding: 26px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-family: var(--sans); }
@media (max-width: 980px) { .walk-end { margin-left: 14px; margin-right: 14px; } }
.walk-end h2 { font-size: 13px; letter-spacing: .16em; color: var(--green); margin: 0 0 14px; }
.stamp-card { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.stamp-card li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.stamp-card li.stamped { border-style: solid; border-color: color-mix(in srgb, var(--copper) 45%, var(--line)); color: var(--ink); }
.stamp-card .slot { position: relative; flex: none; }
.stamp-card .slot-n { position: absolute; right: -8px; bottom: -6px; font-size: 9px; background: var(--card); color: var(--muted); padding: 0 2px; border-radius: 4px; }
.walk-msg { font-size: 15px; color: var(--ink); margin: 0 0 12px; }

/* ミニプレイヤー */
.mini-player { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--ink); color: var(--paper); border-radius: 999px; box-shadow: 0 6px 24px #0004; font-family: var(--sans); font-size: 13px; }
.mini-player button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
.mini-player .mp-toggle { width: 38px; height: 38px; border-radius: 50%; background: var(--copper); color: var(--paper); flex: none; font-size: 14px; }
.mini-player .mp-up { width: 34px; height: 34px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); flex: none; }
.mp-info { flex: 1; min-width: 0; display: grid; gap: 5px; }
.mp-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-bar { height: 3px; background: color-mix(in srgb, var(--paper) 20%, transparent); border-radius: 3px; overflow: hidden; }
.mp-bar span { display: block; height: 100%; width: 0; background: var(--copper-2); }
.mp-follow { display: flex; align-items: center; gap: 4px; font-size: 11px; white-space: nowrap; opacity: .9; }
body.has-mini footer.site { padding-bottom: 96px; }

@media (max-width: 760px) {
  .rail-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 4px 14px 2px; }
  .rail-profile { grid-column: 1 / -1; grid-row: 2; height: 24px; margin: 4px 8px 4px; }
  .rail-elev { display: none; }
  .look { grid-template-columns: 1fr; gap: 6px; }
  .stamp-btn { flex-direction: row; justify-self: start; font-size: 12px; gap: 8px; padding: 2px 0; }
  .course-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 26px; }
  .mp-follow { display: none; }
}

/* ---- 行かずに歩く：上空からの眺め（窓）・道中・要点の層 ---- */
.course-qs { margin: 16px 0 14px; }
.course-qs h3 { font-size: 12px; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.course-qs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: q; }
.course-qs a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--paper-2); color: var(--ink); text-decoration: none; counter-increment: q; }
.course-qs a::before { content: "Q" counter(q); font-weight: 700; color: var(--copper); font-size: 13px; }
.course-qs .q { font-family: var(--serif-ja); font-size: 17px; line-height: 1.55; font-weight: 600; }
.en .course-qs .q { font-family: var(--serif-en); }
.course-qs .to { font-size: 12px; color: var(--green); white-space: nowrap; font-weight: 700; }
.course-qs a:hover { background: color-mix(in srgb, var(--copper) 12%, var(--paper-2)); }
.read-mode { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; font-size: 13px; }
.read-mode .rm-l { color: var(--muted); margin-right: 4px; }
.read-mode button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.read-mode button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* 窓と本文の並び（広い画面では本文の右に、狭い画面では上部に固定） */
.walkthrough { position: relative; }
.window { position: relative; overflow: hidden; background: var(--paper-2); font-family: var(--sans); display: flex; flex-direction: column; }
.win-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.win-map { position: absolute; inset: 0; background: var(--paper-2); }
.win-map.leaflet-container { font: inherit; background: var(--paper-2); }
.win-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -24px 0 0 -11px; z-index: 500; pointer-events: none; }
.win-pin::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--copper); border: 2.5px solid #fff; box-shadow: 0 2px 6px #0007; }
.win-pin::after { content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.win-pin { animation: sz-breathe 2.4s ease-in-out infinite; }
@keyframes sz-breathe { 50% { transform: translateY(-3px); } }
/* 札は1段：地点番号・地点名（狭い画面ではレールにあるので省く）・地図の種類（小さく） */
.win-tag { position: absolute; left: 10px; top: 10px; right: 10px; z-index: 600; display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; pointer-events: none; }
.win-tag > span { flex: none; background: color-mix(in srgb, #111 72%, transparent); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; line-height: 1.5; }
.win-tag .win-n { background: var(--copper); font-weight: 700; }
.win-tag .win-stop { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-tag .win-layer { flex: 0 1 auto; min-width: 0; background: color-mix(in srgb, #111 55%, transparent); font-size: 10.5px; padding: 2px 9px; border-radius: 10px; }
.win-tag .win-layer:empty, .win-tag .win-stop:empty, .win-tag .win-n:empty { display: none; }
.window .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, #fff 75%, transparent); }
/* 注記とたたむボタンは地図の外（すぐ下）に */
.win-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-top: 1px solid var(--line); background: var(--paper); }
.win-note { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 10.5px; line-height: 1.4; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.win-fold { flex: none; font: inherit; font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; background: var(--card); color: var(--ink); }
.window.folded { height: auto !important; min-height: 0; margin-bottom: 0 !important; background: none; overflow: visible; }
.window.folded .win-view, .window.folded .win-note { display: none; }
.window.folded .win-foot { border: 0; background: none; padding: 6px 14px; }

@media (min-width: 1100px) {
  .walkthrough.has-window { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 40%); column-gap: 8px; max-width: 1480px; margin: 0 auto; padding-right: 20px; }
  .walkthrough.has-window .walk-col { grid-column: 1; grid-row: 1; min-width: 0; }
  .walkthrough.has-window .window { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: calc(var(--rail-h, 64px) + 14px);
    height: calc(100vh - var(--rail-h, 64px) - 28px); border-radius: 16px; border: 1px solid var(--line); }
  .walkthrough.has-window .window.folded { position: sticky; }
  .walk-col .pivot { margin: 40px 20px; border-radius: 16px; padding: 56px 32px; }
}
@media (max-width: 1099.98px) {
  .walkthrough.has-window .window { --win-h: max(170px, min(30vh, 56vw)); position: sticky; top: var(--rail-h, 60px); z-index: 30; height: var(--win-h);
    border-bottom: 1px solid var(--line); transition: height .3s ease, margin-bottom .3s ease; }
  .walkthrough.has-window .window.folded { min-height: 0; border: 0; }
  .win-tag .win-stop { display: none; }   /* 地点名は上のレールに出ている */
  /* 全文を読んでいるあいだは細い帯に縮める（縮めた分は下の余白で補い、本文の位置は動かさない） */
  .walkthrough.has-window .window.compact { height: 92px; margin-bottom: calc(var(--win-h) - 92px); }
  .window.compact .win-foot { display: none; }
  .window.compact .win-tag { top: auto; bottom: 6px; right: 128px; }
  .window.compact .win-tag .win-n { display: none; }   /* 帯では番号を省く（上のレールに出ている） */
}
@media (max-width: 1099.98px) and (prefers-reduced-motion: reduce) { .walkthrough.has-window .window { transition: none; } }

/* 要点の層：ひとこと＋数字 */
.gist-wrap { max-width: var(--measure); margin: 2px auto 6px; width: 100%; }
.gist { margin: 0 0 12px; font-size: clamp(19px, 2.3vw, 23px); line-height: 1.75; font-weight: 600; color: var(--ink); }
.en .gist { line-height: 1.45; }
.gist-l { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; color: var(--copper); font-weight: 700; margin-bottom: 4px; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; font-family: var(--sans); }
.keys li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 9px; display: grid; gap: 2px; align-content: start; }
.keys b { font-family: var(--serif-ja); font-size: 26px; line-height: 1.15; font-weight: 700; color: var(--ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.en .keys b { font-family: var(--serif-en); }
.keys b small { font-size: 13px; margin-left: 2px; color: var(--muted); font-weight: 500; }
.keys span { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* くわしく読む（全文と出典） */
.deep { max-width: var(--measure); margin: 6px auto 4px; width: 100%; }
.deep > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--sans); font-size: 14px; font-weight: 700;
  color: var(--green); padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); width: fit-content; }
.deep > summary::-webkit-details-marker { display: none; }
.deep > summary::before { content: "＋"; font-weight: 700; }
.deep[open] > summary::before { content: "－"; }
.deep > summary small { font-weight: 500; color: var(--muted); font-size: 12px; }
.deep .d-less, .deep[open] .d-more { display: none; }
.deep[open] .d-less { display: inline; }
.deep[open] > summary { margin-bottom: 14px; }
.deep .body { max-width: none; }
/* 本筋から外れる話は別の枠に：余談（くわしく読むの中）／行く人へ（常に見える小さな欄） */
.aside-note { margin: 26px 0 6px; padding: 14px 16px 6px; background: var(--paper-2); border-radius: 12px; }
.aside-note > b { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; color: var(--copper); }
.aside-note h4 { margin: 4px 0 8px; font-size: 15px; line-height: 1.5; }
.deep .body .aside-note p { font-size: .92em; }
.visit-note { max-width: var(--measure); margin: 12px auto 0; width: 100%; box-sizing: border-box; display: flex; gap: 10px; align-items: baseline;
  font-family: var(--sans); font-size: 13px; line-height: 1.7; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.visit-note > b { flex: none; font-size: 11px; letter-spacing: .08em; color: var(--green); }
.visit-note p { margin: 0; }
.onsite-wrap { max-width: var(--measure); margin: 0 auto; width: 100%; }

/* 道中（地点と地点のあいだ：ここを読み進めるあいだ、眺めが動く） */
.leg { min-height: 52vh; display: grid; place-items: center; padding: 24px 20px; font-family: var(--sans); }
.leg-inner { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 30rem; }
.leg-steps { position: relative; width: 4px; height: 120px; border-radius: 4px;
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--muted) 45%, transparent) 0 6px, transparent 6px 14px); }
.leg-steps i { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); border-radius: 4px;
  background: repeating-linear-gradient(to bottom, var(--copper) 0 6px, transparent 6px 14px); }
.leg-text { margin: 0; font-family: var(--serif-ja); font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); line-height: 1.7; }
.en .leg-text { font-family: var(--serif-en); }
.leg-next { font-size: 12px; color: var(--green); text-decoration: none; letter-spacing: .04em; }
.leg-next b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--paper); font-size: 10px; margin: 0 2px; }

/* 分かったこと */
.found { margin: 18px 0 16px; display: grid; gap: 10px; }
.found h3 { font-size: 12px; letter-spacing: .12em; color: var(--muted); margin: 0; }
.found .ans { background: var(--paper-2); border-radius: 12px; padding: 12px 14px; }
.found .q { margin: 0 0 6px; font-weight: 700; font-size: 14px; color: var(--copper); }
.found .a { margin: 0; font-family: var(--serif-ja); font-size: 16px; line-height: 1.85; color: var(--ink); }
.en .found .a { font-family: var(--serif-en); line-height: 1.55; }
.found .src { margin: 6px 0 0; font-family: var(--sans); font-size: 11px; color: var(--muted); }
.found .a.muted { color: var(--muted); font-family: var(--sans); font-size: 13px; }

@media (max-width: 760px) {
  .leg { min-height: 42vh; }
  .leg-steps { height: 80px; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keys b { font-size: 22px; }
  .course-qs .q { font-size: 15px; }
  .course-qs a { grid-template-columns: auto minmax(0, 1fr); }
  .course-qs .to { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .win-pin { animation: none; } }
.window .lyr-pale { filter: grayscale(.85) contrast(.7) brightness(1.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window .lyr-pale { filter: grayscale(.85) contrast(.7) brightness(.95); } }

/* 実際に歩く道（Googleマップの経路の埋め込み） */
.go-map { max-width: 940px; margin: 24px auto; padding: 26px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-family: var(--sans); box-sizing: border-box; }
@media (max-width: 980px) { .go-map { margin-left: 14px; margin-right: 14px; } }
.go-map h2 { font-size: 13px; letter-spacing: .16em; color: var(--green); margin: 0 0 10px; }
.go-map .go-lead { margin: 0 0 14px; font-size: 15px; line-height: 1.8; }
.go-map .go-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 520px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e9e5dc; }
@media (max-width: 640px) { .go-map .go-frame { aspect-ratio: 1 / 1; } }
.go-map .go-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.go-map .go-note { margin: 12px 0 14px; font-size: 13px; line-height: 1.8; color: var(--muted); }

/* 他の記事へのリンク（[[W:…]]） */
a.work-link { color: var(--copper); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }
a.work-link:hover { text-decoration-thickness: 2px; }

/* 寄り道（歴史的建築・老舗など、道から数分の見どころ）。「くわしく読む」をたたんでいても見える */
.detour-note { max-width: var(--measure); width: 100%; box-sizing: border-box; margin: 14px auto 0; padding: 12px 16px 4px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; }
.detour-note > b { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; color: var(--green); }
.detour-note h4 { margin: 3px 0 6px; font-size: 15px; line-height: 1.5; }
.detour-note p { margin: 0 0 8px; font-size: .94em; line-height: 1.8; }

/* サイトについて・プライバシー・404 */
.page-body { max-width: 44rem; padding-bottom: 64px; }
.page-body h2 { font-size: 20px; margin: 36px 0 10px; }
.page-body ul { padding-left: 1.2em; }
.page-body li { margin: 6px 0; }
.page-body .muted { color: var(--muted); font-family: var(--sans); font-size: 13px; }
footer.site .foot-links { margin-top: 6px; font-family: var(--sans); font-size: 13px; }
footer.site .foot-links a { color: inherit; margin-right: 14px; }
