/* EasyRiders — バイクツーリング初心者のための道の駅ガイド
   インラインスタイルを使わない(CSP: style-src 'self')ため、見た目はすべてここで定義する。 */

:root {
  --ink: #14213d;
  --ink-2: #2b3a55;
  --text: #1d2433;
  --muted: #5b6477;
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-2: #fbf9f3;
  --line: #e4dec9;
  --accent: #f4a300;
  --accent-strong: #c47f00;
  --accent-ink: #4a3000;
  --teal: #167a74;
  --teal-bg: #e3f3f1;
  --warn: #b4410c;
  --warn-bg: #fdeee3;
  --link: #0b5cad;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 6px 20px rgba(20, 33, 61, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8ebf3;
    --muted: #a3adc2;
    --bg: #0e1524;
    --surface: #162038;
    --surface-2: #1b2745;
    --line: #2b3858;
    --accent: #ffb81f;
    --accent-strong: #ffc94d;
    --accent-ink: #ffe3a1;
    --teal: #54c7bd;
    --teal-bg: #12302f;
    --warn: #ff9a63;
    --warn-bg: #3a2418;
    --link: #8ec5ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.4; color: var(--ink); margin: 0 0 .6em; letter-spacing: .01em; }
@media (prefers-color-scheme: dark) { h1, h2, h3, h4 { color: #f3f5fb; } }
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.65rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: #1b1300; padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); font-size: .9rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; margin-right: .35em; }

/* ---- ヘッダー ---- */
.site-header { background: var(--ink); color: #fff; border-bottom: 4px solid var(--accent); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-icon { width: 38px; height: 38px; padding: 7px; background: var(--accent); color: #1b1300; border-radius: 50%; margin: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.2rem; letter-spacing: .02em; }
.brand-text small { font-size: .72rem; opacity: .8; }
.main-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.main-nav a:hover { background: rgba(255, 255, 255, .14); }
.search-mini { display: flex; background: #fff; border-radius: 999px; overflow: hidden; }
.search-mini input { border: 0; padding: 8px 14px; font: inherit; font-size: .9rem; width: 170px; min-width: 0; background: transparent; color: #1d2433; }
.search-mini input:focus-visible { outline: none; }
.search-mini:focus-within { outline: 3px solid var(--accent); }
.search-mini button { border: 0; background: var(--accent); color: #1b1300; padding: 0 14px; cursor: pointer; }
.search-mini .icon { margin: 0; }
@media (max-width: 760px) {
  .main-nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .search-mini { margin-left: auto; }
}

/* ---- ヒーロー ---- */
.hero { background: linear-gradient(160deg, var(--ink) 0%, #1d3557 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--accent) 0 36px, transparent 36px 64px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: 48px 0 56px; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.7rem); margin-bottom: .5em; }
.hero .lead { font-size: 1.05rem; opacity: .95; }
.hero .lead strong { color: var(--accent); font-size: 1.15em; }
.eyebrow { display: inline-flex; align-items: center; font-size: .85rem; font-weight: 700; letter-spacing: .04em; color: var(--accent-strong); margin: 0 0 .8em; }
.hero .eyebrow { color: var(--accent); }
.hero-art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; padding: 32px 0 44px; } .hero-art { max-width: 520px; } }

.search-big { display: flex; gap: 0; background: #fff; border-radius: 14px; padding: 6px; box-shadow: var(--shadow); max-width: 640px; margin: 1.2em 0 1.4em; }
.search-big input { flex: 1; border: 0; font: inherit; padding: 12px 14px; min-width: 0; background: transparent; color: #1d2433; }
.search-big input:focus-visible { outline: none; }
.search-big:focus-within { outline: 3px solid var(--accent); }
.search-big button { border: 0; background: var(--accent); color: #1b1300; font: inherit; font-weight: 800; padding: 0 20px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.search-big button:hover { background: var(--accent-strong); }
.page-head .search-big { margin-bottom: 0; border: 1px solid var(--line); }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; padding: 0; margin: 0; }
.stat-row li { display: flex; flex-direction: column; line-height: 1.3; }
.stat-row strong { font-size: 1.7rem; color: var(--accent); }
.stat-row span { font-size: .8rem; opacity: .85; }

/* ---- セクション ---- */
.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }
.section-lead { color: var(--muted); max-width: 46em; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band-soft { background: var(--surface-2); border-block: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.h-count { margin-left: .6em; font-size: .85rem; font-weight: 600; color: var(--muted); }
h2 a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--accent); }

/* ---- カード ---- */
.card-grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-title { font-weight: 800; font-size: 1.12rem; color: var(--ink); line-height: 1.45; }
@media (prefers-color-scheme: dark) { .card-title { color: #f3f5fb; } }
.card-num { color: var(--muted); font-size: .9rem; }
.card-num strong { font-size: 1.9rem; color: var(--accent-strong); margin-right: 2px; }
.card-sub { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.guides-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.guide-card .more, .more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--link); }
.tag { display: inline-block; align-self: flex-start; background: var(--teal-bg); color: var(--teal); font-size: .75rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; margin: 0 0 4px; }
.meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature-icon { width: 44px; height: 44px; padding: 10px; background: var(--accent); color: #1b1300; border-radius: 12px; margin: 0 0 10px; }
.feature h3 { margin-bottom: .4em; }
.feature p { margin: 0; font-size: .95rem; }

.note, .callout { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--text); border-left: 5px solid var(--warn); border-radius: 10px; padding: 14px 16px; margin: 1.4em 0; font-size: .95rem; }
.note .icon, .callout .icon { color: var(--warn); margin-top: .25em; }
.callout.info { background: var(--teal-bg); border-left-color: var(--teal); }
.callout.info .icon { color: var(--teal); }
.callout > div > :last-child, .callout > :last-child { margin-bottom: 0; }

/* ---- ランキング・グラフ ---- */
.rank { list-style: none; counter-reset: r; padding: 0; margin: 0 0 12px; }
.rank li { counter-increment: r; }
.rank a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.rank a::before { content: counter(r); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem; }
.rank a:hover { border-color: var(--accent); }
.rank-name { font-weight: 700; flex: 1; }
.rank-n { color: var(--accent-strong); font-weight: 800; }
.chart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis.strong { fill: var(--accent-strong); font-weight: 700; font-size: 13px; }
.chart .area { fill: var(--accent); opacity: .22; }
.chart .line { fill: none; stroke: var(--accent-strong); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--accent-strong); stroke: var(--surface); stroke-width: 2; }
progress { appearance: none; -webkit-appearance: none; height: 10px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; width: 100%; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.bars { list-style: none; padding: 0; margin: 0 0 12px; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .bars { columns: 1; } }
.bars li { display: grid; grid-template-columns: 3.2em 1fr 2.4em; align-items: center; gap: 10px; break-inside: avoid; padding: 3px 0; font-size: .88rem; }
.bars-n { text-align: right; color: var(--muted); }

/* ---- パンくず・ページ見出し ---- */
.crumbs { padding: 14px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; padding: 0; margin: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin: 0 .5em; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head { padding: 18px 0 20px; }
.page-head .lead { max-width: 46em; font-size: 1.02rem; }

/* ---- 県ページ・駅リスト ---- */
.summary-box { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); padding: 20px 22px 8px; margin: 0 0 28px; box-shadow: var(--shadow); }
.summary-box h2 { font-size: 1.15rem; }
.check-list, .warn-list { list-style: none; padding: 0; }
.check-list li, .warn-list li { position: relative; padding-left: 1.7em; margin-bottom: .55em; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 1em; height: .5em; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg) translateY(-50%); }
.warn-list li::before { content: "!"; position: absolute; left: 0; top: .15em; width: 1.2em; height: 1.2em; line-height: 1.2em; text-align: center; font-weight: 800; font-size: .8em; background: var(--warn); color: #fff; border-radius: 50%; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.list-tools label { font-weight: 700; }
.list-tools input { flex: 1 1 260px; max-width: 420px; font: inherit; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.list-tools .muted { margin: 0; }
.st-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.st-item a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; text-decoration: none; color: var(--text); }
.st-item a:hover { border-color: var(--accent); background: var(--surface-2); }
.st-name { font-weight: 800; color: var(--ink); line-height: 1.45; }
@media (prefers-color-scheme: dark) { .st-name { color: #f3f5fb; } }
.st-meta { font-size: .82rem; color: var(--muted); }
.st-item[hidden] { display: none; }

.pref-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 20px; }
.pref-list a { display: grid; grid-template-columns: 5.5em 1fr 3.8em; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.pref-list a:hover { background: var(--surface); }
.pref-name { font-weight: 700; }
.pref-n { text-align: right; color: var(--muted); font-size: .9rem; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0 40px; }
.pager a { padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 700; }

/* ---- 駅の詳細 ---- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0 0; }
.btn { display: inline-flex; align-items: center; padding: 10px 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font-weight: 700; text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn { color: #f3f5fb; } }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1b1300; }
.btn-primary:hover { background: var(--accent-strong); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 8px; margin: 0 0 20px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; }
.spec { margin: 0 0 12px; }
.spec > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 4px 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.spec > div:last-child { border-bottom: 0; }
.spec dt { font-weight: 700; color: var(--muted); }
.spec dd { margin: 0; }
@media (max-width: 560px) { .spec > div { grid-template-columns: 1fr; } }

/* ---- 記事 ---- */
.article { max-width: 780px; margin: 0 auto; padding-bottom: 20px; }
.article-head { padding: 20px 0 8px; }
.article-head h1 { margin-bottom: .4em; }
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 2.2em; padding: .15em 0 .15em .7em; border-left: 6px solid var(--accent); scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.8em; padding-bottom: .2em; border-bottom: 2px solid var(--line); scroll-margin-top: 90px; }
.prose p { text-align: left; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .93rem; background: var(--surface); border-radius: 10px; overflow: hidden; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 800; white-space: nowrap; }
.prose caption { caption-side: bottom; text-align: left; font-size: .82rem; color: var(--muted); padding-top: 6px; }
.table-scroll { overflow-x: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.compare > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 6px; }
.compare h3 { margin-top: 0; border: 0; font-size: 1.05rem; }
.compare .ok { border-top: 5px solid var(--teal); }
.compare .ng { border-top: 5px solid var(--warn); }
.timeline { list-style: none; padding: 0; margin: 1.6em 0; border-left: 4px solid var(--accent); }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li::before { content: ""; position: absolute; left: -11px; top: .55em; width: 18px; height: 18px; background: var(--surface); border: 4px solid var(--accent); border-radius: 50%; }
.timeline strong { display: block; color: var(--ink); }
@media (prefers-color-scheme: dark) { .timeline strong { color: #f3f5fb; } }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px 6px; margin: 0 0 28px; }
.toc-title { font-weight: 800; margin: 0 0 6px; }
.toc ol { margin-bottom: 10px; }
.toc li { margin-bottom: .2em; }
.sources { margin-top: 3em; padding: 18px 22px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.sources h2 { font-size: 1rem; }
.sources li { margin-bottom: .35em; }

/* ---- フッター ---- */
.site-footer { background: var(--ink); color: #d9deea; margin-top: 56px; padding: 36px 0 20px; font-size: .9rem; border-top: 4px solid var(--accent); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.05rem; }
.footer-h { font-weight: 800; color: var(--accent); margin-bottom: .4em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3em; }
.footer-note { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 16px; font-size: .8rem; opacity: .9; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
@media print { .site-header, .site-footer, .search-big, .list-tools { display: none; } body { background: #fff; color: #000; } }
