/* ============================================================
   いなぎ観測所 共通スタイル
   テーマ: 「観測所」×「稲城の梨（日本梨）」
   ============================================================ */
:root {
  --bg: #faf7f0;
  --paper: #ffffff;
  --ink: #2d3142;
  --ink-soft: #5c6270;
  --line: #e8e2d4;
  --pear: #d9a83c;          /* 梨の金色 */
  --pear-deep: #a87b1f;
  --pear-pale: #fdf3dd;
  --leaf: #6a994e;
  --leaf-deep: #386641;
  --link: #2f6690;
  --danger: #c94f4f;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 50, 20, .07);
  --maxw: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}
h1, h2, h3, .logo-text { font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- 非公式バナー ---------- */
.unofficial-bar {
  background: var(--ink);
  color: #f4efe2;
  font-size: 12.5px;
  text-align: center;
  padding: 6px 12px;
}
.unofficial-bar a { color: #ffd97a; }

/* ---------- ヘッダー ---------- */
header.site {
  background: var(--paper);
  border-bottom: 3px solid var(--pear);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--maxw); margin: 0 auto; padding: 10px 16px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg { width: 42px; height: 42px; flex: none; }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.logo-text small { display: block; font-size: 10px; color: var(--ink-soft); letter-spacing: .2em; font-weight: 400; }
.badge-unofficial {
  font-size: 11px; color: var(--danger); border: 1.5px solid var(--danger);
  border-radius: 999px; padding: 1px 9px; font-weight: 700; white-space: nowrap;
}
nav.global { margin-left: auto; }
nav.global ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
nav.global a {
  display: block; padding: 8px 13px; border-radius: 9px;
  color: var(--ink); font-weight: 600; font-size: 13.5px;
}
nav.global a:hover { background: var(--pear-pale); text-decoration: none; }
nav.global a.active { background: var(--pear); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 20px; padding: 4px 10px; cursor: pointer; color: var(--ink); }

/* 姉妹ブログへのリンク（ヘッダー右端） */
.blog-link {
  margin-left: 6px; white-space: nowrap; font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 13px; background: #fff;
}
.blog-link:hover { background: var(--pear-pale); border-color: var(--pear); color: var(--pear-deep); text-decoration: none; }
nav.global li.nav-blog { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  nav.global { display: none; width: 100%; margin: 0; }
  nav.global.open { display: block; }
  nav.global ul { flex-direction: column; }
  .header-inner { flex-wrap: wrap; }
  .blog-link { display: none; }
  nav.global li.nav-blog { display: block; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
}

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(135deg, #fdf6e3 0%, #f6ecd2 55%, #eef3e2 100%);
  border-bottom: 1px solid var(--line);
  padding: 38px 0 30px;
}
.hero h1 { margin: 0 0 6px; font-size: 30px; }
.hero p.lead { margin: 0; color: var(--ink-soft); }
.hero .asof { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- カード/グリッド ---------- */
main { padding: 26px 0 40px; }
section.block { margin-bottom: 34px; }
h2.sec {
  font-size: 21px; margin: 0 0 14px; padding-left: 12px;
  border-left: 5px solid var(--pear);
}
h2.sec small { font-size: 12px; color: var(--ink-soft); font-weight: 400; margin-left: 10px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* 統計カード */
.stat-card { text-align: center; padding: 16px 10px; }
.stat-card .label { font-size: 12.5px; color: var(--ink-soft); }
.stat-card .value { font-size: 28px; font-weight: 700; font-family: "Zen Maru Gothic", sans-serif; color: var(--ink); line-height: 1.3; }
.stat-card .value small { font-size: 14px; }
.stat-card .diff { font-size: 12.5px; font-weight: 700; }
.diff.up { color: var(--leaf-deep); }
.diff.down { color: var(--danger); }
.diff.flat { color: var(--ink-soft); }

/* カテゴリカード */
.cat-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, box-shadow .12s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(60,50,20,.13); text-decoration: none; }
.cat-card .ic { font-size: 26px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--pear-pale); flex: none; }
.cat-card .t { font-weight: 700; font-size: 14.5px; }
.cat-card .n { font-size: 12px; color: var(--ink-soft); }

/* ---------- グラフ ---------- */
.chart-box { position: relative; height: 320px; }
.chart-box.tall { height: 430px; }
.chart-box.short { height: 230px; }
@media (max-width: 560px) { .chart-box { height: 260px; } .chart-box.tall { height: 360px; } }
.chart-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 13px; }
.chart-controls select, .chart-controls input {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
}

/* ---------- テーブル ---------- */
.tbl-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; background: var(--paper); }
table.data th, table.data td { border: 1px solid var(--line); padding: 7px 10px; text-align: right; white-space: nowrap; }
table.data th { background: var(--pear-pale); color: var(--ink); font-weight: 700; text-align: center; }
table.data td.l, table.data th.l { text-align: left; }
table.data tr.subtotal td { background: #f4f1e8; font-weight: 600; }
table.data tr.total td { background: #efe7cf; font-weight: 700; }
table.data tr:hover td { background: #fbf7ec; }
/* ソート可能な見出し */
table.data th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.sortable:hover { background: #f3e9cf; }
table.data th.sortable::after { content: "⇅"; font-size: 10px; opacity: .4; margin-left: 4px; }
table.data th.sortable.desc::after { content: "▼"; opacity: 1; color: var(--pear-deep); }
table.data th.sortable.asc::after { content: "▲"; opacity: 1; color: var(--pear-deep); }

/* ---------- 出典ボックス ---------- */
.source-box {
  margin-top: 14px; padding: 10px 14px; border-left: 4px solid var(--leaf);
  background: #f4f7ef; border-radius: 0 10px 10px 0;
  font-size: 12.5px; color: var(--ink-soft);
}
.source-box b { color: var(--leaf-deep); }

/* ---------- 広告 ---------- */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed #d8cfae; border-radius: 10px; background: #fbf9f1;
  color: #b3a87e; font-size: 12px; position: relative; margin: 18px auto;
}
.ad-slot::before {
  content: "AD"; position: absolute; top: 6px; left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .15em;
  background: #e7dec2; color: #8d8159; border-radius: 4px; padding: 1px 6px;
}
.ad-slot.leaderboard { width: 100%; max-width: 728px; height: 90px; }
.ad-slot.rect { width: 300px; height: 250px; }
.ad-slot.banner { width: 100%; max-width: 970px; height: 90px; }
@media (max-width: 560px) { .ad-slot.leaderboard, .ad-slot.banner { height: 60px; } }

/* ---------- 施設一覧 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filter-bar input[type=search], .filter-bar select {
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.filter-bar input[type=search] { flex: 1; min-width: 180px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.chip {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 5px 13px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink);
  display: inline-flex; gap: 5px; align-items: center;
}
.chip:hover { border-color: var(--pear); }
.chip.on { background: var(--pear); border-color: var(--pear); color: #fff; font-weight: 700; }
.chip .cnt { font-size: 11px; opacity: .75; }

.fac-list { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .fac-list { grid-template-columns: 1fr; } }
.fac-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; box-shadow: var(--shadow); color: var(--ink);
  display: block; transition: transform .1s, box-shadow .1s;
}
.fac-card:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(60,50,20,.12); text-decoration: none; }
.fac-card .head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fac-card .name { font-weight: 700; font-size: 15px; }
.fac-card .cat-badge { font-size: 11px; border-radius: 6px; padding: 1px 7px; color: #fff; white-space: nowrap; }
.fac-card .addr { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.fac-card .meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.fac-card .tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.fac-card .tag, .tag-pill {
  font-size: 11px; background: var(--pear-pale); color: var(--pear-deep);
  border-radius: 6px; padding: 1px 7px;
}

/* ---------- 施設詳細 ---------- */
.detail-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.detail-head h1 { margin: 0; font-size: 26px; }
.kana { color: var(--ink-soft); font-size: 12.5px; }
table.detail { border-collapse: collapse; width: 100%; font-size: 14px; table-layout: fixed; }
table.detail th, table.detail td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.detail th { width: 9.5em; color: var(--ink-soft); font-weight: 600; background: #fbf8ef; }
/* 長いURL等で列が潰れないよう、内容側で折り返す */
table.detail td { overflow-wrap: anywhere; word-break: break-word; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 8px 0 4px; max-width: 480px; }
.week-strip .d {
  text-align: center; border-radius: 8px; padding: 6px 0; font-size: 13px;
  background: #f1ede1; color: #a39c87;
}
.week-strip .d.open { background: var(--leaf); color: #fff; font-weight: 700; }
.week-strip .d.part { background: var(--pear); color: #fff; font-weight: 700; }
.week-strip .d span { display: block; font-size: 10px; font-weight: 400; }

/* カレンダー */
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cal-nav button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 13px; cursor: pointer; font-family: inherit; font-size: 14px; }
.cal-nav button:hover { background: var(--pear-pale); }
.cal-nav .ym { font-weight: 700; font-size: 16.5px; font-family: "Zen Maru Gothic", sans-serif; }
table.cal { border-collapse: collapse; width: 100%; table-layout: fixed; }
table.cal th { font-size: 12px; padding: 6px 0; color: var(--ink-soft); border-bottom: 2px solid var(--line); }
table.cal th.sun, table.cal td.sun .day { color: var(--danger); }
table.cal th.sat, table.cal td.sat .day { color: var(--link); }
table.cal td { border: 1px solid var(--line); height: 58px; vertical-align: top; padding: 4px 6px; font-size: 12px; background: #fff; }
table.cal td.out { background: #f7f4ea; }
table.cal td .day { font-weight: 700; }
table.cal td .st { display: block; font-size: 10.5px; margin-top: 2px; border-radius: 5px; text-align: center; padding: 1px 2px; }
table.cal td.openday .st { background: #e7f0db; color: var(--leaf-deep); }
table.cal td.closeday { background: #faf0ef; }
table.cal td.closeday .st { background: #f3dcdc; color: var(--danger); }
table.cal td.holi .day::after { content: "祝"; font-size: 9px; color: var(--danger); margin-left: 3px; border: 1px solid var(--danger); border-radius: 3px; padding: 0 2px; }
.cal-note { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- お知らせリスト ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  padding: 11px 4px; border-bottom: 1px dashed var(--line);
}
.news-list li:last-child { border-bottom: none; }
.news-list .nd { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.news-list .ntag {
  font-size: 11px; border-radius: 6px; padding: 1px 9px; white-space: nowrap;
  background: var(--pear-pale); color: var(--pear-deep); font-weight: 700;
}
.news-list .ntag.data { background: #e7f0db; color: var(--leaf-deep); }
.news-list .nt { flex: 1; min-width: 220px; font-size: 14px; font-weight: 600; }
.news-list .nbody { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- 現地写真スライダー ---------- */
.slider { position: relative; overflow: hidden; border-radius: 10px; background: #1d1f27; }
.slider-track { display: flex; transition: transform .55s ease; }
.slide { flex: 0 0 100%; margin: 0; position: relative; }
.slide img { width: 100%; height: 400px; object-fit: cover; display: block; }
@media (max-width: 560px) { .slide img { height: 240px; } }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(20, 22, 30, .78));
  color: #fff; font-size: 12.5px; padding: 30px 14px 10px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap;
}
.slide figcaption .ph-meta { white-space: nowrap; opacity: .9; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .85); color: var(--ink); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 5px rgba(0,0,0,.3);
}
.slider-btn:hover { background: var(--pear-pale); }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.slider-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: #d8cfae; padding: 0;
}
.slider-dots button.on { background: var(--pear); transform: scale(1.25); }
.photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--line); border-radius: 10px; background: #fbf9f1;
  color: #b3a87e; font-size: 13px; padding: 38px 14px; text-align: center;
}
.photo-placeholder .ico { font-size: 30px; }

/* ---------- 地図 ---------- */
.map-svg-wrap { background: #eef4f8; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.map-svg-wrap svg { display: block; width: 100%; height: auto; }
.map-tip {
  position: fixed; pointer-events: none; background: rgba(45,49,66,.95); color: #fff;
  font-size: 12px; padding: 6px 10px; border-radius: 8px; z-index: 99; display: none; max-width: 260px;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; font-size: 12.5px; }
.legend .key { display: inline-flex; align-items: center; gap: 5px; }
.legend .sw { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- フッター ---------- */
footer.site {
  background: var(--ink); color: #cfd2dc; margin-top: 30px;
  padding: 30px 0 20px; font-size: 13px;
}
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h3 { color: #fff; font-size: 14px; margin: 0 0 8px; }
footer.site a { color: #ffd97a; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 5px; }
.copyright { text-align: center; margin-top: 22px; padding-top: 14px; border-top: 1px solid #454a5e; font-size: 12px; color: #9aa0b4; }

/* ---------- その他 ---------- */
.note-warn {
  background: #fdf3dd; border: 1px solid #ecd9a8; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; color: #7a5c14;
}
.breadcrumb { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.btn {
  display: inline-block; background: var(--pear); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 9px 22px; border: none; cursor: pointer; font-family: inherit; font-size: 14px;
}
.btn:hover { background: var(--pear-deep); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--pear-deep); border: 1.5px solid var(--pear); }
.btn.ghost:hover { background: var(--pear-pale); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.muted { color: var(--ink-soft); font-size: 12.5px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: 80px; }
