/* ============================================================
   中国各地美食地图 · 样式 (app.css)
   结构：设计变量 → 基础 → 布局 → 组件 → 响应式
   颜色全部走 CSS 变量，深色模式只改变量，不改组件。
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  color-scheme: light dark;
  --bg: #faf5ec;
  --surface: #fffdf7;
  --surface-2: #f3ecdd;
  --ink: #2a251d;
  --muted: #6f6656;
  --line: #e3d9c6;
  --accent: #b03627;        /* 朱红：主强调 */
  --accent-ink: #ffffff;
  --accent-soft: #f7e3dc;
  --gold: #a97b24;
  --gold-soft: #f3e8cf;
  --green: #3f6b4f;
  --water: #8fb6d9;         /* 地理插图：江与海 */
  --water-ink: #4a7396;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(74, 54, 20, .08);
  --font-body: "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --surface: #221e17;
    --surface-2: #2b271e;
    --ink: #f0e8d8;
    --muted: #b0a68f;
    --line: #3d372a;
    --accent: #e0684f;
    --accent-ink: #1d1712;
    --accent-soft: #452a23;
    --gold: #d3a94f;
    --gold-soft: #3a3220;
    --water: #54748f;
    --water-ink: #9db8cc;
    --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  }
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* 页面原生滚条隐藏（用户 2026-11-18 定：外部滚动条就是靠左边
   这个滚条）：整页只显示左缘玻璃把手，不显示浏览器自带滚条；
   选项卡等内部列表的滚条不受影响、照常显示。 */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  overflow-wrap: break-word; /* 长网址/代码断行，不把页面撑宽 */
}
/* 表格按内容最小宽度定列宽：break-word 不影响该宽度，须用 anywhere */
th, td { overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button, select, input[type="search"], a.btn { min-height: 40px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- 3. 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 1180px; margin: 0 auto; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .seal { display: grid; place-items: center; width: 54px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, #c2432f, #93301f); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .06em; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .38), inset 0 0 0 4px rgba(147, 48, 31, .5), 0 1px 3px rgba(42, 37, 29, .25); }
.brand-txt { display: inline-flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-weight: 700; font-size: 1.14rem; letter-spacing: .03em; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-sub { font-size: .6rem; font-weight: 600; letter-spacing: .5em; color: var(--gold); margin-top: 2px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  min-height: 40px; display: inline-flex; align-items: center; font-size: .95rem;
}
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.top-search { flex: 1 1 180px; max-width: 380px; margin-left: auto; display: flex; gap: 6px; align-items: center; }
.search-btn { flex: 0 0 auto; min-height: 40px; padding: 9px 16px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .92rem; white-space: nowrap; cursor: pointer; }
.search-btn:active { transform: translateY(1px); }
.top-search input {
  flex: 1 1 auto; min-width: 0; width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); min-height: 40px;
}
/* 导航链接永远排成一行（用户 2026-11-18 定）：窄屏时导航独占一行、
   链接均分排开，品牌与全站搜索留在第一行；宽屏仍是品牌-导航-搜索同一行 */
.nav { flex-wrap: nowrap; }
.nav a { white-space: nowrap; }
@media (max-width: 1023px) {
  .nav { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .nav a { padding: 8px 6px; }
}

/* ---------- 4. 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer;
  font-size: .95rem; min-height: 40px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px); }
.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .8rem; white-space: nowrap;
}
.chip.flavor { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.type { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.fav-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  width: 40px; height: 40px; min-height: 40px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.fav-btn svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2; }
.fav-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.fav-btn[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.crumbs { font-size: .9rem; color: var(--muted); margin: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.45rem; }

/* 菜品卡 */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dish-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.dish-card .ph { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; text-decoration: none; }
.dish-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.dish-card .ph-none { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); background: radial-gradient(circle at 30% 20%, var(--gold-soft), var(--surface-2)); }
.ph-note { font-family: var(--font-body); font-size: .78rem; color: var(--muted); }
.dish-card .bd { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.dish-card h3 { font-size: 1.08rem; }
.dish-card .loc { font-size: .85rem; color: var(--muted); }
.dish-card .desc { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-card .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* 省份卡 */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
/* 地图页各省条目盒：选择器型列表，带内部滚动条（2026-11-18 用户
   两度改定：先定单一滚动轴、盒子随内容长高；同日 16:49 再定「选
   项卡还是需要内部滚动条，这样页面不至于太长」——页面滚动靠左
   缘滚轴专管，选项卡列表自己限高内滚，两不相碍）。盒高封顶
   56vh（窄屏 54vh），点省高亮对应卡并把卡滚到盒内顶部，页面
   本身不动（进省靠弹卡或点卡本身）。 */
.prov-scroll { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.prov-scroll::-webkit-scrollbar { width: 8px; }
.prov-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 4px; }
.prov-scroll::-webkit-scrollbar-track { background: transparent; }
.prov-card { padding: 10px 12px; text-decoration: none; color: var(--ink); display: block; }
/* 全国图点省后，下方条目里对应省卡片的高亮（用户 2026-11-18 定：
   点图先弹卡＋页面定位到条目，让人看清再选） */
.prov-card--hl { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.prov-card h3 { font-size: 1.04rem; margin-bottom: 2px; }
.prov-card h3 .short { color: var(--accent); font-size: .85rem; margin-left: 6px; }
.prov-card p { margin: 3px 0 6px; font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prov-card .meta { display: flex; gap: 5px; flex-wrap: wrap; }
.prov-card .chip { padding: 2px 8px; font-size: .76rem; }

/* 左边缘滚轴（2026-11-18 全删重写）：原生滚轴的左侧镜像——轨道全高，
   把手细长方形，高度按可见比例（轨道 × 屏高 ÷ 页高）；位置即滚动
   比例；拖动实时滚；页面可滚才显示（常显） */
#sideScroll { position: fixed; top: 0; bottom: 0; left: 0; width: 30px; z-index: 90; pointer-events: none; }
#sideScroll.off { display: none; }
#sideThumb { position: absolute; left: 0; top: 0; width: 32px; border-radius: 0 26px 26px 0; box-sizing: border-box; background: rgba(255, 255, 255, .28); border: 1px solid rgba(96, 74, 52, .38); border-left: none; box-shadow: 0 1px 6px rgba(60, 30, 10, .18), inset 0 0 4px rgba(255, 255, 255, .4); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); pointer-events: auto; touch-action: none; }
#sideScroll.drag #sideThumb { background: rgba(255, 255, 255, .5); }
/* 可抓范围向右加宽（看不见）：细条压不准也能抓住 */
#sideThumb::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: -12px; }

/* ---------- 5. 首页 ---------- */
.hero { padding: 34px 0 6px; }
.hero-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 900; }
.hero .hero-title { font-size: clamp(1.55rem, 3.4vw, 2.3rem); font-weight: 900; line-height: 1.25; margin-top: 14px; }
.hero .hero-title .accent { color: var(--accent); }
.hero h1 .accent { color: var(--accent); }
.hero .lede { color: var(--muted); margin: 14px 0 20px; font-size: 1.02rem; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero figure { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.hero figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hero figcaption { font-size: .8rem; color: var(--muted); padding-top: 6px; }
/* 首页导语画廊：横滑吸附、隐藏滚动条、圆点指示（用户 2026-11-17 定：
   两块图做成可以滑动的，用户能看到更多）。 */
.hero-gal { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface, #fff); }
.hg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hg-track::-webkit-scrollbar { display: none; }
.hero .hg-slide { flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; box-shadow: none; overflow: visible; }
.hero .hg-slide img { display: block; }
.hero .hg-slide figcaption { padding: 6px 10px 2px; }
.hg-dots { display: flex; gap: 2px; justify-content: center; padding: 4px 0 8px; }
/* 圆点本体 7px 用 ::after 画，按钮留 20×26 的可点区域（全局 button 有
   min-height:40px，直接画圆点会被撑成长条）。 */
.hg-dots button { width: 20px; height: 26px; min-height: 0; border: 0; padding: 0; background: transparent; cursor: pointer; position: relative; }
.hg-dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--border, #d8cfc2); }
.hg-dots button.on::after { background: var(--accent); }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 18px 0 0; }
.stats div { min-width: 84px; }
.stats b { font-family: var(--font-display); font-size: 1.5rem; display: block; }
.stats span { color: var(--muted); font-size: .85rem; }
.random-box { margin-top: 26px; padding: 18px; display: flex; gap: 16px; align-items: stretch; }
/* 照片拉满卡片高度、文字纵向居中、按钮整组靠右居中：整卡占满不留空角。
   之前照片是 120×92 的小缩略图、弹性行可换行，窄屏上图文与按钮散成
   两行、空一块缺一块（用户 2026-11-17 两次指：不对齐、没占满空间）。 */
.random-box img { width: 210px; min-height: 118px; object-fit: cover; border-radius: 10px; flex: none; }
.random-box .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.random-box .rand-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; align-self: center; flex: none; }

/* ---------- 6. 浏览页工具栏 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: nowrap; margin: 12px 0 10px; align-items: center; }
.toolbar input[type="search"], .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-height: 40px;
}
.toolbar input[type="search"] { flex: 1 1 200px; }
/* 筛选行四件（全部区域/全部口味/全部类型/清除筛选）必须同行、不许
   换行（用户 2026-11-18 定）：下拉等分压缩，按钮不缩 */
.toolbar select { flex: 1 1 0; min-width: 0; }
.toolbar .btn { flex: none; white-space: nowrap; }
@media (max-width: 640px) {
  .toolbar { gap: 6px; }
  .toolbar select { padding: 8px 5px; font-size: .88rem; }
  .toolbar .btn { padding-left: 10px; padding-right: 10px; }
}
.result-note { color: var(--muted); margin: 4px 0 14px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }

/* ---------- 7. 地图页 ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin: 18px 0 30px; align-items: start; }
#mapEl { width: 100%; height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
#mapEl.map-big { height: 620px; }
/* 全国图紧凑高度：地图＋被选中的省条目必须同屏、不许往下划才
   翻得到（用户 2026-11-18 定，含筛选行移到顶部后的再收紧） */
#mapEl.map-national { height: 40vh; min-height: 260px; }
#mapFallback img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }
/* 首页全国图 */
.home-map { margin: 0 0 10px; }
#homeMapEl { width: 100%; height: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
#homeMapFallback img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }
.map-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; }
.map-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.map-list li.map-selected { border-color: var(--accent); background: var(--accent-soft); }
.map-list .pin { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; margin-right: 8px; }
.map-list li.pin--on { border-color: var(--accent); }
.map-list .sub { display: block; font-size: .82rem; color: var(--muted); margin-left: 30px; }
/* 本省市县格网按钮（用户 2026-11-17 晚定，取代横向滑动固定行）：一格一个
   市县、与地图图钉同号。格子要小（同日晚用户再定）：格内只放编号+名字+
   一行小字。展开后限高内滚（2026-11-18 16:49 用户改定：选项卡需要内
   部滚动条、页面不至于太长；页面滚动靠左缘滚轴专管。2026-11-17 晚
   「封顶让页面下不去」的实报发生在页面还没有左缘滚轴之时）。 */
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; }
.place-grid::-webkit-scrollbar { width: 8px; }
.place-grid::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 4px; }
.place-grid::-webkit-scrollbar-track { background: transparent; }
.place-grid li { padding: 6px 8px; }
.place-grid .pin { margin-right: 6px; flex: none; width: 19px; height: 19px; font-size: .68rem; }
.place-grid .strip-name { font-weight: 600; font-size: .92rem; }
.place-grid .strip-sub { display: block; font-size: .74rem; color: var(--muted); margin: 2px 0 0 25px; }
/* v2.2 行政边界：地图上的驻地图钉（运行时渲染的小号编号点，位于面层之上，与右侧列表同号） */
#mapEl .pin, #homeMapEl .pin, #placeMapEl .pin, #browseMapEl .pin {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1;
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); cursor: pointer;
}
#mapEl .pin--on, #homeMapEl .pin--on, #placeMapEl .pin--on, #browseMapEl .pin--on { background: var(--gold); }
/* 图钉组件：地名在上、数字钉在下（2026-11-18 改定，取代同日「图钉不带
   名、靠底图」的口径）：底图瓦片按缩放级别只带一部分城市，手机全省
   取景时衢州/台州/丽水/舟山等地名根本不在数据里；底图的市/镇名层在
   区域图上已关，地名改由我们自己的数据标，样式仿底图（黑字白晕）。 */
.pin-stack { display: flex; flex-direction: column; align-items: center; }
.pin-label {
  height: 16px; line-height: 16px; margin-bottom: 5px; white-space: nowrap;
  font-size: 12.5px; color: #2b2b2b; pointer-events: none; letter-spacing: .02em;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
.pin-stack:has(.pin--on) .pin-label { font-weight: 700; }
/* 缩放分级：未放大时藏县级图钉（连命中一起藏，所以用 display:none
   而不是只藏内层——空盒还会挡住下面的面点按） */
#mapEl.hide-county .maplibregl-marker:has(.pin[data-tier="county"]),
#placeMapEl.hide-county .maplibregl-marker:has(.pin[data-tier="county"]),
#homeMapEl.hide-county .maplibregl-marker:has(.pin[data-tier="county"]) { display: none; }
/* 「X 的味道」滚轴盒：整版块一个垂直滚轴，展开再多也不撑长页面 */
/* 「X 的味道」不用内部滚轴：列表直接汇入页面这一个垂直滚动轴，
   靠「加载更多」分批控制长度（用户 2026-11-18 定——内部滚轴盒会
   吃掉触屏手势，页面几乎滚不动）。此类只剩边框外观，不再滚动。 */
.taste-scroll { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.taste-more { display: block; margin: 12px auto 2px; }
/* 味道版块的浮动按钮：只在版块进入视野时出现，回滚轴顶 / 到滚轴底 */
.float-nav { position: fixed; right: 14px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.float-nav[hidden] { display: none; }
.float-nav button[hidden] { display: none; } /* 不加这条，display:flex 会压过 hidden 属性，按钮藏不住 */
.float-nav button { width: 40px; height: 40px; min-height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px rgba(60, 30, 10, .25); font-size: 1rem; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* 点击不许冒浅蓝方框（Xi 2026-11-18）：触摸/鼠标点按去掉焦点轮廓与点按高亮；键盘 Tab 的焦点环保留 */
.float-nav button:focus { outline: none; }
.float-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 8. 详情页 ---------- */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 8px 0 24px; align-items: start; }
.detail-head .ph { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.detail-head .ph img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.detail-head .ph-none { aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 6px; font-family: var(--font-display); font-size: 4rem; color: var(--gold); background: radial-gradient(circle at 30% 20%, var(--gold-soft), var(--surface-2)); border-radius: 16px; }
.detail-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 6px 0 10px; }
.fact-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.fact-table th, .fact-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table th { width: 92px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.history-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 16px 18px; margin: 18px 0; }
.history-box h2 { font-size: 1.15rem; margin-bottom: 8px; }
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-row .grow { flex: 1; }

/* ---------- 9. 数据页 / 页脚 ---------- */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; }
.doc h2 { font-size: 1.25rem; margin-bottom: 10px; }
.doc pre { background: var(--surface-2); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: .82rem; line-height: 1.55; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.doc table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.doc th, .doc td { border-bottom: 1px solid var(--line); text-align: left; padding: 7px 8px; vertical-align: top; }
footer { border-top: 1px solid var(--line); margin-top: 44px; padding: 22px 0 34px; color: var(--muted); font-size: .88rem; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 99; font-size: .92rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 9b. v2 深度组件 ---------- */
.chip.ev { font-weight: 600; }
.chip.ev-ok { background: #e2efe4; color: #2f5d3a; }
.chip.ev-warn { background: #fbeed3; color: #8a5a12; }
.chip.ev-legend { background: var(--accent-soft); color: var(--accent); }
.chip.ev-unknown { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .chip.ev-ok { background: #24382a; color: #9fd3ab; }
  .chip.ev-warn { background: #40351c; color: #e8c37a; }
}
.deep-grid, .culture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.deep-card { padding: 16px; text-decoration: none; color: var(--ink); display: block; }
.deep-card h3, .culture-card h3 { font-size: 1.12rem; margin: 8px 0 2px; }
.deep-card .loc, .culture-card .loc { font-size: .85rem; color: var(--muted); }
.deep-card p, .culture-card p { font-size: .9rem; color: var(--muted); margin: 8px 0; }
.deep-card .row { display: flex; gap: 6px; flex-wrap: wrap; }
.culture-card { padding: 16px; }
.culture-card .culture-kind { font-size: .8rem; font-weight: 600; color: var(--gold); }
.culture-card .cph { margin: -16px -16px 12px; overflow: hidden; }
.culture-card .cph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: none; }
.timeline b { flex: 0 0 128px; font-family: var(--font-display); color: var(--accent); }
.timeline span { flex: 1; }
.evidence-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 14px 0; background: var(--surface); }
.evidence-box h2 { font-size: 1.1rem; margin-bottom: 8px; }
.evidence-box.fact { border-left: 4px solid var(--green); }
.evidence-box.legend { border-left: 4px solid var(--accent); }
.evidence-box.dispute { border-left: 4px solid var(--gold); }
.verify-box { border-left: 4px solid var(--green); }
.shallow-note { border-style: dashed; }
.tier-list { display: flex; flex-direction: column; gap: 14px; }
.tier h3 { font-size: 1.02rem; }
.tier p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
.lead-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lead { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.lead h3 { font-size: 1rem; margin-bottom: 6px; }
.lead p { margin: 4px 0; font-size: .9rem; }

/* ---------- 9c. v3 地图导航 / 定位 / 相关导览 ---------- */
.chip.rel { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.prov-card .loc { font-size: .85rem; color: var(--muted); }
/* 地方页定位小地图 */
.loc-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
#placeMapEl { width: 100%; height: 340px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
#browseMapEl { width: 100%; height: 340px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; margin-bottom: 14px; }
#browseMapFallback img { border-radius: 10px; border: 1px solid var(--line); width: 100%; height: auto; }
.loc-side .map-list.loc-list { max-height: 264px; margin: 0 0 12px; }
#placeMapFallback img { border-radius: 10px; border: 1px solid var(--line); width: 100%; height: auto; }
.loc-side p { margin: 0 0 10px; }
/* 相关导览 */
.tour-index { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
button.tour-jump { cursor: pointer; border: 1px solid var(--line); min-height: 34px; }
button.tour-jump:hover { border-color: var(--gold); color: var(--gold); }
.tour { margin-bottom: 10px; }
.tour-route { font-size: .95rem; margin: 0 0 14px; line-height: 2; }
.tour-route a { font-weight: 600; }
.tour-route span { color: var(--muted); margin: 0 2px; }

/* ---------- 9d. v2.4 补全进度（框架） ---------- */
.fw-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.fw-track i { display: block; height: 100%; background: var(--accent); }
.fw-list { display: flex; flex-direction: column; gap: 8px; }
.fw-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.fw-row a { color: var(--ink); }

/* ---------- 9b. 生僻字注解 + 地理平面示意 + 身份轴（样板：潮州） ---------- */
.gloss-term {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: help; text-decoration: underline dotted var(--accent) 1.5px;
  text-underline-offset: 3px;
}
.gloss-term:hover, .gloss-term:focus-visible { color: var(--accent); }
.gloss-pop {
  position: absolute; z-index: 60; box-sizing: border-box;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 10px 12px; font-size: .92rem; line-height: 1.55;
}
.gloss-pop p { margin: 4px 0 0; }
.gloss-pop .gloss-src { color: var(--muted); font-size: .8rem; }
.geomap-fig { margin: 14px 0 0; }
.geomap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.geomap-title { font-weight: 600; }
.geomap-north { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.geomap-grid { display: grid; gap: 8px; }
.geomap-cell {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--gold-soft); padding: 10px 12px; min-width: 0;
}
.geomap-area { color: var(--muted); font-size: .85rem; }
.geomap-dish { color: var(--accent); font-weight: 600; font-size: 1.05rem; }
a.geomap-dish { text-decoration: none; }
a.geomap-dish:hover, a.geomap-dish:focus-visible { text-decoration: underline; }
.geomap-note { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.geomap-fig figcaption { margin-top: 8px; }
/* 手绘风地理插图（geoMap.outline）：真实边界简化的轮廓剪影 + 轮廓内按
   大致方位摆的图标与标签；不是底图，没有街道与比例尺 */
.geomap-art { position: relative; max-width: 540px; margin: 6px auto 0; }
.geomap-svg { display: block; width: 100%; height: auto; }
.geomap-land { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.geomap-sea { fill: var(--water); opacity: .3; }
.geomap-wave { fill: none; stroke: var(--water); stroke-width: 2; stroke-linecap: round; opacity: .65; }
.geomap-river { fill: none; stroke: var(--water); stroke-width: 11; stroke-linecap: round; opacity: .5; }
.geomap-peak { fill: var(--green); opacity: .45; }
.geomap-svg text { font-family: var(--font-body); fill: var(--muted); }
.geomap-peaklab { font-size: 13px; }
.geomap-sealab { font-size: 16px; fill: var(--water-ink); }
.geomap-spot { position: absolute; z-index: 2; text-decoration: none; }
.geomap-badge {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--gold); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
}
.geomap-badge svg { width: 21px; height: 21px; transition: transform .15s ease; }
.geomap-badge svg path, .geomap-badge svg circle, .geomap-badge svg ellipse {
  fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.geomap-badge svg .geomap-eye { fill: var(--accent); stroke: none; }
a.geomap-spot:hover .geomap-badge, a.geomap-spot:focus-visible .geomap-badge {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
a.geomap-spot:hover .geomap-badge svg, a.geomap-spot:focus-visible .geomap-badge svg { transform: scale(1.12); }
/* width:max-content 是必须的：徽章锚点本身零宽，标签若不给确定宽度会被
   压成一个字宽、竖排成条互相遮挡（2026-11-16 实测教训） */
.geomap-lab { position: absolute; display: flex; flex-direction: column; line-height: 1.3; width: max-content; }
.geomap-lab > span { white-space: nowrap; }
/* 引线标签（数据里带 labX/labY）：标签单独成层放到指定位置，点线连回徽章 */
.geomap-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.geomap-leader { stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 0.5 5; stroke-linecap: round; opacity: .9; }
.geomap-lablink { position: absolute; z-index: 2; text-decoration: none; transform: translate(-50%, -50%); }
.geomap-lablink .geomap-lab { position: static; }
a.geomap-lablink:hover .geomap-dish, a.geomap-lablink:focus-visible .geomap-dish { text-decoration: underline; }
.geomap-spot .geomap-area { text-shadow: 0 0 5px var(--bg), 0 0 5px var(--bg); }
.geomap-spot .geomap-dish {
  color: var(--ink);
  text-shadow: 0 0 5px var(--bg), 0 0 5px var(--bg), 0 1px 2px var(--bg);
}
.lp-bottom .geomap-lab { left: 0; top: 22px; transform: translateX(-50%); align-items: center; text-align: center; }
.lp-top .geomap-lab { left: 0; bottom: 22px; transform: translateX(-50%); align-items: center; text-align: center; }
.lp-right .geomap-lab { left: 22px; top: 0; transform: translateY(-50%); align-items: flex-start; text-align: left; }
.lp-left .geomap-lab { right: 22px; top: 0; transform: translateY(-50%); align-items: flex-end; text-align: right; }
.id-axis { display: flex; align-items: flex-start; gap: 0; margin-top: 14px; }
.id-item { display: flex; flex-direction: column; gap: 2px; flex: 0 1 auto; max-width: 46%; }
.id-item b { color: var(--accent); }
.id-item span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.id-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-bottom: 4px; }
.id-line { flex: 1 1 24px; border-top: 2px solid var(--line); margin-top: 4px; min-width: 18px; }
@media (max-width: 480px) {
  .id-axis { flex-direction: column; gap: 10px; }
  .id-item { max-width: none; }
  .id-line { display: none; }
  .geomap-cell { padding: 8px 9px; }
  .geomap-dish { font-size: .98rem; }
  .geomap-note { display: none; }
  .geomap-art { max-width: none; margin-left: -22px; margin-right: -22px; }
  .geomap-badge { width: 30px; height: 30px; }
  .geomap-badge svg { width: 19px; height: 19px; }
  .geomap-spot .geomap-dish { font-size: .875rem; }
  .geomap-spot .geomap-area { font-size: .69rem; }
  .lp-bottom .geomap-lab { top: 20px; }
  .lp-top .geomap-lab { bottom: 20px; }
  .lp-right .geomap-lab { left: 20px; }
  .lp-left .geomap-lab { right: 20px; }
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 860px) {
  .hero, .detail-head { grid-template-columns: minmax(0, 1fr); }
  .hero-duo { grid-template-columns: minmax(0, 1fr); }
  .random-box { flex-direction: column; }
  .random-box img { width: 100%; height: 160px; min-height: 0; }
  .random-box .rand-actions { margin-left: 0; align-self: stretch; }
  .random-box .rand-actions .btn { flex: 1; text-align: center; }
  .map-layout, .loc-layout { grid-template-columns: minmax(0, 1fr); }
  #placeMapEl { height: 280px; }
  #browseMapEl { height: 280px; }
  #mapEl { height: 380px; }
  #mapEl.map-big { height: 440px; }
  #mapEl.map-national { height: 36vh; min-height: 240px; }
  /* 各省条目盒窄屏限高 54vh（见上方 .prov-scroll 注） */
  #homeMapEl { height: 340px; }
  .map-list { max-height: 380px; }
  .place-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 46vh; }
  .prov-scroll { max-height: 54vh; }
  .top-search { order: 3; flex-basis: 100%; max-width: none; }
  .dish-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  /* 注：曾在此把 .map-layout 改成 flex 纵列 + 地图 sticky，
     真机上地图宽度被压成 0、整张图消失（2026-11-17 用户实测），
     已回滚为原来的单列 grid。「点图钉不跳页」靠列表内部滚动解决，
     不再动布局结构。 */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}

/* ---- 首页简化（2026-11-16）：省份图文卡 + 地图静态预览（快速导航行已于 2026-11-17 按用户要求删除） ---- */
.ppc { padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); display: block; }
.ppc .ph { display: block; height: 128px; overflow: hidden; }
.ppc .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppc .ph-none { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f3e2c7, #e8b04b); }
.ppc .ph-none span { font-size: 2.4rem; font-weight: 900; color: #8a5a12; }
.ppc .bd { display: block; padding: 12px 14px 14px; }
.ppc h3 { font-size: 1.08rem; margin: 0 0 4px; }
.ppc h3 .short { color: var(--accent); font-size: .85rem; margin-left: 6px; }
.ppc p { margin: 4px 0 10px; font-size: .88rem; color: var(--muted); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ppc .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.map-preview { display: block; padding: 0; overflow: hidden; text-decoration: none; }
.map-preview img { width: 100%; height: auto; display: block; }
.map-preview-cta { display: block; padding: 10px 14px; color: var(--accent); font-size: .92rem; }

/* ---- 首页再压缩（2026-11-16 二改）：省份图片墙 + 深度县市单入口 ---- */
.prov-grid.wall { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.wall .ppc .ph { height: 76px; }
.wall .ppc .ph-none span { font-size: 1.7rem; }
.wall .ppc .bd { padding: 8px 9px 9px; }
.wall .ppc h3 { font-size: .95rem; margin: 0; }
.wall .ppc h3 .short { font-size: .78rem; margin-left: 4px; }
.wall .ppc .counts { display: block; font-size: .74rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.deep-entry { padding: 16px; }
.deep-intro { margin: 0 0 12px; color: var(--muted); font-size: .94rem; }
.deep-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.deep-band b { display: block; font-size: 1.35rem; }
.deep-band span { font-size: .78rem; color: var(--muted); }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mosaic a { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic a span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 8px 5px;
  font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.tour-rows { padding: 6px 16px; }
.tour-rows a { display: flex; align-items: center; gap: 10px; padding: 10px 0;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line, #e7e0d2); }
.tour-rows a:last-child { border-bottom: 0; }
.tour-rows .grow { flex: 1; min-width: 0; }
@media (max-width: 560px) { .mosaic { grid-template-columns: repeat(2, 1fr); } .deep-band { grid-template-columns: repeat(2, 1fr); } }

/* ---- 首页热力大地图 + 导览信息图（2026-11-16 三改） ---- */
.heat-wrap { position: relative; padding: 12px 12px 10px; }
.heat-wrap canvas { width: 100%; display: block; touch-action: none; }
.heat-tip { position: absolute; z-index: 3; pointer-events: none; background: rgba(38,26,14,.92);
  color: #fdf6e9; border-radius: 8px; padding: 6px 10px; font-size: .84rem; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.heat-bar { flex: 0 0 110px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #313695, #4575b4, #74add1, #abd9e9, #e0f3f8, #ffffbf, #fee090, #fdae61, #f46d43, #d73027, #a50026); }
.heat-hot { margin-left: auto; color: var(--accent); font-weight: 600; white-space: nowrap; }
.tourinfo { padding: 8px 6px; display: flex; flex-direction: column; }
.ti-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line, #e7e0d2); }
.ti-row:last-child { border-bottom: 0; }
.ti-photo { position: relative; flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; display: block; }
.ti-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ti-photo > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 7px 5px; font-size: .8rem; font-weight: 700;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.66)); }
.ti-nophoto { background: linear-gradient(135deg, #f3e2c7, #e8b04b); }
.ti-nophoto > span { background: none; color: #8a5a12; }
.ti-route { flex: 1; min-width: 0; display: block; }
.ti-route svg { width: 100%; height: auto; display: block; }
@media (max-width: 560px) { .ti-photo { flex-basis: 64px; width: 64px; height: 64px; } .heat-bar { flex-basis: 70px; } }

/* ---- 首页四改：省份墙前 12 + 展开；WebGL 热力图舞台/标注/信息条 ---- */
.more-btn { display: block; margin: 12px auto 2px; }
.heat-stage { position: relative; }
.heat-stage canvas { aspect-ratio: 1.358; }
.heat-labels { position: absolute; inset: 0; pointer-events: none; }
.heat-labels span { position: absolute; transform: translate(-50%, -50%); font-size: 11px; font-weight: 600;
  color: #5a3a10; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,252,245,.85), 0 0 5px rgba(255,252,245,.85); }
.heat-info { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px;
  background: var(--bg, #faf6ee); border-radius: 10px; font-size: .92rem; min-height: 46px; }
.heat-info > span { flex: 1; }
.heat-info .btn { margin-left: auto; padding: 6px 14px; white-space: nowrap; }
@media (max-width: 560px) { .heat-labels span { font-size: 10px; } }

/* hidden 属性兜底：任何带 class 的元素也不能把 hidden 顶掉 */
[hidden] { display: none !important; }

/* ---- 首页五改：三维流线图深色舞台 ---- */
.heat-stage { background: radial-gradient(130% 95% at 50% 28%, #33200f 0%, #20130a 55%, #130b06 100%); border-radius: 12px; overflow: hidden; }
.heat-labels span { color: #ffe9c4; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 7px rgba(0,0,0,.8); }

/* ---- 首页六改：地形版——选中省名浮标 + 流线图例 + 更深的舞台 ---- */
.heat-stage { background: radial-gradient(130% 95% at 50% 28%, #2a1709 0%, #180d05 55%, #0b0502 100%); }
.heat-labels span.sel-label { background: rgba(24,12,6,.85); border: 1px solid rgba(255,201,62,.65);
  padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.flow-key { margin-left: 10px; white-space: nowrap; }
.flow-key i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

.heat-legend { flex-wrap: wrap; row-gap: 4px; }
.flow-legend { display: flex; align-items: center; gap: 14px; margin-top: 6px; font-size: .82rem; color: var(--muted, #8a7a5f); }
.flow-legend .flow-key { margin-left: 0; }

.heat-bar.terr { background: linear-gradient(90deg, #4d7a3d, #859e4d, #c7b370, #a38057, #e3ded2); }
.heat-modes { display: flex; gap: 6px; margin: 8px 0 2px; }
.heat-modes button { border: 1px solid #d8c9ae; background: #f7efdd; color: #7a6a52; border-radius: 999px; padding: 4px 16px; font-size: 12.5px; cursor: pointer; }
.heat-modes button.on { background: #b3402a; border-color: #b3402a; color: #fff; }
.heat-legend > span[id] { display: flex; align-items: center; gap: 6px; }
/* 地图页分级加载（2026-11-17）：省级数量标记与回全国按钮 */
#mapEl .prov-badge { display: flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 5px; background: var(--accent); color: #fff; border: 2px solid #fff; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); cursor: pointer; white-space: nowrap; }
#mapEl .prov-badge--on { background: var(--gold); }
#mapEl .prov-label { font-size: 13.5px; font-weight: 800; letter-spacing: .08em; line-height: 1.15; color: #4a2f0d; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 5px #fff; white-space: nowrap; }
#mapEl.prov-lg .prov-label { font-size: 16px; }
#mapEl .prov-label-wrap { pointer-events: none; }
.map-list .pin.pin-count { width: auto; min-width: 22px; border-radius: 999px; padding: 0 7px; font-size: .72rem; }
.map-back-btn { margin: 0 0 8px; }

/* 地图加载动画（2026-11-17）：地图框一出现就占住位置转圈，不留空白；
   地图画出来后由 app.js 撤掉。纯 CSS，不占额外请求 */
#mapEl, #placeMapEl { position: relative; }
#mapEl { background: var(--surface-2); }
.map-wrap { position: relative; }
.map-loading { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: color-mix(in srgb, var(--surface-2) 84%, transparent); border-radius: var(--radius); pointer-events: none; transition: opacity .35s ease; }
.map-loading--out { opacity: 0; }
/* 点中市县弹出的卡片：长在点按处，整张可点进地方页 */
.map-pop { position: absolute; z-index: 8; width: 276px; max-width: calc(100% - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(60, 30, 10, .28); padding: 10px 12px 11px; animation: mp-in .16s ease; }
@keyframes mp-in { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: none; } }
.mp-head { display: flex; align-items: center; gap: 6px; }
.mp-head b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mp-count { flex: none; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 7px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.mp-go { flex: none; margin-left: auto; background: var(--accent); color: #fff; font-weight: 600; font-size: .8rem; padding: 4px 9px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
/* × 的可点区域必须够大（Xi 2026-11-18 真机：太小点不准、偏一点就误触卡片）：40px 见方、负边距探进卡片内边距区，字形本身不变大 */
.mp-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 1.25rem; line-height: 1; width: 40px; height: 40px; margin: -9px -11px -9px -2px; display: grid; place-items: center; cursor: pointer; }
.mp-dishes { margin: 7px 0 0; font-size: .88rem; line-height: 1.55; }
.mp-tag { display: inline-block; background: var(--gold); color: #fff; border-radius: 4px; padding: 0 5px; font-size: .72rem; margin-right: 6px; vertical-align: 1px; }
.mp-tag--hit { background: var(--accent); }
.mp-choose { margin-top: 9px; border-top: 1px dashed var(--line); padding-top: 8px; cursor: default; }
.mp-choose-t { margin: 0 0 4px; font-size: .8rem; color: var(--muted); }
.mp-choice { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 4px 2px; font-size: .92rem; color: var(--text); cursor: pointer; animation: mp-pop-in .18s ease backwards; }
@keyframes mp-pop-in { from { opacity: 0; transform: scale(.65) translateY(3px); } to { opacity: 1; transform: none; } }
.mp-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #eda87e, var(--accent)); color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(60, 30, 10, .3); }
.mp-choice--place { color: var(--accent); font-weight: 600; padding-left: 32px; }
.mp-caret { position: absolute; width: 12px; height: 12px; transform: rotate(45deg); background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mp-caret--up { border-right: 0; border-bottom: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }

.map-loading-in { text-align: center; color: var(--muted); padding: 16px; }
.ml-visual { position: relative; width: 58px; height: 58px; margin: 0 auto 12px; }
.ml-visual::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: ml-spin .9s linear infinite; }
.ml-visual span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.ml-text { margin: 0; font-size: .95rem; }
.ml-dots { font-style: normal; }
.ml-dots b { display: inline-block; animation: ml-dot 1.2s ease-in-out infinite; }
.ml-dots b:nth-child(2) { animation-delay: .2s; }
.ml-dots b:nth-child(3) { animation-delay: .4s; }
.ml-sub { margin: 4px 0 0; font-size: .8rem; }
@keyframes ml-spin { to { transform: rotate(360deg); } }
@keyframes ml-dot { 0%, 60%, 100% { opacity: .15; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ml-visual::before, .ml-dots b { animation: none; }
}

/* 地图选中列表：选中置顶＋同级最近邻居（Xi 2026-11-18） */
.his-head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.sel-list { display: flex; flex-direction: column; gap: 8px; }
.sel-row { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none; }
.sel-row--on { border-color: var(--gold); background: var(--gold-soft); }
.sel-main { display: flex; align-items: center; gap: 8px; }
.sel-main b { font-size: 1rem; }
.sel-count { flex: none; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 7px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.sel-line { display: block; margin-top: 4px; font-size: .88rem; line-height: 1.5; }
.sel-sub { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }

/* 顶栏后退按钮：与 logo 印章同尺寸（36px）同圆角（9px）成一对（Xi
   2026-11-18：后退按钮和标题要协调）；槽位恒定保留、不可用时只是
   不可见，标题不许因它出现/消失而移位 */
.back-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.back-btn[hidden] { display: none; }

/* 地图与下方列表之间留空（Xi 2026-11-18） */
#browseBody { margin-top: 22px; }
