:root {
  --bg: #f3f6f2;
  --card: #ffffff;
  --text: #13262f;
  --muted: #66757a;
  --accent: #287b90;
  --accent-soft: #d9ebee;
  --terracotta: #b65c3a;
  --terracotta-soft: #f6e2d8;
  --border: #d7dfdc;
  --tag-bg: #e3eeee;
  --shadow: 0 16px 48px rgba(25, 47, 55, .08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --rule: rgba(40, 123, 144, .035);
  --mono: ui-monospace, SFMono-Regular, Menlo, "SF Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111d21;
    --card: #17262b;
    --text: #e7eff0;
    --muted: #93a6ab;
    --accent: #6fb7c6;
    --accent-soft: #1d343b;
    --terracotta: #dd9068;
    --terracotta-soft: #3a2820;
    --border: #27393f;
    --tag-bg: #1d3238;
    --shadow: 0 16px 48px rgba(0, 0, 0, .3);
    --rule: rgba(111, 183, 198, .045);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(var(--rule) 1px, transparent 1px), var(--bg);
  background-size: 100% 32px;
  font: 16px/1.8 "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }

/* ---------- 站点头尾 ---------- */
.site-header { padding: 56px 0 28px; }
.site-title {
  font-family: "Noto Serif SC", serif;
  font-size: 2rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--text); text-decoration: none;
}
.site-desc { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.site-footer { padding: 48px 0; color: var(--muted); font-size: .8rem; text-align: center; letter-spacing: .06em; }

/* ---------- 右上角汇率换算 ---------- */
.currency-converter {
  position: fixed; top: 16px; right: 16px; z-index: 60;
  width: min(360px, calc(100vw - 24px));
  font-size: .84rem; line-height: 1.45;
  filter: drop-shadow(0 14px 36px rgba(19, 38, 47, .16));
}
.currency-converter > summary {
  width: max-content; max-width: 100%; margin-left: auto; padding: 7px 12px 7px 7px;
  display: flex; align-items: center; gap: 8px;
  list-style: none; cursor: pointer; user-select: none;
  color: #eff8f8; background: color-mix(in srgb, var(--text) 94%, transparent);
  border: 1px solid color-mix(in srgb, #fff 14%, transparent); border-radius: 999px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.currency-converter > summary::-webkit-details-marker { display: none; }
.currency-summary-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; background: color-mix(in srgb, var(--accent) 76%, #fff 24%);
  font: 700 1rem/1 var(--mono);
}
.currency-summary-copy { display: grid; gap: 2px; text-align: left; }
.currency-converter > summary strong { color: #fff; font-size: .8rem; line-height: 1; }
.currency-converter > summary small { color: #b9d0d4; font: 600 .65rem/1.15 var(--mono); }
.currency-converter[open] > summary { border-radius: 15px 15px 0 0; }
.currency-panel {
  padding: 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px 0 16px 16px; box-shadow: var(--shadow);
}
.currency-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.currency-title > div { display: grid; gap: 2px; }
.currency-title strong { font-family: "Noto Serif SC", serif; font-size: 1.04rem; line-height: 1.4; }
.currency-title div span { color: var(--muted); font-size: .7rem; }
.currency-status {
  flex: none; margin-top: 2px; padding: 3px 7px; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; font: 600 .65rem/1.45 var(--mono);
}
.currency-field {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(104px, 42%); align-items: center; gap: 9px;
  min-height: 53px; padding: 6px 0; border-top: 1px solid var(--border);
}
.currency-field:first-of-type { border-top: 0; }
.currency-symbol {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  color: var(--accent); background: var(--accent-soft); font: 700 .9rem/1 var(--mono);
}
.currency-name { display: grid; color: var(--text); font-weight: 600; line-height: 1.25; }
.currency-name small { margin-top: 3px; color: var(--muted); font: 600 .64rem/1 var(--mono); letter-spacing: .08em; }
.currency-field input {
  width: 100%; min-width: 0; padding: 9px 10px; color: var(--text); background: var(--bg);
  border: 1px solid transparent; border-radius: 10px; outline: none; text-align: right;
  font: 700 1rem/1.2 var(--mono); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.currency-field input::-webkit-inner-spin-button, .currency-field input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.currency-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.currency-rate-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 10px 11px; color: var(--text); background: var(--accent-soft); border-radius: 11px;
}
.currency-rate-card > div { display: grid; gap: 2px; font: 700 .7rem/1.4 var(--mono); }
.currency-rate-card a { flex: none; font-size: .68rem; font-weight: 600; text-decoration: none; }
.currency-panel > p { margin: 9px 1px 0; color: var(--muted); font-size: .67rem; }

/* ---------- 航班摘要 ---------- */
.flight-card {
  margin: 10px 0 8px; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
}
.flight-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 10px; padding: 13px 15px; }
.flight-row + .flight-row { border-top: 1px solid var(--border); }
.flight-direction {
  align-self: stretch; display: grid; place-items: center; min-height: 42px;
  color: var(--accent); background: var(--accent-soft); border-radius: 10px;
  font: 700 .72rem/1 var(--mono); letter-spacing: .08em;
}
.flight-path { display: grid; grid-template-columns: minmax(0, .9fr) auto minmax(0, 1.2fr) auto minmax(0, .9fr); align-items: center; gap: 8px; }
.flight-point { min-width: 0; display: grid; gap: 2px; }
.flight-point time, .flight-return-main time { color: var(--muted); font: 600 .67rem/1.3 var(--mono); }
.flight-point strong, .flight-return-main strong { font-size: .82rem; line-height: 1.35; }
.flight-point small { color: var(--terracotta); font-size: .65rem; line-height: 1.3; }
.flight-arrow { color: var(--border); font: 700 .9rem/1 var(--mono); }
.flight-transfer { padding: 7px 9px; background: var(--terracotta-soft); border-radius: 10px; }
.flight-return-main { display: flex; align-items: baseline; gap: 14px; }
.flight-alert {
  padding: 9px 15px; color: var(--terracotta); background: var(--terracotta-soft);
  font-size: .75rem; line-height: 1.5; text-align: center;
}
.flight-details { margin: 7px 0 18px; border-bottom: 1px solid var(--border); }
.flight-details > summary { padding: 8px 2px 10px; color: var(--accent); cursor: pointer; font-size: .78rem; font-weight: 600; }
.flight-details[open] > summary { margin-bottom: 4px; }
.flight-details ul { margin: 0 0 13px; padding-left: 22px; color: var(--muted); font-size: .8rem; }
.flight-details li { margin: 4px 0; }

.overview-status {
  display: inline-block; margin-left: 3px; padding: 1px 6px; vertical-align: .08em;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px;
  font: 700 .62rem/1.55 var(--mono); white-space: nowrap;
}
.overview-status.is-deadline { color: var(--terracotta); background: var(--terracotta-soft); }

/* ---------- 首页卡片 ---------- */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.card {
  display: block; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-facts {
  display: grid; grid-template-columns: 1.1fr 1.35fr .9fr; gap: 10px;
  margin: 0 0 17px; padding: 0 0 16px; border-bottom: 1px solid var(--border);
}
.card-fact { min-width: 0; display: grid; align-content: start; gap: 4px; }
.card-fact small {
  color: var(--muted); font: 700 .62rem/1.35 var(--mono);
  letter-spacing: .1em;
}
.card-fact strong {
  color: var(--text); font-size: .8rem; font-weight: 600; line-height: 1.45;
  overflow-wrap: anywhere;
}
.card-fact time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.card h2 { font-family: "Noto Serif SC", serif; font-size: 1.25rem; margin: 0 0 6px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

@media (max-width: 560px) {
  .card { padding: 19px 18px; }
  .card-facts { grid-template-columns: 1fr; gap: 9px; }
  .card-fact { grid-template-columns: 68px minmax(0, 1fr); align-items: baseline; gap: 10px; }
}

/* ---------- 文章头 ---------- */
.back { display: inline-block; margin-bottom: 20px; text-decoration: none; font-size: .85rem; letter-spacing: .04em; }
.post-title {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.25; letter-spacing: -.03em;
  margin: 0 0 12px;
}
.meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  color: var(--muted); font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
}
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--tag-bg); color: var(--accent);
  padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}

/* ---------- 倒计时 ---------- */
.countdown {
  margin: 20px 0 0; padding: 20px 22px;
  background: var(--text); color: #eff8f8;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.countdown span { display: block; color: #a9c3c8; font-size: .78rem; font-weight: 700; letter-spacing: .12em; }
.countdown strong {
  display: block; margin-top: 8px; color: #fff;
  font: 700 clamp(1.8rem, 7vw, 2.4rem)/1.05 var(--mono);
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.countdown small { display: block; margin-top: 10px; color: #a9c3c8; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; }
@media (prefers-color-scheme: dark) {
  .countdown { background: var(--card); border: 1px solid var(--border); }
}

/* ---------- 正文 ---------- */
.content { margin-top: 26px; }
.content h2 {
  font-family: "Noto Serif SC", serif; font-size: 1.5rem; letter-spacing: -.03em;
  margin-top: 2.2em; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.content h3 {
  font-size: 1.05rem; color: var(--accent); margin: 2em 0 .6em;
  letter-spacing: .01em;
}
.content h4 { font-size: .95rem; color: var(--muted); margin: 1.6em 0 .4em; letter-spacing: .08em; }
.content p, .content li { overflow-wrap: anywhere; }
.content strong { font-weight: 700; }
.content img { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }

/* 提示卡 */
.content blockquote {
  margin: 1.2em 0; padding: 14px 18px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--terracotta);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow); font-size: .94rem; line-height: 1.75;
}
.content blockquote p { margin: .45em 0; }
.content blockquote p:first-child { margin-top: 0; }
.content blockquote p:last-child { margin-bottom: 0; }
.content blockquote > p + p,
.content blockquote > p + ol,
.content blockquote > ol + p,
.content blockquote > p + ul,
.content blockquote > ul + p {
  margin-top: .8em; padding-top: .8em;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.content blockquote > ol, .content blockquote > ul { padding-left: 1.35em; }

/* 表格 */
.content table {
  width: 100%; margin: 1.3em 0; font-size: .92rem;
  border-collapse: separate; border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow);
}
.content th, .content td { border: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
.content tr:last-child td { border-bottom: 0; }
.content th {
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.content td:first-child { white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.content td:first-child strong, .content td:first-child a { color: var(--text); font-weight: 700; }

.content code { background: var(--tag-bg); padding: 2px 7px; border-radius: 6px; font-size: .88em; }
.content pre { background: var(--card); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-md); overflow-x: auto; }
.content pre code { background: none; padding: 0; }

/* 勾选清单 */
.content li { margin: .3em 0; }
.content li:has(input[type="checkbox"]) { list-style: none; margin-left: -1.4em; }
.content input[type="checkbox"] {
  appearance: none; width: 20px; height: 20px; margin: 0 10px -4px 0;
  border: 1.5px solid var(--muted); border-radius: 6px; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; vertical-align: baseline;
}
.content input[type="checkbox"]::after { content: "✓"; color: #fff; font-size: 13px; opacity: 0; transform: scale(.6); transition: .15s ease; }
.content input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent); }
.content input[type="checkbox"]:checked::after { opacity: 1; transform: scale(1); }
.content li:has(input:checked) { color: var(--muted); }

/* ---------- 时间轴（由 enhance.js 从「时间 / 安排」表格生成） ---------- */
.schedule { margin: 1.3em 0; padding: 0; list-style: none; }
.schedule-item { position: relative; min-height: 46px; padding: 0 0 20px 78px; }
.schedule-item::before { content: ""; position: absolute; left: 66px; top: 8px; bottom: 0; width: 1px; background: var(--border); }
.schedule-item:last-child { padding-bottom: 0; }
.schedule-item:last-child::before { display: none; }
.schedule-item::after {
  content: ""; position: absolute; left: 62px; top: 6px;
  width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg);
}
.schedule-time {
  position: absolute; left: 0; top: 0; width: 58px;
  color: var(--muted); font: 700 .72rem/1.6 var(--mono); letter-spacing: .02em;
}
.schedule-text { font-size: .94rem; line-height: 1.75; }
.schedule-item.is-highlight::after { border-color: var(--terracotta); background: var(--terracotta); }
.schedule-item.is-highlight .schedule-time { color: var(--terracotta); }
.schedule-item.is-current { scroll-margin-top: 92px; }
.schedule-item.is-current::after {
  border-color: var(--accent); background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.schedule-item.is-current .schedule-time { color: var(--accent); }
.schedule-item.is-current .schedule-text {
  margin: -8px -10px -8px 0; padding: 8px 10px;
  background: var(--accent-soft); border-radius: 10px;
}
.schedule-current-label {
  display: inline-block; margin-right: 7px; padding: 1px 7px;
  color: #fff; background: var(--accent); border-radius: 999px;
  font: 700 .65rem/1.55 var(--mono); vertical-align: .08em;
}

/* ---------- 标签页 ---------- */
.tab-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 6px; overflow-x: auto;
  margin: 26px -18px 10px; padding: 12px 18px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 18px;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-panel[hidden] { display: none; }
.tab {
  flex: none; display: flex; flex-direction: column; align-items: center;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--text);
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.3; cursor: pointer;
  scroll-snap-align: center;
}
.tab small { color: var(--muted); font-family: var(--mono); font-size: .68rem; letter-spacing: .02em; }
.tab:hover { border-color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab.active small { color: #fff; opacity: .85; }
.tab.is-today { position: relative; }
.tab.is-today::after {
  content: ""; position: absolute; top: 5px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta);
}
.tab-panel > h2:first-child { margin-top: 1em; }

/* 当天核心信息：只做一条轻量摘要，不增加新的内容层级。 */
.day-glance {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin: -2px 0 18px; padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.day-glance > span { min-width: 0; padding: 0 13px; border-left: 1px solid var(--border); }
.day-glance > span:first-child { padding-left: 0; border-left: 0; }
.day-glance > span:last-child { padding-right: 0; }
.day-glance small {
  display: block; margin-bottom: 3px; color: var(--muted);
  font: 600 .65rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.day-glance strong { display: block; font-size: .84rem; line-height: 1.45; font-weight: 600; }
.day-glance .is-critical small, .day-glance .is-critical strong { color: var(--terracotta); }
.day-glance .sunlight small { color: var(--accent); }
.day-glance .sunlight strong { font: 700 .72rem/1.45 var(--mono); }

.day-nav { display: flex; justify-content: space-between; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .9rem; }
.day-nav a { text-decoration: none; font-weight: 600; }
.day-nav .next { margin-left: auto; }

@media (min-width: 752px) {
  .tab-bar { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .tab { flex: 1 1 0; padding: 7px 4px; }
}

/* 手机 */
@media (max-width: 560px) {
  .currency-converter { top: 10px; right: 10px; }
  .currency-converter > summary { padding-right: 8px; }
  .currency-converter:not([open]) > summary .currency-summary-copy { display: none; }
  .currency-converter:not([open]) > summary { padding: 6px; }
  .flight-row { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding: 10px; }
  .flight-direction { min-height: 38px; }
  .flight-path { gap: 4px; }
  .flight-point time, .flight-return-main time { font-size: .58rem; }
  .flight-point strong, .flight-return-main strong { font-size: .7rem; }
  .flight-point small { font-size: .58rem; }
  .flight-transfer { padding: 6px; }
  .flight-arrow { font-size: .7rem; }
  .flight-return-main { display: grid; gap: 2px; }
  .flight-alert { padding: 8px 10px; font-size: .68rem; }
  .content table { font-size: .85rem; }
  .content th, .content td { padding: 8px 10px; }
  .content td:first-child { white-space: normal; }
  .schedule-item { padding-left: 66px; }
  .schedule-item::before { left: 54px; }
  .schedule-item::after { left: 50px; }
  .schedule-time { width: 46px; }
  .day-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; padding: 12px 0; }
  .day-glance > span { padding: 0 12px; }
  .day-glance > span:nth-child(odd) { padding-left: 0; border-left: 0; }
  .day-glance > span:nth-child(even) { padding-right: 0; border-left: 1px solid var(--border); }
  .day-glance > span:last-child:nth-child(odd) { grid-column: 1 / -1; padding-right: 0; }
  .day-glance strong { font-size: .82rem; }
}

@media print { .currency-converter, .schedule-current-label { display: none; } }

/* 打印：展开所有标签页 */
@media print {
  .site-header, .site-footer, .back, .tab-bar, .day-nav { display: none; }
  .tab-panel[hidden] { display: block !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap { max-width: none; }
  .content table, .content blockquote, .content img, .schedule-item { page-break-inside: avoid; box-shadow: none; }
  .content h2 { page-break-after: avoid; }
}

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }

/* Trip reader: compact header, accessible controls and offline-friendly maps. */
.trip-page .site-header { padding: 18px 0 12px; }
.trip-page .site-title { font-size: 1.05rem; }
.trip-page .site-desc, .trip-page .tags { display: none; }
.trip-page .back { margin-bottom: 10px; }
.trip-page .post-title { font-size: clamp(1.5rem, 5.6vw, 2rem); }
.trip-page .meta time { display: none; }
.trip-page .content { margin-top: 12px; }
.trip-page .tab-bar { margin-top: 0; }
.trip-page .countdown { padding: 12px 16px; margin-top: 12px; box-shadow: none; }
.countdown .countdown-label { font-size: .72rem; letter-spacing: .04em; }
.countdown-units { display: flex; gap: 18px; margin-top: 4px; }
.countdown-units[hidden] { display: none; }
.countdown-units > div { display: flex; align-items: baseline; gap: 5px; }
.countdown-units strong { font-size: 1.5rem; margin: 0; min-width: 2ch; }
.countdown-units span { font-size: .68rem; letter-spacing: 0; }
.countdown small { margin-top: 5px; font-size: .68rem; letter-spacing: 0; }
.offline-status { color: var(--muted); font-size: .72rem; margin: 0 0 10px; }
.trip-intro { margin-top: 24px; }
.prep-group { margin: 12px 0; padding: 0 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.prep-group > summary { cursor: pointer; padding: 16px 0; font-weight: 700; }
.prep-group[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.prep-group > :last-child { margin-bottom: 18px; }
.checklist-progress { color: var(--accent); font-size: .82rem; }
.content input[type="checkbox"] { min-width: 24px; min-height: 24px; }
.map-preview { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card); cursor: zoom-in; color: var(--accent); }
.content .map-preview img { display: block; width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.map-hint { display: block; padding: 7px 12px; font-size: .75rem; }
.map-dialog { box-sizing: border-box; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); }
.map-dialog[open] { display: flex; flex-direction: column; }
.map-dialog::backdrop { background: rgba(0,0,0,.65); }
.map-toolbar { display: flex; align-items: center; gap: 8px; padding: max(12px, env(safe-area-inset-top)) 12px 8px; }
.map-toolbar strong { flex: 1; font-size: .9rem; }
.map-toolbar button { min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.map-help { margin: 0; padding: 0 12px 10px; color: var(--muted); font-size: .75rem; }
.map-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; min-height: 0; padding-bottom: env(safe-area-inset-bottom); }
.map-scroll img { display: block; max-width: none; height: auto; }
body.map-open { overflow: hidden; }
.content th, .content td { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .trip-page .site-header { display: none; }
  .trip-page .back { margin-top: 14px; margin-bottom: 6px; }
  .trip-page .meta { font-size: .7rem; gap: 4px 10px; }
  .trip-page .tab { min-height: 44px; padding: 7px 12px; }
  .trip-page .tab-bar::after {
    content: ""; position: sticky; right: -18px; z-index: 2;
    flex: 0 0 24px; align-self: stretch; margin-left: -24px;
    background: linear-gradient(90deg, transparent, var(--bg)); pointer-events: none;
  }
  .trip-page .countdown { padding: 10px 12px; }
  .countdown-units { gap: 12px; justify-content: space-between; }
  .countdown-units strong { font-size: 1.3rem; }
  .content h2 { font-size: 1.25rem; line-height: 1.5; }
  .schedule-item { padding-left: 83px; }
  .schedule-time { width: 65px; overflow-wrap: anywhere; }
  .schedule-item::before { left: 72px; }
  .schedule-item::after { left: 68px; }
  .prep-group { padding: 0 12px; }
  .prep-group ul { padding-left: 22px; }
}
@media print {
  .countdown, .offline-status, .map-hint, .map-dialog, .checklist-progress { display: none !important; }
  .prep-group { border: 0; padding: 0; }
  .prep-group > summary { list-style: none; }
  .map-preview { border: 0; }
}

@media (max-width: 560px) {
  #panel-overview > table, #panel-overview > table tbody { display: block; }
  #panel-overview > table thead { display: none; }
  #panel-overview > table tr { display: grid; grid-template-columns: 64px minmax(0, 1fr); padding: 12px; gap: 5px 10px; border-bottom: 1px solid var(--border); }
  #panel-overview > table tr:last-child { border-bottom: 0; }
  #panel-overview > table td { display: block; padding: 0; border: 0; }
  #panel-overview > table td:first-child { grid-row: span 2; white-space: nowrap; }
  #panel-overview > table td:nth-child(3) { grid-column: 2; color: var(--muted); font-size: .78rem; }
}

/* Embedded destination maps, with the trip diagram available offline. */
.live-map-card { margin: 18px 0 24px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.live-map-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.live-map-heading strong { font-size: .95rem; }
.live-map-heading span { font-size: .72rem; color: var(--muted); }
.route-fuel-stops { margin: 10px 0 12px; padding: 10px 12px; border: 1px solid #ead8b8; border-radius: 12px; background: #fffaf0; }
.route-fuel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.route-fuel-title strong { color: #7a5218; font-size: .82rem; }
.route-fuel-title span { color: var(--muted); font-size: .68rem; }
.route-fuel-list { display: grid; gap: 6px; }
.route-fuel-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 7px 0; border-top: 1px solid rgba(174, 133, 67, .2); }
.route-fuel-item:first-child { border-top: 0; padding-top: 2px; }
.route-fuel-item:last-child { padding-bottom: 2px; }
.route-fuel-copy { min-width: 0; }
.route-fuel-copy strong, .route-fuel-copy small { display: block; }
.route-fuel-copy strong { color: var(--text); font-size: .8rem; }
.route-fuel-copy small { margin-top: 2px; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.route-fuel-item.is-warning { margin: 0 -4px; padding: 7px 4px; border-radius: 8px; background: #fff0ed; }
.route-fuel-item.is-warning .route-fuel-copy strong { color: #a34b35; }
.route-fuel-links { display: flex; gap: 5px; }
.route-fuel-links a { display: inline-flex; align-items: center; min-height: 34px; padding: 3px 8px; border: 1px solid #d8be91; border-radius: 8px; color: #7a5218; text-decoration: none; font-size: .7rem; font-weight: 600; background: #fff; }
.route-map-visual { margin: 12px 0; }
.route-map-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 7px; }
.route-map-title strong { font-size: .82rem; color: var(--text); }
.route-map-title span { font-size: .68rem; color: var(--muted); }
.route-map-canvas { height: 350px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #e9f0ec; }
.route-map-canvas > p { margin: 0; padding: 28px; color: var(--muted); font-size: .78rem; }
.route-map-caption { margin: 7px 1px 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.route-map-marker-wrap { background: transparent; border: 0; }
.route-map-stop, .route-map-fuel { display: grid; place-items: center; box-sizing: border-box; border: 3px solid #fff; border-radius: 50% 50% 50% 10%; box-shadow: 0 4px 12px rgba(19, 38, 47, .3); transform: rotate(-45deg); font-weight: 700; }
.route-map-stop { width: 28px; height: 28px; color: #fff; background: #287b90; font-size: .7rem; }
.route-map-fuel { width: 36px; height: 36px; color: #6f470e; background: #ffc766; font-size: .95rem; }
.route-map-fuel.is-warning { color: #fff; background: #b85b43; }
.route-map-stop, .route-map-fuel { line-height: 1; }
.route-map-stop b, .route-map-fuel b { transform: rotate(45deg); font: inherit; }
.fuel-map-tooltip { border: 1px solid #e3c58f; color: #6f470e; background: #fff9eb; font-weight: 700; box-shadow: 0 5px 16px rgba(19, 38, 47, .16); }
.fuel-map-popup strong, .fuel-map-popup small { display: block; }
.fuel-map-popup small { margin-top: 4px; color: #66757a; line-height: 1.45; }
.fuel-map-popup-links { display: flex; gap: 7px; margin-top: 9px; }
.fuel-map-popup-links a { padding: 5px 8px; border: 1px solid #d8be91; border-radius: 7px; color: #7a5218; text-decoration: none; font-weight: 700; }
.live-map-picker { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--muted); }
.live-map-picker select { flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--bg); font: inherit; font-size: 16px; }
.live-map-frame { height: 380px; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); margin-top: 12px; background: var(--bg); }
.live-map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-map-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.live-map-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-size: .8rem; }
.live-map-links a:first-child { color: #fff; background: var(--accent); border-color: var(--accent); }
.live-map-note { font-size: .74rem; color: var(--muted); line-height: 1.6; }
.track-map-block { margin: 10px 0 12px; }
.track-map-canvas { height: 480px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #eaf0ec; }
.track-map-canvas > p { margin: 0; padding: 28px; color: var(--muted); }
.track-map-controls { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 10px; }
.track-map-controls label { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; cursor: pointer; }
.track-map-controls input { width: 18px; height: 18px; accent-color: var(--accent); }
.track-map-controls span { width: 24px; height: 5px; border-radius: 4px; background: var(--route-color); }
.track-map-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.track-map-downloads a { min-height: 40px; display: inline-flex; align-items: center; padding: 4px 11px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-size: .76rem; }
.track-map-caption { margin: 8px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.offline-map { border-top: 1px solid var(--border); padding-top: 8px; }
.offline-map summary { padding: 6px 0; min-height: 44px; cursor: pointer; font-size: .84rem; font-weight: 600; }
.offline-map > p { margin-bottom: 0; }
@media (max-width: 560px) {
  .live-map-card { padding: 12px; }
  .route-fuel-item { grid-template-columns: 1fr; gap: 6px; }
  .route-fuel-links a { flex: 1; justify-content: center; }
  .route-map-canvas { height: 310px; }
  .live-map-frame { height: 280px; }
  .live-map-links a { flex: 1; justify-content: center; padding: 5px 7px; }
  .track-map-canvas { height: 420px; }
  .track-map-controls { gap: 7px 10px; }
}
@media print {
  .live-map-heading, .live-map-picker, .route-map-visual, .live-map-frame, .live-map-links, .live-map-note, .track-map-block, .offline-map summary { display: none !important; }
  .live-map-card, .offline-map { border: 0; margin: 0; padding: 0; }
}
.day-places, .live-map-card { scroll-margin-top: 90px; }
.day-places > p { color: var(--muted); font-size: .82rem; }
/* Compact daily navigation table. */
.place-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .82rem; }
.place-table th:first-child { width: 23%; }
.place-table th:last-child { width: 19%; }
.content .place-table th, .content .place-table td { padding: 9px 8px; vertical-align: top; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.place-table tbody th { text-align: left; font-weight: 600; background: transparent; }
.place-table .place-names { font-size: .8rem; }
.place-copy { display: block; width: 100%; text-align: left; font: inherit; font-size: .8rem; line-height: 1.45; color: var(--text); background: none; border: 0; padding: 4px 0; min-height: 40px; cursor: copy; overflow-wrap: anywhere; }
.place-copy small { color: var(--accent); margin-left: 5px; white-space: nowrap; }
.place-copy + .place-copy { color: var(--muted); border-top: 1px dotted var(--border); }
.place-actions a { display: block; min-height: 40px; padding: 6px 0; box-sizing: border-box; font-size: .78rem; text-decoration: none; }
.places-jump { display: inline-block; padding: 10px 0; font-size: .82rem; }
.copy-status:empty { display: none; }
.route-stops { padding: 0; margin: 10px 0; font-size: .8rem; line-height: 1.8; color: var(--text); }
.live-map-frame { height: 440px; }
@media (max-width: 560px) {
  .content .place-table th, .content .place-table td { padding: 8px 5px; }
  .place-table th:first-child { width: 23%; }
  .place-table th:last-child { width: 21%; }
  .place-table tbody th, .place-copy, .place-actions a { font-size: .76rem; }
  .live-map-frame { height: 280px; }
}
@media print { .place-actions, .places-jump, .copy-status, .place-copy small { display: none !important; } }

/* ---------- 行程图册（由 poi-map.js 读取每趟旅行的数据） ---------- */
.trip-atlas {
  position: relative; margin: 14px 0 24px; padding: 13px;
  background: color-mix(in srgb, var(--card) 96%, #f1e9d8 4%);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden;
}
.trip-atlas::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--accent), #6f9d73 48%, var(--terracotta));
}
.trip-atlas-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 4px 2px 12px;
}
.trip-atlas-heading > div { min-width: 0; display: grid; gap: 1px; }
.trip-atlas-kicker {
  color: var(--terracotta); font: 700 .59rem/1.3 var(--mono); letter-spacing: .16em;
}
.trip-atlas-title { overflow: hidden; font: 700 1rem/1.45 "Noto Serif SC", serif; text-overflow: ellipsis; white-space: nowrap; }
.trip-atlas-meta { color: var(--muted); font-size: .68rem; }
.trip-atlas-locate {
  flex: none; min-height: 38px; padding: 7px 11px; color: var(--accent); background: var(--accent-soft);
  border: 0; border-radius: 999px; font: 700 .72rem/1 var(--mono); cursor: pointer;
}
.trip-atlas-locate:disabled { opacity: .65; }
.trip-atlas-map {
  height: 340px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px;
  background:
    radial-gradient(circle at 28% 34%, color-mix(in srgb, var(--accent-soft) 70%, transparent) 0 3px, transparent 4px),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--accent-soft) 35%, var(--bg)));
}
.trip-atlas-map img { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.trip-atlas-error { margin: 0; padding: 28px; color: var(--muted); font-size: .8rem; }
.trip-atlas-route {
  display: flex; gap: 8px; margin: 11px -13px 0; padding: 0 13px 2px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.trip-atlas-route::-webkit-scrollbar { display: none; }
.trip-day-route, .trip-stop {
  flex: none; min-height: 48px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 11px; cursor: pointer; scroll-snap-align: start;
}
.trip-day-route { min-width: min(245px, 76vw); padding: 8px 12px; text-align: left; border-left: 4px solid var(--day-color); }
.trip-day-route b { display: block; color: var(--day-color); font: 700 .68rem/1.3 var(--mono); letter-spacing: .06em; }
.trip-day-route span { display: block; margin-top: 2px; font-size: .76rem; }
.trip-stop { display: flex; align-items: center; gap: 9px; min-width: 142px; padding: 7px 10px 7px 8px; text-align: left; }
.trip-stop > b {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  color: #fff; background: var(--poi-color); border-radius: 50%; font: 700 .7rem/1 var(--mono);
}
.trip-stop > span { min-width: 0; display: grid; gap: 2px; }
.trip-stop small { color: var(--muted); font: 600 .61rem/1.2 var(--mono); }
.trip-stop strong { max-width: 150px; overflow: hidden; font-size: .73rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.trip-day-route:hover, .trip-stop:hover { border-color: var(--accent); }
.trip-atlas-foot { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px 0; color: var(--muted); font-size: .61rem; }

.poi-marker-wrap { background: transparent; border: 0; }
.poi-marker {
  position: relative; display: grid; place-items: center; width: 30px; height: 30px;
  color: #fff; background: var(--poi-color); border: 3px solid #fff; border-radius: 50% 50% 50% 12%;
  box-shadow: 0 5px 13px rgba(19, 38, 47, .28); transform: rotate(-45deg);
}
.poi-marker b { font: 700 .68rem/1 var(--mono); transform: rotate(45deg); }
.poi-marker.is-overview { width: 16px; height: 16px; border-width: 2px; border-radius: 50%; transform: none; }
.poi-leaflet-popup .leaflet-popup-content-wrapper { border-radius: 13px; box-shadow: 0 12px 34px rgba(19, 38, 47, .2); }
.poi-leaflet-popup .leaflet-popup-content { margin: 13px 14px 12px; color: #13262f; font-family: "Noto Sans SC", sans-serif; }
.poi-popup-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.poi-popup-top strong { font-size: .86rem; }
.poi-popup-top time { color: #287b90; font: 700 .7rem/1 var(--mono); }
.poi-popup p { margin: 6px 0; color: #66757a; font-size: .72rem; line-height: 1.55; }
.poi-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.poi-chip { padding: 3px 7px; color: #287b90; background: #d9ebee; border-radius: 999px; font-size: .6rem; line-height: 1.3; }
.poi-chip-fixed, .poi-chip-reservation { color: #a1462d; background: #f6e2d8; }
.poi-chip-weather { color: #446c4d; background: #e1eee2; }
.poi-chip-optional { color: #66757a; background: #edf0ef; }
.poi-popup-nav { width: 100%; min-height: 36px; margin-top: 4px; color: #fff; background: #287b90; border: 0; border-radius: 8px; font: 700 .7rem/1 "Noto Sans SC", sans-serif; cursor: pointer; }

.trip-nav-sheet {
  width: min(460px, calc(100vw - 24px)); max-width: none; margin: auto auto 12px; padding: 0;
  color: var(--text); background: transparent; border: 0;
}
.trip-nav-sheet::backdrop { background: rgba(9, 20, 24, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.trip-nav-card { padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.trip-nav-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.trip-nav-heading strong { font-family: "Noto Serif SC", serif; }
.trip-nav-heading button { width: 38px; height: 38px; color: var(--muted); background: var(--bg); border: 0; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.trip-nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trip-nav-link { min-height: 46px; display: grid; place-items: center; padding: 8px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 11px; text-decoration: none; font-size: .8rem; font-weight: 600; }
.trip-nav-link:first-child { color: #fff; background: var(--accent); border-color: var(--accent); }

@media (max-width: 560px) {
  .trip-atlas { margin-top: 10px; padding: 11px; border-radius: 16px; }
  .trip-atlas-map { height: 280px; }
  .trip-atlas-route { margin-left: -11px; margin-right: -11px; padding-left: 11px; padding-right: 11px; }
  .trip-atlas-foot { display: grid; gap: 1px; }
  .trip-nav-sheet { margin-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media print { .trip-atlas, .trip-nav-sheet { display: none !important; } }
