/* ============================================================
   好吃铺 · 青绿主题样式表（v1.3）
   设计令牌（Design Token）为唯一色值真源：
   全站组件一律通过 var(--x) 引用，禁止在样式内写字面色值
   （按钮/填充面内的 #fff 白字为 WCAG 允许的例外）。
   ============================================================ */
:root {
  /* ---- 品牌主色（青绿） ---- */
  --primary:        #00A78E;  /* 主色：按钮底、选中态、徽标底、标题点缀 */
  --primary-dark:   #00876F;  /* hover / active / 小号按钮底（对比 4.47:1 on #fff） */
  --primary-deep:   #007A66;  /* 文字与链接专用（对比 5.28:1 on #fff） */
  --primary-light:  #0EBDA3;  /* 渐变亮端、深色底上的次级图形 */
  --primary-50:     #EAF9F7;  /* 浅青底：chip 底、选中行、提示条、图片底色 */
  --primary-100:    #D3F2ED;  /* 浅底加深一档（hover 浅底 / 地图默认填充） */
  --primary-200:    #A8E4DA;  /* 描边 / focus ring 实体色 */
  --primary-rgb:    0, 167, 142;  /* 供 rgba(var(--primary-rgb), .12) 使用 */

  /* ---- 渐变 ---- */
  --grad-primary: linear-gradient(120deg, #0EBDA3, #00A78E);  /* Banner / 徽章 / 头像环 */
  --grad-promo:   linear-gradient(120deg, #FF4F21, #FF3BC3);  /* 促销点缀：仅榜单第 1 名 */

  /* ---- 中性色 ---- */
  --bg:        #F3F4F7;  /* 页面底色 */
  --card:      #FFFFFF;  /* 卡片 / 面板 / 顶栏 */
  --text:      #1F2A2E;  /* 正文（13.7:1 on --bg） */
  --text-2:    #55636B;  /* 次要正文（7.4:1 on --card） */
  --muted:     #8A97A0;  /* 辅助信息 / 时间戳 */
  --line:      #E6E9EF;  /* 分隔线 / 边框 */
  --surface-2: #F1FAF9;  /* 次级面（引用块、批量条） */
  --img-bg:    #EAF9F7;  /* 图片未加载时的底色 */
  --overlay:   rgba(10, 38, 35, .48);  /* modal / 遮罩，青黑调 */

  /* ---- 语义色（保留红黄绿色义，非主题色） ---- */
  --success:    #1E8E4F;  --success-bg: #E8F7EE;
  --warning:    #B97A1A;  --warning-bg: #FDF3E0;
  --danger:     #C0392B;  --danger-bg:  #FBE9E7;
  /* 打卡证书 / 徽章：金章色（纪念感，非语义色） */
  --gold:       #9A6B10;  --gold-200:   #E9CE94;  --gold-50: #FFF9EC;

  /* 地图「已点亮 done」荣誉金：仅用于点亮态 / 进度条 / 图例圆点，全站主色仍为青绿 */
  --honor:       #E6A82C;
  --honor-light: #FFE08A;
  --honor-deep:  #C98A1E;
  --honor-rgb:   230,168,44;
  --grad-honor:  linear-gradient(120deg,#FFE08A,#E0A32E);

  /* ---- 阴影 / 焦点 ---- */
  --shadow:       0 4px 16px rgba(var(--primary-rgb), .08);
  --shadow-hover: 0 8px 24px rgba(var(--primary-rgb), .16);
  --ring:         0 0 0 3px rgba(var(--primary-rgb), .18);

  /* ---- 圆角 / 层级（供未来主题扩展，不属于色彩令牌） ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* 全站弹性列布局：页脚稳定落在视口底部（短页面也不悬空） */
#app { display: flex; flex-direction: column; min-height: 100vh; }
#view { flex: 1 1 auto; }
/* 移动端底部主导航：默认隐藏，仅窄屏显示（见下方 @media） */
.mobile-bottom-nav { display: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-deep); }
img { max-width: 100%; display: block; }

/* ---- 首页顶部引导横幅（清新浅色调） ---- */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  padding: 9px 16px;
  background: linear-gradient(120deg, #FFFFFF 0%, var(--primary-50) 100%);
  border: 1px solid var(--primary-100);
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), .06);
}
.hero-banner::before {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  right: -40px; top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .08), rgba(var(--primary-rgb), 0) 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-badge {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--primary-100);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), .1);
  font-size: 17px;
  line-height: 1;
}
.hero-slogan {
  flex: 1 1 auto;
  min-width: 200px;
  margin: 0;
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .2px;
}
.hero-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 720px) {
  .hero-banner { padding: 8px 12px; margin-bottom: 10px; }
  .hero-inner { flex-direction: column; align-items: stretch; text-align: center; }
  /* 移动端小图标不单独成行：隐藏，横幅仅保留「文字 + 2 个按钮」的高度 */
  .hero-badge { display: none; }
  /* 移动端标语强制单行：字号随视口收缩，避免换行导致横幅高度增加；
     30 个汉字 × 3vw ≈ 屏宽，clamp 上下限兼顾 320px 小屏与 720px 平板。 */
  .hero-slogan {
    font-size: clamp(9px, 3vw, 13px);
    min-width: 0;
    white-space: nowrap;
    letter-spacing: -.2px;
  }
  .hero-actions { justify-content: center; }
}

/* ---- 八态：全局 focus-visible ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--card); border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(16, 40, 38, .04);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  height: 60px; display: flex; align-items: center; gap: 16px;
}
.logo { font-size: 22px; font-weight: 800; color: var(--primary-deep); white-space: nowrap; }
.logo:hover { color: var(--primary); }
.logo small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-weight: 600;
}
.nav a:hover { background: var(--primary-50); color: var(--primary-deep); }
.nav a.active { background: var(--primary-50); color: var(--primary-deep); }
.search-box {
  display: flex; align-items: center; gap: 6px;
  flex: 0 1 220px; min-width: 0;
  background: var(--primary-50);
  border: 1.5px solid var(--primary);
  border-radius: 22px; padding: 4px 5px 4px 14px;
  box-shadow: 0 2px 8px rgba(0,167,142,.16);
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.search-box:focus-within { border-color: var(--primary-deep); box-shadow: var(--ring); background: #fff; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; min-width: 0; font-size: 14px; color: var(--text); }
.search-box input::placeholder { color: var(--primary); opacity: .85; }
.search-box button {
  border: none; background: var(--primary); color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.search-box button:hover { background: var(--primary-deep); }
.search-box button:active { transform: scale(.94); }
.user-box { display: flex; align-items: center; gap: 8px; white-space: nowrap; flex: 0 0 auto; }
.user-box .avatar { width: 34px; height: 34px; font-size: 15px; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; cursor: pointer; border-radius: 20px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; background: var(--primary); color: #fff;
  transition: background .15s, box-shadow .15s, transform .12s;
  min-height: 34px;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { background: var(--primary-dark); transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); }
.btn.ghost { background: var(--card); color: var(--primary-deep); border: 1px solid var(--primary-200); }
.btn.ghost:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary-deep); }
.btn.sm { padding: 5px 12px; font-size: 13px; min-height: 28px; background: var(--primary-dark); color: #fff; }
.btn.sm:hover { background: var(--primary-deep); }
.btn.ghost.sm { background: var(--card); color: var(--primary-deep); border: 1px solid var(--primary-200); }
.btn.ghost.sm:hover { background: var(--primary-50); }
.btn.danger { background: var(--card); color: var(--danger); border: 1px solid var(--danger-bg); }
.btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { background: var(--primary); }

/* ---------- 容器 ---------- */
/* width:100% 必须在基础规则里【全视口生效】：
   #app 是 flex column，#view 作为 flex item 的 margin:0 auto 会覆盖 align-items:stretch，
   使容器按「内容宽度」收缩（内容少的页面明显缩窄）。仅提高 max-width 完全无效。
   旧版把这条只放进 ≥1280px 媒体查询，视口不足 1280 时缩窄会原样复现。 */
.container { max-width: 1180px; width: 100%; margin: 0 auto; padding: 20px 28px 60px; }

/* ---------- 区块标题 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 0 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 18px; }
.section-title .more { color: var(--muted); font-size: 14px; }
.section-title .more:hover { color: var(--primary-deep); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
  border: 1px solid var(--line);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-200); }
/* 卡片：图片区固定 4:3 满铺显示（cover，与详情页一致），裁切溢出避免留白；名称与城市同一行 */
.card .thumb { aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; background: var(--img-bg); display: block; }
.card .body { padding: 10px 12px; display: flex; align-items: baseline; gap: 8px; }
.card .body h3 { flex: 1 1 auto; min-width: 0; font-size: 15px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .body .card-loc { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .card .body .sub { color: var(--muted); font-size: 12px; }

/* ---------- 省份 / 城市 / 标签 chips ---------- */
.province-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; cursor: pointer; color: var(--text-2); transition: background .12s, color .12s, border-color .12s;
  display: inline-block;
}
.chip:hover { background: var(--primary-50); color: var(--primary-deep); border-color: var(--primary-200); }
.chip.active { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.chip.active:hover { background: var(--primary-deep); color: #fff; }
.chip.solid { background: var(--primary); color: #fff; border-color: var(--primary); }
  .chip.solid:hover { background: var(--primary-dark); color: #fff; }

/* ---------- 详情 ---------- */
/* 详情页：左侧粘性信息卡（封面 + 档案 + 购买），右侧正文流式排版
   —— 解决「正文变长后，封面下方出现大片空白」的排版问题 */
.detail-head { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 28px; align-items: start; }
.detail-side {
  position: sticky; top: 76px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow);
}
.detail-cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); background: var(--img-bg); }
.detail-side .buy-box { margin: 0; }
.detail-facts { display: flex; flex-direction: column; gap: 9px; margin: 2px 2px 0; }
.detail-facts .fact { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.detail-facts .fact .k { flex: 0 0 42px; color: var(--muted); }
.detail-facts .fact .v { color: var(--text); font-weight: 600; }
.detail-main { min-width: 0; }
.detail-title { font-size: 23px; margin-bottom: 8px; }
.detail-meta { color: var(--primary-deep); font-weight: 600; margin-bottom: 12px; }
.detail-content { font-size: 15px; color: var(--text); margin: 14px 0; line-height: 1.85; }
.detail-content .detail-para { margin: 0 0 12px; }
.detail-content .detail-para:last-child { margin-bottom: 0; }
.detail-content .sec-label {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 6px;
  margin-right: 6px;
  border: 1px solid var(--primary-200);
  vertical-align: 1px;
}
  .buy-box { background: var(--primary-50); border: 1px dashed var(--primary); border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0; }
.buy-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.buy-badge { background: var(--grad-primary); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 999px; letter-spacing: .5px; }
.buy-links { display: flex; flex-wrap: wrap; gap: 10px; }
.buy-links .btn { font-weight: 600; }

/* ---------- 按城市查询：片区/省份/地级市/区县 四级联动下拉 ---------- */
.c4-filters {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin: 4px 0 16px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.c4-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c4-field > span { font-size: 12.5px; font-weight: 600; color: var(--primary-deep); letter-spacing: .2px; }
.c4-field select {
  width: 100%; min-width: 0;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text);
  padding: 10px 34px 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background-color: var(--card);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5l5-5' fill='none' stroke='%2300A78E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.c4-field select:hover:not(:disabled) { border-color: var(--primary-200); }
.c4-field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .16);
}
.c4-field select:disabled {
  background-color: var(--bg); color: var(--muted); cursor: not-allowed;
  background-image: none; border-style: dashed;
}
@media (max-width: 720px) {
  /* 移动端 2×2 排列，单格更宽、拇指区更好点 */
  .c4-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .c4-field > span { font-size: 12px; }
  .c4-field select {
    font-size: 14px; padding: 11px 30px 11px 10px;
    background-position: right 10px center;
  }
}

/* ---------- 后台：购买链接编辑 ---------- */
.link-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.link-row .lk-title { flex: 0 0 150px; }
.link-row .lk-url { flex: 1; min-width: 0; }

/* ---------- 游客留言提示 ---------- */
.comment-login-tip { padding: 12px 14px; background: var(--primary-50); border: 1px dashed var(--primary-200); border-radius: 10px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.link-btn { border: none; background: none; color: var(--primary-deep); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.link-btn:hover { color: var(--primary); }

/* ---------- 留言 ---------- */
.comments { margin-top: 20px; }
.comment-form textarea {
  width: 100%; min-height: 70px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; font: inherit; resize: vertical; outline: none; background: var(--card); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.comment-form textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.comment-item { border-top: 1px solid var(--line); padding: 12px 0; }
.comment-item .who { font-weight: 600; font-size: 14px; }
.comment-item .who .guest { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.comment-item .time { color: var(--muted); font-size: 12px; margin-left: 8px; }

/* ---------- 会员 ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.points-badge { background: var(--grad-primary); color: #fff; padding: 6px 14px; border-radius: 20px; font-weight: 700; }
/* 会员中心：资料卡片（点击「修改」弹出编辑框，不在页面常态展开表单） */
.profile-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pc-head h3 { font-size: 16px; margin: 0; }
.pc-row { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pc-row:first-of-type { border-top: none; }
.pc-k { flex: 0 0 72px; color: var(--muted); }
.pc-v { flex: 1 1 auto; min-width: 0; word-break: break-word; }

/* ---------- 后台 ---------- */
.admin-grid { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.admin-side { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: sticky; top: 76px; }
.admin-side a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; color: var(--text-2); }
.admin-side a:hover { background: var(--primary-50); color: var(--primary-deep); }
.admin-side a.active { background: var(--primary-dark); color: #fff; }
.admin-panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--bg); border-radius: var(--radius-md); padding: 14px; text-align: center; }
.stat b { display: block; font-size: 24px; color: var(--primary-deep); }
.stat span { color: var(--muted); font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
table.list th { color: var(--muted); font-weight: 600; }
table.list tr:hover td { background: var(--primary-50); }
table.list select, table.list input[type="text"] { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 8px; font: inherit; background: var(--card); color: var(--text); }
.modal-mask {
  position: fixed; inset: 0; background: var(--overlay); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-card { position: relative; background: var(--card); border-radius: 14px; padding: 22px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-hover); }
.modal-card h3 { margin-bottom: 14px; color: var(--text); }
.modal-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; border-radius: 8px; transition: background .15s, color .15s; }
.modal-close:hover { background: var(--primary-50); color: var(--text); }
.points-scroll { max-height: 62vh; overflow-y: auto; font-size: 13px; padding-right: 4px; }
.points-scroll .section-title h2 { font-size: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px;
  font: inherit; outline: none; background: var(--card); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: var(--ring); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
/* 草稿自动保存提示：占满左侧剩余空间，按钮保持右对齐 */
.modal-actions .draft-tip { margin-right: auto; align-self: center; font-size: 12px; color: var(--muted); line-height: 1.4; }
/* 编辑器打开时检测到未完成草稿的提示条 */
.draft-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: #FFF8E6; border: 1px solid #F2DCA9; color: #7A5C10;
  padding: 8px 10px; border-radius: 10px; margin: 0 0 12px; font-size: 13px;
}
.draft-banner .btn { padding: 3px 10px; font-size: 12px; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- toast ---------- */
#toast-box { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px; opacity: 0; transform: translateY(-8px); transition: .25s; box-shadow: var(--shadow-hover); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }

/* ---------- 中屏 / 笔记本：顶栏项较多，按宽度逐级收起，避免「后台 / 退出」被挤出视口 ---------- */
@media (max-width: 1180px) {
  .user-name { display: none; }                  /* 收起昵称文本，仅留头像 */
}
@media (max-width: 1024px) {
  .search-box { flex-basis: 160px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 860px) {
  .search-box { flex-basis: 120px; }
  .nav a { padding: 6px 7px; font-size: 13px; }
}
/* 分页条：居中且可换行，避免窄屏「返回按城市查询」被挤出视口右侧 */
.c4-block { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0; }
.c4-block .muted { margin: 0 !important; }
.c4-block .btn { margin: 0 !important; }

/* ---------- 响应式（基础） ---------- */
@media (max-width: 720px) {
  /* 顶栏两行：① LOGO + 搜索 + 用户 ② 四项导航等分铺满 */
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo-mark { height: 28px; width: auto; flex: 0 0 auto; }
  .search-box { order: 1; flex: 1 1 96px; min-width: 0; padding: 3px 4px 3px 10px; }
  .search-box input { width: 100%; min-width: 0; font-size: 13px; }
  .user-box { display: none; }
  /* 导航：不再横向滑动，4 项固定等分全部直接显示 */
  .nav {
    order: 3; flex: 0 0 100%; width: 100%;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    overflow: visible;
  }
  .nav a {
    padding: 8px 2px; font-size: clamp(11.5px, 3.4vw, 13px); font-weight: 600;
    text-align: center; white-space: nowrap;
    background: var(--bg); border-radius: 9px;
  }
  .nav a.active { background: var(--primary); color: #fff; }
  .section-title { margin: 20px 0 10px; }
  .section-title h2 { font-size: 16px; }
  .section-title .more { font-size: 13px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card .body h3 { font-size: 15px; }
  .detail-head { grid-template-columns: 1fr; }
  .detail-side { position: static; top: auto; }
  .detail-meta { font-size: 13px; }
  .detail-title { font-size: 20px; }
  .like-bar { margin: 8px 0 12px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .admin-side a { white-space: nowrap; }
  .container { padding: 14px 12px 50px; }
  /* 移动端底部主导航：固定底部，顶栏主导航隐藏避免重复 */
  .nav { display: none; }
  #app { padding-bottom: 58px; }
  .mobile-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: 56px; background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(16, 40, 38, .06);
  }
  .mobile-bottom-nav a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--text-2); font-size: 10.5px; font-weight: 600;
    white-space: nowrap; letter-spacing: -.2px;
  }
  /* 文案加长到 4 字（查美食 / 点亮地图）：收小字号并强制单行，图标 .ic 尺寸保持不变 */
  .mobile-bottom-nav a > span:not(.ic) { font-size: 10.5px; letter-spacing: -.2px; }
  .mobile-bottom-nav a .ic { font-size: 20px; line-height: 1; }
  .mobile-bottom-nav a.active { color: var(--primary-deep); }
}

/* ========== 按地区：地图 + 列表 双视图（v1.2 保留，仅换肤） ========== */
.seg { display: inline-flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 4px; margin-bottom: 16px; }
.seg-btn { border: none; background: transparent; padding: 7px 16px; border-radius: 18px; cursor: pointer; font: inherit; color: var(--text-2); transition: background .12s, color .12s; }
.seg-btn:hover { background: var(--primary-50); color: var(--primary-deep); }
.seg-btn.active { background: var(--primary-dark); color: #fff; }
.seg-btn.active:hover { background: var(--primary-deep); color: #fff; }

.region-map .map-canvas {
  position: relative; height: 400px;
  background: radial-gradient(circle at 60% 40%, #FBFFFE, var(--primary-50));
  border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden;
}
.region-tile {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 14px; background: var(--card); border: 2px solid var(--primary);
  border-radius: 14px; cursor: pointer; box-shadow: var(--shadow); min-width: 86px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.region-tile:hover { transform: translate(-50%, -50%) scale(1.04); box-shadow: var(--shadow-hover); }
.region-tile .rt-name { font-size: 15px; font-weight: 700; color: var(--primary-deep); }
.region-tile .rt-meta { font-size: 11px; color: var(--muted); }
.region-tile.active { background: var(--primary); border-color: var(--primary-deep); }
.region-tile.active .rt-name, .region-tile.active .rt-meta { color: #fff; }
/* v1.8.1：此处原有 .map-hint{position:absolute;right:12px;bottom:8px} 为旧版遗留死代码
   （全项目已无任何使用点）。地图页说明文字改用 .map-subhint 以彻底避开该绝对定位，
   故删除该规则，避免说明文字被定位到页面右下角。 */

.drill { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 14px; }
.drill-label { width: 100%; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }

.breadcrumb { font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
.breadcrumb .sep { margin: 0 6px; color: var(--line); }
.breadcrumb b { color: var(--text); }
.muted { color: var(--muted); }

.region-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.list-region { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.lr-title { font-size: 15px; margin-bottom: 8px; }
.lr-title .muted { font-size: 12px; margin-left: 6px; }
.lr-provs { display: flex; flex-wrap: wrap; gap: 8px; }
.lr-prov { padding: 6px 12px; border-radius: var(--radius-lg); background: var(--primary-50); border: 1px solid var(--line); font-size: 14px; cursor: pointer; color: var(--text-2); transition: background .12s, color .12s; }
.lr-prov:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 720px) {
  .region-map .map-canvas { height: 300px; }
  .region-tile { min-width: 70px; padding: 8px 10px; }
  .region-tile .rt-name { font-size: 13px; }
  .region-tile .rt-meta { font-size: 10px; }
}

/* ========== 首页轮播（每日随机 Banner） ========== */
.carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px; border: 1px solid var(--line); }
.car-track { display: flex; transition: transform .45s ease; }
/* 一屏同步展示 4 款（移动端 2 款）；cover 保证图片不拉伸变形 */
.car-slide { position: relative; flex: 0 0 25%; height: 220px; background-size: cover; background-position: center; background-color: var(--img-bg); display: block; border-right: 2px solid var(--card); }
.car-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 34, 31, .55), transparent 55%); }
.car-cap { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; font-size: 16px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
/* 人气榜：序号徽标 + 浏览量（轮播展示浏览量最高的 12 款） */
.car-rank {
  position: absolute; left: 12px; top: 12px; z-index: 2; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: 13px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  line-height: 26px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.car-views {
  position: absolute; right: 12px; top: 12px; z-index: 2; padding: 3px 9px; border-radius: 11px;
  background: rgba(0, 0, 0, .42); color: #fff; font-size: 12px; line-height: 1.4; backdrop-filter: blur(2px);
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; border: none;
  background: rgba(255, 255, 255, .88); color: var(--primary-deep); width: 34px; height: 34px;
  border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.car-btn:hover { background: var(--card); color: var(--primary-dark); }
.car-btn.prev { left: 10px; } .car-btn.next { right: 10px; }
.car-dots { position: absolute; right: 14px; bottom: 12px; z-index: 2; display: flex; gap: 6px; }
.car-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; }
.car-dots span.active { background: #fff; transform: scale(1.25); }

/* ========== 详情页 FAQ（GEO：结构化问答，供搜索引擎与生成式引擎摘录） ========== */
.faq-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer; padding: 13px 16px; font-size: 15px; font-weight: 600; color: var(--text);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '❓'; font-size: 14px; }
.faq-item[open] summary { color: var(--primary-deep); background: var(--primary-50); }
.faq-item > p { margin: 0; padding: 0 16px 14px 40px; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* ========== 热门城市榜 / 热门排行 ========== */
/* 热门城市榜：桌面 4 列 × 3 排（12 个），移动 3 列 × 4 排
   卡片内部：左侧名次徽标（跨两行）+ 右侧「城市名 / 省份·款数·浏览」上下两行；
   城市名强制横排并省略，避免中文逐字换行变成竖排 */
.hot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hot-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center;
  column-gap: 10px; row-gap: 1px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 10px 12px; text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hot-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--primary-200); }
.hot-rank { grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: var(--radius-sm); display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--primary-50); color: var(--primary-deep); }
.hot-rank.r1 { background: var(--grad-promo); color: #fff; }
.hot-rank.r2 { background: var(--primary-light); color: #fff; }
.hot-rank.r3 { background: var(--primary); color: #fff; }
.hot-name { grid-column: 2; grid-row: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-meta { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ========== 留言回复 / 置顶 ========== */
.comment-item { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px; }
.comment-item.pinned { border-color: var(--primary); background: var(--primary-50); }
.comment-reply { margin: 8px 0 0 18px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border-left: 3px solid var(--primary); }
.pin-badge { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-right: 6px; }
.reply-btn { border: none; background: none; color: var(--primary-deep); font-size: 12px; cursor: pointer; padding: 4px 0 0; }
.reply-btn:hover { text-decoration: underline; color: var(--primary-dark); }
.reply-hint { display: flex; align-items: center; gap: 10px; background: var(--primary-50); border: 1px dashed var(--primary); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; color: var(--primary-deep); }

/* ========== 徽标 / 快捷入口 / 筛选行 / 批量条 ========== */
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; }
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.wait { background: var(--warning-bg); color: var(--warning); }
.badge.no { background: var(--danger-bg); color: var(--danger); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.quick {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px; text-decoration: none; color: var(--text); font-weight: 600;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--primary); color: var(--primary-deep); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.filter-row select, .filter-row input { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: var(--card); color: var(--text); }
.filter-row select:focus, .filter-row input:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
.batch-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.list td .badge { white-space: nowrap; }

@media (max-width: 720px) {
  .car-slide { flex: 0 0 50%; height: 150px; }
  .hot-grid { grid-template-columns: repeat(3, 1fr); }
  .hot-item { padding: 8px 10px; column-gap: 8px; }
  .hot-name { font-size: 13px; }
  .hot-meta { display: none; }
  .quick-links { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   真实三级联动地图（v1.3 新增，T03）
   ============================================================ */
/* v1.8：地图页工具栏改为「标题 + 说明 + 打卡进度」块布局，风格对齐「按城市查询」 */
.map-toolbar { display: block; margin-bottom: 12px; }
.map-toolbar .map-title { margin: 8px 0 2px; }
.map-toolbar .map-subhint { margin: 0 0 4px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.map-toolbar .ck-stats { margin-top: 10px; }
.map-toolbar .map-legend { font-size: 12px; color: var(--muted); margin-left: auto; }

/* stretch：让右侧热门美食图框下沿与左侧中国地图图框下沿齐平 */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.map-main { min-width: 0; }
/* 桌面端：地图放大 + 左图右单等高（移动端在下方媒体查询中恢复为上下堆叠） */
@media (min-width: 721px) {
  /* 地图放大、列表收窄；两侧模块等高且底部平齐 */
  .map-wrap { grid-template-columns: minmax(0, 2.4fr) minmax(240px, 1fr); }
  .map-main { display: flex; flex-direction: column; }
  /* 去掉固定 min-height，让地图卡片高度=地图实际绘制高度，与右侧列表卡片底部平齐（无框内上下留白） */
  .map-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-start; }
  .map-stage > svg { width: 100%; height: 100%; flex: 1 1 auto; display: block; }
  /* 让 .hot-panel 作为 grid 子项可被内部 .hot-list 滚动（默认 min-height:auto 会撑高） */
  .hot-panel { min-height: 0; }
}
/* 地图页容器与首页/顶部导航同宽（max-width:1180px），内容左右分别与 LOGO、登录/退出对齐 */
@media (min-width: 721px) {
  /* 中国地图按真实比例铺满所在列宽，卡片高度=绘制高度，消除框内上下留白、与列表卡片底部平齐 */
  .map-stage .cnmap { width: 100%; height: auto; }
  .map-stage .cnmap svg { width: 100%; height: auto; }
}
/* 地图页：缩小地图内容模块与底部网站信息页之间的留白 */
.container.map-page { padding-bottom: 8px; }
#view.map-page ~ .site-footer { margin-top: 10px; }

.map-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.map-crumb .mc-sep { color: var(--line); margin: 0 2px; }
.map-crumb a { color: var(--primary-deep); }
.map-crumb a:hover { text-decoration: underline; }
.map-crumb b { color: var(--text); }
.map-back {
  margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--primary-deep);
  border-radius: var(--radius-lg); padding: 5px 12px; font-size: 13px; cursor: pointer; min-height: 30px;
  transition: background .12s, border-color .12s;
}
.map-back:hover { background: var(--primary-50); border-color: var(--primary-200); }
.map-back:disabled { opacity: .55; cursor: not-allowed; }

.cnmap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 8px; box-shadow: var(--shadow); overflow-x: auto;
}
.cnmap svg { width: 100%; height: auto; display: block; min-height: 220px; }
.mp {
  fill: var(--primary-100); stroke: var(--card); stroke-width: .8;
  cursor: pointer; pointer-events: fill; transition: fill .15s, stroke .15s;
}
.mp:hover { fill: var(--primary-200); }
.mp:focus-visible { outline: none; stroke: var(--primary-deep); stroke-width: 1.5; }
.mp.active { fill: var(--primary); stroke: var(--primary-deep); stroke-width: 1.5; }
.mp-jd { fill: none; stroke: var(--primary-200); stroke-width: 1.2; stroke-dasharray: 4 3; pointer-events: none; }
.mp-hit { fill: transparent; stroke: none; pointer-events: all; cursor: pointer; }
.mp-label {
  fill: var(--text-2); font-weight: 600; text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; paint-order: stroke; stroke: var(--card); stroke-width: 2.4px;
  stroke-linejoin: round;
}
.map-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 260px; color: var(--muted); font-size: 14px; }

/* 海南省图：主岛大图 + 三沙市右下角内嵌小图（南海诸岛），内嵌于地图框内 */
.prov-inset { pointer-events: none; }
.prov-inset-bg { fill: var(--card); stroke: var(--primary-200); stroke-width: 1; }
.prov-inset-title { fill: var(--primary-deep); font-weight: 700; }
.prov-inset-svg { overflow: hidden; }
.prov-inset-svg .mp { stroke: var(--primary-400, #5b86b5); stroke-width: 1; pointer-events: all; cursor: pointer; }

/* 登录/注册分区切换，避免登录与注册混淆 */
.auth-seg { margin-bottom: 14px; }
.auth-switch { text-align: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--primary-deep); cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }

/* 详情页收藏按钮 */
.like-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--primary-200); border-radius: 999px;
  background: var(--card); color: var(--primary-deep); cursor: pointer; font-size: 14px;
  transition: background .12s, border-color .12s, color .12s;
}
.fav-btn:hover { background: var(--primary-50); }
.fav-btn.faved { background: var(--primary); border-color: var(--primary); color: #fff; }
.fav-btn .fav-ico { font-size: 15px; line-height: 1; }
.map-loading .sk { width: 108px; height: 108px; border-radius: 50%; background: var(--primary-50); animation: mp-pulse 1.2s ease-in-out infinite; }
@keyframes mp-pulse { 0%, 100% { opacity: .5; transform: scale(.92); } 50% { opacity: 1; transform: scale(1); } }

.map-fallback { background: var(--surface-2); border: 1px dashed var(--primary-200); border-radius: 14px; padding: 18px; }
.map-fallback h3 { font-size: 16px; color: var(--primary-deep); margin-bottom: 6px; }
.map-fallback p { color: var(--text-2); font-size: 14px; }
.map-fallback .map-fallback-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.hot-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.hot-panel h3 { font-size: 15px; margin-bottom: 2px; }
.hot-panel > .muted { display: block; font-size: 11px; margin-bottom: 6px; }
.hot-panel-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line);
  color: var(--text);
}
.hot-panel-item:first-of-type { border-top: none; }
.hot-panel-item:hover .hp-title { color: var(--primary-deep); }
.hot-panel-item img { width: 48px; height: 36px; object-fit: cover; border-radius: var(--radius-sm); background: var(--img-bg); flex: 0 0 auto; }
.hp-body { min-width: 0; }
.hp-title { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-meta { font-size: 11px; color: var(--muted); }
.hot-panel .empty-state { padding: 22px 0; font-size: 13px; }
/* 列表区撑满面板剩余高度，使右侧图框下沿与左侧地图齐平；"更多" 固定在底部 */
.hot-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.hot-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); text-align: right; font-size: 13px; font-weight: 600; color: var(--primary); }
.hot-more:hover { color: var(--primary-deep); }

@media (max-width: 900px) {
  .map-wrap { grid-template-columns: 1fr; }
  .hot-panel { order: 2; }
}
@media (max-width: 720px) {
  .map-wrap { grid-template-columns: 1fr; gap: 12px; }
  .cnmap { padding: 6px; }
  .cnmap svg { min-height: 200px; }
  .map-crumb { font-size: 13px; }
  .map-back { min-height: 32px; }
  .hot-panel { padding: 12px; }
  .hot-panel-item img { width: 50px; height: 38px; }
}

/* 「查看更多」入口卡片（超 100 款时出现） */
.more-card {
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--primary-200);
  background: var(--primary-50);
  min-height: 120px;
}
.more-card:hover { background: var(--primary-100); }
.more-card h3 { color: var(--primary-deep); }

/* ============ 底部版权 + 友情链接 ============ */
.site-footer {
  margin-top: 40px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 28px 26px;
  color: var(--text-2);
  font-size: 13px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { font-weight: 700; color: var(--primary-deep); font-size: 15px; }
.footer-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.friend-links { margin: 12px 0; color: var(--muted); }
.friend-links a {
  display: inline-block;
  margin: 0 10px 0 0;
  color: var(--primary-deep);
  text-decoration: none;
}
.friend-links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
}
.footer-copy { color: var(--muted); font-size: 12.5px; }
.footer-ip { font-size: 12px; color: var(--muted); }

/* ---- 详情页层级返回导航：片区 › 省 › 地级市 › 区县 › 当前 ---- */
.crumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0 0 14px;
  padding: 9px 14px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  font-size: 13.5px;
}
.crumb-nav a {
  color: var(--primary-deep);
  font-weight: 600;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s ease;
}
.crumb-nav a:hover { background: var(--primary-100); text-decoration: underline; }
.crumb-nav .cn-sep { color: var(--primary-200); margin: 0 2px; }
.crumb-nav .cn-cur { color: var(--text-2); font-weight: 600; padding: 2px 6px; }

/* 详情正文按分节（口味/做法/亮点/渊源）展示，保留换行 */
.detail-content { line-height: 1.8; }

/* 详情页点赞（会员/游客均可，防重复点赞） */
.like-bar { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--primary-200);
  background: var(--card); color: var(--primary-deep); border-radius: 999px;
  padding: 6px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.like-btn:hover { background: var(--primary-50); }
.like-btn:active { transform: scale(.96); }
.like-btn.liked { background: var(--primary); border-color: var(--primary); color: #fff; }
.like-btn .like-ico { font-size: 16px; line-height: 1; }
.like-count { font-size: 13px; color: var(--muted); }
.like-count b { color: var(--primary-deep); }

/* ---- 站点 LOGO ---- */
/* 比例基准（参照参考图）：图标尺寸≈两行文字总高（略高 5–10%），
   图标宽:文字区宽≈1:2.1；主标:副标字号≈2.3:1；两行等宽。 */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
/* 新 LOGO 为横向整图 banner（包子图标 + 好吃铺 + 域名），文字内置于图片 */
.logo-pic { display: inline-flex; align-items: center; }
.logo-mark { height: 36px; width: auto; flex: 0 0 auto; display: block; }
/* 移动端改用方形图标（brand-icon-20261119.png），避免横向锁版在小屏被压得看不清 */
@media (max-width: 640px) {
  .logo-mark { height: 32px; }
}
/* 超窄屏（≤360）：收起 slogan、放宽搜索框收缩余量，避免「登录/注册」被挤到单独一行 */
@media (max-width: 360px) {
  .logo { gap: 6px; }
  .logo-mark { height: 24px; }
  .search-box { flex-basis: 56px; }
  .user-box .btn { padding-left: 9px; padding-right: 9px; }
  /* 320 级别仍保持两列，避免卡片被拉成一列超长 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ============================================================
   会员打卡：地图点亮态 / 进度 / 徽章 / 证书
   ============================================================ */

/* ---- 地图点亮（未点亮仍为青绿主色；done 已点亮切换为荣誉金） ----
   SVG <path> 的 fill 不接受 linear-gradient()，故 .mp.done 用纯色 var(--honor)
   叠加 drop-shadow 外发光；真渐变 --grad-honor 只用于 div（.ck-dot / 进度条）。 */
.mp { fill: var(--primary-50); }
.mp.done {
  fill: var(--honor);
  stroke: #FFF3D0;
  stroke-width: .6;
  filter: drop-shadow(0 0 4px rgba(var(--honor-rgb), .6)) drop-shadow(0 0 9px rgba(255, 214, 110, .32));
}
.mp.done:hover  { fill: #F2BB4A; }
.mp.done.active { fill: var(--honor-deep); }
.mp-hit.done    { fill: rgba(var(--honor-rgb), .25); }

/* ---- 地图工具栏：打卡进度（轨道底色仍为 --primary-50，填充改荣誉金渐变） ---- */
.ck-stats { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ck-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ck-stat b { color: var(--honor-deep); font-size: 14px; }
.ck-bar { width: 54px; height: 5px; border-radius: 3px; background: var(--primary-50); overflow: hidden; display: inline-block; }
.ck-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--grad-honor); }
.ck-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad-honor); box-shadow: 0 0 6px rgba(224, 163, 46, .6); display: inline-block; margin-right: 4px; }

/* ---- 详情页购买区 ---- */
.buy-tip { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.ck-flag { margin-left: auto; font-size: 12px; color: var(--primary-deep); background: var(--primary-50); border: 1px solid var(--primary-200); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* ---- 会员页：打卡卡片（地图 + 进度） ---- */
.ck-card {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(230px, 1fr); gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: var(--shadow);
}
.ck-mapbox { min-width: 0; }
.ck-mini { background: transparent; border: 0; box-shadow: none; padding: 0; }
.ck-mini svg { max-height: 330px; }
.ck-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ck-side-head { font-size: 13.5px; color: var(--text-2); }
.ck-side-head b { color: var(--primary-deep); font-size: 19px; }
.ck-pbar { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ck-pbar-t { height: 7px; background: var(--primary-50); border-radius: 4px; overflow: hidden; }
.ck-pbar-t > i { display: block; height: 100%; border-radius: 4px; background: var(--grad-honor); transition: width .4s ease; }
.ck-pbar b { color: var(--primary-deep); font-size: 13px; }
.ck-pbar b em { color: var(--muted); font-style: normal; font-weight: 400; }
.ck-side-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--primary-50); color: var(--primary-deep); border: 1px solid var(--primary-100); }
.ck-pill.gold { background: var(--gold-50); color: var(--gold); border-color: var(--gold-200); }

/* ---- 打卡全景 ---- */
.ck-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ck-stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.ck-stat-card b { display: block; font-size: 22px; color: var(--honor-deep); line-height: 1.25; }
.ck-stat-card b em { font-size: 12px; color: var(--muted); font-style: normal; font-weight: 400; }
.ck-stat-card span { font-size: 12px; color: var(--muted); }
.ck-hint { margin: 10px 0 4px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--primary-200); border-radius: var(--radius-md); padding: 9px 12px; }
.ck-hint b { color: var(--primary-deep); }
.ck-cta { margin: 18px 0 6px; }

/* ---- 徽章墙 ---- */
.badge-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  padding: 16px 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--card); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.badge-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.badge-item.on { border-color: var(--primary-200); background: linear-gradient(180deg, var(--primary-50), var(--card)); }
.badge-item.off { opacity: .78; filter: grayscale(.7); }  /* v1.9：未获得也要读得清 */
.bi-ico { font-size: 30px; line-height: 1.1; }
.bi-name { font-weight: 700; font-size: 14px; }
.badge-item.on .bi-name { color: var(--primary-deep); }
.bi-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.bi-state { font-size: 11.5px; color: var(--primary-deep); margin-top: 3px; }
.badge-item.off .bi-state { color: var(--muted); }

/* ---- v1.9 徽章墙 3D（class 均带 badge-3d-* 业务前缀，避免撞车）----
   动效只改 transform/opacity；阴影只做 hover 静态切换，不进 transition/keyframes。 */
.badge-item .bi-ico { display: inline-block; transition: transform .35s ease; }
.badge-item.badge-3d-lift {
  position: relative; overflow: hidden;
  transition: transform .22s ease, opacity .22s ease;  /* 覆盖基础规则里的 box-shadow 过渡 */
}
.badge-item.on.badge-3d-lift {
  border-color: var(--gold-200);
  background: linear-gradient(160deg, var(--gold-50), var(--primary-50) 45%, var(--card));
}
.badge-item.on.badge-3d-lift:hover {
  transform: perspective(600px) rotateX(6deg) rotateY(-6deg) translateY(-4px);
  box-shadow: var(--shadow-hover);  /* 静态高亮：不参与过渡动画 */
}
.badge-item.on.badge-3d-lift:hover .bi-ico { transform: rotateY(18deg) translateZ(4px); }
.badge-item.on .bi-ico { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .18)); }
/* 未获得：无悬浮/翻面高亮，文字用足对比度色 */
.badge-item.off.badge-3d-lift:hover { transform: none; }
.badge-item.off .bi-name { color: var(--text); }
.badge-item.off .bi-desc  { color: var(--text-2); }
.badge-item.off .bi-state { color: var(--text-2); }

/* 光泽层：固定渐变背景，仅 translateX / opacity 参与循环，GPU 友好 */
.badge-3d-shine {
  position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  opacity: 0; transform: translateX(-60%);
}
.badge-item.on .badge-3d-shine { opacity: .9; animation: badge-3d-shine 2.8s ease-in-out infinite; }
@keyframes badge-3d-shine {
  0%, 100% { transform: translateX(-60%); opacity: 0; }
  50%      { transform: translateX(60%);  opacity: .9; }
}

/* 降低动效：所有 3D 动效停用，仍靠静态渐变/灰度区分已获与未获 */
@media (prefers-reduced-motion: reduce) {
  .badge-item.badge-3d-lift,
  .badge-item.badge-3d-lift .bi-ico,
  .badge-item .badge-3d-shine {
    animation: none !important; transition: none !important; transform: none !important;
  }
  .badge-3d-shine { display: none !important; }
}

/* 移动端（≤600px）：关闭持续光泽循环，hover 降级为轻微 scale，禁止横向滚动 */
@media (max-width: 600px) {
  .badge-3d-shine { display: none !important; }
  .badge-item.on.badge-3d-lift:hover { transform: scale(1.02); }
  .badge-item.on.badge-3d-lift:hover .bi-ico { transform: none; }
  .badge-wall { overflow-x: hidden; }
}

/* ---- 证书（会员页卡片 + 弹窗） ---- */
.ck-cert { background: var(--card); border: 1px solid var(--gold-200); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; box-shadow: var(--shadow); }
.ck-cert-body { font-size: 15px; }
.ck-cert-body b { color: var(--gold); }
.ck-cert-sub { font-size: 12.5px; color: var(--muted); }
.ck-cert.locked { border-style: dashed; border-color: var(--primary-200); color: var(--text-2); font-size: 13.5px; gap: 4px; }

.cert-wrap { text-align: center; }
.cert {
  border: 3px double var(--gold-200); border-radius: 14px; padding: 22px 18px 16px;
  background: radial-gradient(120% 100% at 50% 0%, var(--gold-50), var(--card));
}
.cert-orn { font-size: 28px; line-height: 1; }
.cert-kicker { font-size: 10.5px; letter-spacing: 3px; color: var(--gold); margin-top: 4px; }
.cert-title { font-size: 19px; font-weight: 800; margin: 6px 0 14px; }
.cert-name { display: inline-block; font-size: 26px; font-weight: 800; color: var(--primary-deep); border-bottom: 2px solid var(--primary-200); padding: 0 18px 6px; }
.cert-text { font-size: 13.5px; color: var(--text-2); margin: 12px 0; line-height: 1.8; }
.cert-rank { font-size: 14px; }
.cert-rank b { font-size: 22px; color: var(--gold); }
.cert-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }

@media (max-width: 720px) {
  .ck-card { grid-template-columns: 1fr; gap: 12px; }  .ck-mini svg { max-height: 250px; }
  .ck-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-stats { gap: 10px; }
  .ck-bar { width: 40px; }
  .map-toolbar .map-legend { margin-left: 0; width: 100%; }
  .ck-stat { font-size: 12px; }
  .cert-name { font-size: 22px; }
  .cert-title { font-size: 17px; }
}

/* 移动端分段控件（会员中心/后台 tab）：改成 3 列网格，避免中文被挤成竖排 */
@media (max-width: 720px) {
  .seg {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px; width: 100%; border-radius: 14px; padding: 5px;
  }
  .seg .seg-btn {
    white-space: nowrap; font-size: 12.5px; padding: 9px 4px;
    text-align: center; border-radius: 10px; min-width: 0;
  }
}

/* 详情页购买区头部：标题可换行、打卡标记不被挤压 */
.buy-head { flex-wrap: wrap; }
.buy-head > .muted { flex: 1 1 auto; min-width: 0; font-size: 12.5px; }
.buy-head .buy-badge { flex: 0 0 auto; }
.buy-head .ck-flag { margin-left: 0; }

/* ============================================================
   v1.7：本地图片上传 / 头像裁剪 / 反馈表单 / 知识产权提示
   ============================================================ */

/* ---- 头像（有图用图，无图用昵称首字，图片失效回退首字） ---- */
.avatar { overflow: hidden; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.lg { font-size: 30px; }
.avatar.sm { font-size: 13px; }

/* ---- 表单：字数计数 / 红色错误提示 / 辅助说明 ---- */
.char-count { float: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--danger); font-weight: 700; }
.field-hint { margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.field-err { margin-top: 4px; font-size: 12px; color: var(--danger); font-weight: 600; }
.field-err:empty { display: none; }
.modal-sub { margin: -6px 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.btn.ghost.sm.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- 会员头像编辑 ---- */
.avatar-edit { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--primary-50); border: 1px dashed var(--primary-200); border-radius: 12px; }
.ae-avatar { flex: 0 0 auto; }
.ae-side { flex: 1 1 auto; min-width: 0; }
.ae-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- 后台上传（封面 / 相册） ---- */
.uploader { display: flex; gap: 14px; align-items: flex-start; padding: 12px; background: var(--surface-2); border: 1px dashed var(--primary-200); border-radius: 12px; }
.up-preview { flex: 0 0 128px; width: 128px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--img-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.up-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.up-side input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: var(--card); color: var(--text); }
.up-side input:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
.up-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* ---- 后台相册缩略图（限定在 .thumb-strip 内，避免与卡片图片的 .card .thumb 撞车） ---- */
.thumb-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.thumb-strip .thumb { position: relative; width: 76px; height: 76px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--img-bg); }
.thumb-strip .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-strip .thumb-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(10, 38, 35, .62); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.thumb-strip .thumb-del:hover { background: var(--danger); }
.thumb-loading { font-size: 12px; color: var(--muted); }

/* ---- 留言框补充 ---- */
.comment-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.comment-top { display: flex; align-items: center; gap: 8px; }
.comment-reply .avatar { margin-right: 6px; vertical-align: middle; }

/* ---- 详情页分享按钮（邻近购买链接） ---- */
.share-box { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.share-label { font-size: 12.5px; color: var(--muted); }
.share-btn { border: 1px solid var(--line); background: var(--card); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .15s; }
.share-btn:hover { border-color: var(--primary-200); background: var(--primary-50); color: var(--primary-deep); }

/* ---- 页脚：问题与建议入口 ---- */
.footer-fb { border: 1px solid var(--primary-200); background: var(--primary-50); color: var(--primary-deep); border-radius: 999px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.footer-fb:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- 反馈弹层 ---- */
.fb-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-kind { border: 1px solid var(--line); background: var(--card); color: var(--text-2); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.fb-kind:hover { border-color: var(--primary-200); background: var(--primary-50); }
.fb-kind.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- 后台反馈与投诉列表 ---- */
.fb-content { max-width: 340px; font-size: 12.5px; line-height: 1.6; }
.fb-reply { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; margin-bottom: 6px; }
.fb-ops { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- 移动端（≤720px） ---- */
@media (max-width: 720px) {
  .uploader { flex-direction: column; }
  .up-preview { flex: 0 0 auto; width: 100%; height: 168px; }
  .avatar-edit { gap: 12px; padding: 10px; }
  .avatar.lg { font-size: 24px; }
  .footer-nav { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .fb-content { max-width: none; }
  .comment-bar { align-items: flex-start; }
}

/* ---- 卡片文字行：窄屏给标题让出更多空间（字号保持不变） ---- */
@media (max-width: 720px) {
  .card .body { padding: 9px 10px; gap: 6px; }
  .card .body .card-loc { font-size: 11px; }
}

/* ---- 后台文章分页条 ---- */
.admin-pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.admin-pager input { width: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; text-align: center; }
.admin-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---- 详情页管理员编辑入口 ---- */
.detail-admin-bar { display: flex; justify-content: flex-end; margin-bottom: 6px; }

/* ============================================================
   电脑宽屏统一铺开（≥1280px）：消除页面左右「大幅留白」
   - 根因 A：全站所有页面共用同一个 .container{max-width:1180px}，窗口越宽两侧留白越大。
   - 根因 B（各页宽窄不一的真正原因）：#app 是 flex column，#view（即 .container）是
     flex item；其 margin:0 auto 的水平 auto margin 会覆盖 flex 默认的 align-items:stretch，
     使容器按「内容宽度」收缩而非撑满。首页卡片多 → 撑到上限；地图页 SVG 固定宽 → 约 864px；
     按城市查询筛选后结果变少 → 约 1254px；空态详情页甚至只有 112px。
     因此只提高 max-width 无效，必须显式给 width:100%。
   - 回归修复（本轮）：width:100% 已上移到基础 .container 规则，改为【全视口生效】。
     旧版只把它放在本 ≥1280px 媒体查询里，导致 1100~1279px 窗口、或系统缩放后
     CSS 像素低于 1280 时媒体查询不命中，flex 内容收缩立刻复现（即「又缩窄了」）。
   - 容器 / 顶栏 / 页脚三者使用同一个宽度上限，保证 LOGO 左缘＝内容左缘、
     「登录/退出」右缘＝内容右缘（沿用 Round H 的对齐要求）。
   - v1.8 调整（需求 4）：宽屏上限由 min(2200px,96vw) 收窄为 min(1600px,92vw)，
     并把 .container/.topbar-inner/.footer-inner 左右 padding 由 16px 增到 28px，
     让两侧留白更宽松、不再顶满视口；三者仍共用同一上限，对齐关系不变。
   - 移动端 ≤720px 下 width:100% 等价于原本撑满视口的状态（box-sizing:border-box），
     不改变任何元素几何；须用浏览器 A/B 逐元素复核确认。
   ============================================================ */
@media (min-width: 1280px) {
  .container,
  .topbar-inner,
  .footer-inner { max-width: min(1600px, 92vw); }
  /* .container 的 width:100% 在基础规则中全视口生效，此处只负责抬高宽度上限 */
}

/* ============ 后台「访客统计」：零依赖纯 CSS 柱状图 ============ */
.visit-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.visit-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.visit-legend i.pv { background: var(--primary); }
.visit-legend i.uv { background: var(--primary-200); }
.visit-chart {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 240px;
  padding: 12px 4px 6px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.visit-col {
  flex: 1 0 22px;
  min-width: 22px;
  max-width: 64px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.visit-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: calc(100% - 34px);
  border-bottom: 1px solid var(--line);
}
.visit-bar { width: 40%; max-width: 14px; min-height: 0; border-radius: 3px 3px 0 0; }
.visit-bar.pv { background: var(--primary); }
.visit-bar.uv { background: var(--primary-200); }
.visit-label {
  height: 34px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  word-break: break-all;
}
.visit-chart-empty {
  padding: 40px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}
@media (max-width: 720px) {
  .visit-chart { height: 200px; gap: 4px; }
  .visit-col { flex: 0 0 26px; min-width: 26px; }
  .visit-label { font-size: 10px; }
}

/* ============ 会员中心常驻账号条：窄屏顶栏 .user-box 隐藏后仍可退出登录 ============ */
.member-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.member-account-bar .mab-user { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.member-account-bar .avatar { width: 34px; height: 34px; font-size: 14px; flex: 0 0 auto; }
.member-account-bar .mab-name {
  font-size: 14px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-account-bar .btn { margin-left: auto; flex: 0 0 auto; }
@media (max-width: 720px) {
  .member-account-bar { padding: 8px 10px; }
}

/* ============ 忘记密码 / 临时密码 / 后台会员搜索 ============ */
.auth-forgot { margin: 10px 0 0; text-align: right; font-size: 13px; }
.auth-forgot a { color: var(--primary-deep); cursor: pointer; }
.auth-forgot a:hover { text-decoration: underline; }
.admin-user-search {
  width: 100%;
  max-width: 320px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--card);
  color: var(--text);
}
.admin-user-search:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
.fg-note {
  padding: 10px 12px;
  margin: 0 0 14px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}
.fg-note b { color: var(--primary-deep); }
.fg-note span { color: var(--muted); font-size: 12px; }
.fg-warn {
  padding: 10px 12px;
  margin: 0 0 12px;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
}
.temp-pw {
  display: block;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--primary-deep);
  word-break: break-all;
  white-space: normal;
  user-select: all;
}
.fg-mail-btn { display: inline-block; margin: 4px 0 8px; }

/* ============================================================
   主题美食（图文栏目：列表 + 阅读页 + 后台管理）
   复用全站设计令牌（--primary / --line / --muted / --card / --text / --text-2 / --img-bg / --radius-* / --shadow / --shadow-hover）
   ============================================================ */

/* ---- 列表：栏目头 + 杂志式图文卡片（封面左 / 文字右，≤768px 纵向） ---- */
.topic-list-head { padding: 4px 0 6px; }
.topic-list-head .section-title { margin: 8px 0 2px; }
.topic-list-head .field-hint { font-size: 13px; color: var(--muted); }
.topic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.topic-card {
  position: relative; display: flex; gap: 0; align-items: stretch;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.topic-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-primary); opacity: 0; transition: opacity .18s;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-200); }
.topic-card:hover::before { opacity: 1; }
.topic-cover-wrap { position: relative; flex: 0 0 148px; width: 148px; overflow: hidden; background: var(--img-bg); }
.topic-cover {
  width: 100%; height: 100%; min-height: 148px;
  object-fit: cover; display: block; transition: transform .3s ease;
}
.topic-card:hover .topic-cover { transform: scale(1.05); }
.topic-no {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  font-size: 12px; font-weight: 800; color: #fff; letter-spacing: .5px;
  background: rgba(10, 38, 35, .5); border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px; padding: 1px 8px; backdrop-filter: blur(4px);
}
.topic-body {
  flex: 1 1 auto; min-width: 0;
  padding: 14px 16px 14px 4px;
  display: flex; flex-direction: column; gap: 7px; justify-content: center;
}
.topic-kicker { font-size: 11px; font-weight: 700; color: var(--primary-deep); letter-spacing: .5px; }
.topic-body h3 {
  font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--text); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-excerpt {
  margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-read { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--primary-deep); }
.topic-read i { font-style: normal; display: inline-block; transition: transform .15s; }
.topic-card:hover .topic-read i { transform: translateX(4px); }
@media (max-width: 768px) {
  .topic-list { grid-template-columns: 1fr; gap: 14px; }
  .topic-card { flex-direction: column; }
  .topic-cover-wrap { flex: 0 0 auto; width: 100%; }
  .topic-cover { height: 190px; min-height: 0; }
  .topic-body { padding: 14px 16px 16px; }
}

/* ---- 阅读页：杂志式文章版式 ---- */
.topic-detail {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 30px 24px; box-shadow: var(--shadow);
  max-width: 900px; margin: 0 auto;
}
.topic-back { margin-bottom: 16px; }
.topic-back a {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary-deep); font-weight: 600; font-size: 13.5px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: 999px; padding: 5px 14px; transition: background .15s;
}
.topic-back a:hover { background: var(--primary-100); text-decoration: none; }
.topic-cover-frame {
  margin: 0 0 22px; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow); background: var(--img-bg);
}
.topic-cover-lg { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.topic-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.topic-head-kicker {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1px;
  color: #fff; background: var(--grad-primary); border-radius: 999px; padding: 3px 14px;
  margin-bottom: 12px;
}
.topic-title { font-size: 29px; font-weight: 800; margin: 0 0 12px; line-height: 1.35; color: var(--text); }
.topic-meta {
  display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px;
}
.topic-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.topic-content { font-size: 16px; line-height: 1.95; color: var(--text); }
.topic-content h2, .topic-content h3, .topic-content h4 {
  margin: 26px 0 10px; line-height: 1.4; color: var(--primary-deep); font-weight: 800;
}
.topic-content h2 { font-size: 21px; padding-left: 12px; border-left: 4px solid var(--primary); }
.topic-content h3 { font-size: 18px; }
.topic-content p { margin: 0 0 15px; }
.topic-content img {
  max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 14px 0;
  box-shadow: var(--shadow);
}
.topic-content ul, .topic-content ol { margin: 0 0 15px 24px; }
.topic-content li { margin-bottom: 6px; }
.topic-content blockquote {
  border-left: 4px solid var(--primary); background: var(--surface-2);
  margin: 16px 0; padding: 12px 18px; border-radius: var(--radius-sm);
  color: var(--text-2); font-style: italic;
}
.topic-content pre, .topic-content code { background: var(--bg); border-radius: 6px; font-size: 13.5px; }
.topic-content pre { padding: 12px 14px; overflow-x: auto; }
.topic-content code { padding: 1px 5px; }
.topic-content a { color: var(--primary-deep); text-decoration: underline; }
.topic-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}
.topic-actions-tip { font-size: 13px; color: var(--muted); margin-right: auto; }

/* 点赞 / 分享按钮：风格与现有 .like-btn / .btn 保持一致 */
.topic-like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--primary-200); background: var(--card); color: var(--primary-deep);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.topic-like-btn:hover { background: var(--primary-50); }
.topic-like-btn:active { transform: scale(.96); }
.topic-like-btn.liked { background: var(--primary); border-color: var(--primary); color: #fff; }
.topic-like-btn .like-ico { font-size: 16px; line-height: 1; }
.topic-like-btn .like-count { font-size: 13px; color: var(--muted); }
.topic-like-btn.liked .like-count { color: #fff; }
.topic-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.topic-share-btn:hover { border-color: var(--primary-200); background: var(--primary-50); color: var(--primary-deep); }

/* ============================================================
   v1.7：地图页顶部提示 / 后台富文本编辑器
   ============================================================ */

/* ---- v1.8：地图页顶部提示已迁回 map-view.js 的 toolbarHtml() ----
   旧版（v1.7）因 map-view.js 不在上传清单而用 #view.map-page::before 伪元素插入提示。
   v1.8 起 map-view.js 已纳入生产上传清单，标题「点亮美食地图」与灰色说明统一由
   toolbarHtml() 渲染（风格对齐「按城市查询」），故移除本伪元素以避免出现两段提示。 */

/* ---- 后台文章 / 主题美食：contenteditable 富文本编辑器 ----
   类名与 app.js 约定一致：工具栏 .tp-ed-toolbar、可编辑区 .tp-ed-body、
   源码视图 .tp-ed-src。仅使用 :root 中已存在的令牌。 */
.tp-ed-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 8px; margin-bottom: 8px;
  background: var(--primary-50); border: 1px solid var(--primary-200);
  border-radius: 8px 8px 0 0;
}
.tp-ed-toolbar button, .tp-ed-toolbar select, .tp-ed-toolbar .tp-ed-btn {
  font: inherit; font-size: 12.5px; line-height: 1;
  padding: 5px 8px; min-width: 28px;
  border: 1px solid var(--primary-200); border-radius: 6px;
  background: var(--card); color: var(--primary-deep); cursor: pointer;
}
.tp-ed-toolbar button:hover, .tp-ed-toolbar .tp-ed-btn:hover { background: #fff; border-color: var(--primary); }
.tp-ed-toolbar input[type=color] { width: 30px; height: 28px; padding: 2px; border: 1px solid var(--primary-200); border-radius: 6px; background: var(--card); cursor: pointer; }
.tp-ed-toolbar .tp-ed-sep { width: 1px; height: 20px; background: var(--primary-200); margin: 0 3px; }
.tp-ed-body {
  min-height: 280px; max-height: 460px; overflow-y: auto;
  padding: 12px 14px; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 8px 8px; background: #fff;
  font-size: 14px; line-height: 1.8; color: var(--text);
  outline: none;
}
.tp-ed-body:focus { border-color: var(--primary); box-shadow: var(--ring); }
.tp-ed-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.tp-ed-body p { margin: 0 0 10px; }
.tp-ed-body h1, .tp-ed-body h2, .tp-ed-body h3 { line-height: 1.4; margin: 14px 0 8px; }
.tp-ed-body blockquote { border-left: 3px solid var(--primary-200); padding-left: 12px; color: var(--text-2); margin: 10px 0; }
.tp-ed-body table { border-collapse: collapse; }
.tp-ed-body td, .tp-ed-body th { border: 1px solid var(--line); padding: 5px 8px; }
.tp-ed-src { width: 100%; min-height: 280px; max-height: 460px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.6; resize: vertical; }


