/* ふちゅうコンパス — 和モダン・エディトリアル
   設計原則：余白が主役／明朝の見出し＋字間／英字マイクロラベル／
   箱・影・グラデーションを使わず、極細の罫線と連番で区切る */

:root {
  color-scheme: light;
  --paper: #faf9f5;
  --tint: #f2f1ea;
  --ink: #22271f;
  --text: #363b32;
  --sub: #6d7367;
  --muted: #9aa093;
  --brand: #2f5d3f;
  --line: #dddbd0;
  --hair: #e9e7dd;
  --dark-bg: #20261e;
  --container-max: 1160px;
  --container-pad: clamp(20px, 5vw, 56px);
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --serif: "Zen Old Mincho", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --en: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; letter-spacing: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

/* キーボード操作時のみ、はっきりしたフォーカス枠を出す（マウス操作では邪魔しない） */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}
h1, h2, h3, h4, p { margin-top: 0; }
b { font-weight: 700; color: var(--ink); }

/* ── レイアウト基盤 ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.band-tint { width: 100%; background: var(--tint); }
.band-dark { width: 100%; background: var(--dark-bg); color: #f4f3ec; }

/* 英字マイクロラベル＋和文の小見出し */
.eyebrow {
  display: block;
  margin: 0 0 18px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.eyebrow .en {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-family: var(--en);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

/* ── アイコン共通 ───────────────────────────────────── */
.ic { width: 22px; height: 22px; flex: 0 0 auto; }
.ic-brand { width: 17px; height: 17px; color: var(--brand); }

.tagline { margin: 0; max-width: 620px; color: var(--sub); font-size: clamp(14.5px, 1.6vw, 16.5px); font-weight: 400; letter-spacing: 0.1em; line-height: 2; }

/* ── ボタン体系：静かな輪郭線＋下線リンク ─────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  padding: 14px 36px;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: transparent; }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--ink);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(34, 39, 31, 0.35);
}
.btn-link span { transition: transform 200ms ease; }
.btn-link-light { color: rgba(244, 243, 236, 0.8); text-decoration-color: rgba(244, 243, 236, 0.35); }

/* ── ヒーロー：けやきの夜明け写真＋明朝の文字 ─────────── */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  background: #12172a;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #12172a;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(15, 20, 38, 0.92) 0%, rgba(15, 20, 38, 0.82) 32%, rgba(15, 20, 38, 0.5) 56%, rgba(15, 20, 38, 0.14) 78%, rgba(15, 20, 38, 0) 94%),
    linear-gradient(0deg, rgba(15, 20, 38, 0.28), transparent 46%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(480px, 64vh, 660px);
  padding-block: clamp(64px, 10vw, 120px);
}
.hero-en {
  margin: 0 0 26px;
  color: #cbd1c4;
  font-family: var(--en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.hero-inner h1 {
  margin: 0;
  color: #f4f3ec;
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-wrap: balance;
  text-shadow: 0 2px 34px rgba(8, 10, 20, 0.4);
}
.hero-inner .tagline {
  margin-top: 26px;
  max-width: 30em;
  color: rgba(244, 243, 236, 0.74);
  line-height: 1.9;
  text-wrap: pretty;
  text-shadow: 0 1px 16px rgba(8, 10, 20, 0.45);
}
.hero-rule {
  width: 64px;
  height: 1px;
  margin: 40px 0 0;
  border: 0;
  background: #f4f3ec;
  opacity: 0.45;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 36px;
  margin-top: 38px;
}
.hero .btn-primary { border-color: rgba(244, 243, 236, 0.65); color: #f4f3ec; }
.hero .btn-link { color: #f4f3ec; text-decoration-color: rgba(244, 243, 236, 0.4); }
.hero-date {
  margin: 44px 0 0;
  color: rgba(244, 243, 236, 0.55);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
}
/* 縦書きの添え書き（参考サイトの縦ラベルの引用） */
.hero-vertical {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: var(--container-pad);
  transform: translateY(-50%);
  margin: 0;
  writing-mode: vertical-rl;
  color: rgba(244, 243, 236, 0.82);
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 500;
  letter-spacing: 0.42em;
  line-height: 1;
  text-shadow: 0 1px 14px rgba(8, 10, 20, 0.65), 0 1px 3px rgba(8, 10, 20, 0.7);
  pointer-events: none;
}

/* ── タブ専用バナー：どのタブでも「切り替わった」が一目で分かるように ── */
.tab-banner {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(150px, 22vw, 280px);
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-inline: var(--container-pad);
}
.tab-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(15, 20, 38, 0.78) 0%, rgba(15, 20, 38, 0.5) 42%, rgba(15, 20, 38, 0.16) 74%, rgba(15, 20, 38, 0) 92%);
}
.tab-banner-en {
  margin: 0 0 10px;
  color: rgba(244, 243, 236, 0.78);
  font-family: var(--en);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}
.tab-banner-title {
  margin: 0;
  max-width: 720px;
  color: #f4f3ec;
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-shadow: 0 1px 12px rgba(8, 10, 20, 0.4);
}

/* ── 非公式ライン ───────────────────────────────────── */
.notice-band { width: 100%; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); background: var(--paper); }
.notice-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  padding-block: 14px;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.7;
}
.notice-line strong {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 10px;
  color: var(--ink);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.notice-line a { color: var(--brand); font-weight: 500; text-underline-offset: 4px; }
.notice-meta { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; align-items: center; }
.notice-meta span, .notice-meta a {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  white-space: nowrap;
}
.notice-meta a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(109, 115, 103, 0.4); }

/* ── トップバー ─────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: 0.12em;
}
.tabbar { display: flex; gap: clamp(4px, 2vw, 18px); overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--sub);
  padding: 9px 14px;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  transition: border-color 180ms ease, color 180ms ease;
}
.tab.is-active { color: var(--ink); border-color: var(--ink); }

.view { display: none; width: 100%; }
.view.is-active { display: block; }
.view > .container { padding-block: clamp(56px, 8vw, 104px); }
.band-tint > .container { padding-block: clamp(44px, 6vw, 72px); }

/* ── 見出しのリズム ─────────────────────────────────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 36px;
}
.lead-head { margin-bottom: 40px; }
.sub-head { margin-top: clamp(56px, 8vw, 88px); }
.section-head h2, .section-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--ink);
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head h3 { font-size: clamp(22px, 2.8vw, 32px); }

/* 各セクション見出しに連番を振り、パネルと同じエディトリアルの調子で揃える */
.section-head { counter-increment: sec; }
.section-head .eyebrow .en::before {
  content: counter(sec, decimal-leading-zero) " / ";
  color: var(--brand);
  opacity: 0.85;
}

.text-button {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(34, 39, 31, 0.35);
  white-space: nowrap;
}
.text-button::after { content: " →"; }

/* ── イベント：罫線で区切る目次のようなリスト ─────────── */
.lead-list, .event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 64px);
}
.event-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 4px 24px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 26px 0 28px;
}
.event-cal { display: grid; gap: 8px; justify-items: start; }
.event-status {
  display: inline-block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
}
.event-status::before { content: "— "; }
/* 近い予定ほど強く、先の予定は控えめに（一覧の中で「いま行ける」が際立つ） */
.status-today, .status-ongoing { font-weight: 700; letter-spacing: 0.24em; }
.status-upcoming { color: var(--muted); }
.event-card[data-status="today"] .cal-date,
.event-card[data-status="ongoing"] .cal-date { color: var(--brand); }
.event-card[data-status="upcoming"] .cal-date { color: var(--sub); }
.cal-date { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1.5; letter-spacing: 0.06em; }
.cal-sep { display: block; color: var(--muted); font-size: 12px; }

.card-body h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 17.5px; font-weight: 600; line-height: 1.5; letter-spacing: 0.06em; color: var(--ink); }
.card-body p { margin: 0 0 10px; color: var(--sub); font-size: 13.5px; line-height: 1.85; }

.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.meta span { color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; }
.meta-place { color: var(--sub) !important; }
.source-official { color: var(--brand) !important; }
.source-community { color: var(--muted) !important; }

.card-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; }
.card-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(34, 39, 31, 0.35);
}

.empty-note {
  grid-column: 1 / -1;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
  color: var(--sub);
  text-align: center;
  letter-spacing: 0.08em;
}

/* ── 写真ブレーク：文章の合間に挟む全幅の情景 ─────────── */
.photo-break {
  position: relative;
  width: 100%;
  height: clamp(220px, 34vw, 420px);
  overflow: hidden;
  background: var(--tint);
}
.photo-break-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.photo-break-caption {
  position: absolute;
  left: var(--container-pad);
  bottom: 22px;
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 12px rgba(8, 10, 20, 0.5), 0 1px 3px rgba(8, 10, 20, 0.6);
}

/* ── 今日の要点：縦罫線で分ける3面 ──────────────────── */
.today-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.today-card {
  display: block;
  text-align: left;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  padding: 6px 28px;
}
.today-card:first-child { border-left: 0; padding-left: 0; }
.today-card > span {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
}
.today-card strong { display: block; margin: 10px 0 6px; font-family: var(--serif); font-size: clamp(18px, 2.2vw, 22px); font-weight: 500; letter-spacing: 0.08em; color: var(--ink); }
.today-card small { color: var(--sub); font-size: 12.5px; letter-spacing: 0.08em; }
.today-card small::after { content: " →"; }

/* ── 定番カード ─────────────────────────────────────── */
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 64px); }
.guide-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 26px 0 28px;
}
.thumb { display: grid; width: 34px; padding-top: 4px; place-items: start; color: var(--brand); }
.thumb .ic { width: 26px; height: 26px; }
.guide-card .card-actions { grid-column: 2; }

/* ── 市民リンク ─────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.info-card {
  display: grid;
  gap: 6px;
  align-content: start;
  border-top: 1px solid var(--line);
  padding: 22px 0 24px;
  color: var(--text);
  text-decoration: none;
}
.info-card strong { font-family: var(--serif); font-size: 15.5px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink); }
.info-card strong::after { content: " →"; color: var(--muted); font-weight: 400; }
.info-card span { color: var(--sub); font-size: 12.5px; line-height: 1.8; }

/* ── おでかけ 運用ストリップ・フィルタ ───────────────── */
.ops-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-bottom: 28px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 13px 0;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.8;
}
.ops-strip > span { flex: 1 1 240px; }
.ops-strip a {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(34, 39, 31, 0.35);
  white-space: nowrap;
}

.filters { display: flex; gap: 4px 26px; overflow-x: auto; margin-bottom: 34px; padding: 2px 0 6px; }
.filter {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 6px 2px;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.12em;
}
.filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 200ms ease;
}
.filter.is-active { color: var(--ink); }
.filter.is-active::after { transform: scaleX(1); }

/* ── 天気：トップバーの小型バッジ＋ポップオーバー（気象庁データ） ── */
.weather-widget[hidden] { display: none; }
.weather-widget { position: relative; flex: 0 0 auto; margin-left: auto; }
.weather-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  padding: 6px 12px 6px 10px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: border-color 160ms ease;
}
.weather-badge-icon { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }
@media (hover: hover) {
  .weather-badge:hover { border-color: var(--brand); }
}

.weather-popover[hidden] { display: none; }
.weather-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, 86vw);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(20, 24, 18, 0.14);
  padding: 20px;
}
.weather-popover-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.weather-popover-head .eyebrow { margin: 0; }
.weather-label { display: block; margin-bottom: 6px; color: var(--sub); font-size: 12px; letter-spacing: 0.14em; }
.weather-temp {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.weather-unit { margin-left: 4px; font-size: 0.42em; color: var(--sub); }
.weather-facts { display: grid; gap: 6px; margin: 0; }
.weather-facts div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--hair); padding-top: 6px; }
.weather-facts dt { color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; }
.weather-facts dd { margin: 0; color: var(--ink); font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; }
.weather-time { margin: 10px 0 0; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }

.weather-forecast { display: grid; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 4px; }
.weather-day {
  display: grid;
  grid-template-columns: 64px 22px minmax(0, 1fr);
  align-items: center;
  gap: 3px 10px;
  border-top: 1px solid var(--hair);
  padding: 10px 0;
}
.weather-day:first-child { border-top: 0; padding-top: 8px; }
.weather-day-label { display: grid; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
.weather-day-label small { color: var(--muted); font-family: var(--sans); font-weight: 400; font-size: 10px; letter-spacing: 0.08em; }
.weather-day-icon { width: 20px; height: 20px; color: var(--brand); }
.weather-day-text { grid-column: 3; color: var(--sub); font-size: 12px; line-height: 1.6; }
.weather-day-pop { grid-column: 3; color: var(--brand); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; }
.weather-note { margin: 16px 0 0; }

@media (max-width: 640px) {
  /* ブランド行(1段目)の右端にバッジを収める。タブ行(2段目)はその後に回す */
  .weather-widget { order: 1; margin-left: 0; }
  .tabbar { order: 2; }
  .weather-popover { right: 0; left: auto; }
}

/* ── 医療ディレクトリ：診療科×町名でしぼり込む ───────── */
.clinic-controls { display: grid; gap: 18px; margin-bottom: 22px; }
.clinic-filters { flex-wrap: wrap; margin-bottom: 0; }
.cfilter {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 2px;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.12em;
}
.cfilter::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 200ms ease;
}
.cfilter.is-active { color: var(--ink); }
.cfilter.is-active::after { transform: scaleX(1); }
.clinic-machi-box { max-width: 340px; }
.clinic-count { margin: 0 0 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.1em; }

.clinic-list { display: grid; }
.clinic-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 20px;
  border-top: 1px solid var(--hair);
  padding: 14px 0 15px;
}
.clinic-row[hidden] { display: none; }
.clinic-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.clinic-name {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(34, 39, 31, 0.3);
}
.clinic-name--plain { text-decoration: none; }
.clinic-machi { color: var(--sub); font-size: 12px; letter-spacing: 0.1em; }
.clinic-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.clinic-specs { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.clinic-specs span { color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; }
.clinic-tel {
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.clinic-tel::before { content: "\260E\FE0E  "; }
.clinic-empty { border-top: 1px solid var(--line); padding: 28px 0; color: var(--sub); text-align: center; letter-spacing: 0.06em; }
.clinic-more {
  display: block;
  width: 100%;
  margin-top: -1px;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  background: transparent;
  padding: 14px 0;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: color 160ms ease;
}
.clinic-more::after { content: " ↓"; color: var(--muted); }
.clinic-more[hidden] { display: none; }
@media (hover: hover) {
  .clinic-more:hover { color: var(--brand); }
}

/* ── パネル：連番＋罫線の記事セクション ───────────────── */
.view { counter-reset: panel sec; }
.panel {
  position: relative;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: clamp(44px, 6vw, 64px) 0;
}
.panel:first-of-type { padding-top: 0; border-top: 0; }
.panel-head {
  position: relative;
  counter-increment: panel;
  padding-left: 72px;
  margin-bottom: 28px;
  min-height: 48px;
}
.panel-head::before {
  content: counter(panel, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -6px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  color: rgba(34, 39, 31, 0.16);
  letter-spacing: 0.04em;
}
.panel-label {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
.panel-head h4 { margin: 8px 0 0; font-family: var(--serif); font-size: clamp(19px, 2.4vw, 25px); font-weight: 500; letter-spacing: 0.1em; color: var(--ink); }
.panel-lead { color: var(--sub); font-size: 14px; margin: 0 0 20px; line-height: 2; max-width: 760px; }
.panel-lead b { color: var(--ink); }

/* ── 入力まわり（道具としての使いやすさは保つ）─────────── */
.search-box { display: grid; gap: 8px; color: var(--ink); font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; }
input[type="search"], .search-box select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  padding: 12px 16px;
  letter-spacing: 0.05em;
  outline: none;
}
input[type="search"]:focus, .search-box select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 93, 63, 0.12); }

.result-box {
  margin-top: 16px;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: #fff;
  padding: 22px 24px;
  color: var(--text);
  line-height: 1.9;
}
.result-box > strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 600; letter-spacing: 0.08em; }
.result-box p { margin: 6px 0 0; color: var(--sub); font-size: 13.5px; }
.result-box a { display: inline-block; margin-top: 8px; color: var(--brand); font-weight: 500; }
.bus-stop-box, .bus-time-box, .bus-daytype-box { margin-top: 14px; }
.bus-daytype-box[hidden] { display: none; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; background: #fff; padding: 3px; gap: 3px; }
.daytype-btn {
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--sub);
  padding: 8px 20px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
}
.daytype-btn.is-active { background: var(--ink); color: var(--paper); }
.time-row { display: flex; gap: 10px; align-items: stretch; }
.time-row input[type="time"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 12px 16px;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.time-row input[type="time"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 93, 63, 0.12); }
.time-now-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  padding: 0 20px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
@media (hover: hover) {
  .time-now-btn:hover { border-color: var(--ink); }
}
.bus-next-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bus-next-chip {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  padding: 7px 16px;
  font-weight: 500;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.bus-next-chip.is-next {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.trash-hit { display: grid; gap: 5px; border-bottom: 1px solid var(--hair); padding: 16px 0; }
.trash-hit:first-child { padding-top: 0; }
.trash-hit:last-child { border-bottom: 0; padding-bottom: 0; }
.trash-hit strong { color: var(--ink); font-family: var(--serif); font-size: 16.5px; font-weight: 600; letter-spacing: 0.06em; }
.trash-hit span { width: fit-content; color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; }
.trash-hit span::before { content: "— "; }
.fee-line { color: var(--ink) !important; font-weight: 500; }
.fee-line b { color: var(--brand); font-weight: 700; }

/* 収集曜日：品目と曜日の罫線リスト */
.gomi-days { margin: 12px 0 0; padding: 0; list-style: none; }
.gomi-days li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--hair); padding: 9px 0; }
.gomi-days li:last-child { border-bottom: 0; }
.gomi-days li span { color: var(--sub); font-size: 13px; letter-spacing: 0.04em; }
.gomi-days li b { color: var(--ink); font-weight: 600; font-size: 14.5px; white-space: nowrap; }

.trash-hit p, .tool-note { margin: 0; color: var(--sub); line-height: 1.85; }
.tool-note { margin-top: 20px; font-size: 12.5px; }
.tool-note a { color: var(--brand); font-weight: 500; }

/* 手順ステップ：明朝の番号＋縦罫線 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; border-left: 1px solid var(--line); padding: 4px 26px 8px; }
.steps li:first-child { border-left: 0; padding-left: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: rgba(34, 39, 31, 0.28);
  letter-spacing: 0.06em;
}
.steps li b { display: block; margin-bottom: 6px; color: var(--ink); font-family: var(--serif); font-size: 16.5px; font-weight: 600; letter-spacing: 0.1em; }
.steps li span { display: block; color: var(--sub); font-size: 13px; line-height: 1.85; }
.steps li a { color: var(--brand); font-weight: 500; }

/* 数値ファクト：縦罫線区切り */
.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 26px; }
.fact { border-left: 1px solid var(--line); padding: 4px 26px 6px; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact > span { display: block; color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: 0.26em; }
.fact strong { display: block; margin: 8px 0 4px; font-family: var(--serif); font-size: clamp(17px, 2vw, 21px); font-weight: 500; letter-spacing: 0.06em; color: var(--ink); }
.fact small { color: var(--sub); font-size: 12px; line-height: 1.7; display: block; }
.count { font-variant-numeric: tabular-nums; }

/* ルート名の並び：チップではなく文字列 */
.chips { display: flex; flex-wrap: wrap; gap: 2px 0; margin-bottom: 8px; }
.chips span { color: var(--sub); font-size: 13px; letter-spacing: 0.08em; }
.chips span:not(:last-child)::after { content: "／"; color: var(--muted); margin: 0 2px; }

/* リンクメニュー：記事末の関連リンク */
.mini-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}
.mini-menu a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 0;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(34, 39, 31, 0.3);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
}
.mini-menu a::after { content: "→"; color: var(--muted); }

/* ハザード／スポット：罫線グリッド */
.hazard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); margin-bottom: 4px; }
.spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hazard-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border-top: 1px solid var(--line);
  padding: 24px 0 26px;
  text-decoration: none;
  color: var(--text);
}
.hazard-icon { width: 24px; height: 24px; color: var(--brand); }
.hazard-card strong { font-family: var(--serif); font-size: 16px; color: var(--ink); font-weight: 600; letter-spacing: 0.08em; line-height: 1.6; }
.hazard-card strong::after { content: " →"; color: var(--muted); font-weight: 400; }
.hazard-card small { color: var(--sub); font-size: 12.5px; line-height: 1.85; }

/* ── 府中を知る：渋朱の差し色（大國魂神社の朱を、彩度を落として）── */
#history {
  --brand: #9c4a33;
}

/* イントロの大きな統計数字（1300年） */
.intro-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px 48px; align-items: center; }
.stat-callout {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.stat-callout strong {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 66px);
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.stat-callout span { max-width: 240px; color: var(--sub); font-size: 13px; font-weight: 400; letter-spacing: 0.1em; line-height: 1.9; }

/* ── フッター ───────────────────────────────────────── */
.band-dark .about-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: start;
  padding-block: clamp(64px, 9vw, 110px) clamp(36px, 5vw, 56px);
}
.band-dark .tool-label {
  display: block;
  color: rgba(244, 243, 236, 0.55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
}
.about-copy h3 { margin: 14px 0 16px; font-family: var(--serif); font-size: clamp(21px, 2.8vw, 28px); font-weight: 500; color: #f4f3ec; letter-spacing: 0.1em; line-height: 1.7; }
.about-copy p { margin: 0 0 12px; color: rgba(244, 243, 236, 0.62); font-size: 13.5px; line-height: 2; }
.about-copy p b { color: rgba(244, 243, 236, 0.92); }
.about-copy .cta-line { color: #f4f3ec; font-weight: 500; }
.about-actions { display: grid; gap: 18px; justify-items: start; }
.band-dark .btn-primary {
  border-color: rgba(244, 243, 236, 0.6);
  color: #f4f3ec;
  background: transparent;
}

.colophon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-block: 22px;
  border-top: 1px solid rgba(244, 243, 236, 0.14);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.disclaimer { margin: 0; color: rgba(244, 243, 236, 0.8); font-weight: 500; }
.colophon { margin: 0; color: rgba(244, 243, 236, 0.42); }

/* ── モーション ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── ホバー ─────────────────────────────────────────── */
@media (hover: hover) {
  a, button { transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, opacity 180ms ease; }
  .btn:hover { background: var(--ink); color: var(--paper); }
  .band-dark .btn-primary:hover, .hero .btn-primary:hover { background: #f4f3ec; color: #12172a; }
  .btn-link:hover span { transform: translateX(4px); }
  .tab:hover { color: var(--ink); }
  .filter:hover { color: var(--ink); }
  .card-link:hover, .mini-menu a:hover, .ops-strip a:hover, .text-button:hover { color: var(--brand); }
  .info-card:hover strong, .hazard-card:hover strong { color: var(--brand); }
  .today-card:hover strong { color: var(--brand); }
}

/* ── レスポンシブ ───────────────────────────────────── */
@media (max-width: 980px) {
  .lead-list, .event-list, .guide-list, .info-grid, .hazard-grid { grid-template-columns: 1fr; }
  .spot-grid { grid-template-columns: 1fr; }
  .steps, .fact-grid { grid-template-columns: 1fr; gap: 0; }
  .steps li, .fact { border-left: 0; border-top: 1px solid var(--hair); padding: 16px 0 14px; }
  .steps li:first-child, .fact:first-child { border-top: 0; padding-top: 0; }
  .band-dark .about-panel { grid-template-columns: 1fr; }
  .intro-grid { grid-template-columns: 1fr; }
  .stat-callout { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
  .hero-vertical { display: none; }
}

@media (max-width: 640px) {
  .section-head { flex-wrap: wrap; }
  .section-head > div { flex: 0 0 100%; }
  .topbar-inner { gap: 12px; }
  .brand { font-size: 14.5px; }
  .tab { padding: 7px 4px; font-size: 12.5px; }
  .hero-inner { min-height: 0; }
  .hero-inner h1 { font-size: clamp(32px, 9vw, 44px); }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
  .btn { width: 100%; }
  .today-strip { grid-template-columns: 1fr; }
  .today-card { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 16px; }
  .today-card:first-child { border-top: 0; padding-top: 0; }
  .panel-head { padding-left: 52px; }
  .panel-head::before { font-size: 34px; }
  .event-card { grid-template-columns: 92px minmax(0, 1fr); }
  .card-body h4 { font-size: 16px; }
  .guide-card { grid-template-columns: 30px minmax(0, 1fr); gap: 14px; }
  .thumb .ic { width: 22px; height: 22px; }
  .notice-meta { margin-left: 0; }

  /* 6タブが横に詰まらないよう、ブランド行とタブ行の2段に分ける。
     タブは全幅で横スクロールし、右端の薄いフェードで「続き」を示す。 */
  .topbar-inner { flex-wrap: wrap; gap: 0; min-height: 0; }
  .brand { flex: 1 1 auto; padding: 13px 0 11px; }
  .tabbar {
    flex: 0 0 100%;
    gap: 2px;
    padding-bottom: 6px;
    border-top: 1px solid var(--hair);
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
  }
  .tab {
    scroll-snap-align: start;
    padding: 12px 14px;
    font-size: 13px;
    letter-spacing: 0.08em;
  }
}
