/* 旅行ガイド：読みやすさを第一に。読者の4割は50代以上なので、文字は大きめ・行間は広め・色の差ははっきり */
:root {
  --bg: #FBF8F3;
  --paper: #FFFFFF;
  --ink: #1E1B18;
  --muted: #5E574E;
  --line: #E4DCCF;
  --accent: #A6322B;        /* 台南のお寺の朱 */
  --accent-soft: #F6E7E2;
  --teal: #1F5C63;
  --teal-soft: #E2EEEF;
  --gold: #8A6A1F;
  --serif: "Noto Serif JP", Georgia, serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
  --zh: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 19px; line-height: 1.9; }
a { color: var(--teal); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.zh { font-family: var(--zh); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ヘッダー */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1040px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.logo small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a { font-size: 16px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; background: var(--bg); }
.nav a:hover { border-color: var(--accent); color: var(--accent); }

/* トップ */
.hero { max-width: 1040px; margin: 0 auto; padding: 56px 20px 24px; }
.hero h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 56px); margin: 0 0 14px; line-height: 1.2; }
.hero p { font-size: 20px; color: var(--muted); max-width: 40em; margin: 0; }
.editions { max-width: 1040px; margin: 24px auto 64px; padding: 0 20px; }
.editions h2 { font-family: var(--serif); font-size: 26px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.edition { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 0 0 14px; text-decoration: none; color: var(--ink); }
.edition:hover { border-color: var(--accent); }
.edition strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--accent); }
.edition small { display: block; font-size: 17px; color: var(--muted); }
.edition em { font-style: normal; font-size: 15px; color: var(--muted); }
.edition.big { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 0; overflow: hidden; }
.edition.big .txt { padding: 18px 20px 18px 0; }
.edition.big .thumb { background-size: cover; background-position: center; min-height: 150px; }
.edition.big:not(:has(.thumb)) { grid-template-columns: 1fr; padding: 0 0 0 22px; }

/* ページ */
.page { max-width: 780px; margin: 0 auto; padding: 28px 20px 60px; }
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.kind { margin: 18px 0 0; }
.type { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .04em; padding: 2px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); margin-right: 8px; line-height: 1.7; }
.t-zukan { background: #F6EBD9; color: var(--gold); }
.t-spot { background: var(--accent-soft); color: var(--accent); }
.t-area { background: #E6EEDF; color: #3F6129; }
.t-plan { background: #ECE3F1; color: #5C3D74; }
.t-top { background: var(--ink); color: #fff; }
.page h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 42px); line-height: 1.35; margin: 10px 0 8px; }
.names { margin: 0 0 8px; font-size: 22px; }
.names .zh { margin-right: 14px; }
.names .reading { color: var(--muted); font-size: 18px; }
.dek { font-size: 21px; line-height: 1.75; color: var(--muted); margin: 0 0 14px; }
.checked { font-size: 16px; margin: 0 0 28px; padding: 10px 14px; background: var(--teal-soft); border-radius: 10px; }
.checked a { color: var(--teal); font-weight: 600; text-decoration: none; }
.checked span { display: block; color: var(--muted); font-size: 15px; }
.lead-photo { margin: 0 0 28px; }
.lead-photo img { width: 100%; border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; }
.lead-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lead-photo figcaption a { color: var(--muted); }
.page h2 { font-family: var(--serif); font-size: 27px; line-height: 1.4; margin: 48px 0 12px; padding: 8px 14px; border-left: 5px solid var(--accent); background: #F3EEE6; border-radius: 0 8px 8px 0; }
.page h3 { font-size: 21px; margin: 28px 0 8px; }
.page p { margin: 0 0 20px; }
.page ul, .page ol { padding-left: 1.4em; margin: 0 0 22px; }
.page li { margin: 0 0 8px; }

/* ひと目でわかる */
.summary-box { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 6px 20px; margin: 0 0 32px; }
dl.summary, dl.facts { display: grid; grid-template-columns: 9em 1fr; margin: 0; }
dl.summary dt, dl.facts dt { font-weight: 600; padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.summary dd, dl.facts dd { margin: 0; padding: 10px 0 10px 8px; border-bottom: 1px solid var(--line); }
dl.summary > :nth-last-child(-n+2), dl.facts > :nth-last-child(-n+2) { border-bottom: 0; }
/* 表の項目名（所要時間・運賃…）に薄い背景色（2026-11-08 須藤さん） */
dl.summary dt, dl.facts dt { background: #F3EEE6; padding-left: 12px; padding-right: 8px; }
dl.summary dd, dl.facts dd { padding-left: 14px; }
.summary-box { padding: 0; overflow: hidden; }
.info { padding-top: 16px; }

/* 場所 */
.spots-h { border-left-color: var(--teal) !important; }
.spot { margin: 40px 0 0; }
.spot h2 .zh { font-family: var(--zh); font-size: .75em; color: var(--muted); margin-left: 8px; }
.tagline { font-family: var(--serif); color: var(--accent); font-size: 20px; margin: 0 0 14px; }
.info { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 20px 18px; margin: 0 0 20px; }
.taxi { margin: 14px 0 0; padding: 12px 16px; background: #FFF8E6; border: 1px dashed var(--gold); border-radius: 10px; }
.taxi .label { display: block; font-size: 15px; color: var(--gold); font-weight: 600; }
.taxi .zh { font-size: 24px; line-height: 1.6; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-block; font: inherit; font-size: 17px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--ink); color: #fff; }
.map { margin: 0 0 24px; }
.map iframe { width: 100%; height: 340px; border: 0; border-radius: 12px; background: var(--line); }
.map figcaption { font-size: 15px; }

/* 中国語 */
.phrases table, .budget table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; }
.phrases th, .phrases td, .budget th, .budget td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.phrases thead th { background: var(--teal-soft); font-size: 16px; }
.phrases td.zh { font-size: 24px; }
.phrases td.reading { color: var(--muted); font-size: 16px; }

/* モデルプラン */
.timeline { list-style: none; padding: 0 !important; margin: 0 0 28px; border-left: 3px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; padding: 0 0 18px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 10px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); }
.timeline .time { font-weight: 700; color: var(--accent); }
.timeline h3 { margin: 0 0 4px !important; font-size: 20px; }
.timeline p { margin: 0 0 8px !important; }
.budget th { width: 45%; font-weight: 600; }

/* 行く前に */
.tips { background: var(--accent-soft); border-radius: 12px; padding: 4px 22px 8px; margin: 40px 0 0; }
.tips h2 { border: 0; padding: 0; background: none; margin: 18px 0 8px; font-size: 22px; }

/* 目次 */
.toc-h { border-left-color: var(--ink) !important; }
.chapter h2 { font-size: 23px; margin-top: 36px; background: #F3EEE6; padding: 8px 14px; border-radius: 0 8px 8px 0; }   /* 目次の柱の見出しに薄い背景色（2026-11-08 須藤さん） */
.chapter h2 small { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 10px; }
ul.toc { list-style: none; padding: 0 !important; margin: 0; }
ul.toc li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
ul.toc li.done a { text-decoration: none; color: var(--ink); font-weight: 600; }
ul.toc li.done a:hover { color: var(--accent); }
ul.toc li.planned { color: #9A9186; }
ul.toc li.planned .type { background: #EFEAE2; color: #9A9186; }
ul.toc li em { font-style: normal; font-size: 14px; margin-left: 8px; }

/* あわせて読む・前後 */
.cards { display: grid; gap: 12px; }
.card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card .thumb { background-size: cover; background-position: center; min-height: 100px; }
.card .thumb.none { background: var(--accent-soft); }
.card .txt { padding: 10px 14px 10px 0; }
.card strong { display: block; font-size: 18px; line-height: 1.5; }
.card small { display: block; font-size: 15px; color: var(--muted); line-height: 1.6; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 0; }
.pager a { display: block; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.5; }
.pager .next { grid-column: 2; text-align: right; }
.pager small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }
.sources { font-size: 16px; }
.sources h2 { font-size: 20px; }
.print { margin-top: 36px; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); font-size: 15px; color: var(--muted); }
.site-footer .inner { max-width: 1040px; margin: 0 auto; padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 18px; }
  dl.summary, dl.facts { grid-template-columns: 1fr; }
  dl.summary dt, dl.facts dt { border-bottom: 0; padding-bottom: 0; }
  .edition.big { grid-template-columns: 1fr; }
  .edition.big .txt { padding: 0 18px 16px; }
  .card { grid-template-columns: 90px 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

/* 印刷（PDF）：地図・ボタン・ヘッダーを外し、文字を黒に */
@media print {
  body { background: #fff; font-size: 12pt; line-height: 1.7; }
  .site-header .nav, .site-footer, .map, .buttons, .print, .pager, .related, .checked a::after { display: none !important; }
  .page { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .page h2 { break-after: avoid; }
  .spot, .summary-box, .taxi, .timeline li { break-inside: avoid; }
}

/* モデルプランの「地図」の小さなボタン */
.timeline .pin { display: inline-block; font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 1px 10px; margin-left: 8px; border: 1px solid var(--teal); border-radius: 999px; text-decoration: none; vertical-align: middle; }

/* ページのいちばん上へ戻るボタン（指で押しやすい大きさ） */
.to-top { position: fixed; right: 16px; bottom: 20px; z-index: 20; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 16px; line-height: 1.1; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.to-top span { font-size: 13px; }
.to-top[hidden] { display: none; }
@media print { .to-top { display: none !important; } }

/* モデルプランの「1日目」「2日目」（2026-11-08 須藤さん） */
.day h2 .daynum { display: inline-block; font-family: var(--sans); font-size: 18px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 12px; margin-right: 10px; vertical-align: 3px; }

/* このページの読み方（台湾の名前の一覧） */
.readings table { width: 100%; border-collapse: collapse; background: var(--paper); }
.readings th, .readings td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.readings thead th { background: #F3EEE6; font-size: 16px; }
.readings td.kanji { font-size: 20px; width: 45%; }
.readings .note { font-size: 16px; color: var(--muted); }
.readings { break-inside: avoid; }

/* 番号つきの地図（モデルプランの日ごと・エリアの歩く順・図鑑の店の場所） */
.route { margin: 8px 0 24px; }
.route-map { width: 100%; height: 360px; border-radius: 12px; background: var(--line); z-index: 0; }
.route figcaption { font-size: 15px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.route .dist { font-weight: 600; color: var(--ink); }
.route small { font-size: 12px; }
.pin-num span { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 15px; font-weight: 700; margin-right: 8px; vertical-align: 3px; }
@media print { .route-map { height: 300px; } }

/* 編のトップのいちばん上の、柱のボタン（目次へすぐ飛べる） */
.chapter-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chapter-nav a { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.chapter-nav a small { font-weight: 400; font-size: 13px; color: var(--muted); }
.chapter-nav a.empty { border-color: var(--line); color: #9A9186; }
.chapter-nav a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.chapter-nav a:hover small { color: #fff; }
.chapter, .about-h { scroll-margin-top: 12px; }
/* 編のトップ：目次の最初の柱「街の編」と、読み物の中の「ひと目でわかる」（2026-11-08） */
.edition-list { display: grid; gap: 12px; margin: 12px 0 8px; }
.edition-list .edition { display: block; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 10px; text-decoration: none; color: inherit; background: var(--paper); }
.edition-list .edition strong { display: block; font-size: 21px; }
.edition-list .edition small { display: block; color: var(--muted, #555); margin-top: 4px; }
.summary-h { font-size: 19px; margin: 24px 0 8px; }
/* このページの内容（ページ内の目次。2026-11-08）：大きめの文字、押しやすい行 */
.page-index { background: #F3EEE6; border-radius: 12px; padding: 14px 18px 10px; margin: 0 0 32px; }
.page-index-h { font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.page-index ol { margin: 0; padding-left: 1.6em; }
.page-index li { font-size: 19px; line-height: 1.5; }
.page-index a { display: block; padding: 9px 0; min-height: 44px; box-sizing: border-box; }
h2[id] { scroll-margin-top: 12px; }
@media print { .page-index { display: none; } }
/* 用語集（読み方の辞書）と、本文から用語集へのリンク（2026-11-08） */
a.gloss { color: inherit; text-decoration: underline dotted; text-underline-offset: 4px; text-decoration-thickness: 1px; }
dl.gloss { margin: 8px 0 24px; }
.gloss-item { border-bottom: 1px solid #ddd; padding: 14px 0; scroll-margin-top: 12px; }
.gloss-item:target { background: #FFF6D8; }
.gloss-item dt { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.gloss-item .kanji { font-size: 24px; font-weight: 700; }
.gloss-item .reading { font-size: 19px; color: #444; }
.gloss-item dd { margin: 6px 0 0; }
.gloss-pages-h { font-size: 15px; color: #555; margin: 8px 0 2px; }
.gloss-pages { margin: 0; padding-left: 1.2em; font-size: 17px; }
.gloss-pages li { padding: 3px 0; }
.gloss-item .alt { font-size: 15px; color: #666; }

/* エリアの歩き方：時間の流れ（2026-11-08） */
ol.walk { list-style: none; padding: 0; margin: 12px 0 8px; }
.walk-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.walk-step .num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--ink, #2b2b2b); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.walk-step p { margin: 2px 0 6px; }
.walk-place { font-size: 21px; }
.walk-meta span { display: inline-block; background: #F3EEE6; border-radius: 6px; padding: 2px 10px; margin: 0 6px 4px 0; font-size: 17px; }
.walk-why { color: #333; }
.walk-move { color: #666; padding: 2px 0 2px 46px; font-size: 17px; }
.walk-route a { display: inline-block; padding: 10px 16px; border: 2px solid var(--ink, #2b2b2b); border-radius: 10px; text-decoration: none; font-weight: 700; }
.another-day { background: #F7F7F2; border: 1px dashed #999; border-radius: 10px; padding: 10px 16px; margin: 16px 0 24px; }
.another-day-h { font-weight: 700; margin: 0 0 4px; }
.spot-name { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
/* 「名前：説明」の項目を2行に（2026-11-08） */
ol.items > li.item, ul.items > li.item { margin-bottom: 18px; }
.item-name { display: block; font-weight: 700; font-size: 20px; }
.item-body { display: block; margin: 4px 0 0 0.6em; }
a.inpage { white-space: nowrap; }
p[id^="p-"] { scroll-margin-top: 12px; }
p[id^="p-"]:target { background: #FFF6D8; }
.item-lines { margin: 4px 0 0 0.6em; padding-left: 1.2em; } .item-lines li { padding: 3px 0; }

/* クッキーのお知らせ（2026-11-08） */
#cookie-note { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1000; max-width: 720px; margin: 0 auto; background: #fff; border: 2px solid var(--ink, #2b2b2b); border-radius: 12px; padding: 12px 16px; box-shadow: 0 4px 18px rgba(0,0,0,.18); font-size: 17px; }
#cookie-note p { margin: 4px 0; }
#cookie-note .cookie-btns { display: flex; gap: 10px; margin-top: 8px; }
#cookie-note .btn { min-height: 44px; padding: 8px 20px; font-size: 17px; }
@media print { #cookie-note { display: none; } }
.purpose { font-size: 16px; color: #555; background: #F7F4EE; border-left: 4px solid #C9B99A; padding: 6px 12px; margin: 0 0 16px; }
/* 目次：柱ごとに押すと開く・「食べる」のまとまり（2026-11-09） */
.chapter details > summary { list-style: none; cursor: pointer; }
.chapter details > summary::-webkit-details-marker { display: none; }
.chapter details > summary h2 { display: flex; align-items: baseline; gap: 10px; }
.chapter details > summary h2::before { content: "＋"; font-size: 18px; color: #8a7a5c; }
.chapter details[open] > summary h2::before { content: "－"; }
.toc-group { border-left: 4px solid #C9B99A; padding-left: 12px; margin: 18px 0; }
.toc-group-h { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.map-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; } .map-list li { display: flex; gap: 8px; align-items: center; }
