/* ============================================================
   theme.css · 产品化重构 v2.0 设计系统
   配套文档 14。移动端优先，桌面端由 style.css 的 max-width:480px 居中壳承载。
   ============================================================ */

/* ===== 通用容器 ===== */
.page { min-height: 100vh; padding-bottom: 76px; }   /* 给吸底栏留位 */
.section { padding: 14px 16px 4px; }
.sec-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 16px 10px; font-size: 17px; font-weight: 700; color: var(--text);
}
.sec-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: var(--primary); margin-right: 8px;
}
.sec-title .more { font-size: 13px; font-weight: 500; color: var(--text-soft); cursor: pointer; }
.sec-title .more:active { opacity: .6; }

/* ===== 沉浸式 Hero ===== */
.hero {
  position: relative; width: 100%; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, #0a5e4d 0%, #0e7c66 45%, #1b9e7e 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: saturate(1.05);
}
.hero-inner { position: relative; z-index: 2; padding: 0 16px 16px; }
.hero-kicker {
  font-size: 12px; letter-spacing: 2px; opacity: .9; margin-bottom: 6px;
}
.hero-title {
  font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: .5px;
  text-shadow: 0 2px 14px rgba(0,0,0,.45); margin: 0;
}
.hero-sub { font-size: 13px; opacity: .92; margin-top: 6px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

/* 悬浮搜索条 */
.search-float {
  position: relative; z-index: 3; margin: -18px 12px 0; display: flex; gap: 8px;
}
/* 品牌条（精简，给轮播让位） */
.hero-slim { height: 124px; justify-content: center; }
.hero-slim .hero-inner { padding: 0 16px; text-align: center; }
.hero-slim .hero-title { font-size: 23px; }
.hero-slim .hero-kicker { margin-bottom: 4px; }
.search-float input {
  flex: 1; height: 44px; border: none; border-radius: 12px; padding: 0 14px;
  background: #fff; box-shadow: var(--shadow); font-size: 14px; color: var(--text);
  outline: none;
}
.search-float .btn-go {
  width: 52px; border: none; border-radius: 12px; background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}

/* ===== 金刚区 ===== */
.kingkong {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  padding: 16px 12px 4px;
}
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.kk-icon {
  width: 48px; height: 48px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
  background: linear-gradient(135deg, #e9f7f2, #d6f0e8);
}
.kk-label { font-size: 11px; color: var(--text-soft); }

/* ===== TOP 榜大图卡 ===== */
/* TOP 横向滑动条（v2.2：竖版卡 + 左右滑，节省纵向空间）
 * 注意：不用 scroll-snap-type: mandatory —— Chrome 会把鼠标滚轮吃掉转横向吸附，
 * 造成「上方滚轮失灵、只有列表能滚」的脱节感；触摸/拖拽仍可滑动。 */
.top-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px 6px;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; cursor: grab;
}
.top-strip::-webkit-scrollbar { display: none; }
.top-card {
  position: relative; flex: 0 0 200px;
  border-radius: var(--radius); overflow: hidden;
  background: #fff; box-shadow: var(--shadow); text-decoration: none; color: inherit;
}
.top-card .cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #e9ebee; }
.top-card img { width: 100%; display: block; }
.top-card .cover-fallback {
  width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  color: #aeb4ba; font-size: 13px; background: linear-gradient(135deg,#eef1f4,#e3e7eb);
}
.top-card .rank {
  position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800;
  color: #3a2c00; background: linear-gradient(135deg,#ffe08a,#f5b301);
  padding: 2px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.top-card .city {
  position: absolute; top: 8px; right: 8px; font-size: 10px; color: #fff;
  background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 6px; backdrop-filter: blur(2px);
}
.top-card .body { padding: 9px 11px 11px; }
.top-card .name {
  font-size: 14px; font-weight: 700; margin: 0 0 4px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-card .meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-soft); margin-bottom: 5px; }
.top-card .price { color: var(--accent); font-weight: 800; font-size: 15px; }
.top-card .price small { font-size: 10px; font-weight: 600; }
.top-card .market { color: #9aa0a6; text-decoration: line-through; font-size: 11px; margin-left: 4px; }

/* ===== 升级版列表卡 ===== */
.route-card {
  position: relative;
  display: flex; gap: 12px; margin: 10px 16px; padding: 12px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer;
}
.route-card .thumb {
  width: 112px; height: 84px; flex: none; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg,#eef1f4,#e3e7eb); position: relative;
}
.route-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.route-card .thumb .city {
  position: absolute; left: 6px; bottom: 6px; font-size: 10px; color: #fff;
  background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 5px;
}
/* ===== v2.13 来源徽章（PM⑤ 来源区分）：本地发布 vs 三方抓取 ===== */
.src-badge {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 10px; line-height: 1; padding: 3px 7px; border-radius: 999px;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* TOP 卡是竖图，徽章放右上（城市角标下方） */
.top-card .src-badge { top: 34px; right: 8px; bottom: auto; font-size: 10px; }
/* 本地发布：品牌绿实底（平台自营感） */
.src-badge.local { color: #fff; background: rgba(14,124,102,.92); }
/* 三方抓取：白底描边（转载感），与本地发布形成肉眼可辨的差异 */
.src-badge.ext { color: #334; background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.12); }
.route-card .info .name { display: block; }
.route-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.route-card .info .name { font-size: 15px; font-weight: 700; margin: 0 0 4px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.route-card .info .sum {
  font-size: 12px; color: var(--text-soft); margin: 0 0 6px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.route-card .info .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.route-card .info .price { color: var(--accent); font-weight: 800; font-size: 15px; }
.route-card .info .price small { font-size: 10px; font-weight: 600; }
.route-card .info .sold { font-size: 11px; color: var(--text-soft); }

/* 标签/筛选 chip（增强） */
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tag {
  display: inline-block; font-size: 11px; color: var(--primary-strong);
  background: #e6f4f1; border-radius: 6px; padding: 2px 8px; margin: 0 6px 6px 0;
}

/* ===== v2.12 ⑬排序切换 ⑮搜索历史 ===== */
.sort-bar { display: flex; align-items: center; justify-content: space-between; }
.sort-group { display: inline-flex; gap: 4px; }
.sort-item {
  font-size: 12px; color: var(--text-soft); padding: 4px 10px;
  border-radius: 999px; cursor: pointer; user-select: none;
}
.sort-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.search-history {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 0 2px; font-size: 12px;
}
.search-history .sh-label { color: var(--text-soft); }
.search-history .sh-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; color: var(--text); cursor: pointer;
}
.search-history .sh-clear { color: var(--text-soft); cursor: pointer; margin-left: auto; }

/* 排名徽章（小） */
.badge-rank { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.badge-rank.g1 { color: #3a2c00; background: linear-gradient(135deg,#ffe08a,#f5b301); }
.badge-rank.g2 { color: #2b2b2b; background: linear-gradient(135deg,#e6e8ea,#c7ccd1); }
.badge-rank.g3 { color: #4a2c00; background: linear-gradient(135deg,#f3c08a,#d98a3a); }

/* ===== 参数速览宫格 ===== */
.specs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 16px;
}
.spec {
  background: #f6f8f9; border-radius: 12px; padding: 10px 8px; text-align: center;
}
.spec .ico { font-size: 18px; }
.spec .val { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 2px; }
.spec .val small { font-size: 11px; font-weight: 600; color: var(--text-soft); }
.spec .lab { font-size: 11px; color: var(--text-soft); margin-top: 1px; }

/* ===== 排期横条 ===== */
.schedule-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px;
  scrollbar-width: none;
}
.schedule-strip::-webkit-scrollbar { display: none; }
.date-pill {
  flex: none; min-width: 62px; text-align: center; border-radius: 12px; padding: 8px 6px;
  background: #fff; border: 1px solid var(--border); cursor: pointer;
}
.date-pill .d { font-size: 16px; font-weight: 700; }
.date-pill .w { font-size: 11px; color: var(--text-soft); }
.date-pill .p { font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.date-pill.active { border-color: var(--accent); background: var(--accent-soft); }
.date-pill.active .d, .date-pill.active .w { color: var(--accent); }

/* ===== 详情区块卡 ===== */
.dcard {
  margin: 10px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px;
}
.dcard h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.dcard h3 .ic { font-size: 16px; }
.dcard p { margin: 0; font-size: 14px; line-height: 1.6; color: #2b3137; }
.dcard ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #2b3137; }
.dcard .muted { color: var(--text-soft); font-size: 12px; }

/* 时间轴 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #d9e2e0;
}
.tl-day { position: relative; margin-bottom: 16px; }
.tl-day::before {
  content: ""; position: absolute; left: -16px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
.tl-day .day-h { font-size: 14px; font-weight: 700; color: var(--primary-strong); }
.tl-day .day-t { font-size: 15px; font-weight: 600; margin: 2px 0 4px; }
.tl-day .day-d { font-size: 13px; color: #2b3137; line-height: 1.6; }
.tl-day .day-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* 双列装备 */
.eq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eq-col h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.eq-col ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.7; }

/* 费用两栏 */
.cost-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cost-col h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.cost-col.in h4 { color: var(--green); }
.cost-col.out h4 { color: #b45309; }
.cost-col ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.7; }

/* 退改规则表 */
.refund-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.refund-tbl td { padding: 7px 6px; border-bottom: 1px solid var(--border); }
.refund-tbl td:first-child { color: var(--text-soft); }

/* ===== 折叠面板 ===== */
.collapsible {
  margin: 10px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.collapsible > summary {
  list-style: none; cursor: pointer; padding: 14px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary .chev { transition: transform .2s; color: var(--text-soft); }
.collapsible[open] > summary .chev { transform: rotate(180deg); }
.collapsible .cbody { padding: 0 14px 14px; font-size: 14px; line-height: 1.65; color: #2b3137; }
.collapsible .cbody p { margin: 0 0 8px; }

/* ===== 吸底操作栏 ===== */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-up); max-width: 480px; margin: 0 auto;
}
.cta-bar .tools { display: flex; gap: 14px; }
.cta-bar .tool { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--text-soft); gap: 2px; cursor: pointer; }
.cta-bar .tool .ic { font-size: 18px; }
.cta-bar .main {
  flex: 1; text-align: center; padding: 13px; border-radius: 12px; font-weight: 700; font-size: 15px;
  background: var(--accent); color: #fff; text-decoration: none;
}
.cta-bar .main:active { background: #e85c1f; }
.cta-bar .main.ghost { background: var(--primary); }
.cta-bar .main.ghost:active { background: var(--primary-strong); }

/* 胶囊按钮 */
.pill-btn {
  display: inline-block; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; text-decoration: none;
}
.pill-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill-btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 核验/状态徽章（详情页顶部用） */
.verify-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; background: #e6f4f1; color: var(--primary-strong);
}

/* 骨架屏 */
.skeleton { background: linear-gradient(90deg,#eef1f4 25%,#e3e7eb 37%,#eef1f4 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* 空态 */
.empty { text-align: center; color: var(--text-soft); font-size: 14px; padding: 48px 20px; }
.empty .ic { font-size: 40px; display: block; margin-bottom: 10px; opacity: .5; }

/* 封面兜底（无图时渐变 + 首字） */
.cover-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #aeb4ba; font-size: 22px; font-weight: 700;
  background: linear-gradient(135deg,#eef1f4,#e3e7eb);
}
.top-card .cover-fallback { aspect-ratio: 16/9; }
.route-card .thumb .cover-fallback { font-size: 20px; }

/* ===== 详情页专属 ===== */
.dt-head { background: radial-gradient(130% 145% at 50% 122%, var(--hdr-c2) 0%, var(--hdr-c2) 30%, var(--hdr-c2-70) 62%, var(--hdr-c2t) 95%); }
.dtl-back {
  color: #fff; font-size: 26px; line-height: 1; text-decoration: none;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}
.dtl-title { color: #fff; font-size: 16px; font-weight: 600; }
.dtl-hero { position: relative; width: 100%; height: 230px; overflow: hidden; background: #e9ebee; }
.dtl-hero-track { display: flex; height: 100%; transition: transform .35s ease; }
.dtl-hero-track .slide { flex: 0 0 100%; height: 100%; }
.dtl-hero-track .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dtl-hero-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; }
.dtl-hero-dots .hd { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.dtl-hero-dots .hd.on { background: #fff; width: 16px; border-radius: 3px; }
.dtl-body { padding: 14px 0 8px; }
.dtl-titleblock { padding: 0 16px 10px; }
.dtl-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dtl-name { font-size: 21px; font-weight: 800; margin: 0 0 6px; line-height: 1.3; }
.dtl-sum { font-size: 13px; color: var(--text-soft); margin: 0; line-height: 1.5; }
.dtl-pricebar {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 16px 6px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(135deg,#fff5f0,#ffe9df);
}
.dtl-pricebar .pp { color: var(--accent); font-size: 22px; font-weight: 800; }
.dtl-pricebar .pp small { font-size: 12px; font-weight: 600; }
.dtl-pricebar .pm { color: #9aa0a6; text-decoration: line-through; font-size: 13px; }
.dtl-pricebar .tag { margin: 0 0 0 auto; }

/* ===== 工作台深度内容编辑器 ===== */
.rich-detail {
  margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fafbfc; overflow: hidden;
}
.rich-detail > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.rich-detail > summary::-webkit-details-marker { display: none; }
.rich-detail > summary .chev { color: var(--text-soft); transition: transform .2s; }
.rich-detail[open] > summary .chev { transform: rotate(180deg); }
.rich-inner { padding: 4px 14px 14px; }
.rich-sec { margin-top: 12px; }
.rich-sec > .rs-h { font-size: 13px; font-weight: 700; color: var(--primary-strong); margin-bottom: 6px; }
.dyn-row {
  display: grid; gap: 6px; padding: 8px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; position: relative;
}
.dyn-row .del { position: absolute; top: 6px; right: 8px; color: #b91c1c; font-size: 12px; cursor: pointer; }
.mini-add {
  display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--primary);
  cursor: pointer; user-select: none;
}
.mini-add::before { content: "＋ "; }
.rich-inner textarea, .rich-inner input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-family: inherit; box-sizing: border-box; resize: vertical;
}
.rich-inner .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rich-inner label { font-size: 12px; color: var(--text-soft); display: block; margin: 4px 0 2px; }

/* 列表/宫格在窄屏适配 */
@media (max-width: 360px) {
  .kingkong { grid-template-columns: repeat(4, 1fr); }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   全站公共组件（原 auth.css 承载，现上提到设计系统层，所有产品页通用）
   index/route 仅引 theme.css → 直接获得 tabbar / 头像 / toast / 分享面板等。
   ============================================================ */
body.has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

/* 底部 Tab 栏 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px; z-index: 40;
  display: flex; background: #fff;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(16,24,32,.06);
}
.tabbar-item {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 7px 0 6px; text-decoration: none; color: #9aa3ad;
  transition: color .15s ease;
}
/* 选中态：标签变主题色 + 加粗 + 顶部指示条（emoji 图标无法染色，用指示条保证可见的选中反馈） */
.tabbar-item.active { color: var(--primary); }
.tabbar-item.active::before {
  content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 3px; background: currentColor;
}
.tabbar-icon {
  position: relative; font-size: 20px; line-height: 1;
  /* 不加 padding：角标(.tabbar-dot)锚定图标盒右缘，盒宽必须=emoji 本体宽。
     早期选中态药丸底的 padding:3px 14px 已随药丸底删除——若保留，带 theme.css
     的页面图标盒比 emoji 宽 28px，角标视觉上飘离 emoji（/workbench 等无 theme.css
     的页面则紧贴），出现「非选中错位、选中正确」的不一致。 */
  transition: background .15s ease, transform .15s ease;
}
/* 选中态只改标签颜色/加粗，图标与角标保持未选中风格（选中/未选中观感一致，
 * 角标不被绿色圆角底+放大干扰）。见需求③。 */
.tabbar-item.active .tabbar-label { font-weight: 700; }
.tabbar-label { font-size: 11px; }
.tabbar-dot {
  position: absolute; top: -4px; right: -10px;
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  border-radius: 8px; background: #dc2626; color: #fff;
  font-size: 10px; font-style: normal; text-align: center;
}

/* 头像 / toast / 头部分类入口 */
.dt-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 700;
  flex: none; user-select: none; letter-spacing: 0;
}
/* 图片头像：v4.8 从 auth.css 提到 theme.css（全站公共）。
   原先只有引 auth.css 的页面（登录/我的）有这两条，首页 / 线路列表页 /
   消息中心 / 聊天页 不引 auth.css —— 图片头像不裁剪、撑破圆圈，
   表现就是「头像缩略图显示不正确」。 */
.dt-avatar.has-img { overflow: hidden; }
.dt-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: rgba(15,23,42,.92); color: #fff;
  font-size: 14px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; transition: all .25s ease; z-index: 100; pointer-events: none;
  max-width: 80vw; text-align: center;
}
.dt-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dt-toast.err { background: rgba(185,28,28,.95); }
.hdr-login {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 13px;
  font-weight: 700; text-decoration: none; border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.hdr-login:active { background: var(--primary-strong, #14543c); }
/* 右上角用户态：胶囊（半透明白底 + 白圈头像 + 昵称），与 hdr-login 同一家族 */
.hdr-user {
  display: inline-flex; align-items: center; gap: 7px; color: #fff; text-decoration: none;
  max-width: 46vw; padding: 3px 12px 3px 4px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.38);
}
.hdr-user:active { background: rgba(255,255,255,.28); }
.hdr-user .dt-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.hdr-name { font-size: 12.5px; font-weight: 600; max-width: 24vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 待核验徽章：灰改暖琥珀，与 --gold 色系协调 */
.badge-darkgray, .verify-badge.badge-darkgray {
  color: #9a6a12 !important; background: #fdf3e2 !important;
  border: 1px solid #f0e0bd !important;
}

/* 封面图占位 */
.dt-cover { position: relative; display: block; overflow: hidden; background: #eef0f2; flex: none; }
.dt-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-cover.noimg { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font-weight: 700; }

/* 登录引导 / 空态 / 页脚 */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-tip.big p { margin: 0 0 14px; }
.gp-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.gp-desc { font-size: 13px; margin: 0 0 14px; }
.btn.gp-btn, a.btn.gp-btn { color: #fff !important; text-decoration: none; display: block; text-align: center; line-height: 46px; }
.empty-tip { text-align: center; color: var(--text-soft); font-size: 14px; padding: 40px 20px; line-height: 1.6; }
.about-foot { text-align: center; padding: 24px 0 12px; }
.about-foot p { font-size: 11px; color: var(--text-soft); opacity: .8; margin: 0; }

/* 徽标 */
.mini-badge { font-size: 11px; border-radius: 6px; padding: 2px 8px; background: var(--bg); color: var(--text-soft); }
.mini-badge.wx { background: #ecfdf5; color: #059669; }
.mini-badge.pw { background: #eff6ff; color: #1d4ed8; }
.mini-badge.role { background: #fef3c7; color: #b45309; }
.role-tag { font-size: 11px; color: var(--primary-strong); background: #e6f4f1; border-radius: 6px; padding: 1px 8px; font-weight: 500; }
.hidden { display: none !important; }

/* 个人中心（profile v2） */
.user-card { padding: 18px 16px; margin-bottom: 12px; }
.uc-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.uc-main { flex: 1; min-width: 0; }
.uc-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.uc-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.uc-edit { font-size: 12px; color: var(--primary); flex: none; }
.uc-badges { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.uc-stats { display: flex; margin: 12px 0; }
.uc-stat { flex: 1; text-align: center; padding: 10px 0; }
.uc-stat .n { font-size: 18px; font-weight: 800; color: var(--text); }
.uc-stat .l { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.uc-stat + .uc-stat { border-left: 1px solid var(--border); }
.me-header { display: flex; align-items: center; gap: 14px; padding: 18px 16px; }
.me-header .mh-name { font-size: 18px; font-weight: 800; }
.me-header .mh-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.menu { padding: 0; margin-bottom: 12px; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); font-size: 15px; border-bottom: 1px solid var(--border); background: #fff; }
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-icon { font-size: 18px; flex: none; }
.menu-item .mi-label { flex: 1; }
.menu-item .mi-value { font-size: 12px; color: var(--text-soft); }
.menu-item .mi-arrow { color: var(--border); font-size: 18px; }
.menu-item.danger { color: #b91c1c; }
.unread-dot { min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; border-radius: 8px; background: #dc2626; color: #fff; font-size: 10px; text-align: center; }

/* 消息会话卡 */
.conv-item { background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; cursor: pointer; display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); box-shadow: var(--shadow); }
.conv-item:active { background: var(--bg); }
.conv-item .c-main { flex: 1; min-width: 0; }
.conv-item .c-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.conv-item .c-route { font-weight: 400; font-size: 12px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .c-sub { font-size: 13px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .c-right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-item .c-time { font-size: 11px; color: var(--text-soft); }

/* 收藏星标（列表卡右上角） */
.fav-star {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; cursor: pointer; z-index: 5; backdrop-filter: blur(2px);
}
.fav-star.on { color: #ff4d4f; background: rgba(255,255,255,.92); }

/* 分享面板（底部分享）——隐藏态必须 pointer-events:none，否则全屏拦截点击 */
.share-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.share-mask.show { opacity: 1; pointer-events: auto; }
.share-sheet {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%); bottom: 0;
  width: 100%; max-width: 480px; z-index: 61; background: #fff;
  border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  transition: transform .25s ease; pointer-events: none;
}
.share-sheet.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }
.share-sheet .ss-title { font-size: 14px; color: var(--text-soft); text-align: center; margin: 0 0 14px; }
.share-grid { display: flex; gap: 8px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex: 1; }
.share-item .si-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }
.share-item .si-lab { font-size: 12px; color: var(--text-soft); }
.share-cancel { display: block; width: 100%; text-align: center; margin-top: 16px; padding: 12px; border: none; background: var(--bg); border-radius: 12px; font-size: 15px; color: var(--text); cursor: pointer; }

/* 首页 hero 轮播（精选线路） */
.hero-banner { position: relative; margin: -8px 12px 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.hero-track { display: flex; transition: transform .4s ease; }
.hero-slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 9; min-height: 150px; text-decoration: none; color: #fff; display: block; }
.hero-slide .dt-cover { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 40px; }
.hero-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.hero-cap .hc-title { font-size: 16px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-cap .hc-sub { font-size: 12px; opacity: .9; margin-top: 3px; }
.hero-dots { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; gap: 5px; }
.hero-dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); }
.hero-dot.on { background: #fff; width: 14px; }

/* ===== v2.1 两页结构增补 ===== */
/* 详情页工具按钮激活态（收藏/点赞） */
.cta-bar .tool.on { color: #ff4d4f; }
.cta-bar .tool.on .ic { transform: scale(1.1); }

/* 列表页搜索行 */
.search-line { display: flex; gap: 8px; margin-bottom: 10px; }
.search-line input[type="search"] {
  flex: 1; height: 40px; padding: 0 14px; border: 1px solid var(--line, #e5e7eb);
  border-radius: 20px; font-size: 14px; outline: none; background: #fff;
}
.search-line .btn-go {
  height: 40px; padding: 0 18px; border: 0; border-radius: 20px;
  background: var(--primary); color: #fff; font-size: 14px; cursor: pointer;
}

/* 列表页可点分类宫格（继承金刚区视觉，加选中态） */
.kk-tap { cursor: pointer; }
.kk-tap .kk-item { transition: transform .12s ease, background .12s ease; border-radius: 12px; }
.kk-tap .kk-item:active { transform: scale(.94); }
.kk-tap .kk-item.active .kk-icon { background: var(--primary); }
.kk-tap .kk-item.active .kk-label { color: var(--primary); font-weight: 600; }

/* 列表页顶栏占位（与详情页同款返回钮） */
.dtl-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }

/* ===== v2.1 个人中心皮 ===== */
.me-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0a5d4e 100%);
  color: #fff; padding: 22px 16px 18px; border-radius: 0 0 18px 18px;
}
.me-hero .hidden { display: none; }
.me-hero-inner { display: flex; align-items: center; gap: 12px; }
.me-avatar.ghost {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none;
}
.me-main { flex: 1; min-width: 0; }
.me-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.me-name .role-tag { font-size: 11px; font-weight: 500; background: rgba(255,255,255,.22); padding: 1px 8px; border-radius: 999px; }
.me-sub { font-size: 12px; opacity: .85; margin-top: 3px; }
.me-hero .uc-badges { margin-top: 6px; }
.me-hero .uc-badges .mini-badge { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; }
.me-edit { font-size: 12px; background: rgba(255,255,255,.18); padding: 4px 12px; border-radius: 999px; flex: none; }
.me-login-btn {
  flex: none; font-size: 13px; background: #fff; color: var(--primary);
  padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.me-quick { display: flex; gap: 10px; margin-top: 16px; }
.me-quick .mq-item {
  flex: 1; position: relative; background: rgba(255,255,255,.14); border-radius: 12px;
  padding: 10px 6px; text-align: center; font-size: 12.5px; color: #fff;
  text-decoration: none; display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.me-quick .mq-item span { font-size: 18px; }
.me-quick .mq-item small { font-size: 10px; opacity: .75; }
.me-body { padding: 14px 16px 20px; }
.me-body .menu { margin-bottom: 12px; }
.me-quick .unread-dot { position: absolute; top: 6px; right: 10px; }

/* 收藏页取消收藏按钮 */
.fav-del {
  border: 1px solid #ffd6d6; background: #fff; color: #ff4d4f;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.fav-del:active { background: #fff1f0; }

/* ===== v2.2 聊天气泡：头像 + 昵称 + 时间 ===== */
.bubble-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.bubble-row.mine { flex-direction: row-reverse; }
.bubble-row .msg-avatar { flex: none; width: 28px; }
.bubble-row .msg-avatar .dt-avatar { width: 28px; height: 28px; border-radius: 50%; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.bubble-row .msg-col { display: flex; flex-direction: column; max-width: 76%; }
.bubble-row.mine .msg-col { align-items: flex-end; }
.bubble-row .msg-name { font-size: 11px; color: var(--text-soft); margin: 0 0 3px 2px; }
.bubble-row .msg-time { font-size: 10px; color: #b0b6bc; margin-top: 3px; padding: 0 2px; }
.bubble-row .msg-time.gap { color: #8a9096; font-weight: 600; }
.bubble-row .bubble { max-width: 100%; }

/* 详情页无图 hero 兜底：品牌绿浅渐变（与整体协调） */
.dtl-hero.noimg {
  background: linear-gradient(135deg, #e6f4f1 0%, #cfe9e2 60%, #bfe0d6 100%) !important;
}

/* ===== v2.8 雾状渐变：头部与 banner 区融为一体的连续雾场 =====
   header 本体：中心浓（底部中央）、上/左/右边缘羽化透明（见 style.css）。
   hero-zone 不再是独立色块：::before 雾层上移 16px 叠进 header 底部
   （header z-index 更高盖住重叠区），衔接零缝隙；雾向下渐隐 + 径向
   mask 让左右边缘同步羽化——整个「头部+banner」是一团连续的雾。 */
.hero-zone { position: relative; padding-bottom: 26px; }
.hero-zone::before {
  content: ''; position: absolute; left: 0; right: 0; top: -16px; bottom: 0;
  background: linear-gradient(180deg, var(--hdr-c2) 0%, var(--hdr-c2-70) 46%, var(--hdr-c2t) 84%);
  -webkit-mask-image: radial-gradient(135% 118% at 50% 0%, #000 46%, rgba(0,0,0,.55) 74%, transparent 100%);
          mask-image: radial-gradient(135% 118% at 50% 0%, #000 46%, rgba(0,0,0,.55) 74%, transparent 100%);
  pointer-events: none; z-index: 0;
}
.hero-zone > * { position: relative; z-index: 1; }
/* banner 卡片浮在雾上，与头部同色系呼应 */
.hero-zone .hero-banner { margin: 12px 12px 0; border-radius: var(--radius-lg); }
/* 无 banner：雾层收窄成一条过渡带，不开天窗 */
.hero-zone.no-banner { padding: 0 0 8px; }
.hero-zone.no-banner::before { top: -16px; bottom: auto; height: 34px; }

/* 详情页头图顶部融雾：雾从 header 底部向下压在图上渐隐，图与头部无缝相接 */
.dtl-hero { position: relative; }
.dtl-hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 92px;
  background: linear-gradient(180deg, var(--hdr-c2) 0%, var(--hdr-c2-45) 58%, var(--hdr-c2t) 100%);
  pointer-events: none; z-index: 2;
}
/* 消息/收藏等纯列表页：内容上移叠进 header 底部，卡片「从雾里长出来」 */
.app-header + main, .app-header + .me-body { margin-top: -14px; }
/* 列表页头部内的搜索（白胶囊，竞品同款布局） */
.app-header.grad .rt-search {
  flex: 1; min-width: 0; height: 34px; border: 0; border-radius: 999px;
  padding: 0 14px; font-size: 13px; background: rgba(255,255,255,.92);
  color: var(--text); outline: none;
}
.app-header.grad .rt-search::placeholder { color: #8a93a0; }
.app-header.grad .rt-go {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.app-header.grad .dtl-title { flex: none; }

/* ===== v2.10 预览横幅 / 下架按钮间距 / 收藏动效 ===== */
.preview-banner {
  margin: 10px 12px 0; padding: 10px 12px; border-radius: 10px;
  background: #fff7e6; color: #ad6800; font-size: 13px; line-height: 1.5;
  border: 1px solid #ffe1a6;
}
.ai-ops .btn-mini + .btn-mini { margin-left: 8px; }
.route-item .ai-ops { gap: 8px; }
@keyframes favpop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.cta-bar .tool.on .ic, .fav-star.on { animation: favpop .3s ease; }

/* ===== v2.12 ⑯ 聊天线路卡片气泡 ===== */
.chat-route-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px; margin: 0 0 12px;
  text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.chat-route-card .dt-cover { width: 64px; height: 48px; border-radius: 8px; flex: none; }
.chat-route-card .crc-body { flex: 1; min-width: 0; }
.chat-route-card .crc-t {
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-route-card .crc-p { font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.chat-route-card .crc-arr { color: var(--border); font-size: 18px; flex: none; }
