/* シェアアクセス — 駅の案内板のように: 白い面・濃紺の文字・路線の色は丸い印だけ。読み物は 1 段、表と地図だけ横に広げる */
:root {
  --bg: #f6f8fb; --surface: #ffffff; --ink: #14233b; --ink-2: #4b5a70; --rule: #d6dde8; --accent: #0b5cad; --accent-soft: #e4eefa;
  --warn: #9a5b00; --track: #e3e8f0;
  --sea: #dfe9f3; --land: #fbfcfd; --land-rule: #c3cddb; --rail-other: #b9c3d1;
  --b1: #0b3d91; --b2: #2380d6; --b3: #23a487; --b4: #dba10c; --b5: #d6622a;
  --display: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1826; --surface: #172335; --ink: #e8eef7; --ink-2: #a5b3c7; --rule: #2b3a52; --accent: #7db7f5; --accent-soft: #1c3350;
    --warn: #f2c26b; --track: #26344a;
    --sea: #0b1320; --land: #1a2638; --land-rule: #33445e; --rail-other: #46566f;
    --b1: #a9c8ff; --b2: #5aa9f2; --b3: #45c9a8; --b4: #f0c04a; --b5: #f08a52;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.85; }
img { max-width: 100%; }
a { color: var(--accent); }
.wrap { max-width: 892px; margin-inline: auto; padding-inline: 16px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }

/* ヘッダー・フッター */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-block: 12px; }
.logo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: var(--ink); text-decoration: none; }
.logo-mark { align-self: center; width: 18px; height: 18px; border-radius: 50%; border: 5px solid var(--accent); }
.logo-text { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.logo-tagline { font-size: 12px; color: var(--ink-2); }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--ink); text-decoration: none; } .nav a:hover { text-decoration: underline; }
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; padding-block: 32px 16px; }
.footer-grid > * { min-width: 0; } .footer-grid p { margin: 0 0 8px; }
.footer-name { font-family: var(--display); font-weight: 900; font-size: 16px; color: var(--ink); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; align-content: start; }
.footer-nav a { color: var(--ink-2); }
.footer-bottom { padding-block: 12px 28px; font-size: 12px; } .footer-bottom p { margin: 0; }

/* 本文 */
.page { display: flex; flex-direction: column; gap: 44px; padding-block: 24px 0; }
.page > * { min-width: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.35; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 900; letter-spacing: .01em; }
h2 { font-size: clamp(21px, 4vw, 27px); font-weight: 700; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; max-width: 38em; }
small { font-size: 12px; color: var(--ink-2); }
section, .page-head { display: flex; flex-direction: column; gap: 16px; }
.page-head { gap: 14px; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--accent); }
.lead { font-size: 17px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--ink-2); }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; }
.points { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); }
.points li { padding: 14px 18px; display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; align-items: baseline; }
.points li + li { border-top: 1px solid var(--rule); }
.points b.k { font-family: var(--display); font-weight: 700; }
.dot { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 3px solid var(--surface); box-shadow: 0 0 0 2px currentColor; background: currentColor; }
.note { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.note ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.btn { display: inline-block; padding: 10px 18px; background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 700; }

/* 表 */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
thead th { font-family: var(--display); font-size: 12.5px; color: var(--ink-2); font-weight: 700; border-bottom: 2px solid var(--ink); white-space: nowrap; }
tbody th { font-weight: 700; }
th small, td small { display: block; font-weight: 400; }
.stat td small { display: inline; }
.num { text-align: right; white-space: nowrap; }
.pref td b { font-size: 18px; font-family: var(--display); }
.pref td small { display: inline; margin-left: 6px; }
.none { color: var(--ink-2); }
.cong { display: inline-block; width: 64px; height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.cong i { display: block; height: 100%; background: var(--accent); }

/* 主な駅 */
.strip { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.strip li { display: grid; grid-template-columns: 9.5em minmax(40px, 1fr) 3.6em 5.4em; gap: 10px; align-items: center; }
.strip .st { font-weight: 700; } .strip .st small { margin-left: 6px; font-weight: 400; }
.strip .st a { color: var(--ink); }
.bar { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 4px; }
.strip .min { text-align: right; font-weight: 700; }
.strip .cnt { font-size: 12px; color: var(--ink-2); }
.scale { font-size: 12px; color: var(--ink-2); }

/* 物件 */
/* 1 節に 4 件出すので、広い画面では 4 列に収める (3 列だと 1 件だけ次の段に落ちる) */
.bld { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.bld a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.6; }
.bld a:hover { border-color: var(--accent); }
.bld .bld-media { position: relative; display: block; margin: -12px -14px 8px; aspect-ratio: 3 / 2; overflow: hidden; background: var(--track); }
.bld .bld-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 紹介動画のプレビュー (assets/card-preview.js)。写真の上に透明で重ね、流れ始めたら見せる。クリックは下のリンクへ通す */
.card-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; pointer-events: none; background: transparent; }
.card-preview.is-playing { opacity: 1; }
.bld .card-preview-badge, .card-preview-badge { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 2px 9px 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.6; pointer-events: none; }
.bld b { font-size: 14.5px; } .bld span { color: var(--ink-2); } .bld .fig { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 本体へ送るボタン */
.go-row { display: flex; flex-wrap: wrap; gap: 10px; }
.go { margin: 0; }
.go button { font: 700 15px/1.4 var(--display); padding: 12px 18px; background: var(--accent); color: var(--surface); border: 0; cursor: pointer; text-align: left; }
.go + .go button { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.go button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ページの画像 (管理画面から登録したものだけ出る)。横 2：縦 1 に切り抜く */
.page-hero { margin: 0; }
.page-hero img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.hub-cards .thumb { display: block; width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 2 / 1; object-fit: cover; margin: -16px -18px 8px; }

/* 通勤先の一覧 */
.hub-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.hub-cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.hub-cards a:hover { border-color: var(--accent); }
.hub-cards .name { font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1.3; } .hub-cards .name span { font-size: 14px; font-weight: 700; margin-left: 4px; }
.hub-cards .fig { font-size: 14px; font-variant-numeric: tabular-nums; } .hub-cards .fig b { font-family: var(--display); font-size: 18px; }
.hub-cards .sub { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.hub-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hub-links a { display: block; padding: 8px 14px; background: var(--surface); border: 1px solid var(--rule); text-decoration: none; font-size: 14px; }

/* よくある質問 */
dl.faq { margin: 0; display: flex; flex-direction: column; gap: 18px; }
dl.faq dt { font-family: var(--display); font-weight: 700; font-size: 17px; }
dl.faq dd { margin: 4px 0 0; max-width: 38em; }

/* 地図 */
.map { position: relative; border: 1px solid var(--rule); background: var(--sea); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; font-family: var(--body); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.map svg.zoomed { touch-action: none; } .map svg.drag { cursor: grabbing; }
.sea { fill: var(--sea); }
.land { fill: var(--land); stroke: var(--land); stroke-width: 1px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pref-border { fill: none; stroke: var(--land-rule); stroke-width: 1.2px; stroke-dasharray: 5 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pref-name text { fill: var(--ink-2); font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .2em; opacity: .55; text-anchor: middle; }
.rail-other { stroke: var(--rail-other); stroke-width: 1px; fill: none; vector-effect: non-scaling-stroke; }
.rail { stroke-width: 3.4px; stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; }
.rail.b1 { stroke: var(--b1); } .rail.b2 { stroke: var(--b2); } .rail.b3 { stroke: var(--b3); } .rail.b4 { stroke: var(--b4); } .rail.b5 { stroke: var(--b5); }
.stn { cursor: pointer; }
.stn .hit { fill: transparent; }
.stn .dot { fill: var(--land); stroke: var(--ink); stroke-width: 1.1px; border: 0; box-shadow: none; }
.stn.on .dot { fill: var(--accent); stroke: var(--accent); }
.stn text { fill: var(--ink-2); font-size: 10.5px; paint-order: stroke; stroke: var(--land); stroke-width: 2.5px; stroke-linejoin: round; }
.lab circle { fill: var(--ink); }
.lab text { fill: var(--ink); font-size: 11.5px; font-weight: 500; paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; }
.dest circle { fill: var(--land); stroke: var(--ink); stroke-width: 2.5px; } .dest circle.in { fill: var(--ink); stroke: none; }
.dest text { fill: var(--ink); font-family: var(--display); font-size: 17px; font-weight: 900; paint-order: stroke; stroke: var(--land); stroke-width: 4px; }
.m { pointer-events: none; } .m.stn { pointer-events: auto; }
.t1, .t2 { display: none; } svg.lod1 .t1 { display: inline; } svg.lod2 .t2 { display: inline; }
.map-ctl { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-ctl button { width: 38px; height: 38px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 700 18px/1 var(--display); cursor: pointer; }
.map-ctl button:hover { background: var(--accent-soft); }
.map-ctl button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.map-ctl button:disabled { opacity: .4; cursor: default; }
.map-info { margin: 0; max-width: none; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); font-size: 14.5px; font-variant-numeric: tabular-nums; min-height: 1.85em; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 26px; height: 4px; border-radius: 2px; }
.legend i.b1 { background: var(--b1); } .legend i.b2 { background: var(--b2); } .legend i.b3 { background: var(--b3); } .legend i.b4 { background: var(--b4); } .legend i.b5 { background: var(--b5); }
.legend i.other { background: var(--rail-other); }
.legend i.o { width: 11px; height: 11px; border-radius: 50%; border: 1.2px solid var(--ink); background: var(--land); }

@media (max-width: 520px) {
  .points li { grid-template-columns: 1fr; gap: 2px; }
  .strip li { grid-template-columns: 6.6em minmax(30px, 1fr) 3.2em; gap: 6px; }
  .strip .st small, .strip .cnt { display: none; }
  .logo-tagline { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .bld a, .hub-cards a { transition: border-color .15s; } }
