:root {
  /* — 紙墨基色（旅行誌視覺契約） — */
  --paper: #f4eddf;
  --paper-deep: #e7dcc9;
  --paper-light: #fffaf1;
  --ink: #2c2522;
  --ink-soft: #675e58;
  --plum: #493747;
  --plum-soft: #735c70;
  /* 墨紫當「文字」用時需要另一支：深色模式的 --plum 是版面底色，不能拿來寫字 */
  --plum-ink: #493747;
  --accent: #a84b32;
  --accent-dark: #783521;
  --accent-pale: #f3dfd5;
  --line: #d4c6b3;
  --line-strong: #8e7e70;
  --red: #a33a32;
  --yellow: #805819;
  --green: #356248;

  /* — 反白文字（永遠壓在深色版面上，不隨主題翻轉） — */
  --on-dark: #fffaf1;
  --on-dark-soft: #e7dcc9;
  --on-accent: #fffaf1;

  /* — 由基色推導的面／狀態色，深色模式只需覆寫這一層 — */
  --surface-card: rgb(255 253 248 / 82%);
  --surface-table: rgb(255 253 248 / 48%);
  --surface-row-hover: rgb(168 75 50 / 7%);
  --surface-warn: #fff4d8;
  --surface-warn-line: #c69a48;
  --surface-danger: #fbeae8;
  --surface-note: #fbefe7;
  --surface-good: #eaf4ed;
  --surface-good-hover: #e4eee7;
  --surface-empty: #fffaee;
  --map-ground: #ded8cd;
  --map-panel: rgb(251 248 240 / 95%);
  --hairline-on-dark: rgb(255 250 241 / 45%);
  --link-underline: rgb(143 55 27 / 38%);

  /* — 字型：Playfair 只負責拉丁字，中文一律回退到已載入的 Noto Sans TC — */
  --font-display: 'Playfair Display', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', serif;
  --font-body: 'Noto Sans TC', 'PingFang TC', 'Hiragino Sans CNS', 'Microsoft JhengHei', system-ui, sans-serif;
  --font-mono: 'Inter', system-ui, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;

  --content-width: 1180px;
  --shadow-paper: 0 18px 44px rgb(44 37 34 / 10%);
  --shadow-nav: 0 8px 24px rgb(43 38 32 / 6%);
  --focus-ring: 3px solid rgb(168 75 50 / 55%);
  --nav-height: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 夜讀模式：同一本旅行誌，換成暖色書桌燈下的紙 */
    --paper: #191411;
    --paper-deep: #221b17;
    --paper-light: #241d19;
    --ink: #ece2d5;
    --ink-soft: #b0a496;
    --plum: #3d2f3c;
    --plum-soft: #c0a6bc;
    --plum-ink: #d3b8ce;
    --accent: #e08a6b;
    --accent-dark: #f0a98d;
    --accent-pale: #3a2620;
    --line: #3a302a;
    --line-strong: #6c5f55;
    --red: #ef9b91;
    --yellow: #d9b163;
    --green: #86c3a1;

    --surface-card: rgb(255 246 232 / 4%);
    --surface-table: rgb(255 246 232 / 3%);
    --surface-row-hover: rgb(224 138 107 / 10%);
    --surface-warn: rgb(217 177 99 / 14%);
    --surface-warn-line: rgb(217 177 99 / 55%);
    --surface-danger: rgb(239 155 145 / 13%);
    --surface-note: rgb(224 138 107 / 13%);
    --surface-good: rgb(134 195 161 / 13%);
    --surface-good-hover: rgb(134 195 161 / 20%);
    --surface-empty: rgb(217 177 99 / 10%);
    --map-ground: #2b241f;
    --map-panel: rgb(36 29 25 / 95%);
    --link-underline: rgb(240 169 141 / 45%);

    --shadow-paper: 0 18px 44px rgb(0 0 0 / 45%);
    --shadow-nav: 0 8px 24px rgb(0 0 0 / 35%);
    --focus-ring: 3px solid rgb(240 169 141 / 60%);
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  /* 中文標題不能沿用拉丁字的緊排與極小行高，否則會擠成一團 */
  line-height: 1.24;
  line-break: strict;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  font-size: clamp(2.35rem, 4.6vw, 4rem);
  letter-spacing: -0.01em;
}

h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  letter-spacing: -0.005em;
}

h3 {
  margin: 2.4rem 0 1rem;
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
}

h4 {
  font-size: 1.08rem;
}

p,
ul,
ol,
dl {
  margin-top: 0;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: var(--accent-dark);
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.nav {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 0 3rem;
  gap: 0.15rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(4px)) {
  .nav {
    background: var(--paper);
  }
}

.nav-brand {
  display: grid;
  align-content: center;
  gap: 0.05rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav-brand span {
  line-height: 1;
}

.nav-brand small {
  color: var(--plum-soft);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.journal-edition {
  margin-right: 1rem;
  color: var(--plum-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.nav > a:not(.nav-brand),
.nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.nav > a {
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  margin-left: 0.35rem;
  content: '▾';
  transition: transform 160ms ease;
}

.nav-dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.nav > a:not(.nav-brand):hover,
.nav-dropdown > summary:hover,
.nav-dropdown > summary:focus-visible,
.nav-dropdown-current > summary {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > ul {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  display: none;
  min-width: 260px;
  margin: 0;
  padding: 0.65rem 0;
  border: 1px solid var(--line);
  background: var(--paper-light);
  box-shadow: var(--shadow-paper);
  list-style: none;
  z-index: 101;
}

.nav-dropdown[open] > ul {
  display: block;
}

.nav-dropdown > ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.62rem 1.2rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.nav-dropdown > ul a:hover,
.nav-dropdown > ul a:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
}

/* 目前所在頁：左側色條 + 粗體，一眼看出自己在第幾天／哪座城市 */
.nav-dropdown > ul a.nav-link-current {
  border-left: 3px solid var(--accent);
  padding-left: calc(1.2rem - 3px);
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 700;
}

.nav-dropdown > ul a.nav-link-current::after {
  margin-left: auto;
  content: '●';
  font-size: 0.6rem;
}

.nav-dropdown > ul a.nav-link-current:hover,
.nav-dropdown > ul a.nav-link-current:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
}

/* 桌機維持常駐搜尋列；手機由 nav.js 收合成一列入口，把首屏還給內容 */
/* 沒有查詢時不佔高度，但保留在無障礙樹裡讓 aria-live 仍能播報 */
.page {
  width: min(100%, var(--content-width));
  min-height: 70vh;
  margin: 0 auto;
  padding: 4.5rem 3rem 6rem;
}

.hero-dek {
  max-width: 62ch;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.eyebrow,
.section-num,
.meta-label {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-num {
  display: block;
  margin-bottom: 0.75rem;
}

.chapter-index {
  margin: 2.5rem 0 1rem;
  padding: 1.1rem 0 1.2rem;
  border-block: 1px solid var(--line-strong);
}

.chapter-index-label {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chapter-index ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-index a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chapter-index a > span {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-index a:hover,
.chapter-index a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-pale);
  color: var(--accent-dark);
}

.chapter-index a:hover > span,
.chapter-index a:focus-visible > span {
  color: var(--accent-dark);
}

.section {
  margin-top: 5rem;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

:target {
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.section-heading {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading h2 {
  margin: 0;
}

.section-heading-simple {
  grid-template-columns: 1fr;
}

nav.section-heading > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

nav.section-heading > a:last-child {
  justify-content: flex-end;
}

.lead {
  max-width: 72ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.grid-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  min-width: 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-card);
}

.card-accent {
  border-top: 4px solid var(--accent);
}

.card h3,
.card h4 {
  margin: 0 0 0.65rem;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: var(--accent);
  color: inherit;
  box-shadow: var(--shadow-paper);
  transform: translateY(-3px);
}

.card-link:active {
  transform: translateY(-1px);
}

.journal-day-entry > a,
.journal-city-card > a,
.journal-status-strip a {
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.route-strip {
  display: flex;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem 0;
  overflow-x: auto;
  border-block: 1px solid var(--line);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.route-stop {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.route-stop:not(:last-child)::after {
  width: clamp(2rem, 5vw, 5rem);
  height: 1px;
  margin: 0 0.8rem;
  background: var(--accent);
  content: '';
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline > li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-time {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.timeline-title {
  font-weight: 700;
}

.timeline-note {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.table-wrap {
  width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}

.table-editorial {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-table);
}

.table-editorial th,
.table-editorial td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-editorial th {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-editorial tbody tr:hover {
  background: var(--surface-row-hover);
}

.table-editorial .number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag-red,
.tag-yellow,
.tag-todo,
.tag-muted {
  display: inline-block;
  margin: 0 0.2rem 0.2rem 0;
  padding: 0.14rem 0.48rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: 0.08em;
}

.tag-red {
  background: var(--red);
  color: var(--paper);
}

.tag-yellow {
  border: 1px solid var(--surface-warn-line);
  background: var(--surface-warn);
  color: var(--yellow);
}

.tag-todo {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-dark);
}

.tag-muted {
  background: var(--paper-deep);
  color: var(--ink-soft);
}

.status-verified,
.status-recheck,
.status-pending,
.status-private {
  display: inline-block;
  padding: 0.14rem 0.48rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.status-verified {
  background: var(--surface-good);
  color: var(--green);
}

.status-recheck {
  border: 1px solid var(--surface-warn-line);
  background: var(--surface-warn);
  color: var(--yellow);
}

.status-pending {
  border: 1px solid var(--accent);
  color: var(--accent-dark);
}

.status-private {
  background: var(--paper-deep);
  color: var(--ink-soft);
}

.database-index {
  margin: 2.5rem 0 4.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.database-index h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.database-index ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 2rem;
  margin: 0;
  padding-left: 1.35rem;
}

.database-card {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  box-shadow: var(--shadow-paper);
}

.database-card h3 {
  margin: 0.55rem 0 0.85rem;
}

.database-card-header {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  justify-content: space-between;
}

.database-card-header .eyebrow {
  margin: 0;
}

.sos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.source-meta {
  margin: 1.25rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.source-meta > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.source-meta dt,
.source-meta dd {
  margin: 0;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 0.55rem;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-export:hover,
.btn-export:focus-visible {
  background: var(--accent-pale);
}

.btn-export + .btn-export {
  margin-left: 0.5rem;
}

/* 卡片內的可展開清單也要有 44px 觸控高度 */
.card > summary,
details.card > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.database-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.callout-risk,
.callout-note,
.callout-good {
  margin: 1.5rem 0;
  padding: 1.05rem 1.25rem;
  border-left: 4px solid;
  background: var(--paper-light);
}

.callout-risk {
  border-color: var(--red);
  background: var(--surface-danger);
}

.callout-note {
  border-color: var(--accent);
  background: var(--surface-note);
}

.callout-good {
  border-color: var(--green);
  background: var(--surface-good);
}

.callout-risk > :last-child,
.callout-note > :last-child,
.callout-good > :last-child {
  margin-bottom: 0;
}

.check-list,
.link-list {
  padding-left: 1.3rem;
}

.check-list li,
.link-list li {
  margin-bottom: 0.65rem;
}

.operation-addresses,
.operation-routes,
.night-checks {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.operation-address,
.operation-routes li,
.night-checks li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.operation-address:first-child,
.operation-routes li:first-child,
.night-checks li:first-child {
  padding-top: 0;
  border-top: 0;
}

.operation-address > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.operation-address span,
.operation-address p,
.operation-routes p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.operation-address p,
.operation-routes p {
  margin: 0.35rem 0;
}

.operation-address a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.operation-mode {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.18rem 0.45rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.operation-alerts {
  margin-top: 1.25rem;
}

.night-checks li {
  position: relative;
  padding-left: 2rem;
}

.night-checks li::before {
  position: absolute;
  top: 0.78rem;
  left: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--line-strong);
  content: '';
}

.map-container {
  width: 100%;
  height: 520px;
  margin: 1.5rem 0;
  border: 1px solid var(--line-strong);
  background: var(--map-ground);
  box-shadow: var(--shadow-paper);
  touch-action: pan-y !important;
}

.map-fallback {
  display: grid;
  height: 100%;
  margin: 0;
  padding: 1.5rem;
  place-content: center;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: center;
  text-wrap: balance;
}

.map-caption {
  margin-top: -0.75rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.map-legend {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--map-panel);
  box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.9;
}

.map-legend div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-legend span {
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Leaflet 內建控制項的觸控尺寸與對比偏小，這裡以本站標準覆寫。
   選擇器帶上 .map-container 提高權重（leaflet.css 在 main.css 之後載入），
   顏色一律寫死深色：Leaflet 控制項底色是固定白色，不能用會隨主題翻轉的 token。 */
.map-container .leaflet-bar a,
.map-container.leaflet-touch .leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
  color: #2c2522;
  font-size: 1.15rem;
}

.map-container .leaflet-bar a:hover,
.map-container .leaflet-bar a:focus {
  background-color: #f4eddf;
  color: #783521;
}

.map-container .leaflet-control-attribution {
  padding: 0.45rem 0.6rem;
  background: rgb(255 255 255 / 92%);
  color: #33302c;
  font-size: 0.75rem;
  line-height: 1.9;
}

.map-container .leaflet-control-attribution a {
  color: #6b2f14;
  text-decoration: underline;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--paper-light);
  color: var(--ink);
}

.leaflet-popup-content {
  font-family: var(--font-body);
  line-height: 1.5;
}

.footer {
  padding: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.footer-inner {
  display: flex;
  width: min(100%, var(--content-width));
  margin: 0 auto;
  justify-content: space-between;
  gap: 2rem;
}

.footer p {
  margin: 0;
}

.journal-cover {
  display: grid;
  grid-template-columns: minmax(19rem, 5.4fr) minmax(0, 6.6fr);
  min-height: 30rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-light);
  box-shadow: var(--shadow-paper);
}

.journal-cover-copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3.75rem);
  background: var(--plum);
  color: var(--on-dark);
}

.journal-kicker {
  color: var(--on-dark-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.journal-cover h1 {
  max-width: none;
  /* 以容器寬度封頂：字體回退成較寬的襯線字時 POLSKA 也不會溢出紫版 */
  font-size: min(clamp(3rem, 8vw, 6.5rem), 19cqi);
  letter-spacing: -0.045em;
  line-height: 0.86;
}

.journal-cover-route {
  max-width: 28ch;
  margin: auto 0 1.75rem;
  color: var(--on-dark-soft);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.journal-cover-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-on-dark);
}

.journal-cover-meta > div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
}

.journal-cover-meta dt,
.journal-cover-meta dd {
  margin: 0;
}

.journal-cover-meta dt {
  color: var(--on-dark-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.journal-cover-meta dd {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.journal-cover-figure {
  position: relative;
  min-width: 0;
  margin: 0;
  background: var(--paper-deep);
}

.journal-cover-fallback::before {
  position: absolute;
  inset: 1.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--plum-soft);
  content: 'POLSKA · 2026';
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 5rem);
}

.journal-cover-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-cover-figure figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0.45rem 0.65rem;
  background: var(--paper-light);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.journal-route {
  margin-block: 0 1.5rem;
  padding-inline: 0.25rem;
}

.journal-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--line-strong);
}

.journal-status-strip > * {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  min-height: 72px;
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.journal-status-strip > *:last-child {
  border-right: 0;
}

.journal-status-strip strong {
  color: var(--plum-ink);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.journal-status-strip span span,
.journal-status-strip a span {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.journal-status-strip a:hover,
.journal-status-strip a:focus-visible {
  background: var(--paper-light);
  color: var(--accent-dark);
}

.journal-itinerary {
  margin: 2rem 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.journal-day-entry {
  border-bottom: 1px solid var(--line);
}

.journal-day-entry > a {
  display: grid;
  grid-template-columns: 4rem 7rem minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 86px;
  padding: 1rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.journal-day-entry > a:hover,
.journal-day-entry > a:focus-visible {
  background: var(--paper-light);
}

.journal-day-number {
  color: var(--plum-ink);
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.journal-day-date {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.journal-day-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.journal-day-copy b {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.journal-day-copy small {
  color: var(--ink-soft);
  font-size: 1rem;
}

.journal-city-chapters,
.journal-notes-grid,
.journal-flight-grid,
.journal-toolkit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.journal-city-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.journal-city-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(13rem, 0.85fr);
  min-height: 15rem;
  color: var(--ink);
  text-decoration: none;
}

.journal-city-card figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.journal-city-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-city-card figcaption {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.55rem;
  background: var(--paper-light);
  color: var(--plum-ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.journal-city-card > a > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.journal-city-card h3,
.journal-note-card h3,
.journal-flight h3 {
  margin: 0 0 0.65rem;
}

.journal-city-card span,
.journal-text-link {
  margin-top: auto;
  color: var(--accent-dark);
  font-weight: 700;
}

/* 章節結尾的文字連結也要有 44px 可點擊高度 */
.journal-text-link,
.journal-note-card > a,
.journal-toolkit .card-link span,
.journal-city-card span,
.card > a:last-child:not(.card-link) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.journal-city-card > a:hover,
.journal-city-card > a:focus-visible {
  background: var(--paper-deep);
}

.journal-note-card,
.journal-flight {
  min-width: 0;
  padding: 1.4rem;
  border-top: 3px solid var(--plum);
  background: var(--paper-light);
}

.journal-note-card .check-list {
  font-size: 0.92rem;
}

.journal-flight-grid,
.journal-toolkit {
  align-items: stretch;
}

.journal-toolkit .card {
  min-height: 13rem;
}

.journal-appendix-header {
  position: relative;
  max-width: 62rem;
  margin-bottom: 4rem;
  padding: 2.5rem 0 2rem 8.5rem;
  border-block: 1px solid var(--line-strong);
}

.journal-appendix-header::before {
  position: absolute;
  top: 2.75rem;
  left: 0;
  color: var(--plum-ink);
  content: 'APPENDIX';
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.journal-appendix-header h1 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.journal-practical .page > .section,
.journal-practical .page > section,
.journal-practical .page > .grid-wide,
.journal-practical .page > .callout-risk,
.journal-practical .page > .callout-note,
.journal-practical .page > .callout-good {
  max-width: 68rem;
}

.journal-database {
  max-width: none;
}

.journal-database .journal-appendix-header {
  max-width: 68rem;
}

.journal-database .database-index {
  border-right: 0;
  border-left: 0;
}

.journal-day-header,
.journal-city-cover {
  display: grid;
  grid-template-columns: minmax(21rem, 0.92fr) minmax(0, 1.08fr);
  min-height: 30rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-light);
  box-shadow: var(--shadow-paper);
}

.journal-day-heading,
.journal-city-cover-copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3.75rem);
}

.journal-day-heading {
  background: var(--plum);
  color: var(--on-dark);
}

.journal-day-heading .section-num {
  color: var(--on-dark-soft);
}

.journal-day-heading h1,
.journal-city-cover-copy h1 {
  margin-block: 1.1rem;
  /* 中文一個字就是一個全形，靠容器單位把每行控制在 6–8 字 */
  font-size: min(clamp(2.1rem, 4.2vw, 3.4rem), 14cqi);
  line-height: 1.2;
}

.journal-day-heading .hero-dek {
  color: var(--on-dark-soft);
}

.journal-day-cover,
.journal-city-cover figure {
  position: relative;
  min-width: 0;
  min-height: 30rem;
  margin: 0;
  overflow: hidden;
  background: var(--paper-deep);
}

.journal-day-cover img,
.journal-city-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-day-cover figcaption,
.journal-city-cover figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0.45rem 0.65rem;
  background: var(--paper-light);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.journal-day-cover-fallback {
  display: grid;
  min-height: 30rem;
  place-items: center;
  background: var(--paper-deep);
  color: var(--plum-soft);
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
}

.journal-day-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 3rem;
  border-block: 1px solid var(--line-strong);
}

.journal-day-facts > div {
  min-width: 0;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--line);
}

.journal-day-facts > div:last-child {
  border-right: 0;
}

.journal-day-facts dt {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.journal-day-facts dd {
  margin: 0.25rem 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.journal-city-cover {
  grid-template-columns: minmax(0, 1.08fr) minmax(21rem, 0.92fr);
}

.journal-city-cover-copy {
  border-left: 1px solid var(--line-strong);
}

.journal-city-cover-copy .hero-dek {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.journal-city-cover-copy .eyebrow {
  display: block;
  margin-bottom: 0.65rem;
}

.journal-city-cover-copy .check-list {
  margin-bottom: 0;
}

.journal-city-story > .section:first-child {
  margin-top: 3rem;
}

.journal-city-map {
  border-top-color: var(--plum);
}

@media (max-width: 920px) {
  .nav {
    padding-inline: 1.25rem;
  }

  .nav > a,
  .nav-dropdown > a {
    padding-inline: 0.5rem;
  }

  .page {
    padding-inline: 1.5rem;
  }

  .grid-wide,
  .sos-grid,
  .journal-cover,
  .journal-city-chapters,
  .journal-notes-grid {
    grid-template-columns: 1fr;
  }

  .journal-cover-figure {
    min-height: 26rem;
  }

  .journal-city-card > a {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.75fr);
  }

  .journal-day-header,
  .journal-city-cover {
    grid-template-columns: 1fr;
  }

  .journal-day-cover,
  .journal-day-cover-fallback,
  .journal-city-cover figure {
    min-height: 26rem;
  }

  .journal-city-cover-copy {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .journal-appendix-header {
    padding-left: 6rem;
  }

  .database-index ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .database-section-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {
  :root {
    --nav-height: 56px;
  }

  .nav {
    /* sticky 與 relative 一樣建立堆疊脈絡（選單仍蓋在內容之上），
       但捲動時導覽列不會消失，手機上不必回到頂端才能換章節 */
    position: sticky;
    z-index: 100;
    isolation: isolate;
    flex-wrap: nowrap;
    gap: 0;
    min-height: var(--nav-height);
    padding-inline: 0.9rem;
  }

  .nav-brand {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
  }

  .nav-brand small {
    display: none;
  }

  .nav > a:not(.nav-brand),
  .nav-dropdown > summary {
    padding-inline: 0.42rem;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .nav-brand {
    white-space: nowrap;
  }

  .nav-dropdown > summary::after {
    margin-left: 0.15rem;
  }

  .journal-edition {
    display: none;
  }

  .nav-dropdown {
    position: static;
  }

  .nav-dropdown > ul {
    top: 100%;
    right: 0.9rem;
    left: 0.9rem;
    min-width: 0;
    max-height: min(32rem, calc(100dvh - var(--nav-height) - 1.5rem));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* 收合列的標題已經說明用途，欄位標籤只留給輔助技術，避免同一句話出現兩次 */
  .page {
    padding-top: 2.5rem;
  }

  h1 {
    font-size: clamp(1.95rem, 8.5vw, 2.6rem);
  }

  .journal-cover {
    min-height: 0;
  }

  .journal-cover-copy {
    min-height: 19rem;
    padding: 1.5rem;
  }

  .journal-cover h1 {
    font-size: min(clamp(2.9rem, 16vw, 4.4rem), 26cqi);
  }

  .journal-cover-figure {
    min-height: 0;
  }

  .journal-cover-photo {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .journal-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-status-strip > * {
    min-height: 64px;
    border-bottom: 1px solid var(--line);
  }

  .journal-status-strip > *:nth-child(2n) {
    border-right: 0;
  }

  .journal-status-strip > *:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .journal-day-entry > a {
    grid-template-columns: 3.2rem minmax(0, 1fr) auto;
    gap: 0.7rem;
    min-height: 76px;
    padding-inline: 0.25rem;
  }

  .journal-day-number {
    font-size: 2rem;
  }

  .journal-day-date {
    grid-column: 2;
    grid-row: 2;
  }

  .journal-day-copy {
    grid-column: 2 / -1;
  }

  .journal-day-copy small {
    font-size: 1rem;
  }

  .journal-day-entry .tag-todo,
  .journal-day-entry .tag-muted {
    grid-column: 3;
    grid-row: 2;
    white-space: nowrap;
  }

  .journal-city-chapters,
  .journal-notes-grid,
  .journal-flight-grid,
  .journal-toolkit {
    grid-template-columns: 1fr;
  }

  .chapter-index {
    margin-top: 1.75rem;
  }

  .chapter-index ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .chapter-index a {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.1rem;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
  }

  .journal-city-card > a {
    grid-template-columns: 1fr;
  }

  .journal-city-card figure {
    aspect-ratio: 4 / 3;
  }

  .journal-city-card > a > div {
    min-height: 12rem;
  }

  .journal-day-header,
  .journal-city-cover {
    min-height: 0;
  }

  .journal-day-heading,
  .journal-city-cover-copy {
    padding: 1.5rem;
  }

  .journal-day-heading {
    min-height: 17rem;
  }

  .journal-day-heading h1,
  .journal-city-cover-copy h1 {
    font-size: min(clamp(1.9rem, 8.5vw, 2.6rem), 15cqi);
  }

  .journal-day-cover,
  .journal-day-cover-fallback,
  .journal-city-cover figure {
    min-height: 0;
  }

  .journal-day-cover img,
  .journal-city-cover img {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .journal-day-cover-fallback {
    min-height: 18rem;
  }

  .journal-day-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-day-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .journal-day-facts > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .journal-appendix-header {
    margin-bottom: 3rem;
    padding: 1.5rem 0;
  }

  .journal-appendix-header::before {
    position: static;
    display: block;
    margin-bottom: 1rem;
    writing-mode: horizontal-tb;
  }

  .journal-appendix-header h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
  }

  .table-wrap-cards {
    overflow-x: visible;
  }

  .table-itinerary,
  .table-schedule,
  .table-itinerary tbody,
  .table-schedule tbody,
  .table-itinerary tr,
  .table-schedule tr,
  .table-itinerary td,
  .table-schedule td {
    display: block;
    width: 100%;
  }

  .table-itinerary thead,
  .table-schedule thead {
    display: none;
  }

  .table-itinerary tbody,
  .table-schedule tbody {
    display: grid;
    gap: 1rem;
    padding: 1rem 0;
  }

  .table-itinerary tr,
  .table-schedule tr {
    padding: 0.55rem 1rem;
    border: 1px solid var(--line);
    background: var(--paper-light);
    box-shadow: var(--shadow-paper);
  }

  .table-itinerary td,
  .table-schedule td {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0;
    overflow-wrap: anywhere;
  }

  .table-itinerary td::before,
  .table-schedule td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .table-itinerary td:last-child,
  .table-schedule td:last-child {
    border-bottom: 0;
  }

  .table-itinerary td:last-child a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .section-heading,
  .timeline > li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .map-container {
    height: 420px;
  }

  .database-index ol {
    grid-template-columns: 1fr;
  }

  .database-card-header {
    align-items: start;
    flex-direction: column;
  }

  .operation-address > div {
    align-items: start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --paper: #fff;
    --paper-deep: #fff;
    --paper-light: #fff;
    --ink: #000;
    --ink-soft: #333;
    --surface-card: transparent;
    --surface-table: transparent;
    --shadow-paper: none;
    --shadow-nav: none;
  }

  /* 列印／存 PDF 時不需要的介面元素（移除搜尋列時這條規則被一併刪掉，已補回） */
  .nav,
  .chapter-index,
  .skip-link,
  .map-container {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.55;
  }

  .page {
    width: 100%;
    min-height: 0;
    padding: 0;
  }

  .journal-cover,
  .journal-day-header,
  .journal-city-cover,
  .journal-day-cover,
  .card,
  .database-card,
  .journal-note-card,
  .timeline > li,
  .table-editorial tr {
    break-inside: avoid;
  }

  .section {
    margin-top: 2rem;
    break-before: auto;
  }

  a[href^="http"]::after {
    color: #444;
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    word-break: break-all;
  }

  .journal-cover-copy,
  .journal-day-heading {
    background: #fff;
    color: #000;
  }

  .journal-kicker,
  .journal-cover-route,
  .journal-cover-meta dt,
  .journal-day-heading .section-num,
  .journal-day-heading .hero-dek {
    color: #333;
  }
}
