/* ================================================================
 * 鹏城觅味 v5 · 海派玉兰 + 暮光金 视觉系统
 * 字体混排：Noto Serif SC（衬线标题）+ Inter（数字）+ PingFang（正文）
 * 层次：双层投影 + 内描边 + 噪点 + 材质对比
 * 点睛：腾讯蓝主 + 暮光金辅 + 朱砂红强调
 * ================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* —— 底色（米纸，暖偏灰） —— */
  --bg: #f5f1e8;
  --bg-warm: #efe8d9;
  --bg-elev: #ffffff;
  --bg-paper: #fcfaf4;

  /* —— 墨色梯度 —— */
  --ink-1: #1c1a17;
  --ink-2: #4a4640;
  --ink-3: #8a857b;
  --ink-4: #bab5a9;

  /* —— 分隔 —— */
  --line: #e5ded0;
  --line-2: #efe9dc;
  --line-3: #f6f1e4;

  /* —— 品牌：腾讯蓝 + 暮光金 + 朱砂 —— */
  --brand: #1A5FAE;
  --brand-deep: #0E3F7E;
  --brand-hover: #124a8b;
  --brand-soft: #EAF2FB;
  --brand-veil: rgba(26,95,174,0.08);
  --accent: #1A7FE0;

  --gold: #C88A3E;            /* 暮光金（点睛色，数字/徽章） */
  --gold-soft: #F6E9D0;
  --gold-deep: #9A6322;

  --crimson: #B33A3A;          /* 朱砂（印章、极少用） */
  --warn: #E87E3C;

  /* —— 双层阴影（更有"纸张浮起"感） —— */
  --shadow-paper: 0 1px 0 rgba(255,255,255,0.8) inset, 0 1px 2px rgba(28,26,23,0.04), 0 2px 8px rgba(28,26,23,0.05);
  --shadow-s: 0 1px 0 rgba(255,255,255,0.85) inset, 0 2px 4px rgba(26,95,174,0.05), 0 6px 14px rgba(26,95,174,0.08);
  --shadow-m: 0 1px 0 rgba(255,255,255,0.9) inset, 0 4px 10px rgba(26,95,174,0.08), 0 14px 32px rgba(26,95,174,0.13);
  --shadow-l: 0 2px 0 rgba(255,255,255,0.95) inset, 0 8px 24px rgba(26,95,174,0.1), 0 24px 60px rgba(26,95,174,0.18);
  --shadow-gold: 0 6px 18px rgba(200,138,62,0.25);

  /* —— 圆角 —— */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-xl: 28px;

  /* —— 字体 —— */
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Inter", system-ui, sans-serif;
  --font-num: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;

  /* —— 菜系渐变 —— */
  --g-1: linear-gradient(135deg, #8cb8e0 0%, #3a6ba8 100%);
  --g-2: linear-gradient(135deg, #a9c9e6 0%, #5e86b4 100%);
  --g-3: linear-gradient(135deg, #b5d4a8 0%, #5f9058 100%);
  --g-4: linear-gradient(135deg, #ffb86b 0%, #d87228 100%);
  --g-5: linear-gradient(135deg, #e7a9a9 0%, #a85656 100%);
}

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-1);
  height: 100%;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1, "kern" 1;
}

/* —— 纸质噪点背景（细密） —— */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6  0 0 0 0 0.55  0 0 0 0 0.45  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
}

.view { display: flex; flex-direction: column; min-height: 100vh; }
.view[hidden] { display: none !important; }

/* 数字专用字体类 */
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* 衬线标题 */
.serif { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0.02em; }

/* ================================================================
 * 主站首页
 * ================================================================ */
.home-hero {
  position: relative;
  padding: 24px 20px 16px;
  background:
    radial-gradient(1200px 320px at 20% -30%, rgba(26,95,174,0.18), transparent 60%),
    radial-gradient(800px 260px at 110% 10%, rgba(200,138,62,0.14), transparent 60%),
    linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
  overflow: hidden;
}
/* 首页背景大字水印 */
.home-hero::after {
  content: "鵬城";
  position: absolute;
  right: -12px; bottom: -60px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 220px;
  color: var(--brand);
  opacity: 0.04;
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
}
.home-brand {
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 2;
}
.home-logo {
  width: 60px; height: 60px; border-radius: 14px;
  box-shadow: var(--shadow-m);
  flex-shrink: 0;
  background: #fff;
  padding: 4px;
}
.home-brand-text h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: 2px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-tag {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 4px;
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 8px;
}
.home-tag::before {
  content: "";
  width: 18px; height: 1px; background: var(--gold);
}

.home-body {
  flex: 1; padding: 16px 16px 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 2;
}

/* —— 今天吃什么：升级为带印章与衬线字的英雄按钮 —— */
.home-lucky {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background:
    radial-gradient(400px 120px at 100% 0%, rgba(255,255,255,0.18), transparent 70%),
    linear-gradient(135deg, #0E3F7E 0%, #1A5FAE 45%, #1A7FE0 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-m);
  box-shadow: 0 10px 26px rgba(26,95,174,0.32), 0 2px 0 rgba(255,255,255,0.1) inset;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease;
  width: 100%;
  text-align: left;
  overflow: hidden;
}
.home-lucky::before {
  /* 斜向光带 */
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: rotate(12deg);
  pointer-events: none;
}
.home-lucky:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(26,95,174,0.38); }
.home-lucky:active { transform: scale(.985); }
.home-lucky .lucky-emoji {
  font-size: 32px; line-height: 1; flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.home-lucky .lucky-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.home-lucky .lucky-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
}
.home-lucky .lucky-sub {
  font-size: 11.5px;
  opacity: 0.82;
  letter-spacing: 0.6px;
  font-variant-numeric: tabular-nums;
}
.home-lucky::after {
  /* 右侧金色印章 */
  content: "隨緣";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  background: var(--crimson);
  padding: 4px 6px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 3px;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  line-height: 1.05;
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* —— 地图容器 —— */
.home-map-wrap {
  position: relative;
  background: var(--bg-elev);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
  overflow: hidden;
  height: 320px;
  border: 1px solid var(--line);
}
#home-map { width: 100%; height: 100%; }
.home-map-legend {
  position: absolute; top: 14px; right: 14px;
  padding: 7px 14px;
  background: rgba(14,63,126,0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(14,63,126,0.3);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

/* —— 七区卡片：升级为多层质感 —— */
.home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dcard {
  position: relative;
  display: block;
  padding: 16px 16px 42px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg-paper) 100%);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-paper);
  text-decoration: none;
  color: var(--ink-1);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease;
}
.dcard::before {
  /* 左侧金色装饰条 */
  content: "";
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--brand) 100%);
  border-radius: 0 3px 3px 0;
  opacity: 0.55;
  transition: opacity .2s;
}
.dcard::after {
  /* 右下装饰数字水印 */
  content: attr(data-idx);
  position: absolute;
  right: -8px; bottom: -28px;
  font-family: var(--font-serif);
  font-size: 90px;
  font-weight: 900;
  color: var(--brand);
  opacity: 0.05;
  line-height: 1;
  pointer-events: none;
}
.dcard:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-m);
}
.dcard:hover::before { opacity: 1; }
.dcard:active { transform: scale(.98); }
.dcard-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.dcard-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-1);
  letter-spacing: 1.5px;
}
.dcard-count {
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.dcard-count::after {
  content: " 家";
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.5px;
}
.dcard-anchor {
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.3px;
}
.dcard-arrow {
  position: absolute;
  right: 14px; bottom: 12px;
  font-size: 14px;
  color: var(--brand);
  opacity: .6;
  transition: transform .2s, opacity .2s;
}
.dcard:hover .dcard-arrow { opacity: 1; transform: translateX(3px); }

.home-foot {
  padding: 16px 20px 24px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
  position: relative; z-index: 2;
}
.home-foot::before {
  content: "";
  display: block;
  width: 40px; height: 1px;
  margin: 0 auto 12px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ================================================================
 * 子站
 * ================================================================ */
.sub-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.sub-back {
  font-size: 14px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.sub-title {
  display: flex; align-items: center; gap: 10px;
}
.sub-logo { width: 26px; height: 26px; border-radius: 6px; }
.sub-district {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-1);
  letter-spacing: 1.5px;
}
.sub-fav {
  background: transparent; border: none; font-size: 20px; cursor: pointer;
  padding: 4px 8px;
  transition: transform .14s;
}
.sub-fav.active { transform: scale(1.08); }
.sub-fav:active { transform: scale(.9); }

/* —— 场景筛选 chip —— */
.scenes {
  display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
  scrollbar-width: none;
}
.scenes::-webkit-scrollbar { display: none; }
.scene-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
  box-shadow: var(--shadow-paper);
}
.scene-chip:hover { border-color: var(--brand); color: var(--brand); }
.scene-chip.on {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(26,95,174,0.3);
  font-weight: 600;
}

/* —— 餐厅卡片：纸质层叠 + 金边 + 衬线店名 —— */
.stage {
  flex: 1;
  padding: 8px 16px 16px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.rcard {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  position: relative;
}
/* 顶部细金线 */
.rcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand) 40%, var(--gold) 100%);
  z-index: 5;
}
.rcard-cuisine {
  padding: 24px 22px 18px;
  color: #fff;
  background: var(--g-1);
  min-height: 170px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.rcard-cuisine.has-real {
  min-height: 210px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.75), 0 1px 3px rgba(0,0,0,0.6);
}
.rcard-cuisine.has-real::after {
  height: 85%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.72) 100%);
}
.rcard-cuisine::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}
.rcard-cuisine-top, .rcard-name { position: relative; z-index: 2; }
.rcard-cuisine-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.rcard-cuisine-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  letter-spacing: 1px;
}
/* —— 排名徽章：暮光金 —— */
.rank-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--gold) 0%, #E3A855 100%);
  color: #fff;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-gold);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.rank-badge::before {
  content: "◆";
  font-size: 8px;
  opacity: 0.9;
}
.rcard-name {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 900;
  margin-top: 8px;
  line-height: 1.25;
  word-break: break-all;
  letter-spacing: 1px;
}
.rcard-body {
  padding: 18px 22px 22px;
  flex: 1;
  background: linear-gradient(180deg, #fff 0%, var(--bg-paper) 100%);
}
.rcard-meta {
  display: flex; gap: 16px; margin-bottom: 12px;
  font-size: 13px; color: var(--ink-2);
  flex-wrap: wrap;
  align-items: baseline;
}
.rcard-meta .price {
  font-family: var(--font-num);
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.rcard-meta .rating {
  font-family: var(--font-num);
  color: var(--gold-deep);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex; align-items: center; gap: 3px;
}
.rcard-meta .rating::before { content: "★"; color: var(--gold); font-size: 13px; }
.rcard-meta .verified { color: var(--brand); font-size: 11.5px; font-weight: 600; }
.rcard-meta .faved { color: #e24d67; font-size: 11.5px; font-weight: 600; }
.rcard-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.tag-chip {
  font-size: 11.5px;
  padding: 3px 10px;
  background: var(--brand-veil);
  color: var(--brand-deep);
  border: 1px solid rgba(26,95,174,0.15);
  border-radius: 999px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.rcard-addr {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  display: flex; gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.rcard-addr::before { content: "📍"; flex-shrink: 0; }
.rcard-dist {
  margin-top: 8px;
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.3px;
}

/* ================================================================
 * 动作栏
 * ================================================================ */
.actions {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 14px 12px 20px;
}
.btn-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, var(--bg-paper) 100%);
  border: 1px solid var(--line);
  font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-s);
  display: flex; align-items: center; justify-content: center;
  transition: transform .16s, box-shadow .2s, border-color .2s;
  flex: 0 0 auto;
}
.btn-icon:hover { border-color: var(--brand); box-shadow: var(--shadow-m); }
.btn-icon:active { transform: scale(.92); }
.btn-main {
  height: 50px; padding: 0 22px; border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 50%, var(--accent) 100%);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(26,95,174,0.4), 0 2px 0 rgba(255,255,255,0.15) inset;
  transition: transform .16s, box-shadow .2s;
  position: relative; overflow: hidden;
  flex: 0 0 auto;
  white-space: nowrap;
}
.btn-main::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn-main:hover::after { transform: translateX(100%); }
.btn-main:hover { box-shadow: 0 12px 28px rgba(26,95,174,0.5); }
.btn-main:active { transform: scale(.96); }
.btn-main span:first-child { font-size: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); }

.sub-foot {
  display: flex; justify-content: space-between;
  padding: 10px 20px 18px;
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
}

/* ================================================================
 * 全屏地图
 * ================================================================ */
.mapview {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.mapview[hidden] { display: none !important; }
.mapview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-elev);
  box-shadow: var(--shadow-paper);
}
.mapview-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 2px;
}
.mapview-close {
  background: transparent; border: none; font-size: 20px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  transition: background .2s;
}
.mapview-close:hover { background: var(--line-2); }
#sub-map { flex: 1; }

/* 头部操作区（外部导航 + 关闭） */
.mapview-head-ops {
  display: flex; align-items: center; gap: 10px;
}
.mapview-open-nav {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff; border: none;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 95, 174, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mapview-open-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 95, 174, 0.45);
}
.mapview-open-nav:active { transform: translateY(0); }

/* 路线信息覆盖层 */
.mapview-routeinfo {
  position: absolute;
  left: 14px; right: 14px; bottom: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14), var(--shadow-paper);
  font-size: 14px;
  line-height: 1.7;
  backdrop-filter: blur(6px);
  z-index: 5;
}
.mapview-routeinfo[hidden] { display: none !important; }
.mapview-routeinfo .ri-row {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-1);
  font-weight: 600;
}
.mapview-routeinfo .ri-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 10px;
}
.mapview-routeinfo .ri-from { background: var(--gold); box-shadow: 0 0 0 3px rgba(200,138,62,0.2); }
.mapview-routeinfo .ri-to   { background: var(--crimson); box-shadow: 0 0 0 3px rgba(179,58,58,0.2); }
.mapview-routeinfo .ri-dist {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--ink-2, #6b6761);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* mapview 内部相对定位，以便 routeinfo 浮层 */
.mapview { position: fixed; }
.mapview > #sub-map { position: relative; }

/* ================================================================
 * 收藏抽屉
 * ================================================================ */
.favs {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28,26,23,0.48);
  display: flex; align-items: flex-end;
  backdrop-filter: blur(4px);
}
.favs[hidden] { display: none !important; }
.favs-panel {
  width: 100%;
  background: var(--bg-elev);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  max-height: 75vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
}
.favs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-elev) 100%);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.favs-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 1.5px;
}
.favs-close {
  background: transparent; border: none; font-size: 20px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
}
.favs-close:hover { background: var(--line-2); }
.favs-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.fav-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-3);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  transition: background .2s;
}
.fav-item:hover { background: var(--bg-paper); }
.fav-item:last-child { border-bottom: none; }
.fav-info { flex: 1; min-width: 0; }
.fav-ops { display: flex; gap: 4px; flex-shrink: 0; }
.fav-nav, .fav-del {
  background: transparent; border: none; cursor: pointer;
  padding: 7px 10px; border-radius: 8px;
  font-size: 15px;
  transition: background .15s;
}
.fav-nav { color: var(--brand); }
.fav-nav:hover { background: var(--brand-soft); }
.fav-del { color: var(--ink-3); }
.fav-del:hover { color: var(--warn); background: #fff4e8; }
.fav-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.3px;
}
.fav-meta {
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.fav-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.fav-empty::before {
  content: "❤";
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--line);
}

/* ================================================================
 * Toast
 * ================================================================ */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(28,26,23,0.92);
  color: #fff;
  padding: 11px 24px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .24s;
  z-index: 200;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
}
.toast.show { opacity: 1; }

/* ================================================================
 * 桌面适配
 * ================================================================ */
@media (min-width: 768px) {
  .home-hero { padding: 34px 32px 18px; }
  .home-hero::after { font-size: 320px; bottom: -100px; }
  .home-body { padding: 20px 32px 36px; }
  .home-map-wrap { height: 440px; }
  .home-cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
  .home-brand-text h1 { font-size: 36px; }
  .home-logo { width: 68px; height: 68px; }
  .rcard-name { font-size: 32px; }
}

/* ================================================================
 * 动效
 * ================================================================ */
@keyframes rcard-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.rcard { animation: rcard-in .32s cubic-bezier(.2,.8,.2,1) both; }

@keyframes dcard-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dcard { animation: dcard-in .4s ease both; }
.dcard:nth-child(1) { animation-delay: .04s; }
.dcard:nth-child(2) { animation-delay: .08s; }
.dcard:nth-child(3) { animation-delay: .12s; }
.dcard:nth-child(4) { animation-delay: .16s; }
.dcard:nth-child(5) { animation-delay: .20s; }
.dcard:nth-child(6) { animation-delay: .24s; }
.dcard:nth-child(7) { animation-delay: .28s; }

/* ============================== 打卡 / 评价 ============================== */
/* 首页"我的打卡"入口 */
.home-checkins-entry {
  display: flex; align-items: center; gap: 14px;
  margin: 14px auto 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fff4ec 0%, #f7e3d0 100%);
  border: 1px solid #f1d9bb;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(200,138,62,0.10);
  cursor: pointer;
  width: calc(100% - 28px);
  max-width: 520px;
  transition: transform .15s, box-shadow .15s;
}
.home-checkins-entry:active { transform: scale(.98); }
.home-checkins-entry:hover { box-shadow: 0 8px 22px rgba(200,138,62,0.20); }
.home-checkins-entry .ce-emoji { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.home-checkins-entry .ce-text { flex: 1; display: flex; flex-direction: column; text-align: left; }
.home-checkins-entry .ce-title { font-size: 16px; font-weight: 700; color: #7a4a1e; }
.home-checkins-entry .ce-sub { font-size: 12px; color: #9a7a52; margin-top: 2px; }
.home-checkins-entry .ce-count {
  font-size: 22px; font-weight: 800; color: #c88a3e;
  padding: 4px 14px;
  background: #fff;
  border-radius: 20px;
  min-width: 44px; text-align: center;
  box-shadow: inset 0 0 0 1px rgba(200,138,62,0.3);
}

/* 打卡按钮（子站 actions） */
.btn-check {
  background: linear-gradient(135deg, #ffe0c2 0%, #f1c98b 100%);
  border-color: #e5b56a !important;
  color: #7a4a1e !important;
}

/* 打卡弹窗 */
.checkin-modal {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: cm-bg .2s ease both;
}
.checkin-modal[hidden] { display: none !important; }
@keyframes cm-bg { from { opacity: 0; } to { opacity: 1; } }

.cm-panel {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: cm-pop .25s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes cm-pop {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1A5FAE 0%, #2d79d0 100%);
  color: #fff;
}
.cm-title { font-size: 16px; font-weight: 700; }
.cm-close {
  background: rgba(255,255,255,0.2); border: 0; color: #fff;
  width: 28px; height: 28px; border-radius: 14px;
  cursor: pointer; font-size: 14px;
}
.cm-body { padding: 16px 18px; }
.cm-target {
  padding: 10px 12px;
  background: #f7f7fb;
  border-radius: 10px;
  margin-bottom: 14px;
}
.cm-target-name { font-size: 15px; font-weight: 700; color: #222; }
.cm-target-meta { font-size: 12px; color: #666; margin-top: 3px; }
.cm-field { margin-bottom: 14px; }
.cm-field label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 600;
}
.cm-count { font-size: 11px; color: #999; font-weight: 400; }
.cm-date, .cm-note {
  width: 100%; padding: 10px 12px;
  border: 1px solid #e0e0e8; border-radius: 8px;
  font-size: 14px; font-family: inherit;
  box-sizing: border-box;
}
.cm-date:focus, .cm-note:focus { border-color: #1A5FAE; outline: 0; }
.cm-note { resize: none; }

.cm-stars { display: flex; align-items: center; gap: 4px; user-select: none; }
.cm-star {
  font-size: 28px; color: #ddd; cursor: pointer;
  transition: color .1s, transform .1s;
}
.cm-star:hover { transform: scale(1.15); }
.cm-star.on { color: #f5b431; filter: drop-shadow(0 1px 2px rgba(245,180,49,0.4)); }
.cm-star-label { margin-left: 10px; font-size: 13px; color: #999; font-weight: 600; }

.cm-foot {
  display: flex; gap: 10px; padding: 14px 18px;
  background: #f7f7fb; border-top: 1px solid #ecedf3;
}
.cm-cancel, .cm-save {
  flex: 1; padding: 11px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  border: 0;
}
.cm-cancel { background: #fff; color: #666; box-shadow: inset 0 0 0 1px #e0e0e8; }
.cm-cancel:hover { background: #f0f0f5; }
.cm-save { background: linear-gradient(135deg, #1A5FAE 0%, #2d79d0 100%); color: #fff; }
.cm-save:hover { box-shadow: 0 6px 16px rgba(26,95,174,0.3); }
.cm-save:active { transform: scale(.98); }

/* 我的打卡抽屉 */
.checkins {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: cm-bg .2s ease both;
}
.checkins[hidden] { display: none !important; }
.checkins-panel {
  background: #fff;
  width: 100%; max-width: 600px;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
  animation: ci-slide .28s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes ci-slide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.checkins-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #ecedf3;
}
.checkins-title { font-size: 17px; font-weight: 700; color: #222; }
.checkins-close {
  background: #f0f0f5; border: 0;
  width: 28px; height: 28px; border-radius: 14px;
  cursor: pointer; color: #666; font-size: 14px;
}
.checkins-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 14px 18px;
  background: linear-gradient(135deg, #fff4ec 0%, #f7e3d0 100%);
  border-bottom: 1px solid #f1d9bb;
  gap: 8px;
}
.ci-stat { text-align: center; }
.ci-stat-v { font-size: 22px; font-weight: 800; color: #c88a3e; line-height: 1.1; }
.ci-stat-l { font-size: 11px; color: #9a7a52; margin-top: 4px; }
.checkins-list { flex: 1; overflow-y: auto; padding: 8px 14px 20px; }
.ci-empty {
  text-align: center; color: #999; font-size: 13px; line-height: 1.8;
  padding: 60px 20px;
}
.ci-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 10px;
  border-bottom: 1px dashed #eee;
}
.ci-item:last-child { border-bottom: 0; }
.ci-date {
  font-size: 11px; color: #999; font-weight: 600;
  background: #f7f7fb; padding: 3px 8px; border-radius: 6px;
  flex: 0 0 auto; white-space: nowrap;
  margin-top: 2px;
}
.ci-main { flex: 1; min-width: 0; }
.ci-name { font-size: 14px; font-weight: 700; color: #222; }
.ci-meta { font-size: 11px; color: #888; margin-top: 2px; }
.ci-stars {
  margin-top: 4px; color: #f5b431; font-size: 13px; letter-spacing: 1px;
}
.ci-stars-off { color: #e0e0e8; }
.ci-note {
  margin-top: 5px; font-size: 12px; color: #555;
  background: #f7f7fb; padding: 6px 9px; border-radius: 6px;
  line-height: 1.5;
}
.ci-ops { flex: 0 0 auto; }
.ci-del {
  background: #f7f7fb; border: 0;
  width: 24px; height: 24px; border-radius: 12px;
  cursor: pointer; color: #999; font-size: 12px;
}
.ci-del:hover { background: #ffe0e0; color: #c94a3d; }

/* ============================== v9：锚点选择器 ============================== */
.anchor-picker {
  margin: 10px 12px 4px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(26, 95, 174, 0.05);
  overflow: hidden;
}
.ap-cur {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}
.ap-cur-label { color: #7a8796; font-size: 12px; flex: 0 0 auto; }
.ap-cur-name {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 700; color: #1A5FAE;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-toggle {
  flex: 0 0 auto;
  background: #f0f5fb;
  color: #1A5FAE;
  border: 0;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.ap-toggle:hover { background: #dfeaf7; }

.ap-panel {
  border-top: 1px dashed #e6eaf0;
  padding: 10px 12px 12px;
  background: #fafbfd;
}
.ap-cats {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.ap-cat {
  background: #fff;
  border: 1px solid #d8dfe8;
  color: #4a5868;
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.ap-cat:hover { border-color: #1A5FAE; color: #1A5FAE; }
.ap-cat.on {
  background: #1A5FAE; color: #fff; border-color: #1A5FAE;
}
.ap-cat-cnt {
  font-size: 10px;
  background: rgba(0,0,0,0.08);
  color: inherit;
  padding: 0 5px; min-width: 16px; text-align: center;
  border-radius: 8px; line-height: 14px;
}
.ap-cat.on .ap-cat-cnt { background: rgba(255,255,255,0.22); }

.ap-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 180px; overflow-y: auto;
}
.ap-item {
  background: #fff;
  border: 1px solid #e0e6ee;
  color: #3a4656;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.ap-item:hover {
  background: #eef4fb;
  border-color: #9cb8dc;
  color: #1A5FAE;
}
.ap-item.on {
  background: #1A5FAE; color: #fff; border-color: #1A5FAE;
  font-weight: 700;
}
.ap-empty {
  font-size: 12px; color: #999; padding: 8px 4px;
}

.ap-custom {
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  padding: 10px;
}
.ap-custom-row {
  display: flex; gap: 6px;
  margin-bottom: 8px;
}
.ap-custom-row:last-child { margin-bottom: 0; }
.ap-geo {
  flex: 1;
  background: #1A5FAE; color: #fff; border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.ap-geo:hover { background: #144985; }
.ap-addr-input {
  flex: 1; min-width: 0;
  border: 1px solid #d8dfe8;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.ap-addr-input:focus { border-color: #1A5FAE; }
.ap-addr-go {
  flex: 0 0 auto;
  background: #f0f5fb; color: #1A5FAE;
  border: 1px solid #c9dcf3;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.ap-addr-go:hover { background: #dfeaf7; }
.ap-custom-tip {
  font-size: 11px; color: #98a3b0;
  margin-top: 6px;
}
