/* 觀音山巡禮 路線指南 — 昼の観音山（白い観音・庭の緑・空）。ライトモード固定。
 * ボタン・下部メニューの作りは柳川町ウェブガイドにそろえている。 */
:root {
  color-scheme: light only;
  --bg: #f4f1ea;        /* 和紙の地 */
  --surface: #ffffff;
  --cream: #fff8e6;     /* 日本語カード */
  --ink: #1f3b4d;       /* 濃い藍（文字・見出し） */
  --ink-2: #4a5f6d;
  --line: #d9d3c6;
  --accent: #a8322b;    /* 寺の朱（ボタン。白文字 6.2:1） */
  --accent-press: #84261f;
  --green: #2f5d3a;     /* 庭の緑 */
  --green-bg: #e8f0e6;
  --warn: #8a4b00;
  --warn-bg: #fff1dc;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-zh: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-ja: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-zh); font-size: 17px; line-height: 1.65;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
:lang(ja) { font-family: var(--font-ja); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 2000; background: var(--surface); padding: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.view { min-height: calc(100vh - var(--tabbar-h)); }
.wrap { padding: 16px; max-width: 640px; margin: 0 auto; }
h1, h2, h3 { color: var(--ink); line-height: 1.35; margin: 0 0 8px; }
h1 { font-size: 24px; }
h2 { font-size: 20px; margin-top: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; padding-left: 1.3em; }
li { margin-bottom: 6px; }
.muted { color: var(--ink-2); }
.note { font-size: 15px; color: var(--ink-2); }

/* ボタン */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 16px; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-quiet { border-width: 1px; font-weight: 600; min-height: 48px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn-stack { display: grid; gap: 10px; margin-top: 12px; }
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* 下の固定メニュー */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--ink); box-shadow: 0 -2px 8px rgba(0,0,0,.15);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #e9eef2; text-decoration: none; font-size: 14px; font-weight: 600; min-height: 48px; gap: 2px;
}
.tabbar .ti svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a[aria-current="page"] { color: #fff; background: #2d5168; box-shadow: inset 0 3px 0 #f2d17a; }
.tabbar .tab-help { color: #ffd2cc; }

/* トップ */
.hero { background: linear-gradient(180deg, #8fc1dd 0%, #cfe3ee 60%, var(--bg) 100%); }
.hero-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-text { padding: 18px 16px 8px; max-width: 640px; margin: 0 auto; }
.hero-text .kicker { margin: 0 0 4px; font-weight: 700; color: var(--green); }
.hero-text h1 { font-size: 28px; }
.hero-text .lead { margin: 0; }

/* チェックリスト */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { margin: 0; }
.check {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer;
}
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--green); }
.check.is-done { background: var(--green-bg); border-color: #b9d1b4; }
.check a { display: inline-block; margin-top: 4px; }

/* 行程表 */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--green); }
.timeline li { margin: 0; }
.timeline a {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center;
  padding: 10px 8px 10px 14px; text-decoration: none; color: var(--ink); min-height: 52px; position: relative;
}
.timeline a::before { content: ""; position: absolute; left: -8px; top: 50%; width: 13px; height: 13px; margin-top: -7px; border-radius: 50%; background: var(--bg); border: 3px solid var(--green); }
.timeline .t { font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline .yen { font-size: 14px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.timeline a:active { background: #ebe6db; }

/* ステップ */
.progress { display: flex; gap: 4px; margin: 0 0 12px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--green); }
.step-head .num { display: inline-block; font-weight: 800; color: #fff; background: var(--green); border-radius: 8px; padding: 2px 10px; margin-bottom: 6px; }
.step-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 700; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 12px; }
.box h3 { margin-top: 0; }
.box-tip { background: var(--green-bg); border-color: #b9d1b4; }
.box-warn { background: var(--warn-bg); border-color: #f0cf9c; }
.box-warn h3 { color: var(--warn); }
.howto { list-style: none; padding: 0; margin: 0; counter-reset: h; }
.howto li { counter-increment: h; display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin-bottom: 12px; }
.howto li::before { content: counter(h); width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; display: grid; place-items: center; }
.howto b { display: block; }
.photos { display: grid; gap: 12px; margin-top: 12px; }
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.photo img { width: 100%; }
.photo figcaption { padding: 8px 12px; font-size: 15px; color: var(--ink-2); }
.photo.is-pending { display: none; }
.photo.is-missing { border-style: dashed; }
.photo.is-missing .ph { aspect-ratio: 3 / 2; display: grid; place-items: center; color: var(--ink-2); background: #ece8df; font-size: 14px; padding: 8px; text-align: center; }
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; }
.words div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.words dt { font-weight: 700; }
.words dd { margin: 0; color: var(--ink-2); text-align: right; }

/* 日本語カード */
.cards { display: grid; gap: 10px; }
.card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--cream); border: 2px solid #ead9a8; border-radius: 14px; padding: 14px 16px;
}
.card .ja { font-size: 21px; font-weight: 800; line-height: 1.45; white-space: pre-line; margin: 0 0 4px; }
.card .zh { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.cardfull {
  position: fixed; inset: 0; z-index: 3000; background: var(--cream);
  display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 24px;
}
.cardfull-ja { font-size: 34px; font-weight: 800; line-height: 1.5; margin: 0; white-space: pre-line; }
.cardfull-zh { font-size: 18px; color: var(--ink-2); margin: 0; }

/* 表 */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #e9e4d8; font-size: 15px; }
td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
tr.is-rec td { background: var(--green-bg); }

/* 求助 */
.sos { display: grid; gap: 10px; margin-top: 12px; }
.sos a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; min-height: 60px; padding: 10px 16px; border-radius: 12px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.sos a b { font-size: 18px; }
.sos a .n { font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.sos a.is-red { background: #fdecea; border-color: #f2b8b1; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.faq summary { padding: 14px 16px; font-weight: 700; cursor: pointer; min-height: 52px; list-style-position: inside; }
.faq details p { padding: 0 16px 14px; margin: 0; }

.foot { margin: 28px 0 8px; font-size: 14px; color: var(--ink-2); }
.edit-banner { background: #333; color: #fff; padding: 6px 12px; font-size: 13px; text-align: center; }
