/* nanluo.com — 城市杂志 + 精选地图。移动端底部导航，桌面顶部导航 + 多栏。
   设计基线：design/references/UI.png。

   两条约束决定了这里的取舍：
   1. 内容全部在初始 HTML 里，样式不能依赖 JS 状态（筛选只切 hidden）。
   2. 图片来自 Wikimedia Commons，构图、色调、明暗完全不可控 —— 所以凡是压在图上的
      文字都必须自带渐变底，不能指望图片本身够暗。 */

:root {
  color-scheme: light;

  /* 纸面与墨色。老城题材，底色偏暖，不用纯白纯黑 */
  --paper: #faf6ef;
  --paper-sunk: #f3ede2;     /* 比 paper 更沉一档，用于分段与输入区 */
  --card: #fffdfa;
  --ink: #241a12;
  --ink-soft: #5c4b3c;
  --muted: #8a7a68;
  --line: #e8dccb;
  --line-soft: #f0e7da;

  --accent: #b8321c;          /* 宫墙红。只用于可点击与强调，不做大面积背景 */
  --accent-ink: #97240f;      /* 红底上的深一档，用于 hover */
  --accent-soft: #fbeade;
  --gold: #c8933c;
  --jade: #4a7c59;            /* 已核验、已完成一类的正向状态 */

  --serif: Georgia, "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* 阴影统一带暖调偏移，避免灰蒙蒙压在暖底上 */
  --shadow-1: 0 1px 2px rgba(61, 39, 18, .04), 0 2px 8px rgba(61, 39, 18, .05);
  --shadow-2: 0 2px 4px rgba(61, 39, 18, .05), 0 8px 24px rgba(61, 39, 18, .08);
  --shadow-3: 0 12px 40px rgba(61, 39, 18, .14);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  /* 中西文混排时字距略开，CJK 标点挤压交给浏览器 */
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { width: min(100%, 480px); margin: 0 auto; padding: 0 18px 28px; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(29px, 7.6vw, 38px); margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 16px; margin: 0 0 4px; }
p { margin: 0 0 10px; }
button { font: inherit; color: inherit; cursor: pointer; }
/* hidden 属性必须能盖住显式 display。浏览器默认只给 [hidden] 一条优先级最低的
   display: none，任何 .place-grid { display: grid } 都会盖掉它 —— 实测切到地图视图后
   列表仍然显示在下面（因为 app.js 靠 node.hidden = true 切视图）。筛选隐藏卡片没事，
   因为卡片本身没设 display；容器才会撞。 */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 10; padding: 8px 12px; border-radius: var(--r-sm); background: var(--card); box-shadow: var(--shadow-2); }

/* 图标：18px 线性，跟文字基线对齐。inline SVG，不引图标字体 */
.i { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.12em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 导航 ---------- */
.topnav { display: none; }
.brand { display: inline-flex; flex-direction: column; font-family: var(--serif); text-decoration: none; }
.brand b { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.brand small { color: var(--muted); font-family: var(--sans); font-size: 11px; letter-spacing: .02em; }

.bottomnav {
  position: fixed; inset: auto 0 0; z-index: 6;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 250, .92);
  backdrop-filter: saturate(1.6) blur(12px);
}
.bottomnav a {
  display: grid; gap: 2px; justify-items: center;
  padding: 6px 0 4px; color: var(--muted); font-size: 10.5px; text-decoration: none;
  transition: color .15s;
}
.bottomnav .i { width: 21px; height: 21px; }
.bottomnav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* ---------- 首页与页头 ---------- */
.hero { padding: 26px 0 4px; }
.eyebrow {
  display: inline-flex; gap: 6px; align-items: center;
  margin: 0 0 10px; color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
}
h1 em { color: var(--accent); font-style: normal; }
.scene-row {
  display: flex; gap: 8px; margin: 16px 0 4px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.scene-row::-webkit-scrollbar { display: none; }
.scene-row .chip { flex: 0 0 auto; white-space: nowrap; }
.page-head { padding: 24px 0 2px; }
.band { margin-top: 32px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.band-head h2 { position: relative; padding-left: 11px; }
/* 小竖条比下划线更省空间，也不会在长标题换行时错位 */
.band-head h2::before {
  content: ""; position: absolute; top: .22em; bottom: .22em; left: 0;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.more { display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; }
.more .i { width: 13px; height: 13px; }

/* ---------- chip / cta / tag ---------- */
.chip {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .72); font-size: 12.5px; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] {
  border-color: var(--accent); color: #fff; background: var(--accent);
}
.chip .i { width: 14px; height: 14px; }

.cta {
  display: inline-flex; gap: 6px; align-items: center; justify-content: center;
  padding: 12px 18px; border: 0; border-radius: var(--r-md);
  color: #fff; background: var(--accent);
  font-size: 14px; font-weight: 700; text-align: center; text-decoration: none;
  box-shadow: 0 2px 8px rgba(184, 50, 28, .22);
  transition: background .15s, transform .08s;
}
.cta:hover { background: var(--accent-ink); }
.cta:active { transform: translateY(1px); }
.cta.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--card); box-shadow: none; }
.cta.ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }

.tag {
  display: inline-block; padding: 3px 8px; border-radius: 5px;
  color: var(--accent); background: var(--accent-soft); font-size: 10.5px; font-weight: 700;
}
.tag-distance {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--paper-sunk); color: var(--accent); border: 1px solid var(--line);
}
.tag-distance .i { width: 11px; height: 11px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; }
.meta .i { width: 13px; height: 13px; }
.lede { color: var(--ink-soft); font-size: 13px; }

/* ---------- 图片与占位 ---------- */
.cover, .detail-cover { width: 100%; display: block; object-fit: cover; background: var(--paper-sunk); }
.cover { height: 190px; }
.detail-cover { height: 240px; border-radius: var(--r-lg); }
.figure-pending {
  display: grid; place-content: center; gap: 4px;
  border: 1px dashed var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(200, 147, 60, .06) 0 8px, transparent 8px 16px),
    var(--accent-soft);
  color: var(--muted); text-align: center; font-size: 12px;
}
.figure-pending small { font-size: 10px; opacity: .75; }

/* ---------- 路线卡 ----------
   参考稿把标题压在封面上。图片来自 Commons，明暗不可控，所以渐变必须够厚，
   不能靠图本身。 */
.route-card {
  position: relative; overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-1);
  transition: box-shadow .2s, transform .2s;
}
.route-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.route-card-media { position: relative; display: block; }
.route-card-media .cover { height: 200px; }
.route-card-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(24, 16, 10, .82) 0%, rgba(24, 16, 10, .45) 30%, rgba(24, 16, 10, 0) 62%);
}
.route-card-media .figure-pending { height: 200px; }
/* 封面上的文字。position 由 media 提供，z-index 压过渐变 */
.card-overlay {
  position: absolute; inset: auto 0 0; z-index: 1;
  padding: 14px 15px 13px; color: #fff;
}
.card-overlay h3 { margin: 0 0 3px; color: #fff; font-size: 19px; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.card-overlay h3 a { color: #fff; text-decoration: none; }
.card-overlay p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 12.5px; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.card-badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(24, 16, 10, .58); color: #fff; font-size: 11px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.route-card-body { padding: 13px 15px 15px; }

/* 统计行：时长 / 步行 / 站数。带图标，值在前标签在后 */
.stat-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0; list-style: none; }
.stat-row li { display: flex; gap: 5px; align-items: center; color: var(--ink-soft); font-size: 12.5px; }
.stat-row .i { width: 14px; height: 14px; color: var(--muted); }
.stat-row b { font-size: 13px; font-weight: 700; }
.stat-row span { color: var(--muted); font-size: 11px; }
/* 详情页用等宽四格，数值大一号 */
.stat-row.wide {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin: 14px 0; padding: 13px 0; border-block: 1px solid var(--line);
}
.stat-row.wide li { display: grid; gap: 1px; justify-items: center; text-align: center; }
.stat-row.wide b { font-family: var(--serif); font-size: 17px; }
.stat-row.wide span { font-size: 10.5px; }

/* 节点串。用点分隔而不是箭头，长路线换行时不会出现孤立箭头 */
.node-line {
  margin: 0 0 11px; padding: 10px 12px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--paper-sunk); color: var(--ink-soft); font-size: 11.5px; line-height: 1.7;
}
.node-line b { font-weight: 600; }
.transit-guide {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 12px 0 16px; padding: 12px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--paper-sunk);
}
.transit-guide div { display: grid; gap: 2px; }
.transit-guide span { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.transit-guide b { font-size: 13.5px; color: var(--ink); font-weight: 700; }
.transit-guide p { margin: 0; font-size: 11.5px; color: var(--ink-soft); }

/* ---------- 宝藏卡 ---------- */
.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.place-card {
  position: relative; overflow: hidden; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-1);
  transition: box-shadow .2s, transform .2s;
}
.place-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.place-card-media { position: relative; display: block; }
.place-card .cover, .place-card .figure-pending { height: 132px; }
.place-card-body { padding: 11px 12px 12px; }
.place-card h3 { font-size: 15px; }
.place-card h3 a { text-decoration: none; }
.place-card .lede {
  font-size: 11.5px; line-height: 1.6;
  /* 卡片高度必须整齐：推荐理由长短不一，截到三行 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.place-card .meta { margin-bottom: 0; font-size: 11px; }

/* ---------- 胡同小店 ---------- */
.merchant-card { min-width: 0; }
.merchant-card h3 { margin: 8px 0; font-size: 18px; }
.merchant-card h3 a { text-decoration: none; }
.evidence-official, .evidence-field { color: var(--jade); background: #e8f3e8; }
.evidence-press { color: #805d16; background: #f7edcf; }
.evidence-map { color: var(--muted); background: var(--paper-sunk); }
.merchant-detail .detail-head { padding-top: 18px; }
.merchant-detail .figure-pending { min-height: 220px; }
.fav {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  display: inline-flex; gap: 4px; align-items: center;
  padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
  background: rgba(255, 253, 250, .88); font-size: 11px;
  backdrop-filter: blur(6px); box-shadow: var(--shadow-1);
}
.fav[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.fav-mark { font-size: 13px; line-height: 1; }
/* 详情页的收藏按钮跟分享并排，不浮在图上 */
.detail-head .fav { position: static; box-shadow: none; backdrop-filter: none; border-color: var(--line); }

/* ---------- 片区卡 ----------
   参考稿是带图的方块。片区是一等内容，值得比纯文字列表更强的入口。 */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.area-card {
  position: relative; display: grid; align-content: end; overflow: hidden;
  min-height: 104px; padding: 12px; border-radius: var(--r-md);
  color: #fff; text-decoration: none; background: var(--ink);
  box-shadow: var(--shadow-1);
}
.area-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24, 16, 10, .8), rgba(24, 16, 10, .18));
}
.area-card strong, .area-card small { position: relative; z-index: 1; }
.area-card strong { font-family: var(--serif); font-size: 16px; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.area-card small { color: rgba(255, 255, 255, .85); font-size: 11px; }

/* ---------- 筛选 ---------- */
.filters {
  display: flex; flex-direction: column; gap: 8px;
  margin: 12px 0 16px; padding: 12px 14px 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--card);
}
.filter-row {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0; padding: 0; min-width: 0;
}
.filter-label {
  flex: 0 0 28px; margin: 0; padding: 5px 0 0;
  color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; line-height: 1;
}
.chip-wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; min-width: 0;
}
.chip-wrap > .chip {
  flex: 0 0 auto; margin: 0;
  padding: 4px 10px; font-size: 12px; line-height: 1.4;
}

.filter-expand {
  margin: 2px 0 4px;
}
.filter-expand-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-sm);
  color: var(--accent); font-size: 11.5px; font-weight: 600; cursor: pointer;
  background: var(--paper-sunk); border: 1px solid var(--line-soft);
  user-select: none; list-style: none;
}
.filter-expand-btn::-webkit-details-marker { display: none; }
.filter-expand-btn .i { width: 12px; height: 12px; transition: transform .2s; }
.filter-expand[open] .filter-expand-btn .i { transform: rotate(90deg); }
.filter-expand-content {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
}

.filter-bottom-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line-soft);
}
.filter-status { margin: 0; color: var(--accent); font-size: 11.5px; font-weight: 700; }
.view-toggle { display: flex; gap: 6px; margin: 0; }
.view-toggle .chip { padding: 4px 10px; font-size: 11.5px; }
.map-view { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.map-list { margin: 0; padding: 0; list-style: none; }
.map-list li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.map-list li:last-child { border-bottom: 0; }
.map-list span { color: var(--muted); font-size: 11px; }

/* ---------- 详情 ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 5px; margin: 18px 0 14px; color: var(--muted); font-size: 11.5px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.detail-head { margin-bottom: 4px; }
.detail-head .tag-row { margin-top: 12px; }
.detail section { margin-top: 28px; }
.detail section h2 { margin-bottom: 10px; }

.verify-note {
  display: flex; gap: 8px; margin: 12px 0; padding: 10px 12px;
  border-left: 3px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(200, 147, 60, .1); color: var(--ink-soft); font-size: 11.5px; line-height: 1.6;
}
.verify-note .i { width: 15px; height: 15px; margin-top: .15em; color: var(--gold); }
.verify-note.verified { border-left-color: var(--jade); background: rgba(74, 124, 89, .09); }
.verify-note.verified .i { color: var(--jade); }

.facts {
  display: grid; gap: 1px; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--line-soft);
}
.facts > div { display: flex; gap: 10px; justify-content: space-between; padding: 11px 13px; background: var(--card); }
.facts dt { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.facts dt .i { width: 14px; height: 14px; }
.facts dd { margin: 0; font-size: 13px; font-weight: 600; text-align: right; }
/* 没核验的值不能跟核验过的长得一样 */
.facts dd.pending { color: var(--muted); font-weight: 400; }

/* ---------- 场馆预约与摄影指南卡片 ---------- */
.guide-box {
  margin-top: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow-1);
}
.guide-head {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft);
}
.guide-badge {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.badge-warn { background: rgba(200, 147, 60, .14); color: var(--gold); }
.badge-ok { background: rgba(74, 124, 89, .14); color: var(--jade); }
.guide-channel { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.guide-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 0 0 12px; padding: 0;
}
.guide-facts div { display: grid; gap: 2px; }
.guide-facts dt { font-size: 10.5px; color: var(--muted); }
.guide-facts dd { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.guide-tips, .photospot-tips {
  display: flex; gap: 8px; margin: 0; padding: 9px 11px;
  border-radius: var(--r-sm); font-size: 11.5px; line-height: 1.6;
}
.guide-tips { background: rgba(200, 147, 60, .08); color: var(--ink-soft); border-left: 3px solid var(--gold); }
.guide-tips .i { color: var(--gold); width: 14px; height: 14px; flex-shrink: 0; margin-top: .15em; }
.photospot-box {
  background: linear-gradient(135deg, var(--card) 0%, rgba(200, 147, 60, .03) 100%);
}
.photospot-row {
  display: flex; gap: 8px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.5;
}
.photospot-label {
  flex-shrink: 0; padding: 2px 6px; border-radius: 4px;
  background: var(--paper-sunk); color: var(--accent); font-size: 10.5px; font-weight: 700; height: fit-content;
}
.photospot-value { color: var(--ink); font-weight: 500; }
.photospot-tips { background: rgba(74, 124, 89, .08); color: var(--ink-soft); border-left: 3px solid var(--jade); margin-top: 10px; }
.photospot-tips .i { color: var(--jade); width: 14px; height: 14px; flex-shrink: 0; margin-top: .15em; }

.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between;
  padding: 12px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.link-list li:last-child { border-bottom: 0; }
.link-list a { font-weight: 600; text-decoration: none; }
.link-list a:hover { color: var(--accent); }
.link-list span { color: var(--muted); font-size: 11.5px; }

/* ---------- 路线时间线 ----------
   编号沿一条竖轴，步行时间落在两个节点之间的连线上。 */
.timeline { margin: 0; padding: 0; list-style: none; }
.stop { position: relative; padding: 0 0 0 44px; }
.stop::before {
  content: ""; position: absolute; top: 34px; bottom: 0; left: 15px;
  border-left: 2px dotted var(--line);
}
.stop:last-child::before { display: none; }
.stop-no {
  position: absolute; top: 0; left: 0;
  display: grid; width: 32px; height: 32px; place-items: center;
  border-radius: 10px; color: #fff; background: var(--ink);
  font-family: var(--serif); font-size: 12px; font-weight: 700;
}
.stop.is-optional .stop-no { color: var(--ink-soft); background: var(--paper-sunk); box-shadow: inset 0 0 0 1px var(--line); }
.stop-body { padding-bottom: 4px; }
.stop-body h3 a { text-decoration: none; }
.stop-body h3 a:hover { color: var(--accent); }
.walk-gap { display: flex; gap: 5px; align-items: center; margin: 6px 0 18px; color: var(--accent); font-size: 11.5px; }
.walk-gap .i { width: 14px; height: 14px; }
.walk-gap.end { color: var(--muted); }

/* 地图优先渐进增强：没有 Key 或 SDK 加载失败时仍保留坐标点位卡。 */
.map-canvas { height: 260px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.map-canvas[hidden] { display: none; }
.map-static { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.map-static[hidden] { display: none; }
.map-static > p { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 10px; }
.map-static > p .i { width: 17px; height: 17px; color: var(--accent); }
.map-static > p span { color: var(--muted); font-size: 11px; }
.map-static-points { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.map-static-points li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.map-static-points li > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 700; }
.map-static-points small { color: var(--muted); font-variant-numeric: tabular-nums; }

.schematic { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.schematic figcaption { margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.schematic ol { margin: 0; padding: 0; list-style: none; }
.schematic li { display: flex; gap: 9px; align-items: center; padding: 7px 0; font-size: 13px; }
.schematic .dot { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.schematic .gap { display: flex; gap: 4px; align-items: center; margin-left: auto; color: var(--muted); font-size: 10.5px; }
.schematic .gap .i { width: 12px; height: 12px; }
.map-link-row { margin: 10px 0 0; font-size: 13px; }
.map-link { display: inline-flex; gap: 5px; align-items: center; color: var(--accent); font-weight: 600; text-decoration: none; }
.map-link:hover { text-decoration: underline; }

/* ---------- 固定行动栏 / 确认层 / 兜底 ---------- */
.actionbar {
  position: fixed; inset: auto 0 var(--nav-h); z-index: 4;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 9px;
  width: min(100%, 480px); margin: 0 auto; padding: 10px 18px;
  border-top: 1px solid var(--line); background: rgba(255, 253, 250, .96);
  backdrop-filter: blur(12px);
}
.startsheet { width: min(92%, 420px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-3); }
.startsheet::backdrop { background: rgba(36, 26, 18, .45); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nav-fallback { margin-top: 16px; padding: 14px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); }
.nav-fallback.standalone { margin: 20px 0 90px; }
.nav-fallback h3 { color: var(--accent); }

/* ---------- 空状态 ---------- */
.empty {
  margin: 22px 0; padding: 26px 18px; border: 1px dashed var(--line);
  border-radius: var(--r-lg); background: var(--card); text-align: center;
}
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); font-size: 13px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.fav-tabs { display: flex; gap: 8px; margin: 16px 0 20px; }

/* 收藏列表的行：名字与元信息在左，取消按钮靠右。
   用 link-list 默认的 space-between 三栏会把按钮挤到下一行（实测如此）。 */
.fav-list li { flex-wrap: nowrap; gap: 12px; }
.fav-row-main { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-width: 0; }
.fav-remove { flex: 0 0 auto; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.fav-remove:hover { border-color: var(--accent); color: #fff; background: var(--accent); }

/* ---------- 桌面：顶部导航 + 多栏，不直接放大移动稿 ---------- */
@media (min-width: 860px) {
  body { padding-bottom: 0; font-size: 15.5px; }
  .topnav {
    position: sticky; top: 0; z-index: 6;
    display: flex; gap: 28px; align-items: center;
    padding: 12px 32px; border-bottom: 1px solid var(--line);
    background: rgba(250, 246, 239, .9); backdrop-filter: saturate(1.6) blur(12px);
  }
  .topnav nav { display: flex; gap: 22px; margin-left: auto; }
  .topnav a { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; text-decoration: none; }
  .topnav a:hover { color: var(--accent); }
  .topnav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  .topnav .i { width: 16px; height: 16px; }
  .bottomnav { display: none; }

  main { width: min(100%, 1120px); padding: 0 32px 64px; }
  h1 { font-size: 46px; }
  .hero { padding: 56px 0 12px; }
  .hero-sub { max-width: 48ch; font-size: 15.5px; }

  .place-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .merchant-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .merchant-filters { grid-template-columns: repeat(3, 1fr); }
  .area-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .area-card { min-height: 132px; }

  /* 桌面的路线卡图文并排。overlay 仍然压在图上（和移动端一致）：
     把它改成 static 会让标题落到 media 列里被图片高度挤掉，卡片就没了标题。 */
  .route-card { display: grid; grid-template-columns: 340px 1fr; }
  .route-card-media .cover, .route-card-media .figure-pending { height: 100%; min-height: 240px; }
  .card-overlay { padding: 16px 18px 15px; }
  .card-overlay h3 { font-size: 21px; }
  .route-card-body { display: flex; flex-direction: column; justify-content: center; padding: 22px 24px; }
  .route-card-body .cta { align-self: flex-start; }

  /* 桌面端筛选栏：按行平铺自然换行展开，所有标签一览无余，无需折叠或滑动 */
  .filters {
    display: flex; flex-direction: column; gap: 12px;
    padding: 18px 22px 14px;
  }
  .filter-row {
    display: flex; align-items: flex-start; gap: 12px;
    margin: 0; min-width: 0;
  }
  .filter-row legend {
    flex: 0 0 38px; margin: 0; padding-top: 5px;
    color: var(--muted); font-size: 11.5px; font-weight: 700;
  }
  .chip-wrap {
    display: flex; flex-wrap: wrap; gap: 7px;
  }
  .chip-wrap > .chip {
    padding: 5px 12px; font-size: 12.5px;
  }
  .filter-expand {
    display: block; margin: 0;
  }
  .filter-expand-btn {
    display: none; /* 桌面端直接完全展开，无需显示折叠展开按钮 */
  }
  .filter-expand-content {
    display: flex; flex-direction: column; gap: 12px;
    margin: 0; padding: 0; border: 0;
  }
  .scene-row {
    flex-wrap: wrap; overflow: visible; padding: 0;
  }
  .filter-bottom-bar {
    margin-top: 6px; padding-top: 10px;
  }

  .detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; align-items: start; }
  .detail .crumbs, .detail .detail-head { grid-column: 1 / -1; }
  .detail-cover { grid-column: 1 / -1; height: 400px; }
  .stat-row.wide, .detail-wide, .detail section.detail-wide, .detail section:has(.place-grid) { grid-column: 1 / -1; width: 100%; }
  .detail .place-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
  .actionbar { position: sticky; inset: auto; width: 100%; margin-top: 30px; border: 1px solid var(--line); border-radius: var(--r-md); grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
