/* 页面内跳转（scrollIntoView / 锚点）要让开吸顶的顶栏，否则标题被压在下面 */
html { scroll-padding-top: 82px; }

:root {
  /* 配色按「强阳光下户外使用」校准（金边白天室外看车是主场景）：
   * - 正文/次要文字全面加深，浅灰字在阳光下一片糊；
   * - 边框加深一档，白色卡片在亮背景上靠边框区分；
   * - 品牌蓝保持深蓝（白字对比度 8:1+），不用浅蓝做按钮底。 */
  --bg: #EFF3F8;
  --card: #FFFFFF;
  --line: #D6DDE6;
  --line2: #B7C1CE;
  --ink: #101318;
  --ink2: #3F4A59;
  --ink3: #5F6B7C;
  /* 品牌色取自 ZB logo 的深蓝 (#0A237D)，强光下白字对比度 10:1+ */
  --brand: #0A237D;
  --brand-ink: #071A5E;
  --brand-soft: #E7EDFB;
  --ok: #0B5E3D;
  --ok-soft: #DFF2E8;
  --warn: #75490A;
  --warn-soft: #FBEDD4;
  --bad: #8E1F1F;
  --bad-soft: #FBE7E7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .07);
  /* 张力层：模板会整套覆盖，这里只给不带模板时的默认值 */
  --cta: #E8590C;
  --cta2: #FF8A3D;
  --cta-ink: #FFFFFF;
  --grad: linear-gradient(135deg, #0A237D, #1237B8);
  --grad-ink: #FFFFFF;
  --glow: 0 8px 20px rgba(10, 35, 125, .26);
  --price: #0A237D;
  --accent: #1E5EFF;
  --accent-ink: #071A5E;
  --accent-soft: #E7EDFB;
  --hero: linear-gradient(180deg, #E9EFFB 0%, #EFF3F8 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans Khmer", "Khmer OS", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hide { display: none !important; }

/* ---------- 顶部导航 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad, var(--brand)); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: .2px; }
.brand-logo {
  height: 30px; width: auto; display: block; border-radius: 4px;
}
.head-nav { display: flex; gap: 18px; margin-left: 10px; }
.head-nav a { color: var(--ink2); font-size: 14px; }
.head-nav a:hover, .head-nav a.on { color: var(--ink); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line2);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink2);
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.lang-menu {
  position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; min-width: 132px; display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0;
  font-size: 14px; color: var(--ink);
}
.lang-menu button:hover { background: var(--brand-soft); }
.lang-menu button.on { color: var(--brand); font-weight: 500; }

/* 折叠菜单容器：桌面下 display:contents 保持原布局不变 */
.head-collapse { display: contents; }
.menu-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink);
  border-radius: 11px; min-height: 44px; padding: 9px 16px; font-size: 14.5px; font-weight: 500;
  transition: .15s;
}
.btn:hover { border-color: var(--ink3); }
/* 主按钮不再是死板的纯色块：渐变 + 品牌色投影，让它从页面里浮出来。
 * 渐变两端在 theme.js 里都卡过白字对比度 4.5:1，阳光下也读得清。 */
.btn-primary {
  background: var(--grad, var(--brand)); border-color: transparent; color: var(--grad-ink, #fff);
  font-weight: 600; box-shadow: var(--glow, none);
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.ic { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 30px 20px 26px; margin: 12px 0 8px; border-radius: 20px;
  box-shadow: var(--glow, 0 8px 20px rgba(10, 35, 125, .26));
  /* 头版底色仍是品牌渐变；真实车照放在 ::before 里，见下 */
  background: linear-gradient(135deg, var(--brand-ink, #0A237D) 0%, var(--brand, #0A237D) 58%, var(--b1, #1E5EFF) 100%);
}
/* 头版压一张真实车照：luminosity 只借它的明暗，色相仍旧是品牌色；
   左侧用遮罩渐隐，标题区是干净的品牌底色，车从右边露出来。
   --hero-img 由首页按「当前第一台车」写入，取不到回落内置样张。 */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  /* 先给照片压一层暗纱：白车太亮会把品牌色冲淡，也会把白字吃掉 */
  background-image: linear-gradient(rgba(10, 14, 22, .34), rgba(10, 14, 22, .34)), var(--hero-img, url('img/v03-1.jpg'));
  background-size: auto, cover;
  background-position: center, center 58%;
  background-repeat: no-repeat;
  mix-blend-mode: luminosity;
  opacity: .92;
  -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .52) 34%, #000 68%);
  mask-image: linear-gradient(100deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .52) 34%, #000 68%);
  pointer-events: none;
}
/* 老浏览器不认混合模式：宁可不出图，也别糊一张彩色照片在标题后面 */
@supports not (mix-blend-mode: luminosity) { .hero::before { display: none; } }

/* 右上角一团柔光，让大色块不死板 */
.hero::after {
  content: ''; position: absolute; right: -70px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.hero .search-row { position: relative; z-index: 1; }
/* 头版里的搜索键用「行动色」，在品牌色底上跳出来 */
.hero .search-row .btn-primary { background: var(--cta); color: var(--cta-ink, #fff); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.hero .search-row .btn-primary:hover { filter: brightness(1.06); }
.hero .search-row input { background: #fff; color: #101318; border-color: rgba(255, 255, 255, .5); box-shadow: 0 6px 16px rgba(0, 0, 0, .16); }
.hero .search-row input::placeholder { color: #6B7789; }
.hero h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.3px; color: #fff; line-height: 1.3; text-shadow: 0 1px 3px rgba(0, 0, 0, .2); position: relative; z-index: 1; }
.hero p { position: relative; z-index: 1; margin: 0 0 18px; color: rgba(255, 255, 255, .94); font-size: 15px; text-shadow: 0 1px 5px rgba(0, 0, 0, .55); }
.search-row { display: flex; gap: 10px; max-width: 620px; }
.search-row input { flex: 1; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line2); border-radius: 11px;
  background: #fff; color: var(--ink); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' fill='none' stroke='%238B94A3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 12px; padding-right: 32px; }

/* ---------- 工具栏 ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.bar .count { font-size: 14px; color: var(--ink2); }
.bar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewsw { display: flex; background: #F2F4F7; border-radius: 9px; padding: 3px; }
.viewsw button { border: 0; background: none; padding: 6px 9px; border-radius: 6px; color: var(--ink3); display: flex; align-items: center; }
.viewsw button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* ---------- 车辆卡片（大图 + 多角度 + 关键标签） ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; padding-bottom: 40px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--brand); box-shadow: var(--glow, var(--shadow)); transform: translateY(-3px); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #EDF0F4; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 1;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0) 0%, rgba(8, 12, 20, .40) 100%);
  pointer-events: none;
}
/* 角标都压到遮罩之上，不然会被渐变压暗 */
.card-img .badge, .card-img .imgcount, .card-img .offbadge,
.card-img .dealtag, .card-img .newtag { z-index: 2; }
.badge {
  position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 500;
  padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink2);
}
.badge.available { color: var(--ok); background: var(--ok-soft); }
.badge.reserved { color: var(--warn); background: var(--warn-soft); }
.badge.sold { color: var(--ink3); background: rgba(240, 242, 245, .96); }
.imgcount {
  position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px;
  background: rgba(16, 24, 40, .62); color: #fff; font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
}
.offbadge {
  position: absolute; right: 10px; top: 10px; background: var(--bad); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 3px; }
.card-sub { font-size: 13px; color: var(--ink3); margin: 0 0 10px; }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.tag { font-size: 12px; color: var(--ink2); background: #F2F4F7; border-radius: 7px; padding: 3px 8px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.kt { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 3px 8px; background: #EEF2F7; color: var(--ink2); }
.kt.good { background: var(--ok-soft); color: var(--ok); }
.kt.warn { background: var(--warn-soft); color: var(--warn); }
.kt.info { background: var(--brand-soft); color: var(--brand-ink); }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; row-gap: 8px; }
/* 价格独占一行：三个元素挤一行时，划线价一长就把价格顶出卡片（手机上会裁掉） */
.card-foot .pricebox { flex: 1 1 100%; min-width: 0; }
.card-foot .qshare { margin-left: auto; }
.pricebox { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.price { font-size: 20px; font-weight: 800; color: var(--price, var(--brand-ink)); letter-spacing: -.4px; }
.price small { font-size: 12px; color: var(--ink3); font-weight: 400; margin-left: 2px; }
s, s.old { font-size: 13px; color: var(--ink3); text-decoration: line-through; }
.empty { text-align: center; color: var(--ink3); padding: 70px 20px; }

/* ---------- 列表视图 ---------- */
.rows { display: flex; flex-direction: column; gap: 11px; padding-bottom: 40px; }
.row {
  display: grid; grid-template-columns: 232px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px;
  transition: .16s;
}
.row:hover { border-color: var(--brand); box-shadow: var(--glow, var(--shadow)); }
.row-img { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #EDF0F4; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; }
.row-year { font-size: 13px; color: var(--ink3); font-weight: 400; }
.row-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .row-img { aspect-ratio: 16 / 9; }
  .row-price { text-align: left; align-items: flex-start; flex-direction: row; align-items: baseline; gap: 10px; }

  /* 头部导航转成汉堡菜单 */
  .site-head .wrap { height: auto; min-height: 58px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 42px; margin-left: auto; padding: 10px;
    background: #fff; border: 1px solid var(--line2); border-radius: 11px;
  }
  .menu-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .22s; }
  .site-head.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-head.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-head.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .head-collapse {
    display: none; order: 3; width: 100%;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(16, 24, 40, .12);
    padding: 8px 16px 16px; z-index: 45;
  }
  .site-head.menu-open .head-collapse { display: flex; }
  .head-nav { flex-direction: column; gap: 0; margin: 0; width: 100%; }
  .head-nav a { padding: 13px 6px; font-size: 15px; border-bottom: 1px solid var(--line); }
  .head-nav a:last-child { border-bottom: 0; }
  /* 语言胶囊常驻顶栏（不进汉堡菜单）：本地客户第一眼就能换成高棉语 */
  .head-right { margin: 0 0 0 auto; width: auto; gap: 8px; flex: none; }
  .head-right .lang { width: auto; }
  .lang-btn { width: auto; padding: 7px 11px; font-size: 12.5px; }
  .lang-menu { top: 44px; right: 0; left: auto; min-width: 120px; }
  .menu-toggle { margin-left: 0; }
  .head-collapse .nav-admin { width: 100%; margin-top: 6px; }

  .hero-stats .stat { flex: 1 1 0; min-width: 0; }
  .page-hero h1 { font-size: 24px; }
}

/* ---------- 筛选抽屉 ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(470px, 100%);
  background: #fff; border-left: 1px solid var(--line); z-index: 55;
  transform: translateX(103%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column; box-shadow: -14px 0 40px rgba(16, 24, 40, .13);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.drawer-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 18px 18px; }
.drawer-foot { flex: 0 0 auto; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.dsec { padding: 15px 0; border-bottom: 1px solid var(--line); }
.dsec:last-child { border-bottom: 0; }
.dsec h4 { font-size: 12px; color: var(--ink3); font-weight: 600; margin: 2px 0 10px; letter-spacing: .5px; }
.dsec .fld { margin-bottom: 13px; }
.dsec .fld:last-child { margin-bottom: 0; }
.fld label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 5px; }
.fld-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 0; min-width: 68px; padding: 9px 8px; border: 1px solid var(--line2);
  background: #fff; border-radius: 10px; font-size: 13px; color: var(--ink2); transition: .14s;
}
.seg button:hover { border-color: var(--ink3); }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.switch {
  width: 48px; height: 28px; border-radius: 999px; background: var(--line2); border: 0;
  position: relative; padding: 0; transition: .18s;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.switch.on { background: var(--brand); }
.switch.on i { left: 23px; }

/* ---------- 详情页 ---------- */
.detail { padding: 20px 0 90px; }
.crumb { font-size: 13px; color: var(--ink3); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }

.gallery { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery .main { position: relative; aspect-ratio: 16 / 10; background: #EDF0F4; }
.gallery .main img {
  /* 主图必须是「整张照片」，不能裁切：以前用 cover，手机竖拍/4:3 的照片
     被切成 16:10，客户看不到车头车尾，还以为照片传错了。
     改成 contain 后主图和小图看到的是同一张完整照片（空出来的地方用底色补）。 */
  width: 100%; height: 100%; object-fit: contain; background: #EDF0F4;
}
.ph-tip {
  position: absolute; right: 10px; bottom: 10px; font-size: 12px; color: var(--ink2);
  background: rgba(255, 255, 255, .92); padding: 4px 10px; border-radius: 999px;
}
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px; background: #fff; }
.th {
  position: relative; border: 2px solid transparent; border-radius: 9px; padding: 0;
  overflow: hidden; background: #EDF0F4; aspect-ratio: 4 / 3; transition: .14s;
}
.th img { width: 100%; height: 100%; object-fit: cover; }
.th span {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; text-align: center;
  background: rgba(16, 24, 40, .58); color: #fff; padding: 2px 0;
}
.th.on { border-color: var(--brand); }
@media (max-width: 720px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
.gallery-foot { font-size: 12.5px; color: var(--ink3); padding: 0 12px 12px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; margin-top: 20px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.sec-h { font-size: 15px; font-weight: 600; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.dtitle { font-size: 23px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.3px; }
.dsub { color: var(--ink3); font-size: 13.5px; margin: 0 0 14px; }

/* 车辆档案：键值表 */
.vfile { display: grid; grid-template-columns: auto 1fr; }
.vfile .fk {
  font-size: 13px; color: var(--ink3); padding: 9px 16px 9px 0;
  border-bottom: 1px dashed var(--line); white-space: nowrap;
}
.vfile .fv {
  font-size: 14px; font-weight: 500; padding: 9px 0; text-align: right;
  border-bottom: 1px dashed var(--line);
}
.vfile .fk:last-of-type, .vfile .fv:last-of-type { border-bottom: 0; }

.hl-list { margin: 0; padding-left: 19px; font-size: 14px; color: var(--ink2); line-height: 1.85; }
.hl-list li { margin-bottom: 3px; }

.cond { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warnc { background: var(--warn-soft); color: var(--warn); }
.note-box { font-size: 14px; color: var(--ink2); background: #F7F9FB; border-radius: 10px; padding: 13px 14px; margin-top: 12px; line-height: 1.7; }
.deliver {
  margin-top: 12px; font-size: 13px; color: var(--brand-ink); background: var(--brand-soft);
  border-radius: 9px; padding: 9px 12px; display: flex; align-items: center; gap: 7px;
}

/* 服务标签墙 */
.svc-wall { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-chip {
  font-size: 13px; color: var(--brand-ink); background: var(--brand-soft);
  border: 1px solid #D8E6F7; border-radius: 999px; padding: 5px 12px; display: inline-block;
  margin: 0 4px 4px 0;
}

/* 业务员 */
.agent-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.agent {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px;
}
.agent b { font-size: 14px; font-weight: 600; }
.agent span { display: block; font-size: 12px; color: var(--ink3); }
.map-mini {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px;
  font-size: 13px; color: var(--ink2); border: 1px solid var(--line2); border-radius: 11px; padding: 10px;
}
.map-mini:hover { border-color: var(--brand); color: var(--brand); }

/* 购买框 */
.buybox { position: sticky; top: 78px; }
.buybox .off-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.off-tag { font-size: 12px; font-weight: 600; color: #fff; background: var(--bad); border-radius: 6px; padding: 2px 7px; }
.buybox .big-price { font-size: 32px; font-weight: 800; color: var(--price, var(--brand-ink)); letter-spacing: -.6px; }
.buybox .big-price small { font-size: 13px; color: var(--ink3); font-weight: 400; }
.buybox .refund { font-size: 13px; color: var(--ok); background: var(--ok-soft); border-radius: 9px; padding: 9px 11px; margin: 12px 0 14px; }
.buybox .stack { display: flex; flex-direction: column; gap: 9px; }
@media (max-width: 860px) { .buybox { position: static; } }

.contact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.contact-row a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px; border: 1px solid var(--line2); border-radius: 11px; font-size: 12px; color: var(--ink2); background: #fff; }
.contact-row a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 弹窗 ----------
 * 结构固定为 head / body / foot 三段：
 *   head + foot 不滚（永远看得见关闭和保存），只有 body 滚。
 * 以前整个 .modal 一起滚 —— 表单长一点，标题和右上角 × 就滚出屏幕，
 * 用户想退出只能一点点滚回顶部（TG 里还会被客户端顶部条压住）。
 */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  padding-top: calc(16px + var(--tg-safe-top, 0px));
  overflow-y: auto; overscroll-behavior: contain;
}
/* 弹窗：iOS/微信里 92vh 会超出可视区（地址栏吃掉一块），补一档 dvh；
 * 再用 --vvh（visualViewport 实测高度，见 ui.js）兜住所有浏览器，
 * 保证底部操作条永远落在真正看得见、点得到的范围里。 */
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 520px;
  max-height: 92vh; max-height: 92dvh;
  max-height: min(92dvh, calc(var(--vvh, 100dvh) - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  overscroll-behavior: contain;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex: 0 0 auto; position: relative; z-index: 2;
  padding: 14px 14px 12px 20px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0; font-size: 17px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-body {
  padding: 16px 20px 20px; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
/* 底部操作条：保存 / 取消永远贴在屏幕下沿，长表单也不用滚到底 */
.modal-foot {
  flex: 0 0 auto; display: flex; gap: 10px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(16, 24, 40, .06);
}
.modal-foot .btn { flex: 1 1 0; min-width: 0; min-height: 46px; margin: 0; }
.modal-foot .btn-ghost { margin-top: 0; }
.modal-foot .btn-grow { flex: 2 1 0; }
.x {
  border: 0; background: #F2F4F7; color: var(--ink2); border-radius: 10px;
  font-size: 22px; line-height: 1; padding: 0; width: 34px; height: 34px;
  min-width: 34px; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.x:hover { color: var(--ink); background: #E8ECF1; }

/* ---------- 过户资料 ---------- */
.tr-prog { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.tr-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: #EEF1F5; overflow: hidden; }
.tr-prog-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .2s; }
.tr-prog span { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.tr-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--card); }
.tr-h { display: flex; align-items: center; gap: 8px; }
.tr-h b { font-size: 14px; font-weight: 600; }
.tr-h em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.tr-h em.req { background: var(--bad-soft); color: var(--bad); }
.tr-h em.opt { background: #F2F4F7; color: var(--ink3); }
.tr-hint { font-size: 12.5px; color: var(--ink3); margin: 5px 0 9px; line-height: 1.6; }
.tr-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-th { position: relative; width: 84px; height: 64px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #F2F4F7; }
.tr-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tr-th button {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px; border: 0;
  background: rgba(16, 24, 40, .66); color: #fff; border-radius: 0 0 0 8px;
  font-size: 15px; line-height: 1; padding: 0;
}
.tr-add {
  width: 84px; height: 64px; border: 1px dashed var(--line2); border-radius: 9px;
  background: var(--card); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: var(--ink2); font-size: 11.5px; padding: 0;
}
.tr-add i { font-style: normal; font-size: 19px; line-height: 1; }
.tr-add-wide { width: 100%; height: 88px; flex-direction: row; gap: 8px; font-size: 13.5px; }
.tr-vwrap { background: #0E1116; border-radius: 10px; overflow: hidden; }
.tr-vid { display: block; width: 100%; max-height: 44vh; background: #000; }
.tr-vbtns { display: flex; gap: 8px; margin-top: 8px; }
.tr-vbtns .btn { flex: 1; min-height: 42px; }
.tr-del { color: var(--bad); border-color: var(--bad-soft); }
.tr-busy {
  position: sticky; bottom: 0; margin-top: 8px; padding: 9px 12px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; text-align: center;
}
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amounts button { padding: 12px 4px; border: 1px solid var(--line2); background: #fff; border-radius: 11px; font-weight: 600; font-size: 15px; }
.amounts button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.qr-box { text-align: center; margin: 16px 0; }
.qr-box img { width: 216px; height: 216px; object-fit: contain; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; }
.qr-ph { width: 216px; height: 216px; margin: 0 auto; border: 1px dashed var(--line2); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink3); font-size: 13px; text-align: center; padding: 20px; }
.qr-amount { font-size: 26px; font-weight: 600; color: var(--brand-ink); margin-top: 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 5px; }
.rules { font-size: 13px; color: var(--ink2); background: #F7F9FB; border-radius: 10px; padding: 12px; line-height: 1.6; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; margin: 6px auto 14px; font-size: 26px; }
.center { text-align: center; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); background: #fff; padding: 34px 0 26px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; }
.foot-grid h4 { font-size: 13px; color: var(--ink3); font-weight: 500; margin: 0 0 9px; }
.foot-grid p, .foot-grid a { font-size: 14px; color: var(--ink2); margin: 0 0 6px; display: block; }
.foot-grid a:hover { color: var(--brand); }
.copyright { font-size: 12.5px; color: var(--ink3); margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.6; }

/* ---------- 关于 / 联系页面 ---------- */
.page { padding: 8px 0 40px; }
.page-hero {
  padding: 26px 20px 22px; margin: 12px 0 6px; border-radius: 18px;
  background: var(--hero, transparent); border: 1px solid var(--line);
}
.page-hero h1 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -.2px; }
.page-hero p { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.6; }
.hero-stats { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.hero-stats .stat { background: var(--brand-soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; min-width: 92px; }
.hero-stats .stat b { display: block; font-size: 24px; color: var(--price, var(--brand)); font-weight: 800; }
.hero-stats .stat span { font-size: 12px; color: var(--ink3); }
.section { padding: 22px 0; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.section .lead { margin: 0 0 12px; font-size: 15px; line-height: 1.8; color: var(--ink); }
.section .muted { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--ink2); display: flex; gap: 8px; align-items: flex-start; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: .18s; }
.feat:hover { box-shadow: var(--shadow); border-color: var(--line2); }
.feat-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feat h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.feat p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink2); }
.cta-row { border-top: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); text-decoration: none; transition: .18s; }
.contact-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.contact-card b { font-size: 15px; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.contact-card span { font-size: 13px; color: var(--ink2); word-break: break-word; }
.inq-form { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.home-links { display: flex; gap: 12px; flex-wrap: wrap; }
.pill-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink2); text-decoration: none; font-size: 14px; transition: .15s; }
.pill-link:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 后台 ---------- */
.tabs { display: flex; gap: 4px; background: #F2F4F7; padding: 4px; border-radius: 11px; margin: 18px 0; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 15px; border-radius: 8px; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.tabs button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.kpi .n { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.kpi .l { font-size: 13px; color: var(--ink3); }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--ink3); font-weight: 500; padding: 11px 14px; background: #F8FAFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .rowimg { width: 62px; height: 44px; border-radius: 8px; object-fit: cover; background: #EDF0F4; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #F2F4F7; color: var(--ink2); white-space: nowrap; }
.pill.available { background: var(--ok-soft); color: var(--ok); }
.pill.reserved { background: var(--warn-soft); color: var(--warn); }
.pill.sold { background: #F2F4F7; color: var(--ink3); }
.pill.pending_confirm { background: var(--warn-soft); color: var(--warn); }
.pill.confirmed { background: var(--brand-soft); color: var(--brand-ink); }
.pill.completed { background: var(--ok-soft); color: var(--ok); }
.pill.refunded, .pill.cancelled { background: var(--bad-soft); color: var(--bad); }
.pill.new { background: var(--brand-soft); color: var(--brand-ink); }
.pill.contacted { background: var(--ok-soft); color: var(--ok); }

/* 后台表单 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-sec { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.form-sec > h4 {
  font-size: 13px; font-weight: 600; color: var(--brand-ink); margin: 0 0 12px;
  background: var(--brand-soft); display: inline-block; padding: 4px 11px; border-radius: 7px;
}
.imgs-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.imgs-preview .it { position: relative; }
.imgs-preview img { width: 88px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.imgs-preview .rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--bad); color: #fff; border: 0; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 9px; margin-top: 10px; }
.slot { border: 1px dashed var(--line2); border-radius: 10px; padding: 8px; text-align: center; background: #FAFBFC; }
.slot .nm { font-size: 11.5px; color: var(--ink3); margin-bottom: 6px; }
.slot .box { aspect-ratio: 4 / 3; background: #EDF0F4; border-radius: 7px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink3); font-size: 11px; position: relative; }
.slot .box img { width: 100%; height: 100%; object-fit: cover; }
.slot.filled { border-style: solid; border-color: var(--ok); background: #fff; }
.hint { font-size: 12.5px; color: var(--ink2); margin-top: 6px; line-height: 1.55; }
.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.section h3 { font-size: 15px; font-weight: 600; margin: 0 0 15px; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.login-box { max-width: 380px; margin: 70px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.login-box h2 { margin: 0 0 5px; font-size: 19px; }
.login-box p { margin: 0 0 20px; color: var(--ink3); font-size: 13.5px; }
textarea { resize: vertical; min-height: 76px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
/* 提示条：只做提示，不能挡住下面的按钮（弹窗底部保存键就在它正上方） */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: #16191F; color: #fff;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 90;
  pointer-events: none; max-width: calc(100vw - 32px); text-align: center;
}
.toast.above-foot { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* 页面级（不是弹窗）的长表单：保存键吸附在屏幕下沿，不用滚到底 */
.page-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 6px 0 0 !important; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.page-foot .btn { flex: 1 1 140px; min-height: 46px; margin: 0; }
.banner { background: var(--warn-soft); color: var(--warn); border-radius: 11px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }

/* Telegram 文案预览 */
.tg-preview {
  background: #F7F9FB; border: 1px solid var(--line); border-radius: 11px;
  padding: 14px; font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; color: var(--ink);
  max-height: 320px; overflow-y: auto;
}

/* 扫铭牌自动填表 */
.nm-scan {
  margin: 10px 0 4px; padding: 12px; border: 1px dashed var(--brand, #2F6BFF);
  border-radius: 12px; background: rgba(47, 107, 255, 0.05);
}
.nm-scan .nm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nm-preview {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; max-width: 260px;
}
.nm-preview img { display: block; width: 100%; height: auto; }
.nm-preview .nm-cap { font-size: 11px; color: var(--ink3); padding: 5px 8px; }
#nmStatus { margin-top: 8px; font-size: 12.5px; color: var(--ink3); line-height: 1.6; }
#nmStatus.ok { color: #1B8A4B; }
#nmStatus.err { color: #C0392B; }
.nm-mock-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; padding: 1px 6px;
  border-radius: 6px; background: #FFE9B8; color: #8A5B00; vertical-align: middle; }

/* ==================================================================
 * 车牌遮盖编辑器（全屏，手机单手可用）
 * 深色背景是有意的：看照片细节时不受页面白底干扰，也避免在强光下
 * 因为屏幕整体过亮而看不清边框。
 * ================================================================== */
body.pe-lock { overflow: hidden; }

/* 全屏工作台：必须严格等于可视高度，且底部控制条自己可滚。
   iOS / 微信 WebView 里 fixed + inset:0 常常拿不到正确视口高度，
   所以显式给 100dvh（带 100vh 与 -webkit-fill-available 两级兜底），
   并且把控制条设成「内容再高也不撑破屏幕」。 */
.pe {
  position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 200; background: #0E1116;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  height: var(--vvh, 100dvh);
  max-height: var(--vvh, 100dvh);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.pe-top {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
}
.pe-title {
  flex: 1; text-align: center; color: #F2F5F9; font-size: 15px; font-weight: 600;
  letter-spacing: .2px;
}
/* 「取消」以前是透明底，在 #0E1116 上几乎看不见；改成和工具条同一套浅色卡片，
   跟右边的蓝色「完成」形成主次，但不会比背景还暗。 */
.pe-btn-ghost, .pe-btn-done {
  min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px;
  flex: 0 0 auto;
}
.pe-btn-ghost {
  background: #232A36; border: 1px solid #3B4757; color: #E6EDF6;
}
.pe-btn-ghost:active { background: #2C3644; }
.pe-btn-done {
  background: #2E7DF7; border: 1px solid #2E7DF7; color: #fff; font-weight: 600;
}
.pe-stage {
  position: relative; flex: 1 1 auto; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 12px; overflow: hidden; touch-action: none;
}
.pe-canvas {
  display: block; border-radius: 8px; background: #1A1F27;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  touch-action: none; max-width: 100%; max-height: 100%;
  cursor: crosshair;
}
.pe-toast {
  position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px);
  background: rgba(22, 27, 35, .94); color: #fff; padding: 8px 14px; border-radius: 20px;
  font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
  max-width: 88%; text-align: center; line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, .1);
}
.pe-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pe-bar {
  flex: 0 0 auto; max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #171C24; border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.pe-tools { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pe-tools::-webkit-scrollbar { display: none; }
.pe-tool {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 11px;
  background: #232A36; color: #D7DFEA; border: 1px solid #333D4C;
  font-size: 14px; white-space: nowrap;
}
.pe-tool.on { background: #2E7DF7; border-color: #2E7DF7; color: #fff; font-weight: 600; }
/* 撤销：加经典回转箭头图标 + 提亮描边，跟其它工具明显拉开 */
.pe-tool svg {
  width: 16px; height: 16px; margin-right: 6px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.pe-tool.pe-undo { background: #2B3546; border-color: #4E5F78; color: #EAF1FA; }
.pe-tool.pe-undo:active { background: #354357; }

/* 小屏（iPhone SE / 安卓 360×640 一类）：把说明文字收起来，工具条压紧，
   保证「完成」和控制条永远在可视区内 */
@media (max-height: 720px) {
  .pe-hint { display: none; }
  .pe-tools { gap: 6px; }
  .pe-tool { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .pe-bar { padding-top: 8px; }
  .pe-opts { margin-top: 6px; }
  .pe-select, .pe-range { min-height: 30px; height: 30px; }
  .pe-colors { gap: 6px; }
  .pe-color { width: 28px; height: 28px; }
}
@media (max-height: 560px) {
  .pe-bar { max-height: 52vh; }
  .pe-title { font-size: 14px; }
}
.pe-opts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
/* 滑杆前面的文字标签：固定宽度，拖动时数字不会把滑杆挤得来回跳 */
.pe-lbl { flex: 0 0 62px; font-size: 12.5px; color: #C3CDDB; }
/* 效果下拉收窄 + 压低到原来一半高：滑杆自然往左靠，单手也能拖 */
.pe-select {
  flex: 0 0 auto; width: 92px; min-height: 30px; height: 30px;
  padding: 0 24px 0 10px; border-radius: 8px;
  background: #232A36; color: #D7DFEA; border: 1px solid #333D4C; font-size: 12.5px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9AA6B6 50%), linear-gradient(135deg, #9AA6B6 50%, transparent 50%);
  background-position: calc(100% - 14px) 12.5px, calc(100% - 10px) 12.5px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.pe-range { flex: 1; height: 30px; accent-color: #2E7DF7; background: transparent; }

/* 纯色色块 */
.pe-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pe-color {
  width: 30px; height: 30px; border-radius: 8px; padding: 0; position: relative;
  border: 1px solid rgba(255, 255, 255, .38); flex: 0 0 auto;
}
.pe-color.on {
  box-shadow: 0 0 0 2px #2E7DF7, inset 0 0 0 2px #fff;
  border-color: #2E7DF7;
}
/* 「更多颜色」：彩虹底 + 透明原生取色器盖在上面 */
.pe-cpick {
  background: conic-gradient(#FF5F6D, #FFC371, #7BE495, #4FC3F7, #7C6BFF, #FF5F6D);
  overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
}
.pe-cpick input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; cursor: pointer;
}
.pe-hint { margin-top: 8px; font-size: 12.5px; line-height: 1.55; color: #93A0B2; }

/* 图片槽位上的「遮牌」按钮 */
.slot { position: relative; }
.slot .slot-tools { display: flex; gap: 5px; margin-top: 6px; }
.slot .mk {
  flex: 1; min-width: 0; min-height: 30px; border-radius: 7px; font-size: 11.5px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink2);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 3px; white-space: nowrap;   /* 两个按钮并排时不许折行（「遮牌」曾折成两行） */
}
.slot .mk.on { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
/* 「背景」按钮：跟遮牌区分开，处理过之后是实心品牌色，一眼能看出哪张还没做 */
.slot .mk.bg { border-color: #C7D9F5; color: var(--brand); }
.slot .mk.bg.on { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.slot .mk svg { width: 13px; height: 13px; }
.slot .mk:hover { border-color: var(--brand); color: var(--brand); }
.batch-mask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* 分享面板 */
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.share-item {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px;
  border: 1px solid var(--line2); border-radius: 12px; background: #fff;
  color: var(--ink); font-size: 14px; font-weight: 500; text-align: left;
}
.share-item .ic, .share-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.share-item.tg { border-color: #9CC7EC; background: #F1F8FE; color: #0B5C9E; }
.share-item.wx { border-color: #A8DCA9; background: #F1FAF2; color: #14713A; }
.share-item:active { transform: translateY(1px); }
.share-preview {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #F7F9FB;
  border: 1px solid var(--line); font-size: 13px; line-height: 1.7; white-space: pre-wrap;
  color: var(--ink2); max-height: 150px; overflow-y: auto;
}
#cdpToast { opacity: 0; transition: opacity .2s; pointer-events: none; }
#cdpToast.on { opacity: 1; }

/* 卡片一键分享按钮（嵌在 <a> 卡片里） */
.qshare {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border-radius: 9px; padding: 6px 10px;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.qshare svg { width: 14px; height: 14px; }
.qshare:active { transform: translateY(1px); }
.row-price .qshare { margin-top: 6px; }

/* 分享图弹窗 */
.sc-box {
  background: #F2F4F7; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; text-align: center; font-size: 14px; color: var(--ink2);
  max-height: 52vh; overflow-y: auto;
}
.sc-actions { display: flex; gap: 10px; margin-top: 12px; }
.sc-actions .btn { flex: 1; }

/* 快捷筛选栏：桌面横排两行，手机保持单列 */
@media (min-width: 760px) {
  .quickbar {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.8fr 0.8fr 0.8fr 0.8fr auto;
    gap: 8px;
  }
  .quickbar .qmore { grid-column: auto; }
}

/* 登录身份选择 + 角色徽章 */
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-btn {
  min-height: 52px; border: 1px solid var(--line2); border-radius: 12px;
  background: #fff; font-size: 14px; font-weight: 500; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.role-btn em { font-style: normal; font-size: 20px; }
.role-btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.role-badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

/* ==================================================================
 * 2026-10 第二批：分享面板 v2 / 后台账号与状态流
 * ================================================================== */

/* 分享面板：图片长图 + 链接两个页签 */
.modal.modal-wide { max-width: 640px; }
.share-tabs { display: flex; gap: 6px; background: #F2F4F7; padding: 4px; border-radius: 11px; margin-bottom: 14px; }
.share-tabs button {
  flex: 1; min-height: 42px; border: 0; background: none; border-radius: 8px;
  font-size: 14px; color: var(--ink2); font-weight: 500;
}
.share-tabs button.on { background: #fff; color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.share-tip { margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: var(--ink2); }
.sc-box { padding: 8px; max-height: 48vh; }
.sc-box img { border-radius: 8px; }
.sc-loading { padding: 46px 12px; color: var(--ink3); font-size: 13.5px; line-height: 1.6; }
.share-longpress {
  margin: 10px 0 0; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--brand-ink); background: var(--brand-soft); border-radius: 9px;
  padding: 9px 10px; line-height: 1.55;
}
.sc-actions .btn { min-height: 46px; }
.btn-ghost { background: #fff; border: 1px solid var(--line2); color: var(--ink2); margin-top: 9px; min-height: 44px; }
.share-linkbox { background: #F7F9FB; border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 12px; }
.share-linkbox span { display: block; font-size: 12px; color: var(--ink3); margin-bottom: 5px; }
.share-linkbox code { display: block; font-size: 12.5px; color: var(--ink); word-break: break-all; line-height: 1.6; }

/* 状态选择 */
.st-opts { display: flex; flex-direction: column; gap: 9px; }
.st-opt {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line2); background: #fff; border-radius: 12px; padding: 13px 15px;
}
.st-opt b { font-size: 15px; color: var(--ink); }
.st-opt span { font-size: 12.5px; color: var(--ink3); }
.st-opt em {
  position: absolute; right: 13px; top: 13px; font-style: normal; font-size: 11.5px;
  background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 2px 8px;
}
.st-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.st-opt:disabled { opacity: .45; }
.st-sub { font-size: 12.5px; color: var(--ink3); line-height: 1.5; margin-top: 3px; }

/* 顶部：通知铃 + 当前登录人 */
.bell {
  position: relative; min-height: 36px; padding: 0 10px; font-size: 16px;
  border: 1px solid var(--line2); background: #fff; border-radius: 10px;
}
.bell.on { border-color: var(--brand); background: var(--brand-soft); }
.bell i {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bad); color: #fff; font-size: 10.5px; font-style: normal; border-radius: 999px;
}
.who { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.who b { font-weight: 600; }
.who .role-badge { font-size: 11.5px; padding: 3px 9px; }

/* 线索筛选 / 统计两栏 */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filterbar select {
  min-height: 38px; border: 1px solid var(--line2); border-radius: 9px;
  padding: 0 10px; background: #fff; font-size: 13.5px; color: var(--ink);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col .section { margin-bottom: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.lead-msg { max-width: 250px; line-height: 1.55; }

/* 通知列表 */
.notif-list { display: flex; flex-direction: column; gap: 9px; max-height: 58vh; overflow-y: auto; }
.notif { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff; }
.notif.unread { border-color: var(--brand); background: var(--brand-soft); }
.notif-t { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.notif-m { font-size: 11.5px; color: var(--ink3); margin: 5px 0 8px; }

/* 后台表格在手机上横向滚动，别把操作列挤掉 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 手机上弹窗尽量占满，按钮好点 */
@media (max-width: 520px) {
  .mask {
    align-items: flex-start; padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    padding-top: calc(10px + var(--tg-safe-top, 0px) + env(safe-area-inset-top));
  }
  .modal {
    max-height: 94vh;
    max-height: calc(var(--vvh, 100dvh) - 20px - var(--tg-safe-top, 0px));
    border-radius: 14px;
    overflow: hidden;
  }
  .modal.modal-full { height: calc(var(--vvh, 100dvh) - 20px - var(--tg-safe-top, 0px)); }
  .modal-head { padding: 10px 10px 10px 16px; }
  .modal-head h3 { font-size: 16px; }
  .modal-body { padding: 12px 16px 16px; }
  .modal-foot { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .sc-box { max-height: 42vh; }
  .who { display: none; }
}

#cdpAdminToast { transition: opacity .2s; }

/* 分享引导（系统分享不可用时的两步落地） */
.sc-guide {
  margin-top: 12px; padding: 12px 12px 10px; border-radius: 12px;
  background: var(--brand-soft); border: 1px solid var(--line);
}
.sc-guide-h { font-size: 13.5px; font-weight: 700; color: var(--brand-ink); margin-bottom: 10px; line-height: 1.5; }
.sc-guide-steps { display: flex; flex-direction: column; gap: 8px; }
.sc-guide-steps .btn { min-height: 44px; }
.sc-guide-tip { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink2); }
@media (min-width: 560px) {
  .sc-guide-steps { flex-direction: row; }
  .sc-guide-steps .btn { flex: 1; }
}
.sc-guide-tip.sc-guide-android {
  margin-top: 8px; padding: 7px 9px; border-radius: 8px;
  background: rgba(0, 0, 0, .045); color: var(--ink); font-weight: 600;
}

/* 系统分享返回后的确认条（不替用户宣称已发出） */
.sc-done {
  margin-top: 12px; padding: 11px 12px; border-radius: 12px;
  background: #FFF7E6; border: 1px solid #FFE0A3;
}
.sc-done-q { font-size: 13.5px; font-weight: 700; color: #7A4B00; line-height: 1.5; }
.sc-done-btns { display: flex; gap: 8px; margin-top: 9px; }
.sc-done-btns .btn { flex: 1; min-height: 42px; }

/* ── 安卓浏览器兼容：长按保存是最后的保底手段，任何样式都不能干扰它 ── */
.sc-box img, .sc-zoom-body img {
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
  -webkit-user-drag: none;
}
.sc-box { -webkit-overflow-scrolling: touch; }

/* 全屏看图（页内，不用 window.open —— 微信/UC/小米都会拦新窗口） */
.sc-zoom {
  position: fixed; inset: 0; z-index: 9999;
  background: #0b0e12; display: flex; flex-direction: column;
}
.sc-zoom-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: #161b22; color: #fff; font-size: 12.5px; line-height: 1.45;
}
.sc-zoom-bar span { flex: 1 1 auto; }
.sc-zoom-x {
  flex: 0 0 auto; min-height: 34px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .34); background: transparent;
  color: #fff; font-size: 13px; font-weight: 600;
}
.sc-zoom-body {
  flex: 1 1 auto; overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; background: #0b0e12;
}
.sc-zoom-body img { display: block; width: 100%; height: auto; max-width: none; }

/* 引导里只剩一个按钮时铺满整行 */
.sc-guide-steps.one .btn { width: 100%; }
.sc-retry { margin-top: 8px; font-size: 12.5px; min-height: 38px; }

/* ==================================================================
 * 分享面板：长图 / 九宫格 + 渠道选择（2026-11-08）
 * ------------------------------------------------------------------
 * 移动端硬性要求：360 宽下 3 列九宫格不溢出，渠道表 3 列不换行太挤，
 * 一行 3 个、图标在上文字在下，手指一点就是一整块。
 * ================================================================== */
.share-seg {
  display: flex; gap: 6px; background: #F2F4F7; padding: 4px;
  border-radius: 11px; margin-bottom: 12px;
}
.share-seg button {
  flex: 1 1 0; min-height: 36px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink2); font-size: 13px; font-family: inherit;
}
.share-seg button.on {
  background: #fff; color: var(--brand-ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.sc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 6px; background: #F7F9FB; border-radius: 10px;
  max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sc-grid .tile {
  position: relative; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden;
  background: #E7EBF1; cursor: zoom-in;
}
.sc-grid .tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-grid .tile.mid { box-shadow: inset 0 0 0 2px var(--brand); }
.sc-grid .tile-tag {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 9px; line-height: 1;
  padding: 2px 5px; border-radius: 4px; white-space: nowrap;
}

/* 九宫格逐张放大：底部两个翻页按钮 */
.sc-zoom-nav {
  flex: 0 0 auto; display: flex; gap: 10px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #161b22;
}
.sc-zoom-nav button {
  flex: 1 1 0; min-height: 42px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .28); background: transparent;
  color: #fff; font-size: 13.5px; font-weight: 600;
}
.sc-zoom-nav button:disabled { opacity: .35; }

/* 渠道选择：底部抽屉，盖在弹窗之上 */
.sh-sheet {
  position: fixed; left: 0; right: 0; z-index: 10050;
  top: 0; bottom: var(--wx-inset-bottom, 0px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.sh-mask { position: absolute; inset: 0; background: rgba(8, 12, 20, .52); }
.sh-body {
  position: relative; background: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 82vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 0 -8px 30px rgba(8, 12, 20, .22);
}
.sh-h { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.sh-tip { font-size: 12.5px; line-height: 1.6; color: var(--ink2); margin: 0 0 14px; }
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sh-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-height: 82px; padding: 8px 4px;
  border: 1px solid var(--line2); border-radius: 12px; background: #fff;
  color: var(--ink); font-size: 12.5px; font-family: inherit; line-height: 1.25;
  text-align: center;
}
.sh-item:active { background: var(--brand-soft); border-color: var(--brand); }
.sh-item svg, .sh-item .ic { width: 22px; height: 22px; flex: 0 0 auto; }

/* 安卓地址栏缩放：用 dvh 让弹窗高度跟着可视区走，避免底部按钮被顶出屏幕 */
@supports (height: 100dvh) {
  @media (max-width: 520px) {
    .sc-box { max-height: 46dvh; }
  }
}

/* 展开引导后收起顶部那一排按钮：屏幕上只留一条明确的路，不要两个「保存」打架 */
#sharePane.has-guide .sc-actions,
#sharePane.has-guide #scOpen { display: none; }

/* ── 照片格子：空槽显示「＋」，点哪格加哪格 ── */
.slot .box.add {
  cursor: pointer; flex-direction: column; gap: 3px;
  border: 1px dashed var(--line2); background: #F7F9FB;
  transition: background .15s, border-color .15s;
}
.slot .box.add:hover { background: var(--brand-soft); border-color: var(--brand); }
.slot .box.add .plus {
  font-size: 22px; line-height: 1; font-weight: 300; color: var(--brand); display: block;
}
.slot .box.add em { font-style: normal; font-size: 11px; color: var(--brand-ink); }
.slot.filled .box { cursor: pointer; }
/* 已上传的照片：右下角一个「放大」角标，明确告诉车商「点一下能看大图」——
   以前点图是直接开相册换图，没人知道能放大检查遮牌。 */
.slot .box.view { cursor: zoom-in; }
.slot .box.view::after {
  content: '⤢'; position: absolute; right: 4px; bottom: 4px;
  background: rgba(8, 12, 20, .52); color: #fff; border-radius: 5px;
  font-size: 10px; line-height: 1; padding: 3px 4px; pointer-events: none;
}
.slot .main-tag {
  display: inline-block; margin-left: 3px; padding: 0 5px; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 9.5px; font-weight: 600; vertical-align: 1px;
}
.slot.just-added { animation: slotPop .45s ease; }
@keyframes slotPop {
  0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(10, 35, 125, .35); }
  100% { transform: scale(1); box-shadow: 0 0 0 9px rgba(10, 35, 125, 0); }
}
.slot-batch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.slot-batch .btn { cursor: pointer; margin: 0; }

/* ── 合集链接一行放：输入框 + 按钮 ── */
.album-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.album-row input { flex: 1 1 240px; min-width: 0; }
.album-row .btn { flex: 0 0 auto; }
.album-row input.filled { border-color: var(--ok); background: var(--ok-soft); }

/* ── 后台顶栏：返回 + 查看主页 ── */
.back-btn {
  flex: 0 0 auto; height: 34px; padding: 0 12px; margin-right: 4px;
  border: 1px solid var(--line2); border-radius: 999px; background: #fff;
  color: var(--ink); font-size: 13px; font-weight: 600;
}
.back-btn:hover { border-color: var(--brand); color: var(--brand); }
.home-btn {
  flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap;
}
.home-btn:hover { background: var(--brand-ink); }
@media (max-width: 640px) {
  .site-head .wrap { gap: 6px; }
  .home-btn { padding: 0 10px; font-size: 12px; }
  .back-btn { padding: 0 9px; font-size: 12px; }
}

/* ── 后台顶栏：原来 .admin-head 没有布局，返回/品牌/右侧控件各占一行 ── */
.admin-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-head .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.admin-head .brand { white-space: nowrap; }
.admin-head .who { white-space: nowrap; }
@media (max-width: 760px) {
  .admin-head .wrap {
    height: auto; min-height: 56px; flex-wrap: wrap;
    padding-top: 8px; padding-bottom: 8px; gap: 8px;
  }
  .admin-head .head-right { margin-left: 0; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .admin-head .brand { flex: 1 1 auto; }
}

/* ==================================================================
 * 2026-10 增补：筛选下拉 / 已选条件 / 同步状态 / 抢单冲突 / 价签对比
 * ================================================================== */

/* —— 快捷筛选条 —— */
.quickbar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px; margin-bottom: 2px;
  background: var(--brand-soft); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
@media (min-width: 760px) {
  .quickbar { grid-template-columns: 1.2fr 1.2fr .8fr .8fr .8fr .8fr auto; }
}
@media (max-width: 759px) {
  /* 手机上下面那行已有「筛选」，这里再来一条通栏实心大按钮，比车源卡片还抢眼 */
  .quickbar .qmore { display: none; }
}
.qsel {
  width: 100%; height: 44px; padding: 0 12px; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid rgba(16, 24, 40, .12); border-radius: 12px;
  -webkit-appearance: none; appearance: none; min-width: 0;
}
.qsel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
/* 「筛选」是这一排里唯一该被点的东西，给实心渐变，别做成第 7 个输入框 */
.qmore {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--grad, var(--brand)); color: var(--grad-ink, #fff);
  font-size: 14px; font-weight: 600; box-shadow: var(--glow, none); white-space: nowrap;
}
.qmore.on { background: linear-gradient(135deg, var(--cta, #F2620F), var(--cta2, #FF9147)); color: var(--cta-ink, #fff); }
.qcombo { position: relative; display: flex; align-items: center; min-width: 0; }
.qcombo .qsel { padding-right: 62px; }
.qcombo .qarrow {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 34px;
  border: 0; border-left: 1px solid var(--line); border-radius: 0 9px 9px 0;
  background: #FBFCFE; color: var(--ink2); font-size: 12px; line-height: 1;
}
.qcombo .qarrow:active { background: var(--brand-soft); }
.qcombo .qclear {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: #EDF0F5; color: var(--ink2); font-size: 14px; line-height: 1;
}
.qpop {
  position: fixed; z-index: 400; max-height: 46vh; overflow-y: auto;
  padding: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(16, 24, 40, .18);
  -webkit-overflow-scrolling: touch;
}
.qpop-i {
  display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font-size: 14.5px; text-align: left;
}
.qpop-i.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.qpop-i:active { background: var(--brand-soft); }
.qpop-empty { padding: 14px 12px; margin: 0; color: var(--ink3); font-size: 13px; }

/* —— 已选条件：整颗可点，点一下即删除 —— */
.achips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 12px; }
.achips-l { font-size: 12.5px; color: var(--ink3); margin-right: 2px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border: 1px solid #C9D8FF; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-ink); font-size: 13px; font-weight: 500; cursor: pointer;
}
.achip i { font-style: normal; font-size: 15px; line-height: 1; opacity: .65; }
.achip:active { transform: scale(.97); }
.achip.clear { background: #fff; color: var(--ink2); border-color: var(--line2); }

/* —— 后台同步状态灯 —— */
.syncb {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: #F1F4F8; color: var(--ink2); border: 1px solid var(--line);
}
.syncb.on { background: #E9F7EF; color: #0B6B3A; border-color: #B9E4CB; }
.syncb.busy { background: #EEF3FF; color: #1B4BB8; border-color: #C9D8FF; }
.syncb.off { background: #FDF1E7; color: #A3500B; border-color: #F3D4B4; }
@media (max-width: 560px) {
  .syncb { font-size: 0; padding: 0 7px; height: 24px; }
  .syncb::before { content: '●'; font-size: 15px; }
}

/* —— 冲突提示 —— */
.conflict-lead { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: var(--ink); }
.conflict-car {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 10px; background: #F7F9FB; border: 1px solid var(--line);
  margin-bottom: 10px; font-size: 14px;
}

/* —— 价签：原价划线 + 立省红标（超市对比） —— */
s, s.old {
  font-size: 13.5px; font-weight: 600; color: #98A2B3;
  text-decoration: line-through;
  text-decoration-color: #D33A3A;
  text-decoration-thickness: 2px;
}
.buybox .off-line { gap: 10px; margin-bottom: 6px; }
.buybox .off-line s { font-size: 19px; font-weight: 700; text-decoration-thickness: 2.5px; }
.off-tag {
  background: #D33A3A; color: #fff; font-weight: 700; font-size: 12.5px;
  border-radius: 7px; padding: 3px 9px;
}

/* ==================================================================
 * 2026-10-23 增补：车源列表排序 / 车款跳详情 / 草稿浮窗 / 边缘返回
 * ================================================================== */

/* —— 表头可排序 —— */
.tbl-cars th.sortable {
  cursor: pointer; user-select: none; -webkit-user-select: none;
  white-space: nowrap; transition: background .15s;
}
.tbl-cars th.sortable:hover { background: #F7F9FC; }
.tbl-cars th.sortable .sarrow {
  display: inline-block; margin-left: 5px; font-size: 11px;
  color: var(--ink3); font-weight: 500;
}
.tbl-cars th.sortable.on { color: var(--brand-ink); }
.tbl-cars th.sortable.on .sarrow {
  color: #fff; background: var(--brand); border-radius: 5px;
  padding: 1px 5px; font-weight: 700;
}

/* —— 点车款直接看客户视角的详情页 —— */
a.car-link {
  font-weight: 600; color: var(--ink); text-decoration: none;
  border-bottom: 1px dashed #C7D3F7;
}
a.car-link:hover, a.car-link:active { color: var(--brand-ink); border-bottom-color: var(--brand); }
a.rowimg-link { display: block; line-height: 0; }
a.rowimg-link img { transition: transform .15s; }
a.rowimg-link:active img { transform: scale(.96); }

/* —— 草稿浮窗（可拖动，自己吸边） —— */
.float-ball {
  position: fixed; z-index: 900; left: auto; top: 0;
  display: none; align-items: center; gap: 6px;
  min-width: 52px; height: 52px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #2C55E0, #0A237D);
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 22px rgba(10, 35, 125, .34);
  touch-action: none; cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.float-ball.on { display: inline-flex; }
.float-ball.drag { cursor: grabbing; transform: scale(1.06); }
.float-ball .fb-ico { font-size: 18px; line-height: 1; }
.float-ball .fb-txt { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .18s; }
.float-ball.wide .fb-txt { max-width: 96px; }
.float-ball.wide { padding-right: 14px; }
.float-ball .fb-dot {
  position: absolute; top: 6px; right: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: #FF5A4E; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

/* —— 草稿恢复提示条 —— */
.draft-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  background: #EEF3FF; border: 1px solid #C9D8FF; color: #1B3A8C;
  font-size: 13.5px; line-height: 1.5;
}
.draft-banner .btn { flex: none; }

/* —— 边缘滑动返回的指示箭头 —— */
.edge-hint {
  position: fixed; left: 0; top: 50%; z-index: 1200;
  width: 44px; height: 44px; margin-top: -22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(16, 24, 40, .55);
  color: #fff; font-size: 26px; line-height: 1;
  opacity: 0; pointer-events: none;
  transition: opacity .12s, transform .12s;
  transform: translateY(-50%) scale(.8);
  backdrop-filter: blur(2px);
}
.edge-hint.on { pointer-events: none; }

@media (max-width: 560px) {
  .tbl-cars th.sortable .sarrow { margin-left: 3px; }
}

/* 草稿提示里的两个按钮并排 */
.draft-banner .draft-btns { display: flex; gap: 8px; flex: none; }

/* ==================================================================
 * 手机端后台布局修复：顶栏压成两行、车源表格不再被挤成竖排
 * ================================================================== */

/* 缩略图外层是链接，必须给固定宽度，否则 img 的 max-width:100% 会把它压成 0 */
a.rowimg-link { display: block; width: 62px; flex: none; }
a.rowimg-link img { max-width: none; width: 62px; height: 44px; }

@media (max-width: 760px) {
  .admin-head .wrap {
    height: auto; min-height: 0; flex-wrap: wrap;
    padding: 8px 10px; gap: 6px 8px;
  }
  .admin-head .brand { font-size: 14px; }
  .admin-head .brand-logo { height: 20px; width: 20px; }
  /* 右列整体换到第二行，但仍在同一行内横排 */
  .admin-head .head-right {
    margin-left: auto; width: auto; flex: none;
    flex-wrap: nowrap; gap: 6px;
  }
  .admin-head .head-right .lang { width: auto; }
  .admin-head .head-right .lang-btn { width: auto; padding: 5px 9px; font-size: 12px; }
  .admin-head .head-right > .btn.btn-sm { width: auto; padding: 6px 10px; font-size: 12px; }
  .admin-head .home-btn { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
  .admin-head .who { display: none; }
  .admin-head .back-btn { padding: 6px 10px; font-size: 12.5px; }

  /* 车源表格：给足最小宽度，横向滑动看，别把「车款」挤成一字一行。
   * 手机上先藏掉成本/毛利两列（要看得用电脑），给操作按钮腾地方。 */
  .tbl-cars { min-width: 700px; }
  .tbl-cars .col-cost, .tbl-cars .col-gross { display: none; }
  .tbl-cars .actions { flex-wrap: nowrap; gap: 6px; }
  .tbl-cars .actions .btn-sm { padding: 6px 8px; font-size: 12px; }
  .tbl-cars th, .tbl-cars td { padding: 9px 10px; }
  .tbl-cars a.car-link, .tbl-cars .st-sub { white-space: nowrap; }
  .tbl-cars td { vertical-align: middle; }
  /* 左右滑动时缩略图列固定在左侧，滑到右边也知道在看哪台车 */
  .tbl-cars th:first-child, .tbl-cars td:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--card);
  }
  .tbl-cars thead th:first-child { background: #F8FAFC; }
  .tbl .rowimg, a.rowimg-link, a.rowimg-link img { width: 52px; height: 40px; }
  a.rowimg-link { width: 52px; }
}

/* ==================================================================
 * 第八轮：看板可点、状态筛选标签、线索跟进、自动翻译提示
 * ================================================================== */

/* 看板数字卡片：可点击的给足反馈，客户/业务员一眼知道「这里能点」 */
.kpi.link { cursor: pointer; transition: .15s; position: relative; }
.kpi.link:hover, .kpi.link:focus-visible { border-color: var(--brand); box-shadow: 0 4px 14px rgba(16, 24, 40, .08); transform: translateY(-1px); outline: none; }
.kpi.link:active { transform: translateY(0); }
.kpi .kpi-go { color: var(--brand); font-weight: 700; }

/* 筛选标签 */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips .chip {
  background: #fff; color: var(--ink2); border: 1px solid var(--line2);
  font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 10px; cursor: pointer;
}
.chips .chip b { color: var(--ink3); font-weight: 600; }
.chips .chip:hover { border-color: var(--ink3); }
.chips .chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.chips .chip.on b { color: var(--brand-ink); }
.chip-x { opacity: .6; margin-left: 2px; }

/* 状态胶囊可点：点开就是三个动作的选择 */
.pill-btn { border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.pill-btn:hover { border-color: currentColor; }

/* 线索跟进历史 */
.follow-hist { background: #F8FAFC; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; max-height: 168px; overflow: auto; }
.follow-hist .fh { font-size: 13px; line-height: 1.6; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.follow-hist .fh:last-child { border-bottom: 0; }
.follow-hist .fh b { display: block; color: var(--ink3); font-weight: 500; font-size: 12px; }
.st-sub.bad { color: var(--bad); }

/* 中→英/柬 自动翻译状态 */
.tr-state { font-size: 12px; font-weight: 500; color: var(--ink3); margin-left: 6px; }
.tr-state.busy { color: var(--warn); }
.tr-state.ok { color: var(--ok); }
.tr-state.bad { color: var(--bad); }

/* 草稿恢复提示条（页面级） */
.draft-restore { margin: 0 0 14px; }

/* ==================================================================
 * 第九轮：营销模块 + 大风车式界面语言
 * 取色：亮蓝渐变（数据卡） + 橙（行动点） + 大圆角白卡 + 线条图标
 * 原则：颜色只出现在"要点的东西"和"要说的事"上，其余保持中性
 * ================================================================== */
:root {
  --b1: #1E5EFF;
  --b2: #4C8DFF;
  --cta: #F2620F;
  --cta2: #FF8A3D;
  --mk-bg: #F4F6FB;
}

/* 顶部页签：从方块改成胶囊，选中态用品牌深蓝实心（比白底更清楚） */
.tabs { background: #EDF1F7; border-radius: 14px; padding: 5px; gap: 3px; }
.tabs button { border-radius: 10px; padding: 9px 16px; font-weight: 500; }
.tabs button.on { background: var(--grad, var(--brand)); color: var(--grad-ink, #fff); box-shadow: var(--glow, 0 4px 12px rgba(10, 35, 125, .22)); }

/* 橙色行动按钮（只给"发海报"这类要加强的动作） */
.btn-cta {
  background: linear-gradient(135deg, var(--cta), var(--cta2));
  border: 0; color: var(--cta-ink, #fff); font-weight: 600;
  box-shadow: var(--glow, 0 3px 10px rgba(242, 98, 15, .25));
}
.btn-cta:hover { filter: brightness(1.05); }

/* 库龄提示 */
.mk-age { margin-top: 3px; font-size: 11.5px; color: var(--accent-ink, var(--cta)); background: var(--accent-soft, #FFF1E7); border-radius: 6px; padding: 1px 6px; display: inline-block; }

/* 前台：活动横幅 */
.promo-bar {
  display: flex; align-items: center; gap: 10px; margin: 14px auto 0; max-width: 1120px;
  padding: 12px 16px; border-radius: 14px; color: var(--cta-ink, #fff);
  background: linear-gradient(120deg, var(--cta, #F2620F), var(--cta2, #FF9147) 55%, var(--accent-ink, #FFB066));
  box-shadow: var(--glow, 0 6px 18px rgba(242, 98, 15, .22));
}
.promo-bar .pb-txt { display: flex; flex-direction: column; line-height: 1.35; }
.promo-bar b { font-size: 16px; font-weight: 700; }
.promo-bar em { font-style: normal; font-size: 12.5px; opacity: .92; }
.promo-bar .pb-go { margin-left: auto; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .22); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

/* 前台：车辆卡「新到」角标 */
.newtag {
  /* 放在状态角标下方：英文/高棉语的状态文字更宽，按固定偏移会互相压住 */
  position: absolute; top: 40px; left: 10px;
  background: var(--grad, linear-gradient(135deg, #1E5EFF, #4C8DFF)); color: var(--grad-ink, #fff);
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 3px 8px; border-radius: 7px; box-shadow: 0 2px 6px rgba(16, 24, 40, .28);
}

/* ---------------- 后台营销页 ---------------- */
.mdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.mk-hero {
  border-radius: 18px; padding: 18px 20px 16px; color: #fff; margin-bottom: 14px;
  background: linear-gradient(135deg, #1E5EFF 0%, #3C7BFF 58%, #6AA0FF 100%);
  box-shadow: 0 10px 24px rgba(30, 94, 255, .25);
}
.mk-hero-top { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; opacity: .95; }
.mk-hero-top em { font-style: normal; background: rgba(255, 255, 255, .2); padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.mk-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 12px; }
.mk-hero-stats div {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px; padding: 10px 6px; text-align: center;
}
.mk-hero-stats b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.mk-hero-stats span { font-size: 12px; opacity: .9; }
.mk-hero-foot { font-size: 12.5px; opacity: .85; }

/* 图标宫格（大风车首页那种） */
.mk-icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px; margin-bottom: 14px; }
.mk-icons.home { margin-bottom: 16px; }
.mk-icons button, .mk-icons a { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding: 2px; color: var(--ink2); font-size: 12px; }
.mk-icons .ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.mk-icons .ic svg { width: 22px; height: 22px; }
.mk-icons .ic.a { background: #EAF0FF; color: #1E5EFF; }
.mk-icons .ic.b { background: #FFF1E7; color: #F2620F; }
.mk-icons .ic.c { background: #E9F7F0; color: #0B7A54; }
.mk-icons .ic.d { background: #F3ECFF; color: #6B3FD4; }
.mk-icons .ic.e { background: #E9F4FF; color: #0B63C5; }
.mk-icons .ic.f { background: #FFF3E0; color: #B36A00; }
.mk-icons .dot {
  position: absolute; top: 0; right: 8px; min-width: 17px; height: 17px; border-radius: 999px;
  background: #F2620F; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 区块 */
.mk-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.mk-sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mk-sec-h h3 { margin: 0; font-size: 15.5px; }
.mk-sub { font-size: 12px; color: var(--ink3); }
.mk-group + .mk-group { margin-top: 14px; }
.mk-group-h { font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.mk-todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: #FAFBFD; border: 1px solid #EEF1F6; margin-bottom: 6px; }
.mk-todo-row:hover { background: #F5F8FF; border-color: #DCE6FA; }

.mk-todo-main { flex: 1; min-width: 0; }
.mk-todo-main b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-todo-main span { font-size: 12px; color: var(--ink3); }
.mk-mini { border: 0; background: linear-gradient(135deg, var(--cta), var(--cta2)); color: var(--cta-ink, #fff); font-weight: 600; font-size: 13px; padding: 7px 16px; border-radius: 999px; }

/* 模板卡 */
.mk-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-tpl {
  border: 0; border-radius: 14px; padding: 18px 14px; text-align: left; color: #fff;
  min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .12);
}
.mk-tpl b { font-size: 15px; font-weight: 700; }
.mk-tpl span { font-size: 12px; opacity: .88; }
.mk-tpl.ta { background: linear-gradient(150deg, #F2620F, #C0392B); }
.mk-tpl.tb { background: linear-gradient(150deg, #1E5EFF, #0B2E7A); }
.mk-tpl.tc { background: linear-gradient(150deg, #B8860B, #6B4A00); }
.mk-tpl.td { background: linear-gradient(150deg, #C0392B, #6E1212); }
.mk-tpl.te { background: linear-gradient(150deg, #6B3FD4, #2B1B46); }
.mk-tpl.tf { background: linear-gradient(150deg, #334155, #0F172A); }

/* 文案 chips */
.mk-copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-chip { border: 1px solid var(--line2); background: #fff; color: var(--ink2); border-radius: 999px; padding: 8px 15px; font-size: 13px; }
.mk-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* 弹窗内表单 */
.mk-form .field { margin-bottom: 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mk-prev { margin-top: 14px; background: var(--mk-bg); border: 1px dashed var(--line2); border-radius: 14px; padding: 14px; text-align: center; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.mk-prev img { max-height: 46vh; width: auto; border-radius: 10px; box-shadow: 0 8px 22px rgba(16, 24, 40, .18); }

/* ---------- 海报弹窗：样式轮播 + 大预览（左右滑动换模板） ---------- */
.mk-poster .ps-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.ps-nav {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2);
  background: #fff; color: var(--ink2); font-size: 20px; line-height: 1; padding: 0 0 3px;
}
.ps-nav:active { background: var(--brand-soft); }
.ps-rail {
  flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 3px 4px;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ps-rail::-webkit-scrollbar { display: none; }
.ps-card {
  scroll-snap-align: center; flex: 0 0 auto; width: 100px; border: 1px solid var(--line2);
  background: #fff; border-radius: 14px; padding: 6px 6px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; overflow: hidden;
}
.ps-card .ps-thumb { display: block; height: 40px; border-radius: 9px; background: #dfe6f2; }
.ps-card b {
  font-size: 12px; font-weight: 700; color: var(--ink1); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-card span {
  font-size: 10px; color: var(--ink3); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ps-card.ta .ps-thumb { background: linear-gradient(150deg, #F2620F, #C0392B); }
.ps-card.tb .ps-thumb { background: linear-gradient(150deg, #1E5EFF, #0B2E7A); }
.ps-card.tc .ps-thumb { background: linear-gradient(150deg, #B8860B, #6B4A00); }
.ps-card.td .ps-thumb { background: linear-gradient(150deg, #C0392B, #6E1212); }
.ps-card.te .ps-thumb { background: linear-gradient(150deg, #6B3FD4, #2B1B46); }
.ps-card.tf .ps-thumb { background: linear-gradient(150deg, #334155, #0F172A); }
.ps-prev {
  margin: 0 0 12px; background: var(--mk-bg); border: 1px solid var(--line2); border-radius: 14px;
  padding: 10px; text-align: center; min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.ps-prev img { max-height: 52vh; max-width: 100%; width: auto; border-radius: 10px; box-shadow: 0 10px 26px rgba(16, 24, 40, .2); }
.mk-poster .two-field { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) {
  .mk-poster .two-field { grid-template-columns: 1fr; }
  .ps-card { width: 88px; }
  .ps-card span { display: none; }
  .ps-prev img { max-height: 42vh; }
}
html[data-theme="dark"] .ps-card,
html[data-theme="dark"] .ps-nav { background: #1a2028; border-color: #2c3644; }
html[data-theme="dark"] .ps-card b { color: #e8ecf2; }
html[data-theme="dark"] .ps-prev { background: #151b22; border-color: #2c3644; }

.mk-out { width: 100%; border: 1px solid var(--line2); border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.6; margin-top: 12px; resize: vertical; }
.mk-cars { max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.mk-car { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; }
.mk-car.on { background: var(--brand-soft); }
.mk-car input { width: auto; }
.mk-car span { flex: 1; }
.mk-car em { font-style: normal; color: var(--ink3); font-size: 12.5px; }

/* 渠道条 & 漏斗 */
.mk-bars { display: flex; flex-direction: column; gap: 9px; }
.mk-bar { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.mk-bar i { display: block; height: 9px; border-radius: 999px; background: #EDF1F7; overflow: hidden; }
.mk-bar em { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1E5EFF, #6AA0FF); }
.mk-bar b { text-align: right; font-size: 13px; }
.mk-funnel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-funnel div { background: var(--mk-bg); border-radius: 12px; padding: 12px; text-align: center; }
.mk-funnel span { display: block; font-size: 12px; color: var(--ink3); }
.mk-funnel b { font-size: 24px; }

@media (max-width: 720px) {
  .mk-icons { grid-template-columns: repeat(4, 1fr); }
  .mk-tpls { grid-template-columns: 1fr 1fr; }
  .mk-bar { grid-template-columns: 76px 1fr 34px; }
  .promo-bar { margin: 10px 12px 0; }
  .newtag { top: 38px; left: 10px; }
}

/* 我要卖车（收车）页 */
.sell-card { max-width: 520px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.sell .field { margin-bottom: 12px; }
/* 卖车表单不短，提交按钮吸附在屏幕下沿，客户不用滚到底找按钮 */
.sell-foot {
  position: sticky; bottom: 0; z-index: 4;
  background: #fff; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
html[data-theme="dark"] .sell-foot { background: var(--card); }
.sell .field label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 5px; }
.sell .field input, .sell .field textarea {
  width: 100%; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px;
  font-size: 15px; background: #fff; color: var(--ink);
}
.sell .field input:focus, .sell .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------------- 我要卖车：照片上传 ---------------- */
.lbl-note { font-weight: 400; color: var(--ink3); font-size: 12px; margin-left: 6px; }
.sell-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sell-photos .ph {
  position: relative; padding-top: 100%; border-radius: 12px; overflow: hidden;
  background: #F1F4F9; border: 1px solid var(--line);
}
.sell-photos .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sell-photos .ph.bad { border-color: var(--bad); }
.sell-photos .ph-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 20, 38, .42); color: #fff; font-weight: 700; font-size: 18px;
}
.sell-photos .ph-mask.bad { background: rgba(190, 40, 40, .55); }
.sell-photos .ph-x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 22px; padding: 0;
}
.sell-photos .ph-zoom { position: absolute; inset: 0; background: none; border: 0; }
.sell-photos .ph-x { z-index: 2; }
.sell-photos .ph-add {
  padding-top: 100%; position: relative; border: 1px dashed var(--line2); border-radius: 12px;
  background: #FAFBFD; color: var(--ink3); display: block;
}
.sell-photos .ph-add b, .sell-photos .ph-add em {
  position: absolute; left: 0; right: 0; text-align: center; font-style: normal;
}
.sell-photos .ph-add b { top: 30%; font-size: 22px; font-weight: 400; color: var(--brand); transform: translateY(-50%); }
.sell-photos .ph-add em { bottom: 16%; font-size: 11.5px; line-height: 1.2; padding: 0 4px; }
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite; display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sell-trust { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.sell-trust div { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink2); background: #F6F9F7; border-radius: 9px; padding: 8px 10px; }
.sell-trust b { color: #0B7A54; font-size: 13px; line-height: 1.3; }

/* 看大图 */
.pic-view {
  position: fixed; inset: 0; z-index: 9999; background: rgba(6, 10, 20, .94);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.pic-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

@media (max-width: 720px) {
  .sell-photos { grid-template-columns: repeat(3, 1fr); }
}

/* 线索里的卖家照片 */
.tag-sell {
  display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px;
  background: #E9F7F0; color: #0B7A54; font-size: 11.5px; font-weight: 600; vertical-align: 1px;
}
.lead-pics { display: flex; gap: 5px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.lead-pics img {
  width: 46px; height: 46px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--line); display: block;
}
.lead-pics a { display: block; line-height: 0; }
.lead-pics .lp-more { font-size: 12px; color: var(--ink3); }

/* 「装到桌面」小条 */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 900;
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
  backdrop-filter: blur(6px);
}
.install-bar .ib-ic {
  width: 34px; height: 34px; flex: none; border-radius: 10px; background: #EAF0FF; color: #1E5EFF;
  display: flex; align-items: center; justify-content: center;
}
.install-bar .ib-ic svg { width: 18px; height: 18px; }
.install-bar .ib-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.install-bar .ib-txt b { font-size: 13.5px; }
.install-bar .ib-txt em { font-style: normal; font-size: 11.5px; color: var(--ink3); }
.install-bar .ib-go {
  flex: none; border: 0; border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, #1E5EFF, #4C8DFF);
}
.install-bar .ib-x {
  flex: none; border: 0; background: none; color: var(--ink3); font-size: 18px; width: 24px; padding: 0;
}

/* ==========================================================================
   Telegram Mini App 适配（2026-10-28）
   只在 TG 客户端内激活：html[data-shell="tg"]，普通浏览器/PWA/微信里零影响。
   TG 里用户大概率开着深色模式，页面若不自适应会在打开瞬间"闪一片白"，
   观感立刻变成"这是个网页"——所以这里做一套暗色调色板。
   原则：只换背景/文字/边框/品牌色，照片、二维码、车牌底不变。
   ========================================================================== */
/* TG 全屏模式下客户端顶部那条（关闭 / 机器人名 / ⋯）是浮在网页上面的。
 * tg.js 把它的高度写进 --tg-safe-top，这里所有"贴边"的层都往下让开：
 * 不让页面自己的标题、× 、返回键被压在那条下面点不到。 */
html[data-shell="tg"] body { padding-bottom: var(--tg-safe-bottom, 0px); }
html[data-shell="tg"] .site-head { top: var(--tg-safe-top, 0px); }
html[data-shell="tg"] .drawer { padding-top: var(--tg-safe-top, 0px); }
html[data-shell="tg"] .pe { padding-top: var(--tg-safe-top, 0px); }
html[data-shell="tg"] .lang-sheet { padding-top: var(--tg-safe-top, 0px); }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1216;
  --card: #171C23;
  --bg-soft: #1D232B;
  --line: #272E38;
  --line2: #39424F;
  --ink: #ECEEF2;
  --ink2: #AFB8C5;
  --ink3: #8792A1;
  --brand: #2563EB;
  --brand-ink: #1D4ED8;
  --brand-soft: #16233A;
  --ok: #3DDC97;
  --ok-soft: #0F2A20;
  --warn: #F5B942;
  --warn-soft: #2A2213;
  --bad: #F87171;
  --bad-soft: #2C1717;
  --cta-ink: #FFFFFF;
  --grad: linear-gradient(135deg, #1D4ED8, #2563EB);
  --grad-ink: #FFFFFF;
  --glow: 0 8px 22px rgba(37, 99, 235, .34);
  --price: #93C5FD;
  --accent: #60A5FA;
  --accent-ink: #93C5FD;
  --accent-soft: #16233A;
  --hero: linear-gradient(180deg, #131B2A 0%, #0F1319 100%);
  --head-bg: rgba(15, 18, 22, .92);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .site-head { background: var(--head-bg); }

/* 深色模式下品牌色本身是「亮」的，头版再用它就压不住白字了：
 * 换成「深品牌软底 → 卡片色」的暗调渐变，右上角柔光调低，气质还在，字看得清 */
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--card) 100%);
  box-shadow: inset 0 0 0 1px var(--line2), 0 10px 30px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .hero::after { display: none; }

/* 深色模式下品牌色本身是「亮」的，头版再用它就压不住白字了：
 * 换成「深品牌软底 → 卡片色」的暗调渐变，右上角柔光调低，气质还在，字看得清 */
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--card) 100%);
  box-shadow: inset 0 0 0 1px var(--line2), 0 10px 30px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .hero::after { display: none; }

/* 弹窗三段式：头尾必须和卡片同色，否则深色模式下会露出两块白条 */
html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot { background: var(--card); }
html[data-theme="dark"] .x { background: #232A36; color: var(--ink2); }
html[data-theme="dark"] .x:hover { background: #2C3542; color: var(--ink); }
html[data-theme="dark"] .tr-th,
html[data-theme="dark"] .tr-prog-bar,
html[data-theme="dark"] .tr-h em.opt { background: #232A36; }

/* 原本写死白底的容器，统一换成卡片色；二维码和开关滑块除外（前者必须白底才能扫） */
html[data-theme="dark"] .lang-btn,
html[data-theme="dark"] .lang-menu,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .viewsw button.on,
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .head-collapse,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .drawer-foot,
html[data-theme="dark"] .seg button,
html[data-theme="dark"] .gallery,
html[data-theme="dark"] .thumbs,
html[data-theme="dark"] .contact-row a,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .amounts button,
html[data-theme="dark"] .site-foot,
html[data-theme="dark"] .tabs button.on,
html[data-theme="dark"] .slot.filled,
html[data-theme="dark"] .slot .mk,
html[data-theme="dark"] .login-box,
html[data-theme="dark"] .nm-preview,
html[data-theme="dark"] .share-item,
html[data-theme="dark"] .role-btn,
html[data-theme="dark"] .share-tabs button.on,
html[data-theme="dark"] .st-opt,
html[data-theme="dark"] .bell,
html[data-theme="dark"] .filterbar select,
html[data-theme="dark"] .notif,
html[data-theme="dark"] .back-btn,
html[data-theme="dark"] .qsel,
html[data-theme="dark"] .qpop,
html[data-theme="dark"] .achip.clear,
html[data-theme="dark"] .chips .chip,
html[data-theme="dark"] .mk-icons,
html[data-theme="dark"] .mk-sec,
html[data-theme="dark"] .mk-chip,
html[data-theme="dark"] .sell-card { background: var(--card); }

/* 只改 background-color：不能用 background 简写，否则会把 select 的下拉箭头背景图一起清掉 */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .sell .field input,
html[data-theme="dark"] .sell .field textarea { background-color: var(--card); color: var(--ink); }

/* 搜索框右侧的下拉箭头按钮和清除按钮（原本是近白色，暗色下会变成一块白斑） */
html[data-theme="dark"] .qcombo .qarrow { background: var(--bg-soft); border-left-color: var(--line); color: var(--ink2); }
html[data-theme="dark"] .qcombo .qclear { background: #2A3139; color: var(--ink2); }
html[data-theme="dark"] .qmore { background: linear-gradient(135deg, var(--cta, #F2620F), var(--cta2, #FF9147)); color: var(--cta-ink, #fff); border: 0; }
html[data-theme="dark"] .achip { border-color: rgba(37, 99, 235, .45); }

html[data-theme="dark"] .switch i { background: #E6EAF0; }
html[data-theme="dark"] .qr-box img { background: #fff; }
html[data-theme="dark"] .tbl th { background: var(--bg-soft); }
html[data-theme="dark"] .pill { background: var(--bg-soft); }
html[data-theme="dark"] .tbl tr:hover td { background: var(--bg-soft); }

/* 规格小标签、图片占位底色、卖车页的"拍照/选图"格——原本都是近白底，暗色下会变成白斑 */
html[data-theme="dark"] .tag,
html[data-theme="dark"] .kt,
html[data-theme="dark"] .gallery .main,
html[data-theme="dark"] .th,
html[data-theme="dark"] .sell-photos .ph-add { background: var(--bg-soft); }

/* html 自己也要上色，否则滚到底部会漏出一条白边 */
html[data-theme="dark"] { background: #0F1216; }

/* 视图切换底槽、图片占位、车况角标（在售/已订/已售） */
html[data-theme="dark"] .viewsw { background: var(--bg-soft); }
html[data-theme="dark"] .card-img { background: var(--bg-soft); }
/* 主图背景色是写在 img 自己身上的（contain 后两侧露出来的就是它），改容器没用 */
html[data-theme="dark"] .gallery .main img { background: var(--bg-soft); }
html[data-theme="dark"] .ph-tip { background: rgba(23, 28, 35, .92); color: var(--ink2); }
html[data-theme="dark"] .badge { background: rgba(23, 28, 35, .94); color: var(--ink2); }
html[data-theme="dark"] .badge.available { background: rgba(15, 42, 32, .94); color: var(--ok); }
html[data-theme="dark"] .badge.reserved { background: rgba(42, 34, 19, .94); color: var(--warn); }
html[data-theme="dark"] .badge.sold { background: rgba(32, 37, 44, .94); color: var(--ink3); }

/* ==================================================================
 * 三语排版加固（2026-10-29）
 *
 * 问题：同一句按钮文案，中文 4 个字、英文 12 个字符、高棉语可能 20+ 个字符。
 * 以前按钮允许换行，英文的「View details →」会把箭头挤到第二行，
 * 同一个页面里几个按钮高低不一，看着像坏了。
 *
 * 处理原则（写死在这里，别再逐处调）：
 *   1) 按钮/标签一律不换行；宁可缩短文案，也不让箭头掉行
 *   2) 箭头、图标这类"不能单独成行"的元素永远和文字同组
 *   3) 英/柬两语按语言整体缩字号、减内边距，而不是逐个按钮打补丁
 *   4) 容器允许收缩时，价格等关键数字优先保留空间
 * ================================================================== */
.btn, .tag, .kt, .qshare, .chip, .pill, .lang-btn {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.tag { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.tag.go {
  background: var(--grad, var(--brand)); color: var(--grad-ink, #fff);
  border: 0; font-weight: 700; padding: 6px 12px; box-shadow: var(--glow, none);
}
.tag .ar, .btn .ar, .qshare .ar { font-style: normal; }
.btn { flex: 0 1 auto; }
.btn-block { flex: none; width: 100%; }
.pricebox { min-width: max-content; flex: 0 0 auto; }
.price, .price small { white-space: nowrap; }

/* 英文/高棉语更长：统一降一档字号，按钮仍保持单行 */
html[lang="en"] .btn, html[lang="en"] .tag,
html[lang="km"] .btn, html[lang="km"] .tag {
  font-size: 13.5px; padding-left: 12px; padding-right: 12px;
}
html[lang="km"] .btn, html[lang="km"] .tag { font-size: 13px; }
html[lang="en"] .lang-btn, html[lang="km"] .lang-btn { font-size: 12.5px; }
@media (max-width: 720px) {
  html[lang="en"] .btn, html[lang="en"] .tag,
  html[lang="km"] .btn, html[lang="km"] .tag { font-size: 13px; padding-left: 10px; padding-right: 10px; }
  .card-foot { gap: 6px; }
  .card-foot .qshare { font-size: 12px; }
}

/* 顶栏语言胶囊：地球图标 + 当前语言 */
.lang-btn { gap: 5px; }
.lang-btn .lb-ic { display: inline-flex; opacity: .6; }
.lang-btn .lb-ic .ic { width: 15px; height: 15px; }
.nav-admin { margin-left: 4px; }
@media (max-width: 720px) { .nav-admin { margin: 6px 0 0; } }

/* 首次进站的三语选择 */
.lang-sheet {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12, 18, 26, .55);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.ls-card {
  width: 100%; max-width: 340px; background: #fff; border-radius: 20px;
  padding: 22px 18px 16px; text-align: center;
  box-shadow: 0 24px 60px rgba(10, 20, 35, .28);
}
.ls-logo { width: 54px; height: 54px; border-radius: 15px; object-fit: contain; margin: 0 auto 10px; display: block; }
.ls-card h3 { font-size: 16px; margin: 0 0 4px; }
.ls-sub { font-size: 12px; color: var(--ink3); margin: 0 0 14px; }
.ls-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 50px; margin-bottom: 9px; padding: 12px 16px;
  border: 1px solid var(--line2); border-radius: 13px; background: #fff; color: var(--ink);
  font-size: 15px; text-align: left;
}
.ls-opt b { font-weight: 500; }
.ls-opt span { font-size: 12px; color: var(--ink3); }
.ls-opt:active, .ls-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.ls-tip { font-size: 11.5px; color: var(--ink3); margin: 6px 0 0; }

/* 「原文」气泡：存疑译文旁边的小按钮 + 点开的浮层 */
.trq {
  border: 0; background: none; color: var(--brand); font-size: 11px; line-height: 1;
  padding: 2px 5px; margin-left: 6px; border-radius: 999px;
  border: 1px dashed currentColor; vertical-align: 1px; opacity: .75;
}
.trq::after { content: ""; }
.trq-pop {
  position: absolute; z-index: 210; max-width: 280px;
  background: #111A24; color: #F3F6FA; font-size: 12.5px; line-height: 1.6;
  padding: 10px 12px; border-radius: 10px; white-space: pre-wrap;
  box-shadow: 0 12px 30px rgba(8, 14, 22, .35);
}

/* 暗色模式：新增元素也要跟着暗，别漏白 */
html[data-theme="dark"] .lang-sheet { background: rgba(0, 0, 0, .62); }
html[data-theme="dark"] .ls-card,
html[data-theme="dark"] .ls-opt { background: var(--card); border-color: var(--line2); color: var(--ink); }
html[data-theme="dark"] .ls-opt span { color: var(--ink3); }
html[data-theme="dark"] .tag.go { background: rgba(37, 99, 235, .16); }
html[data-theme="dark"] .trq-pop { background: #E9EEF6; color: #10161E; }

/* 后台翻译体检结果 */
.tr-audit-list { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ta-row { padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 12.5px; position: relative; }
.ta-row:last-child { border-bottom: 0; }
.ta-row b { display: block; font-size: 11.5px; color: var(--ink3); font-weight: 500; }
.ta-zh { color: var(--ink); margin: 2px 0 3px; }
.ta-km { color: var(--ink2); line-height: 1.55; }
.ta-sim { position: absolute; right: 10px; top: 9px; font-size: 11px; color: var(--warn); }
.lang-sheet .ls-skip {
  display: block; width: 100%; margin-top: 2px; padding: 10px;
  border: 0; background: none; color: var(--ink3); font-size: 13px;
}

/* ==================================================================
 * 定价参谋：市场比价 / 历史低价（2026-10-29）
 * 列表里的行情标签 + 弹窗里的价格区间条 + 改价曲线
 * 颜色全部走变量，暗色主题自动跟随
 * ================================================================== */
.mk-line {
  display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center;
  margin-top: 4px; padding: 0; border: 0; background: none;
  font: inherit; text-align: left; cursor: pointer;
}
.mk-line:hover .mk-meta { text-decoration: underline; }
.mk-tag {
  display: inline-block; font-size: 11px; line-height: 1.5; font-weight: 700;
  padding: 1px 6px; border-radius: 6px; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand);
}
.mk-tag.lowest { background: var(--bad); color: #fff; }
.mk-tag.below { background: var(--ok-soft); color: var(--ok); }
.mk-tag.fair { background: var(--brand-soft); color: var(--brand); }
.mk-tag.high { background: var(--warn-soft); color: var(--warn); }
.mk-tag.nodata { background: transparent; color: var(--ink3); border: 1px dashed var(--line2); font-weight: 600; }
.mk-tag.big { font-size: 13px; padding: 3px 10px; border-radius: 8px; }
.mk-meta { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.mk-none { font-size: 11px; color: var(--ink3); }
.mk-wait { font-size: 11px; color: var(--line2); }

.pm-wrap { display: flex; flex-direction: column; gap: 10px; }
.pm-loading, .pm-empty { font-size: 13px; color: var(--ink3); padding: 10px 0; }
.pm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pm-price { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.pm-diff { font-size: 12px; color: var(--ink2); }

.pm-bar { margin-top: 2px; }
.pm-track {
  position: relative; height: 8px; border-radius: 999px;
  background: var(--line); overflow: visible; margin: 14px 6px 6px;
}
.pm-track .pm-iqr { position: absolute; top: 0; height: 8px; background: var(--brand-soft); border-radius: 999px; }
.pm-track .pm-med { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink3); border-radius: 2px; }
.pm-track .pm-me {
  position: absolute; top: -6px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--bad); border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--bad);
}
.pm-scale { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--ink3); }
.pm-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink2); }
.pm-kv span:last-child { color: var(--ink); font-weight: 600; }
.pm-sub { font-size: 12px; color: var(--ink3); margin-top: 4px; font-weight: 600; }
.pm-list { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; }
.pm-row {
  display: flex; gap: 8px; align-items: baseline; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12px;
}
.pm-row:hover { border-color: var(--line2); background: var(--bg); }
.pm-row b { color: var(--brand); min-width: 62px; }
.pm-row span { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-note { font-size: 11px; color: var(--ink3); line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 8px; }
.pm-hist { min-height: 68px; }
.pm-svg { width: 100%; height: 68px; display: block; }

html[data-theme="dark"] .mk-tag.lowest { background: #B23B3B; color: #fff; }
html[data-theme="dark"] .mk-tag.below { background: rgba(28, 122, 82, .22); color: #6FD3A4; }
html[data-theme="dark"] .mk-tag.high { background: rgba(180, 120, 20, .24); color: #E7B457; }
html[data-theme="dark"] .pm-track .pm-iqr { background: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .pm-svg polyline { stroke: #7FA8FF; }

/* 前台「历史低价」角标：卡片右下 + 详情页价格下方 */
.dealtag {
  position: absolute; right: 8px; bottom: 8px;
  background: linear-gradient(135deg, var(--accent-ink, #D93025), var(--bad, #A81C14));
  color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .2px;
  padding: 3px 9px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.deal-line {
  display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 4px;
  background: var(--bad-soft); border: 1px solid var(--bad); border-radius: 10px;
  padding: 4px 10px; font-size: 12.5px; color: var(--bad);
}
.deal-line b { font-weight: 800; }
html[data-theme="dark"] .dealtag { background: linear-gradient(135deg, #C0392B, #8E1F1F); }

/* 主推：后台列表里的可点击小标 + 前台主推位 */
.pill.feat {
  background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad);
  font-weight: 700; cursor: pointer; line-height: 1.4;
}
.pill.feat:hover { background: var(--bad); color: #fff; }
html[data-theme="dark"] .pill.feat { background: rgba(180, 60, 50, .22); color: #F08C80; }

/* ==================================================================
 * 图片放大查看器（详情页主图）
 * ================================================================== */
.imv {
  position: fixed; inset: 0; z-index: 320; background: rgba(6, 10, 18, .96);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; overscroll-behavior: contain;
  opacity: 1; transition: opacity .18s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.imv.out { opacity: 0; }
.imv-img {
  max-width: 100vw; max-height: 100vh; width: auto; height: auto;
  transform-origin: center center; will-change: transform;
  transition: none; user-select: none; -webkit-user-drag: none;
  object-fit: contain;
}
.imv-x {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 24px; line-height: 1;
}
.imv-n {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px;
  background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 10px;
}
.imv-n button { border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; padding: 0 6px; }
.imv-n span { min-width: 52px; text-align: center; opacity: .9; }
.imv-tip {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(14px + env(safe-area-inset-top));
  color: rgba(255, 255, 255, .72); font-size: 12.5px; white-space: nowrap;
  pointer-events: none;
}
.imv.zoomed .imv-tip { opacity: 0; }
.gallery .main img { cursor: zoom-in; }

/* ---------- 同行寄卖编号标签 ---------- */
.ptag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: #EEF3FF; color: #3D5CC5; border: 1px solid #C9D6F5;
  vertical-align: middle; white-space: nowrap;
}
.card-img .ptag { position: absolute; right: 8px; bottom: 8px; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.ptag-line {
  display: inline-block; margin: 2px 0 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #EEF3FF; color: #3D5CC5; border: 1px solid #C9D6F5;
}
html[data-theme="dark"] .ptag { background: #1C2540; color: #A9BCF5; border-color: #33417A; }
html[data-theme="dark"] .ptag-line { background: #1C2540; color: #A9BCF5; border-color: #33417A; }

/* ---------- 过户资料导出（PDF / 长图） ---------- */
.trx {
  position: fixed; inset: 0; z-index: 95; background: rgba(16, 24, 40, .5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.trx-in {
  background: var(--card); border-radius: var(--radius); width: 100%; max-width: 520px;
  height: 100vh; height: -webkit-fill-available; height: 100dvh;
  max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
.trx-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.trx-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.trx-body {
  flex: 1 1 auto; padding: 14px 18px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.trx-foot {
  flex: 0 0 auto; display: flex; gap: 10px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
}
.trx-foot .btn { flex: 1 1 0; min-height: 46px; margin: 0; }
.trx-foot .btn-grow { flex: 2 1 0; }
.trx-lead { margin: 0 0 12px; font-size: 15px; color: var(--ink2); }
.trx-warn {
  background: var(--warn-soft); color: var(--warn); padding: 10px 12px;
  border-radius: 10px; font-size: 13px; line-height: 1.5; margin: 0 0 12px;
}
.trx-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); margin-bottom: 10px; cursor: pointer;
}
.trx-pick:active { background: var(--brand-soft); }
.trx-pick > i { font-size: 26px; font-style: normal; flex: 0 0 auto; }
.trx-txt { flex: 1 1 auto; min-width: 0; }
.trx-txt b { display: block; font-size: 15px; color: var(--ink); }
.trx-txt em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink3); margin-top: 3px; line-height: 1.4; }
.trx-load { text-align: center; padding: 26px 0; color: var(--ink2); font-size: 14px; }
.trx-spin {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: trxspin .9s linear infinite;
}
@keyframes trxspin { to { transform: rotate(360deg); } }
.trx-prev { max-height: 44vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; background: #fff; }
.trx-prev img { display: block; width: 100%; }

/* ---------- 外观主题选择 ---------- */
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.th-card {
  text-align: left; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); cursor: pointer;
}
.th-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.th-sw { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.th-sw .th-bar { flex: 1; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); }
.th-sw .th-dot { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); flex: 0 0 auto; }
.th-mind {
  display: inline-block; margin: 4px 0 3px; font-size: 11.5px; font-weight: 700; text-decoration: none;
  background: var(--accent-soft, var(--brand-soft)); color: var(--accent-ink, var(--brand-ink));
  border-radius: 999px; padding: 2px 9px;
}
.th-card b { display: block; font-size: 14px; color: var(--ink); }
.th-card em { display: block; font-style: normal; font-size: 12px; color: var(--ink3); margin-top: 3px; line-height: 1.35; }
.th-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.th-row > label { min-width: 60px; font-size: 13.5px; color: var(--ink2); }
.th-row .hint { flex: 1 1 120px; margin: 0; }
.th-seg { display: flex; gap: 6px; }
.th-seg-b {
  padding: 7px 12px; font-size: 13px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink2); cursor: pointer;
  min-height: 40px;
}
.th-seg-b.on { background: var(--brand); border-color: var(--brand); color: #fff; }
#thBrand {
  width: 56px; height: 38px; padding: 2px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card);
}
.modal-foot .btn { white-space: nowrap; }
@media (max-width: 380px) {
  .th-grid { grid-template-columns: 1fr; }
  .modal-foot { gap: 6px; }
}

/* 后台顶栏原来只写了浅色（rgba(255,255,255,.94)），深色主题下是一块白斑。
   跟着主题卡片色走，5 套皮肤都能对上。 */
html[data-theme="dark"] .admin-head { background: var(--card); border-bottom-color: var(--line); }

/* ==================================================================
 * 微信内置浏览器适配（2026-11-04 现场修复）
 * ------------------------------------------------------------------
 * 微信 iOS 的页面是整屏渲染的，顶部三条东西叠在一起：
 *   0..47pt   系统状态栏（原生）
 *   47..92pt  微信导航条（原生 45pt：关闭 / 全文翻译 / 更多）
 *   92..      网页内容
 * 底部还有一条微信工具栏（49pt）+ 小白条（34pt）。
 * env(safe-area-inset-*) 只认状态栏和小白条，认不出微信自己的两条栏，
 * 于是后台弹窗的标题被导航条盖掉、底部按钮贴着工具栏。
 * ui.js 识别到「微信 + iOS」会给 <html> 打 data-wx="1"，
 * 这里把页面和所有贴边浮层统一让开这两条栏。
 * 注意：让出来的区域正好被微信两条栏本身盖住，所以视觉上不会多出白边。
 * ================================================================== */
html[data-wx="1"] {
  --wx-top: 45px;
  --wx-bottom: 49px;
  --wx-inset-top: calc(env(safe-area-inset-top, 0px) + var(--wx-top));
  --wx-inset-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--wx-bottom));
  scroll-padding-top: calc(62px + var(--wx-inset-top));
}
/* 让位的那一段（微信导航条高度）要画在顶栏自己身上，不能用 body padding：
 * body padding 会在顶栏上方留出一条**看得见的空档**，滚动时详情正文从空档里穿过去
 * （iPhone 13 现场：正文「车身类型 SUV」出现在「柬埔寨中邦汽车」上面）。
 * 改成顶栏自己带 padding 后，这段区域属于顶栏的背景，内容只可能从顶栏下面经过。
 * 注：--wx-inset-top 在「微信内嵌渲染」时等于 0，此时顶栏与普通浏览器完全一致。 */
html[data-wx="1"] .site-head,
html[data-wx="1"] .admin-head {
  top: 0;
  padding-top: var(--wx-inset-top);
}

/* 所有全屏浮层：上下都缩进安全区，别钻到微信两条栏底下 */
html[data-wx="1"] .mask,
html[data-wx="1"] .drawer,
html[data-wx="1"] .lang-sheet,
html[data-wx="1"] .trx,
html[data-wx="1"] .imv,
html[data-wx="1"] .sc-zoom { top: var(--wx-inset-top); bottom: var(--wx-inset-bottom); }

/* 弹窗按「可见区域」排版：宽高都由 mask 决定，不再自己算 vh */
html[data-wx="1"] .mask { padding-top: 10px; padding-bottom: 10px; }
html[data-wx="1"] .modal { max-height: 100%; }
html[data-wx="1"] .modal.modal-full { height: auto; max-height: 100%; }

/* 全屏编辑器（遮牌 / 去背景 / 看图）：四边顶满可见区 */
html[data-wx="1"] .pe {
  top: var(--wx-inset-top);
  bottom: var(--wx-inset-bottom);
  height: auto;
  max-height: none;
}
html[data-wx="1"] .pe-top { padding-top: 6px; }

/* 提示条别压在微信工具栏底下 */
html[data-wx="1"] .toast { bottom: calc(28px + var(--wx-inset-bottom)); }
html[data-wx="1"] .toast.above-foot { bottom: calc(92px + var(--wx-inset-bottom)); }

/* ---------- 页内提示 / 确认框（微信吞 alert、confirm 的替代品） ---------- */
.ui-mask {
  position: fixed; left: 0; right: 0; z-index: 100000;
  top: var(--wx-inset-top, 0px); bottom: var(--wx-inset-bottom, 0px);
  display: none; align-items: center; justify-content: center;
  padding: 20px 18px;
  background: rgba(16, 24, 40, .5);
  overscroll-behavior: contain;
}
.ui-mask.on { display: flex; }
.ui-dlg {
  width: 100%; max-width: 340px; background: #fff; border-radius: 16px;
  padding: 20px 18px 16px; box-shadow: 0 18px 48px rgba(10, 18, 34, .28);
  animation: uiPop .16s ease-out;
}
@keyframes uiPop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.ui-msg { font-size: 15px; line-height: 1.6; color: #1B2333; white-space: pre-wrap; word-break: break-word; }
.ui-btns { display: flex; gap: 10px; margin-top: 18px; }
.ui-btns .btn { flex: 1 1 0; min-width: 0; min-height: 46px; margin: 0; }
html[data-theme="dark"] .ui-dlg { background: var(--card); }
html[data-theme="dark"] .ui-msg { color: var(--ink); }

/* ---------- 后台「页面出错」红条 ---------- */
.crash-bar {
  position: fixed; left: 8px; right: 8px; z-index: 100001;
  top: calc(var(--wx-inset-top, 0px) + 8px);
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 11px;
  background: #FFF1F0; border: 1px solid #FFC9C3; color: #8A1F14;
  font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 8px 22px rgba(140, 30, 20, .18);
}
.crash-bar b { flex: 0 0 auto; font-size: 12.5px; }
.crash-bar span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crash-bar .btn { flex: 0 0 auto; min-height: 30px; padding: 0 10px; font-size: 12px; }
.crash-bar .x { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(0,0,0,.06); color: #8A1F14; font-size: 16px; line-height: 1; }

/* 吸底保存条、浮动安装条、侧栏购买框也跟着让位 */
html[data-wx="1"] .page-foot,
html[data-wx="1"] .sell-foot { bottom: var(--wx-inset-bottom); }
html[data-wx="1"] .install-bar { bottom: calc(14px + var(--wx-inset-bottom)); }
html[data-wx="1"] .buybox { top: calc(78px + var(--wx-inset-top)); }
.ui-input {
  display: block; width: 100%; margin-top: 12px; height: 46px; padding: 0 13px;
  border: 1px solid #D6DCE6; border-radius: 10px; font-size: 15px; color: #1B2333;
  background: #fff;
}
.ui-input:focus { outline: none; border-color: var(--brand, #2C55E0); box-shadow: 0 0 0 3px var(--brand-soft, #E8EEFF); }
html[data-theme="dark"] .ui-input { background: #1A2230; border-color: #33405A; color: #E9EEF7; }

/* ==================================================================
 * 车辆来源方（同行 / 寄售客户）2026-11-04
 * ------------------------------------------------------------------
 * 名称、联系方式、备注是文本；二维码 / Telegram 截图是一张图，
 * 方块里直接显示缩略图，点开是全屏大图（上下避开微信两条栏）。
 * ================================================================== */
.field label .req { color: var(--bad); font-weight: 700; }

.party-img { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.pimg-box {
  position: relative; flex: 0 0 auto; width: 92px; height: 92px; padding: 0;
  border: 1px dashed var(--line2); border-radius: 12px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
}
.pimg-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg-box.has { border-style: solid; border-color: var(--brand); }
.pimg-ph { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink3); pointer-events: none; }
.pimg-ph b { font-size: 20px; line-height: 1; font-weight: 400; }
.pimg-ph i { font-style: normal; font-size: 10px; line-height: 1.25; text-align: center; padding: 0 4px; }
.pimg-box.has .pimg-ph { display: none; }
.pimg-side { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pimg-side .btn { margin: 0; min-width: 104px; }
.pimg-side #srcPartyImgDel { color: var(--bad); border-color: var(--bad-soft); }
.pimg-side .hint { line-height: 1.45; }
/* 只有窄到 300 出头（iPhone SE 分屏、老安卓）才让按钮落到图片下面一整行 */
@media (max-width: 340px) {
  .pimg-side { flex-basis: 100%; }
}

.party-line { word-break: break-word; }
.lnk {
  border: 0; background: none; padding: 0; margin: 0; font: inherit;
  color: var(--brand-ink); text-decoration: underline; cursor: pointer;
}

/* 全屏看大图 */
.imgview {
  position: fixed; left: 0; right: 0; z-index: 100002;
  top: var(--wx-inset-top, 0px); bottom: var(--wx-inset-bottom, 0px);
  background: rgba(8, 12, 20, .94);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overscroll-behavior: contain;
}
.imgview img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.imgview .x {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 22px; line-height: 1;
}
/* 大图底部条：左边一句提示，右边「更换照片」。
   固定底部 + 让开微信工具栏，不然按钮会被原生栏压住。 */
/* 大图底部条：左边一句提示，右边「更换照片」。
   固定底部 + 让开微信工具栏；照片区留出这条的高度，别把图压住。 */
.imgview { padding: 16px 16px 104px; }
.imgview .iv-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 14px calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(to top, rgba(8, 12, 20, .96) 46%, rgba(8, 12, 20, 0));
}
.imgview .iv-tip { flex: 1; color: #C9D3E0; font-size: 12.5px; line-height: 1.4; }
.imgview .iv-act {
  flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 13.5px; font-weight: 600;
}
.imgview .iv-act:active { background: rgba(255, 255, 255, .26); }

/* ==================================================================
 * 商用授权：到期横幅 / 授权面板 / 锁屏（2026-11-05）
 * ------------------------------------------------------------------
 * 移动端硬性要求：三个套餐卡在 390 宽下两列、360 宽下一列，
 * 任何一屏都不能横向溢出（lic-row 里的输入框一律 flex 收缩）。
 * ================================================================== */
.lic-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px; margin: 10px 0 2px;
  font-size: 13px; line-height: 1.45; border: 1px solid transparent;
}
.lic-bar .lic-ico {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; line-height: 1;
}
.lic-bar .lic-msg { flex: 1 1 auto; min-width: 0; }
.lic-bar .lic-cta { flex: 0 0 auto; margin-left: 4px; min-height: 32px; }
.lic-bar .lic-cta-t { flex: 0 0 auto; font-style: normal; font-size: 12px; opacity: .85; }
.lic-bar.lic-info { background: #EAF1FF; color: #1B3A8A; border-color: #C9DBFF; }
.lic-bar.lic-info .lic-ico { background: #1B3A8A; color: #fff; }
.lic-bar.lic-warn { background: #FFF6E5; color: #7A4A00; border-color: #F5D79A; }
.lic-bar.lic-warn .lic-ico { background: #B26A00; color: #fff; }
.lic-bar.lic-bad { background: #FFF1F0; color: #8A1F14; border-color: #FFC9C3; }
.lic-bar.lic-bad .lic-ico { background: #C0392B; color: #fff; }

/* ---------- 设置页：授权面板 ---------- */
.lic-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--card); }
.lic-card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lic-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink);
}
.lic-state { margin-left: auto; font-size: 15px; font-weight: 800; }
.lic-card.lic-ok .lic-state { color: var(--ok, #10894F); }
.lic-card.lic-warn .lic-state { color: #B26A00; }
.lic-card.lic-bad .lic-state { color: var(--bad, #C0392B); }
.lic-card.lic-none .lic-state { color: var(--ink3); }
.lic-bar-line { height: 6px; border-radius: 99px; background: var(--line-2, #EDEFF4); margin: 12px 0 8px; overflow: hidden; }
.lic-bar-line i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .3s; }
.lic-card.lic-warn .lic-bar-line i { background: #E39A1C; }
.lic-card.lic-bad .lic-bar-line i { background: #C0392B; }
.lic-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink3); }
.lic-meta b { color: var(--ink); font-weight: 700; }

.lic-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lic-plan {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 12px 13px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit;
}
.lic-plan:hover { border-color: var(--brand); box-shadow: 0 4px 14px var(--glow, rgba(44,85,224,.14)); }
.lic-plan b { font-size: 15px; font-weight: 800; }
.lic-plan em { font-style: normal; font-size: 12.5px; color: var(--ink3); }
.lic-plan u { text-decoration: none; font-size: 11.5px; color: var(--brand-ink); margin-top: 2px; }

.lic-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lic-row label { flex: 0 0 auto; font-size: 13px; color: var(--ink2, var(--ink3)); min-width: 92px; }
.lic-row input, .lic-row select { flex: 1 1 120px; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.lic-row .btn { flex: 0 0 auto; margin: 0; }

.lic-code { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lic-code label { font-size: 13px; color: var(--ink2, var(--ink3)); }
.lic-code textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; resize: vertical; word-break: break-all; }
.lic-code .btn { align-self: flex-start; margin: 0; }

/* 账号弹窗里的期限快捷按钮 */
.lic-uq { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lic-uq .btn { margin: 0; }

/* ---------- 到期锁屏 ---------- */
.lic-lock { text-align: center; padding: 40px 20px; }
.lic-lock-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%; margin-bottom: 14px;
  background: #FFF1F0; color: #C0392B; font-size: 28px; font-weight: 800;
}
.lic-lock h3 { margin: 0 0 10px; font-size: 19px; }
.lic-lock p { margin: 0 0 10px; color: var(--ink3); font-size: 14px; line-height: 1.6; }
.lic-lock-date { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--ink2, var(--ink3)); font-size: 13px; margin-bottom: 10px; }

html[data-theme="dark"] .lic-bar.lic-info { background: #16233C; color: #BFD3FF; border-color: #2A3E63; }
html[data-theme="dark"] .lic-bar.lic-warn { background: #33280F; color: #F3CE8A; border-color: #5A4517; }
html[data-theme="dark"] .lic-bar.lic-bad { background: #3A1A17; color: #FFC3BB; border-color: #5E2A24; }
html[data-theme="dark"] .lic-lock-ico { background: #3A1A17; color: #FF8F80; }
html[data-theme="dark"] .lic-bar-line { background: #263043; }

@media (max-width: 430px) {
  .lic-row label { min-width: 100%; }
  .lic-plans { grid-template-columns: 1fr 1fr; }
  .lic-plans .lic-plan:last-child { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .lic-plans { grid-template-columns: 1fr; }
  .lic-plans .lic-plan:last-child { grid-column: auto; }
}

/* ---------- 前台整站停用（后台选了「前台一起停」且已过期） ---------- */
.front-lock {
  position: fixed; left: 0; right: 0; z-index: 99999;
  top: var(--wx-inset-top, 0px); bottom: var(--wx-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px; background: var(--bg);
}
.fl-card { max-width: 360px; text-align: center; }
.fl-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 16px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 28px; font-weight: 800;
}
.fl-card h3 { margin: 0 0 10px; font-size: 19px; color: var(--ink); }
.fl-card p { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: var(--ink3); }
.fl-tel {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none;
}

/* ==================================================================
 * 厂商授权控制台（/owner，2026-11-06）
 * 移动端硬性要求：禁止横向溢出；全屏层 100dvh 三级兜底；
 * 弹层 max-height 92dvh 可滚动；关键按钮不裁切；小屏收间距不缩按钮。
 * ================================================================== */
html[data-shell="tg"] .admin-head { top: var(--tg-safe-top, 0px); }
html[data-shell="tg"] body { padding-bottom: var(--tg-safe-bottom, 0px); }

.ow-login { max-width: 420px; margin: 10vh auto 0; padding: 0 20px 40px; text-align: center; }
.ow-logo { font-size: 44px; margin-bottom: 8px; }
.ow-login h1 { margin: 0 0 6px; font-size: 22px; color: var(--ink); }
.ow-sub { margin: 0 0 22px; font-size: 13px; color: var(--ink3); }
.ow-login .ow-card { text-align: left; padding: 18px 16px; }
.ow-login input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px;
}
.ow-login .ow-go { width: 100%; margin-top: 12px; min-height: 44px; }
.ow-err { margin-top: 10px; font-size: 13px; color: var(--bad, #C0392B); }

.ow-main { padding-bottom: calc(28px + var(--tg-safe-bottom, 0px)); }
.ow-toolbar { display: flex; justify-content: flex-end; margin: 14px 0 10px; }
.ow-card {
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 12px;
}
.ow-empty { text-align: center; color: var(--ink3); font-size: 14px; padding: 34px 16px; }
.ow-tn-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ow-tn-name { font-size: 16px; color: var(--ink); margin-right: auto; }
.ow-pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ow-pill.ow-active { background: #E7F6EE; color: #10894F; }
.ow-pill.ow-grace, .ow-pill.ow-expired { background: #FFF1F0; color: #C0392B; }
.ow-pill.ow-suspended { background: #F3E8FF; color: #6B2FA0; }
.ow-pill.ow-none { background: var(--line-2, #EDEFF4); color: var(--ink3); }
.ow-pill.ow-live { background: #EAF1FF; color: #1B3A8A; }
.ow-pill.ow-ledger { background: transparent; border: 1px dashed var(--line); color: var(--ink3); }
.ow-tn-meta {
  display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 10px 0 4px;
  font-size: 13px; color: var(--ink3);
}
.ow-tn-meta b { color: var(--ink); }
.ow-tn-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ow-tn-act .btn { min-height: 38px; }
.ow-tn.ow-local { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }

/* 弹层：全屏遮罩（100dvh 三级兜底）+ 内容 92dvh 可滚 */
.ow-mask {
  position: fixed; inset: 0; z-index: 900;
  height: 100vh; height: -webkit-fill-available; height: 100dvh;
  background: rgba(15, 22, 34, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.ow-sheet {
  width: 100%; max-width: 560px;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card, #fff); border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-bottom, 0px));
  box-sizing: border-box;
}
.ow-sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ow-sheet-h b { font-size: 17px; color: var(--ink); margin-right: auto; }
.ow-x {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink3); font-size: 15px;
}
.ow-sec { margin-top: 16px; }
.ow-sec h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.ow-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ow-plan {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; min-height: 64px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.ow-plan b { font-size: 14px; }
.ow-plan em { font-style: normal; font-size: 11px; color: var(--ink3); }
.ow-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ow-row label { flex: 0 0 auto; font-size: 13px; color: var(--ink3); }
.ow-row input { flex: 1 1 140px; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; box-sizing: border-box; }
.ow-row .btn { min-height: 40px; }
.ow-field { margin: 12px 0; }
.ow-field label { display: block; font-size: 13px; color: var(--ink3); margin-bottom: 6px; }
.ow-field input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px;
}
.ow-actions { display: flex; gap: 10px; margin-top: 18px; }
.ow-actions .btn { flex: 1 1 0; min-height: 44px; }
.ow-code {
  width: 100%; box-sizing: border-box; margin: 12px 0;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 12px; font-family: ui-monospace, monospace;
  word-break: break-all; resize: none;
}
.ow-tbl { min-width: 340px; font-size: 12px; }
.btn-danger { background: #C0392B; border-color: #C0392B; color: #fff; }

@media (max-width: 360px) {
  .ow-plans { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ow-plan { padding: 8px 4px; min-height: 58px; }
  .ow-card { padding: 12px; }
}
@media (min-height: 720px) {
  .ow-mask { align-items: flex-end; }
}

/* ==================================================================
 * 2026-11 v12 · UI/UX Pro Max 设计规范落地
 * 只做加法：老类和变量全部保留，新规则写在文件末尾，靠层叠覆盖。
 * 规范文档见 docs/38-UI设计规范与打磨记录.md
 * ================================================================== */

/* —— 1. 设计令牌：字号 / 间距 / 圆角 / 投影 / 动效 —— */
:root {
  /* 字号阶梯：11.5 角标 → 12.5 辅助 → 13.5 正文次级 → 15 正文 → 20 价格 → 26 区块标题 */
  --fs-cap: 11.5px; --fs-xs: 12.5px; --fs-sm: 13.5px; --fs-md: 15px; --fs-lg: 20px; --fs-xl: 26px;
  /* 间距：4px 基准，页面里只允许这七档，避免 9/11/13 这种「手抖值」 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  /* 圆角与投影：小控件 → 卡片 → 浮层，三级够用 */
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .06);
  --sh-2: 0 4px 14px rgba(16, 24, 40, .10);
  --sh-3: 0 14px 34px rgba(16, 24, 40, .18);
  /* 键盘焦点环 */
  --ring: 0 0 0 3px rgba(30, 94, 255, .38);
  /* 划线价：原来 #98A2B3 只有 2.58:1，金边户外基本看不见；#6E7987 是 4.4:1 */
  --old-ink: #6E7987;
  --dur-1: 120ms; --dur-2: 200ms; --ease: cubic-bezier(.2, .8, .2, 1);
  /* 触控目标下限：44px（WCAG 2.5.5），手机上一个都别小于它 */
  --tap: 44px;
}

/* —— 2. 焦点可见性：键盘 / 车机 / 外接鼠标用户唯一能定位的东西 —— */
:focus-visible {
  outline: 3px solid var(--accent, #1E5EFF);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.card:focus-visible, .row:focus-visible, .sh-item:focus-visible { outline-offset: 3px; }
/* 输入类自己就有边框，用光晕代替描边，别双重描边 */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}

/* —— 3. 数字等宽：列表每 8 秒轮询重绘，价格位数一变整行就跳 —— */
.price, s, .old, .card-sub, .mono, .num, .tbl td b, .kpi b, .stat b { font-variant-numeric: tabular-nums; }

/* —— 4. 划线价对比度 2.58:1 → 4.4:1（保留红色删除线做语义） —— */
s, s.old { color: var(--old-ink); }

/* —— 5. 按下反馈：触屏没有 hover，不给自己一个 :active 等于点了没反应 —— */
.btn, .qmore, .x, .chip, .seg button, .sh-item, .sc-grid .tile, .tabs button, .sh-tabs button {
  transition: transform var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease),
    box-shadow var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
@media (hover: none) {
  /* 触屏：hover 位移没意义，换成轻微内缩 + 阴影收起，手感「按下去了」 */
  .card:hover, .row:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .card:active, .row:active { transform: scale(.994); box-shadow: var(--sh-1); }
  .btn:active, .qmore:active, .sh-item:active, .chip:active, .seg button:active, .tabs button:active { transform: scale(.97); }
  .sc-grid .tile:active { transform: scale(.97); }
}

/* —— 6. 触控目标 ≥44px：靠伪元素扩热区，视觉尺寸不变，不会挤坏排版 —— */
/* 注意：.qarrow / .qclear 本身就是 absolute，**不能**再给它们 position:relative，
   否则箭头会被挤到输入框外面（踩过一次）。absolute 元素本来就是伪元素的包含块。 */
.x, .brand, .tag.go, .qshare { position: relative; }
@media (pointer: coarse) {
  .x::after { content: ''; position: absolute; inset: -5px; }
  .qcombo .qarrow::after { content: ''; position: absolute; inset: -6px -3px; }
  .qcombo .qclear::after { content: ''; position: absolute; inset: -11px; }
  .brand::after { content: ''; position: absolute; inset: -7px -4px; }
  .tag.go::after, .qshare::after { content: ''; position: absolute; inset: -6px; }
  /* 语言按钮别再撑高：它是 999px 圆的胶囊，一撑就变「圆球」 */
  .lang-btn { position: relative; }
  .lang-btn::after { content: ''; position: absolute; inset: -7px -3px; }
  .tabs button, .admin-tabs button, .seg button { min-height: 40px; }
  .chip { min-height: 36px; }
}

/* —— 7. 首屏骨架：3G 下 /api/state 要 1~3 秒，别让人对着白屏等 —— */
.boot { padding: var(--sp-4) 0 var(--sp-8); }
.boot-hero, .boot-bar i, .boot-card {
  background: linear-gradient(100deg, #E6EBF3 18%, #F4F7FB 38%, #E6EBF3 58%);
  background-size: 220% 100%;
  animation: bootShine 1.35s linear infinite;
}
.boot-hero { height: 170px; border-radius: var(--r-lg); }
.boot-bar { display: flex; gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-4); }
.boot-bar i { flex: 1; height: 44px; border-radius: var(--r-sm); }
.boot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: var(--sp-3); }
.boot-card { height: 266px; border-radius: var(--r-md); }
@keyframes bootShine { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot-hero, .boot-bar i, .boot-card { animation: none; }
  .card:hover { transform: none; }
}

/* —— 8. 空状态：给一条出路，而不是一句「暂无车源」就完了 —— */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: 56px 20px; text-align: center; color: var(--ink3);
}
.empty p { margin: 0; font-size: var(--fs-sm); }
.empty-ic {
  width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
}
.empty-ic svg { width: 26px; height: 26px; }

/* —— 9. 区块标题的节奏：h2/h3 上下间距统一，别再一段一个样 —— */
.section h2, .section h3 { letter-spacing: -.2px; }
.section > h2 { margin: var(--sp-6) 0 var(--sp-3); }

/* —— 10. 手机端收紧一档：筛选条与工具栏各自省 4~6px，首屏能多露一截车 —— */
@media (max-width: 430px) {
  .quickbar { gap: var(--sp-2); padding: 10px; border-radius: var(--r-md); }
  .bar { gap: var(--sp-2); }
  .card-body { padding: 12px 13px 14px; }
  .card-sub { font-size: var(--fs-sm); }
}

/* 顶栏骨架：与真顶栏同高（62px），图片加载前也不会塌 */
.head-skel { display: flex; align-items: center; gap: 14px; height: 62px; }
.head-skel .brand-logo { opacity: .9; }
.head-skel i { display: block; width: 56px; height: 12px; border-radius: 6px; background: #E6EBF3; }
.head-skel i:first-of-type { margin-left: 10px; }
@media (max-width: 720px) { .head-skel i { display: none; } }

/* —— 11. 详情页面包屑：41×20 的链接在手机上太难点，扩热区不改字号 —— */
.crumb a { position: relative; }
@media (pointer: coarse) {
  .crumb a::after { content: ''; position: absolute; inset: -10px -8px; }
}

/* —— 12. 手机首屏很贵：年份区间收进「筛选」抽屉（抽屉里本来就有，选中后也有 chip 可删），
 *    快捷条从 3 行降到 2 行，首屏能多露出半台到一台车。 */
@media (max-width: 430px) {
  .quickbar .qnum[data-qf="yearMin"], .quickbar .qnum[data-qf="yearMax"] { display: none; }
  .hero { padding: 24px 18px 20px; border-radius: 18px; margin: 10px 0 8px; }
  .hero h1 { font-size: 24px; }
}

/* —— 13. 后台行内「⋯ 更多」菜单：收起时 DOM 常驻（委托逻辑不变），打开搬到 body fixed 定位 —— */
.vmore-wrap { position: relative; display: inline-block; }
.vmore { min-width: 38px; padding-left: 12px; padding-right: 12px; font-size: 16px; line-height: 1; }
.vmenu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 90;
  display: none; flex-direction: column; gap: 6px; min-width: 132px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3);
}
.vmenu.open { display: flex; }
.vmenu.fixed { position: fixed; top: auto; left: auto; }
.vmenu .btn { display: flex; width: 100%; justify-content: center; text-align: center; }

/* —— 14. 手机芯片式筛选：品牌 / 车款两枚胶囊占一行，价格与年份收进「筛选」抽屉
 *    （抽屉里本来就有这两组区间，选中后还有 chip 可删；首屏能多露出半台车） —— */
@media (max-width: 430px) {
  .quickbar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 999px; }
  .quickbar .qnum { display: none; }
  .quickbar .qsel { height: 40px; border-radius: 999px; text-align: center; font-size: 13.5px; }
  .quickbar .qcombo .qarrow { right: 8px; }
}

/* ==================================================================
 * 15. 屏幕适配兜底（2026-11-10 v14）
 * ------------------------------------------------------------------
 * 现场反馈「操作键被遮住」，拆成三种成因，这里一次性收口：
 *
 *  a) 吸附底栏（.page-foot）两枚按钮在窄屏换行，常驻 123px，
 *     把设置页最后一屏内容整片盖住 → 改成强制单行，高度回到 66px。
 *  b) 键盘弹起时 sticky bottom:0 留在键盘后面 → html[data-kb] 时改为静态，
 *     内容跟着正常滚动，保存键滑上来即可见。
 *  c) 键盘/工具栏压缩可视区时，浮动小件（草稿球、装到桌面条）压住输入框 → 临时收起。
 * ================================================================== */
.page-foot { flex-wrap: nowrap; }
/* min-width:0 让按钮能被压窄，但文字不换行会溢出到按钮外、把整页撑宽几像素 ——
   所以必须配 ellipsis 收口（320 老屏实测：不收口整页横向溢出 8~15px） */
.page-foot .btn { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html[data-kb="1"] .page-foot { position: static; }
html[data-kb="1"] .float-ball,
html[data-kb="1"] .install-bar,
html[data-kb="1"] .edge-hint { display: none !important; }

/* 锚点跳转 / 聚焦滚动时别把目标藏到粘性顶栏下面 */
html { scroll-padding-top: 76px; scroll-padding-bottom: 84px; }
.modal-body input, .modal-body select, .modal-body textarea { scroll-margin-bottom: 96px; }

/* 底部抽屉在「浏览器工具栏 / 微信底部栏」之上收口，别让末排按钮贴到屏幕外 */
.sh-sheet { bottom: calc(var(--wx-inset-bottom, 0px) + var(--tg-safe-bottom, 0px)); }

/* 弹窗打开时收起浮动件：草稿球的 z-index 比遮罩高，小屏上会坐在「保存」键上 */
html[data-modal="1"] .float-ball,
html[data-modal="1"] .install-bar { display: none !important; }

/* —— 16. 底部安全区统一收口（TG / 微信 / 刘海屏）+ 2026-11-10 —
 *
 * 之前只有 env(safe-area-inset-bottom) 一处来源，但：
 *   · TG Mini App 里安全区是客户端给的 --tg-safe-bottom（34px），env() 拿不到；
 *   · 微信 iOS 整屏渲染时底部工具栏 49pt，用 --wx-inset-bottom。
 * 弹窗底栏、页面吸附底栏、抽屉底栏只认 env() 就会被压到系统手势条下面。
 * 这里统一成一个 --safe-b：三者取最大，所有贴底元素都读它。 */
html {
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px), var(--wx-inset-bottom, 0px));
}
.page-foot { padding-bottom: calc(10px + var(--safe-b)); }
.modal-foot { padding: 8px 12px calc(8px + var(--safe-b)); }
.drawer-foot { padding: 14px 18px calc(14px + var(--safe-b)); }
.mask { padding-bottom: calc(16px + var(--safe-b)); }
@media (max-width: 520px) {
  .mask { padding-bottom: calc(10px + var(--safe-b)); }
  /* 弹窗高度也要让开安全区，否则底栏虽加了内边距、整块还是压在手势条上 */
  .modal { max-height: calc(var(--vvh, 100dvh) - 20px - var(--tg-safe-top, 0px) - var(--safe-b)); }
  .modal.modal-full { height: calc(var(--vvh, 100dvh) - 20px - var(--tg-safe-top, 0px) - var(--safe-b)); }
}

/* ==================================================================
 * v16 · 主图一键美化（2026-11-11）
 * 槽位按钮 + 前后对比组件（拖动分割线）+ 全屏美化浮层
 * ================================================================== */
.slot .mk.eh { border-color: #E2D8FF; color: #6B3FD4; }
.slot .mk.eh.on { border-color: #6B3FD4; background: #F3ECFF; color: #6B3FD4; font-weight: 600; }
html[data-theme="dark"] .slot .mk.eh { border-color: #3A3357; background: #1A1926; color: #BCA9FF; }
html[data-theme="dark"] .slot .mk.eh.on { border-color: #6B5BD6; background: #2A2440; color: #D6CCFF; font-weight: 600; }

/* 对比舞台：两张同尺寸叠放，上层用 clip-path 开窗 */
.cmp {
  position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 180px;
  background: #0B0F14; overflow: hidden; touch-action: pan-y; cursor: ew-resize;
}
.cmp-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.cmp-tag {
  position: absolute; top: 10px; z-index: 2; font-size: 11.5px; line-height: 1.6;
  padding: 2px 9px; border-radius: 999px; background: rgba(8, 12, 18, .58);
  color: #fff; pointer-events: none;
}
.cmp-tag.l { left: 10px; }
/* 右侧标签让开 44px 的关闭键，避免叠在一起 */
.cmp-tag.r { right: 58px; }
.cmp-line {
  position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 0 10px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.cmp-line b {
  position: absolute; top: 50%; left: 50%; width: 36px; height: 36px;
  margin: -18px 0 0 -18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.cmp-line b:before, .cmp-line b:after {
  content: ''; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-top: 2px solid #5A6270; border-left: 2px solid #5A6270;
}
.cmp-line b:before { left: 8px; transform: rotate(-45deg); }
.cmp-line b:after { right: 8px; transform: rotate(135deg); }
.cmp-range { width: 100%; height: 32px; margin: 10px 0 0; accent-color: var(--brand, #1E5EFF); }

/* 美化浮层：挂在 body 上（不能走 openModal，否则会把车辆表单冲掉） */
.enh-cmp {
  position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; align-items: stretch;
  padding: calc(14px + var(--tg-safe-top, 0px)) 14px calc(14px + var(--safe-b));
  background: #070A0F;
}
.enh-cmp .x {
  position: absolute; top: calc(8px + var(--tg-safe-top, 0px)); right: 10px; z-index: 5;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 22px; line-height: 1;
}
.enh-cmp .x:active { background: rgba(255, 255, 255, .26); }
.enh-stage { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
/* 舞台按照片本身的宽高比收缩（mount() 会写 aspect-ratio），上下不再留大片黑 */
.enh-stage .cmp { width: auto; height: auto; max-width: 100%; max-height: 100%; margin: 0 auto; aspect-ratio: 4 / 3; }
.enh-cmp .cmp-range { flex: 0 0 auto; margin: 14px 0 0; }
.enh-cmp .enh-bar { flex: 0 0 auto; display: flex; gap: 10px; margin-top: 14px; }
.enh-cmp .enh-bar .btn { flex: 1 1 0; min-width: 0; min-height: 46px; margin: 0; border-radius: 12px; }
.enh-cmp .enh-bar .btn-ghost { background: #232A36; border-color: #3B4757; color: #E6EDF6; }
.enh-cmp .enh-bar .btn-primary { background: var(--cta, #1E5EFF); border-color: transparent; color: var(--cta-ink, #fff); font-weight: 600; }
.enh-hint { font-size: 12.5px; line-height: 1.55; color: var(--ink3); margin: 0 0 10px; }
.enh-hint.dark { color: #93A0B0; text-align: center; margin: 10px 0 0; }

@media (max-height: 620px) {
  .enh-hint.dark { display: none; }
  .enh-cmp .cmp-range { margin-top: 8px; }
  .enh-cmp .enh-bar { margin-top: 8px; }
}

/* ==================================================================
 * v17 · 短视频文案 + 分镜（2026-11-11）
 * 入口在车辆表单「车况亮点」下方，浮层挂 body（层级高于车辆弹窗）
 * ================================================================== */
.vs-entry { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.vs-entry .hint { margin: 0; font-size: 12px; line-height: 1.5; flex: 1 1 auto; min-width: 0; }
.vs-open { flex: 0 0 auto; }

.vs-mask { z-index: 1250; background: rgba(10, 14, 20, .55); }
.vs-modal { max-width: 560px; }

.vs-warn {
  margin: 0 0 12px; padding: 9px 11px; border-radius: 10px;
  background: #FFF7E8; border: 1px solid #F2D9AC; color: #85560F;
  font-size: 12.5px; line-height: 1.55;
}
.vs-pick-h { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 0 0 10px; }
.vs-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.vs-kind {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  min-height: 66px; padding: 10px 11px; border-radius: 12px;
  border: 1px solid var(--line2); background: #fff;
}
.vs-kind b { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.vs-kind span { font-size: 11.5px; line-height: 1.45; color: var(--ink3); }
.vs-kind:active { background: #F3F6FF; border-color: var(--brand); }

.vs-dur { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.vs-dur > span { font-size: 12.5px; color: var(--ink3); }
.vs-dchip {
  min-width: 56px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink2); font-size: 12.5px;
}
.vs-dchip.on { border-color: var(--brand); color: var(--brand); background: rgba(30, 94, 255, .07); font-weight: 600; }

/* 生成中的三点 */
.vs-loading { display: flex; gap: 6px; justify-content: center; padding: 42px 0; }
.vs-loading i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand); opacity: .35;
  animation: vsDot 1s infinite ease-in-out;
}
.vs-loading i:nth-child(2) { animation-delay: .15s; }
.vs-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes vsDot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* 结果 */
.vs-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.vs-head b { font-size: 15.5px; line-height: 1.45; color: var(--ink); flex: 1 1 180px; min-width: 0; }
.vs-badge {
  flex: 0 0 auto; font-size: 11px; font-style: normal; line-height: 1.7;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(30, 94, 255, .1); color: var(--brand); white-space: nowrap;
}
.vs-badge.local { background: #F1F3F6; color: var(--ink3); }

.vs-sec { margin: 0 0 16px; }
.vs-sec h4, .vs-tipbox h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink3); text-transform: none;
}
.vs-vo { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.vs-vo:last-child { border-bottom: 0; }
.vs-vo > span {
  flex: 0 0 52px; font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--brand); padding-top: 2px;
}
.vs-vo > p { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.62; color: var(--ink); }

.vs-shot {
  border: 1px solid var(--line2); border-radius: 12px;
  padding: 9px 11px; margin-bottom: 8px; background: #FCFDFE;
}
.vs-shot-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-shot-h em {
  font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: var(--ink2); border-radius: 6px; padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.vs-shot-h b { font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.vs-shot-h span {
  font-size: 11px; color: var(--ink3); border: 1px solid var(--line2);
  border-radius: 999px; padding: 0 7px; line-height: 1.7;
}
.vs-move { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink2); }
.vs-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink3); }

.vs-tipbox {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #F5F8FF; border: 1px solid #DDE6FA;
}
.vs-tipbox p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink2); }
/* 话题标签：只读成品，按车型精选。chip 可点复制 */
.vs-tags { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #F0FBF5; border: 1px solid #CDEDDC; }
.vs-tags h4 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: #17724E; }
.vs-tags .vs-live { margin-left: 6px; font-size: 10.5px; font-weight: 400; color: #0E8C63; }
.vs-tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.vs-tagrow span {
  display: inline-block; padding: 5px 9px; border-radius: 999px;
  background: #fff; border: 1px solid #BFE4D2; color: #146B49;
  font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums;
}
.vs-tagcopy {
  margin-top: 9px; min-height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #BFE4D2; background: #fff; color: #146B49; font-size: 12px;
}
html[data-theme="dark"] .vs-tags { background: #10251C; border-color: #1E4634; }
html[data-theme="dark"] .vs-tags h4 { color: #6FE0A9; }
html[data-theme="dark"] .vs-tags .vs-live { color: #4FD39B; }
html[data-theme="dark"] .vs-tagrow span { background: #0D1E17; border-color: #235A41; color: #7CE7B5; }
html[data-theme="dark"] .vs-tagcopy { background: #0D1E17; border-color: #235A41; color: #7CE7B5; }
.vs-cost { margin: 0 0 6px; font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.vs-back {
  width: 100%; min-height: 42px; margin-top: 6px; border-radius: 10px;
  border: 1px dashed var(--line2); background: transparent; color: var(--ink3); font-size: 12.5px;
}

/* 深色：后台切深色时这一层也要跟上，别出现白块 */
html[data-theme="dark"] .vs-kind,
html[data-theme="dark"] .vs-dchip { background: #151A22; border-color: #2A3340; }
html[data-theme="dark"] .vs-kind:active { background: #1C2534; }
html[data-theme="dark"] .vs-dchip.on { background: rgba(90, 140, 255, .14); color: #9DBAFF; border-color: #3C568F; }
html[data-theme="dark"] .vs-shot { background: #12171E; border-color: #2A3340; }
html[data-theme="dark"] .vs-shot-h em { background: #33404F; }
html[data-theme="dark"] .vs-tipbox { background: #141B25; border-color: #2A3646; }
html[data-theme="dark"] .vs-warn { background: #2A2214; border-color: #4A3A18; color: #E8C88A; }
html[data-theme="dark"] .vs-badge { background: rgba(90, 140, 255, .16); color: #9DBAFF; }
html[data-theme="dark"] .vs-badge.local { background: #232A35; color: #98A5B6; }

@media (max-width: 380px) {
  .vs-kinds { grid-template-columns: 1fr; }
  .vs-kind { min-height: 0; }
  .vs-vo > span { flex-basis: 46px; }
}

/* 结果页脚注 + 未生成时按钮要是「明显不可点」，否则销售会一直戳「换一版」 */
.vs-note { margin: 0 0 6px; font-size: 11.5px; line-height: 1.55; color: var(--ink3); }
.vs-modal .modal-foot .btn:disabled { opacity: .4; }

/* ==================================================================
 * 列表主图取景（2026-11-18 客户明确要求：主页主图一律不裁切）
 * 任何原始照片都整张放进 16:10 卡片（object-fit: contain），
 * 空出来的位置用同一张照片放大模糊做衬底，视觉仍是满幅，
 * 但车顶、车尾、轮子一个像素都不丢。
 * 卡片网格与列表视图一致处理；判定在 app.js 的 fitPhotos()。
 * ================================================================== */
.card-img.fit-contain, .row-img.fit-contain { background: #E9EDF2; }
.card-img.fit-contain::before, .row-img.fit-contain::before {
  content: ''; position: absolute; inset: -8%; z-index: 0;
  background-image: var(--bgimg, none); background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.15) brightness(.78); transform: scale(1.06);
}
.card-img.fit-contain img, .row-img.fit-contain img { position: relative; z-index: 1; object-fit: contain; }
.card-img.fit-contain:hover img { transform: none; }

/* 九宫格合成图（v19）：九张已合成一张 3024² 大图，容器改成单张大图的尺寸 */
.sc-grid.merged {
  display: block; padding: 8px; max-height: 52vh; overflow-y: auto;
  background: #F7F9FB; border-radius: 10px;
}
.sc-grid.merged img { display: block; width: 100%; height: auto; border-radius: 8px; }
/* 降级/提示行：和普通脚注区别开，免得用户当成正文读过去 */
.vs-note.warn { color: #A3500B; }
html[data-theme="dark"] .vs-note.warn { color: #E8C88A; }

/* ==================================================================
 * v20 · 下架 / 垃圾箱（2026-11-11）
 * 下架 = 灰标签；垃圾箱 = 后台里的一张可恢复清单
 * ================================================================== */
.pill.off, .pill.draft { background: #EEF1F5; color: #6B7280; }
html[data-theme="dark"] .pill.off, html[data-theme="dark"] .pill.draft { background: #232A35; color: #9BA6B6; }
.vmenu .vmenu-del { color: var(--bad); border-color: var(--bad-soft); }

.trash-list { display: flex; flex-direction: column; gap: 10px; }
.trash-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.trash-info { flex: 1 1 150px; min-width: 0; }
.trash-info b {
  display: block; font-size: 13.5px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trash-info span { display: block; font-size: 11.5px; line-height: 1.5; color: var(--ink3); }
.trash-row .btn { flex: 0 0 auto; min-height: 38px; }

/* ==================================================================
 * v21（2026-11-12）：状态确认流 / 看盘明细 / 谱面取色 / 已售出红章
 * ================================================================== */

/* 挂起 / 待确认 */
.pill.pending { background:#FDF1E7; color:#A3500B; }
.pending-box {
  background:#FFF7EF; border:1px solid #F5C99B; color:#8A4A10;
  border-radius:12px; padding:10px 12px; font-size:13px; margin-bottom:12px;
}
.pending-car {
  background:var(--card, #fff); border:1px solid var(--line, #E5E7EB);
  border-radius:12px; padding:10px 12px;
}
.pending-car b { display:block; font-size:14px; }
.pending-car span { font-size:12px; color:var(--ink3, #6B7280); }

/* 消息：已读 / 未读 一眼分清 */
.notif.unread { border-left:3px solid var(--brand, #1D4ED8); background:var(--brand-soft, #EEF3FF); }
.notif.read { border-left:3px solid transparent; opacity:.62; }
.notif.read .notif-t { color:var(--ink3, #6B7280); }
.notif-img { max-width:100%; max-height:180px; border-radius:10px; margin-top:8px; display:block; }

/* 车源行高亮（消息「返回车源管理」跳转） */
@keyframes rowHl { 0%,100% { background:transparent; } 50% { background:var(--brand-soft, #EEF3FF); } }
tr.row-hl { background:var(--brand-soft, #EEF3FF) !important; outline:2px solid var(--brand, #1D4ED8); outline-offset:-2px; }
tr.row-hl td { background:transparent; }

/* 权限按人微调 */
.perm-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:6px 14px; margin-top:6px; }
.perm-item { display:flex; align-items:center; gap:6px; font-size:13px; min-height:32px; }

/* 站点设置「翻译」按钮 */
.tri-btn { margin-left:8px; vertical-align:middle; }
.section h3 .tri-btn { float:right; }

/* 品牌色：精选色板 + 谱面 */
.swatch-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(74px,1fr)); gap:8px; margin:8px 0 12px; width:100%; }
.swatch { display:flex; flex-direction:column; align-items:center; gap:4px; background:none; border:0; padding:4px; cursor:pointer; }
.swatch i { width:38px; height:38px; border-radius:50%; display:block; box-shadow:inset 0 0 0 1px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.12); transition:transform .15s; }
.swatch:active i { transform:scale(.9); }
.swatch span { font-size:11px; color:var(--ink2, #374151); }
.swatch.on i { outline:2px solid var(--brand, #1D4ED8); outline-offset:2px; }

.spec-wrap { width:100%; max-width:260px; margin:4px 0 10px; }
#specSV { width:100%; height:132px; border-radius:10px; display:block; touch-action:none; cursor:crosshair; }
.spec-hue { position:relative; height:16px; border-radius:8px; margin-top:8px; touch-action:none; cursor:crosshair;
  background:linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); }
.spec-hue i { position:absolute; top:-3px; width:6px; height:22px; border-radius:3px; background:#fff;
  box-shadow:0 0 0 1.5px rgba(0,0,0,.35); transform:translateX(-3px); }
.spec-val { display:flex; align-items:center; gap:8px; margin-top:8px; }
.spec-dot { width:26px; height:26px; border-radius:50%; position:relative; box-shadow:inset 0 0 0 1px rgba(0,0,0,.15), 0 1px 4px rgba(0,0,0,.2); }
.spec-val b { font-size:14px; font-family:var(--mono, monospace); }

/* 营销页看盘三格可点 */
.mk-hero-stats button {
  background:none; border:0; color:inherit; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:4px 10px; cursor:pointer; border-radius:10px;
}
.mk-hero-stats button:active { background:rgba(255,255,255,.14); }
.mk-hero-stats button b { font-size:20px; }
.mk-hero-stats button span { font-size:12px; opacity:.85; }

/* AI 文案：单选车 + 缩略图 */
.mk-car-1 { cursor:pointer; }
.mk-car-1 .mk-thumb { display:block; width:56px; height:42px; border-radius:8px; overflow:hidden; flex:0 0 auto; }
.mk-car-1 .mk-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.mk-car-1 input[type=radio] { flex:0 0 auto; }

/* 前台已售出红章 */
.sold-stamp {
  position:absolute; top:50%; left:50%; z-index:3; pointer-events:none;
  transform:translate(-50%,-50%) rotate(-12deg);
  border:3px solid #C81E1E; color:#C81E1E; border-radius:8px;
  padding:6px 14px; text-align:center; background:rgba(255,255,255,.72);
  text-transform:uppercase;
}
.sold-stamp b { display:block; font-size:22px; font-weight:800; letter-spacing:2px; line-height:1.1; }
.sold-stamp i { display:block; font-size:10px; font-style:normal; font-weight:700; letter-spacing:1px; margin-top:2px; }
.card.is-sold .card-img img, .row.is-sold img, a.row.is-sold .row-img img { filter:saturate(.55) brightness(.92); }

/* 微信浮窗提醒条 */
.wx-float-tip {
  position:fixed; left:10px; right:10px; top:calc(env(safe-area-inset-top, 0px) + 8px);
  z-index:1200; display:flex; align-items:flex-start; gap:8px;
  background:rgba(17,24,39,.92); color:#F9FAFB; font-size:13px; line-height:1.5;
  border-radius:12px; padding:10px 12px; box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.wx-float-tip-t { flex:1 1 auto; min-width:0; }
.wx-float-tip-x { background:none; border:0; color:#9CA3AF; font-size:18px; line-height:1; padding:2px 4px; }

/* ==================== 分享动图生成器（assets/anim.js） ==================== */
/* 车辆照片区的入口 */
.anim-entry { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; }
.anim-entry .btn { margin:0; }

/* 全屏层：移动端用 --vvh（ui.js 现算的可视高度），三级兜底防裁切 */
.an-layer {
  position:fixed; inset:0; z-index:9400;
  display:flex; align-items:flex-end; justify-content:center;
  background:rgba(6,10,20,.62);
  height:100vh; height:-webkit-fill-available; height:100dvh;
}
.an-sheet {
  width:100%; max-width:600px;
  max-height:92vh; max-height:92dvh;
  display:flex; flex-direction:column;
  background:var(--card); color:var(--ink);
  border-radius:18px 18px 0 0;
  box-shadow:0 -8px 30px rgba(0,0,0,.28);
  padding-bottom:max(env(safe-area-inset-bottom, 0px), 0px);
}
.an-head {
  flex:0 0 auto; display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid var(--line); font-size:16px;
}
.an-x { background:none; border:0; font-size:24px; line-height:1; color:var(--ink3); padding:4px 8px; cursor:pointer; }
.an-body { flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; padding:14px 16px 18px; -webkit-overflow-scrolling:touch; }
.an-hint { margin:0 0 12px; font-size:12.5px; line-height:1.6; color:var(--ink3); }
.an-row { display:flex; gap:10px; flex-wrap:wrap; }
.an-row label { flex:1 1 190px; min-width:0; font-size:12px; color:var(--ink3); display:block; }
.an-row select { width:100%; margin-top:4px; padding:9px 10px; font-size:14px; border:1px solid var(--line2); border-radius:10px; background:var(--card); color:var(--ink); }
.an-btns { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.an-btns .btn { flex:1 1 200px; min-height:44px; }
.an-bar { height:6px; background:var(--brand-soft); border-radius:99px; overflow:hidden; margin:14px 0 8px; }
.an-bar i { display:block; height:100%; width:0; background:var(--brand); transition:width .12s linear; }
.an-stat { font-size:12.5px; line-height:1.6; color:var(--ink3); min-height:20px; }
.an-stage { margin-top:10px; }
.an-gen { margin-top:10px; font-size:12.5px; line-height:1.6; color:var(--ink2); }
.an-gen b { color:var(--ink); }
.an-stage canvas { width:100%; display:none; border-radius:12px; background:#0B1220; }
.an-stage canvas.live { display:block; }
.an-stage video { width:100%; max-height:46vh; object-fit:contain; display:none; border-radius:12px; background:#000; }
.an-acts { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.an-acts .btn { flex:1 1 160px; min-height:42px; }
.an-saved { margin-top:16px; padding-top:12px; border-top:1px dashed var(--line); font-size:12.5px; color:var(--ink3); }
.an-saved-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 0; }
.an-saved-row a { text-decoration:none; border:1px solid var(--line2); border-radius:8px; padding:3px 10px; color:var(--ink2); }
@media (max-height:680px) {
  .an-hint { display:none; }
  .an-head { padding:10px 14px; }
  .an-body { padding:10px 14px 14px; }
}

/* ==========================================================================
 * 动效播放（2026-11-14）：客户手上全是手机，所以这套东西有三个硬要求
 *   1) 不依赖 mp4：没有视频就用同一套动画实时画，任何手机都能看
 *   2) 全屏层高度走 --vvh 三级兜底，iOS/微信里底部按钮不会被裁掉
 *   3) 触控目标 ≥ 40px，按钮不透明（深色底上透明按钮等于看不见）
 * ========================================================================== */

/* 详情页主图上的入口 */
.an-pill {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 15px; border: 0; border-radius: 999px;
  background: rgba(8, 14, 30, .74); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.an-pill:active { transform: scale(.96); }

/* 动态封面：视频盖在主图上，切到「图片」时整块让位 */
.gallery .main .hero-vid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #0B1220; cursor: pointer;
}
.gallery .main.pic .hero-vid { display: none; }

/* 播放层 */
.an-full {
  position: fixed; inset: 0; z-index: 9600;
  display: flex; flex-direction: column;
  background: #04070E; color: #fff;
  height: 100vh; height: -webkit-fill-available; height: 100dvh; height: var(--vvh, 100dvh);
  overscroll-behavior: contain;
}
.an-full-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 6px;
}
/* 顶栏车名：跟视频末尾「有价格白面板」上的车名一致（品牌蓝 + 粗体大字）。
   末帧车名是 56*k（1080 基准），顶栏没有 k 缩放，用 clamp 给个接近的视觉字号；
   深色顶栏上品牌蓝对比度不够，垫一层浅色胶囊再上色（跟末帧白面板同一个视觉语言）。 */
.an-full-t {
  flex: 1 1 auto; min-width: 0;
  font-size: clamp(16px, 4.6vw, 20px); font-weight: 800; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--brand, #0A237D);
  background: rgba(255, 255, 255, .96);
  padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(4, 7, 14, .25);
}
/* 深色主题下站点主色会变亮，浅色底压不住 —— 保证白底始终配深色品牌字 */
.an-full-t { color: var(--brand-ink, var(--brand, #0A237D)); }
.an-ic[hidden] { display: none; }   /* display:flex 会盖掉 [hidden]，必须显式关掉 */
.an-ic {
  width: 44px; height: 44px; min-width: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
/* 背景：主图放大模糊 + 压暗。1:1 的画面放在竖屏里上下必然留黑，
   有张虚化的车照垫底，观感就从「黑边」变成「电影院」 */
.an-full-bg {
  position: absolute; inset: -8%; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(26px) brightness(.42) saturate(1.15);
  transform: scale(1.08); pointer-events: none;
}
.an-full-bar, .an-full-stage, .an-full-foot { position: relative; z-index: 1; }
.an-full { overflow: hidden; }
.an-full-stage {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center; padding: 0 8px;
}
.an-full-stage.is-loading::after {
  content: ''; position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  animation: an-spin .8s linear infinite;
}
@keyframes an-spin { to { transform: rotate(360deg); } }
.an-play-vid, .an-play-cv {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
  aspect-ratio: 1 / 1; border-radius: 14px; background: #0B1220;
}
.an-play-cv { cursor: zoom-in; }
.an-full-tip { font-size: 14px; color: rgba(255, 255, 255, .8); text-align: center; padding: 24px; }
/* 长按提示：几秒后淡出，pointer-events:none 不挡长按手势 */
.an-lp-hint {
  position: absolute; left: 50%; bottom: calc(76px + max(env(safe-area-inset-bottom, 0px), 0px)); transform: translateX(-50%);
  z-index: 3; max-width: calc(100% - 28px); white-space: nowrap;
  background: rgba(6, 11, 24, .8); color: #fff; font-size: 12px; line-height: 1.4;
  padding: 7px 14px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .3); transition: opacity .5s;
  animation: an-lp-in .3s ease-out;
}
.an-lp-hint.out { opacity: 0; }
@keyframes an-lp-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
/* 音效选择按钮 + 小面板 */
.an-ic-mu { font-size: 18px; }
.an-mu-sheet {
  position: fixed; z-index: 9700; top: calc(52px + env(safe-area-inset-top, 0px)); right: 12px;
  width: 170px; background: #fff; color: #18202E; border-radius: 13px;
  padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
}
.an-mu-h { font-size: 12px; color: #667085; padding: 6px 10px 4px; font-weight: 700; }
.an-mu-opt {
  display: block; width: 100%; min-height: 42px; text-align: left; border: 0;
  background: transparent; color: #18202E; font-size: 14px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
}
.an-mu-opt.on { background: #EAF0FF; color: var(--brand, #0A237D); font-weight: 700; }
.an-mu-opt.an-mu-up {
  border-top: 1px solid #E4E8EF; margin-top: 4px; padding-top: 11px;
  color: var(--brand, #0A237D); font-weight: 700; border-radius: 0 0 8px 8px;
}
/* 分享面板「取消准备」小按钮 —— 进度慢时给明确出路，不让人干等 */
.an-vs-cancel {
  display: inline-block; margin-top: 8px; border: 1px solid rgba(120, 132, 150, .45);
  background: transparent; color: inherit; font-size: 12px; line-height: 1;
  padding: 8px 12px; border-radius: 999px; cursor: pointer; min-height: 34px;
}
.an-full-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + max(env(safe-area-inset-bottom, 0px), 0px));
}
.an-tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .10); border-radius: 999px; padding: 4px; }
.an-tabs button {
  border: 0; background: none; color: rgba(255, 255, 255, .72);
  font-size: 13px; padding: 9px 14px; min-height: 38px; border-radius: 999px; cursor: pointer;
}
.an-tabs button.on { background: #fff; color: #0A237D; font-weight: 700; }
.an-picbtn {
  margin-left: auto; border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 13px; padding: 9px 14px; min-height: 38px; border-radius: 999px; cursor: pointer;
}

/* 后台：上传手机视频 / 录制不可用时的替代路径 */
.an-up { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.an-up .btn { margin: 0; min-height: 40px; }
.an-up select {
  flex: 1 1 120px; min-width: 0; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--ink);
}
.an-fb { margin-top: 4px; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--brand-soft); }
.an-fb b { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.an-fb p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--ink2); }
.an-fb-link { display: flex; gap: 8px; }
.an-fb-link input {
  flex: 1 1 auto; min-width: 0; padding: 9px 10px; font-size: 12px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--ink2);
}
.an-fb-qr { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.an-fb-qr canvas { width: 110px; height: 110px; border-radius: 8px; background: #fff; }
.an-fb-qr span { font-size: 12px; line-height: 1.6; color: var(--ink3); }

@media (max-height: 640px) {
  .an-tabs button { padding: 7px 12px; }
  .an-full-bar { padding-top: calc(4px + env(safe-area-inset-top, 0px)); }
}

/* ==========================================================================
 * Facebook 文案弹层（P0 · 2026-11-14）
 * 手机后台是主场景：文案框要能滚动、复制按钮永远在手指够得到的地方。
 * 桌面端阅读宽度压住 720px——一行长到 120 个字符，老板根本读不出错别字。
 * ========================================================================== */
.fb-langs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.fb-lang {
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--card); color: var(--ink2);
  font-size: 13px; font-weight: 600;
}
.fb-lang.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.fb-text {
  width: 100%; max-width: 100%; box-sizing: border-box;
  height: 38vh; min-height: 200px; max-height: 46vh; resize: vertical;
  padding: 12px 13px; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font-family: var(--font-th), inherit; font-size: 13.5px; line-height: 1.85;
  white-space: pre-wrap; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.fb-text:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.fb-meta {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 6px; font-size: 12px; color: var(--ink3);
}
.fb-warn { color: var(--bad); font-weight: 600; }

/* 小屏（SE / 安卓 360）：文案框矮一点，保证底部「复制文案」不用滚也能看见 */
@media (max-height: 720px) {
  .fb-text { height: 30vh; min-height: 150px; max-height: 34vh; font-size: 13px; line-height: 1.7; }
  .fb-lang { min-height: 36px; padding: 0 12px; }
}

/* 手机上的「FB 文案」快捷入口：只在窄屏出现。
 * 原因：车源表格在手机上是横向滚动的，操作列在屏幕外，老板不会去滑。 */
.fb-inline { display: none; }
@media (max-width: 760px) {
  .fb-inline {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 32px; margin-top: 8px; padding: 0 12px;
    font-size: 12.5px; border-radius: 999px;
    border: 1px solid var(--line2); background: var(--card); color: var(--ink2);
  }
  .fb-inline:active { transform: scale(.96); }
}

/* ==========================================================================
 * 视频生成「板块」与二维码大图（2026-11-14）
 *   板块一：模板成片（本机渲染）  板块二：AI 文生视频（VIP，未开放）
 *   两件事必须在视觉上分开，否则老板以为「动效」就是全部能力。
 * ========================================================================== */
.an-blk {
  margin: 12px 0 14px; padding: 12px 12px 4px;
  border: 1px solid var(--line2); border-radius: 14px; background: var(--card);
}
.an-blk-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.an-blk-h b { font-size: 14px; color: var(--ink); }
.an-blk-h span { font-size: 12px; line-height: 1.6; color: var(--ink3); }
.an-vip {
  align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.an-blk-ai { background: var(--brand-soft); border-style: dashed; }
.an-blk-ai .btn[disabled] { opacity: .75; cursor: not-allowed; margin-bottom: 10px; }

.an-ic-qr { font-size: 12px; font-weight: 800; letter-spacing: .02em; }

.an-qr {
  position: fixed; inset: 0; z-index: 9800;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 7, 14, .88);
  height: 100vh; height: -webkit-fill-available; height: 100dvh; height: var(--vvh, 100dvh);
}
.an-qr-card {
  width: 100%; max-width: 320px; box-sizing: border-box;
  padding: 18px 18px 16px; border-radius: 20px; background: #fff; color: var(--ink);
  text-align: center;
  max-height: 90%; overflow-y: auto; overscroll-behavior: contain;
}
.an-qr-card > b { display: block; font-size: 15px; margin-bottom: 12px; }
.an-qr-img { display: flex; justify-content: center; }
.an-qr-img canvas {
  width: 240px; height: 240px; max-width: 100%;
  border-radius: 12px; background: #fff;
}
.an-qr-url {
  margin: 10px 0 14px; font-size: 11.5px; line-height: 1.5; color: var(--ink3);
  word-break: break-all;
}
.an-qr-acts { display: flex; gap: 8px; }
.an-qr-acts .btn { flex: 1 1 0; margin: 0; min-height: 42px; }

@media (max-height: 640px) {
  .an-qr-img canvas { width: 180px; height: 180px; }
  .an-qr-card { padding: 14px; }
}

/* 手机车源列表的两个快捷入口：FB 文案 / 视频，并排一行 */
.inline-entry { display: none; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .inline-entry { display: flex; }
  /* 两个入口挤在一行：字号和内边距各收一点，宁可小一号也别换行占两行高度 */
  .inline-entry .fb-inline { margin-top: 0; padding: 0 9px; font-size: 12px; gap: 3px; }
}

/* ---------- 销售名片（2026-11-14） ---------- */
/* 账号表单里的头像上传 */
.up-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.up-prev {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 50%; overflow: hidden;
  background: var(--brand-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-weight: 700; font-size: 21px;
}
.up-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 名片预览：灰底托着，白卡才看得清边界 */
.card-prev {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; min-height: 140px; display: flex; align-items: center; justify-content: center;
}
/* 名片语言：主语言 + 同时显示的第二语言（柬语 + 中文双语卡） */
.card-lang {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 12px;
  background: var(--brand-soft); border-radius: 10px;
}
.cl-row { display: flex; align-items: center; gap: 6px; flex: 1 1 180px; min-width: 0; }
.cl-row label { font-size: 12px; color: var(--ink2, #3D4653); white-space: nowrap; }
/* 后台有一批 select { width:100% } 的通用规则，这里要压回去，否则两个下拉各占一整行 */
.card-lang select {
  height: 36px; width: auto; flex: 1 1 auto; min-width: 0; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink, #0E1116);
}
/* 名片版式：经典 / 金线框 / 居中徽标 + 竖版横版 */
.card-style { margin: 0 0 10px; }
.cs-row { display: flex; gap: 8px; margin: 0 0 8px; }
.cs-row:last-child { margin-bottom: 0; }
.cs-btn {
  flex: 1 1 0; min-width: 0; height: 38px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink2, #3D4653); font-size: 12.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
.cs-btn.on {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand); font-weight: 700;
}
.card-prev img { width: 100%; max-width: 400px; height: auto; display: block; border-radius: 8px; }
.mycard-btn { white-space: nowrap; }

@media (max-width: 760px) {
  .mycard-btn { padding: 0 9px; font-size: 12px; }
  .card-prev img { max-width: 100%; }
  .card-lang { gap: 8px; padding: 8px 10px; }
  .cl-row { flex: 1 1 100%; }
  .card-lang select { font-size: 12px; }
  .up-prev { width: 54px; height: 54px; flex-basis: 54px; font-size: 18px; }
}

/* ---------- 顾问联系入口（2026-11-14 P0，docs/58） ---------- */
/* 头像：缺照片退首字母 + 品牌色圆，不留空块 */
.ag-avt { display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-strong, #1E5EFF));
  color: #fff; font-weight: 700; flex: 0 0 auto; }
.ag-avt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ag-avt.ag-big { width: 46px; height: 46px; font-size: 19px; }
.ag-avt.ag-sm { width: 40px; height: 40px; font-size: 16px; }
.ag-avt.ag-bav { width: 40px; height: 40px; font-size: 17px; }
.ag-avt.ag-nophoto { background: linear-gradient(135deg, #0A237D, #1E5EFF); }

/* 手机底栏：滚动过主图才滑入 */
.ag-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px calc(8px + var(--safe-b, 0px));
  background: var(--panel, #fff); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(9, 14, 28, .12);
  transform: translateY(0); opacity: 1; transition: transform .22s ease, opacity .22s ease;
}
.ag-bar.ag-off { transform: translateY(110%); opacity: 0; pointer-events: none; }
.ag-bwrap { position: relative; flex: 0 0 auto; }
.ag-dot { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%;
  background: #12A150; border: 2px solid #fff; }
.ag-bwho { flex: 0 1 96px; min-width: 0; line-height: 1.25; }
.ag-bwho b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-bwho span { display: block; font-size: 10.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-bask { flex: 1 1 auto; min-width: 0; height: 44px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; padding: 0 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-bcall { flex: 0 0 46px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel, #fff); color: var(--brand); font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center; }
.ag-bcall svg, .ag-bcall i { width: 20px; height: 20px; }

/* 弹层 */
.ag-mask { position: fixed; inset: 0; z-index: 960; background: rgba(9, 14, 28, .55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  display: flex; align-items: flex-end; justify-content: center; }
.ag-mask.on { opacity: 1; pointer-events: auto; }
.ag-sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  overscroll-behavior: contain; background: var(--panel, #fff);
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(14px + var(--safe-b, 0px));
  transform: translateY(6%); transition: transform .22s ease;
}
.ag-mask.on .ag-sheet { transform: translateY(0); }
.ag-head { display: flex; align-items: center; justify-content: space-between; }
.ag-head h3 { margin: 0; font-size: 17px; color: var(--ink); }
.ag-head .x { border: 0; background: none; font-size: 22px; color: var(--ink3); padding: 4px 8px; }
.ag-sub { margin: 6px 0 12px; font-size: 12.5px; color: var(--ink3); line-height: 1.6; }
.ag-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--panel, #fff);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 11px; align-items: center; }
.ag-card .ag-cinfo { min-width: 0; }
.ag-nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ag-nm b { font-size: 15.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-lead { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--brand);
  border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.ag-st { font-size: 12px; color: var(--ok, #12A150); margin-top: 2px; }
.ag-langs { font-size: 11.5px; color: var(--ink3); margin-top: 1px; }
.ag-chs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 4px; }
.ag-ch { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; border-radius: 11px; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.ag-ch svg, .ag-ch i { width: 17px; height: 17px; }
.ag-ch.tg { background: #F4F7FE; border: 1px solid #B9C7E8; color: #0A237D; }
.ag-ch.wa { background: #F1FAF5; border: 1px solid #B6D9C8; color: #0B5E3D; }
.ag-ch.call { background: var(--bg, #F4F6FA); border: 1px solid var(--line); color: var(--ink2); }
.ag-book { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: 2px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel, #fff); color: var(--brand); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ag-more { margin: 14px 0 8px; font-size: 12px; color: var(--ink3); }
.ag-others { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 2px; }
.ag-pick { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; background: none; padding: 0; min-width: 52px; cursor: pointer; }
.ag-pick span { font-size: 11px; color: var(--ink2); max-width: 64px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ag-foot { margin: 12px 0 0; font-size: 11.5px; color: var(--ink3); line-height: 1.6; }

/* 桌面右栏顾问卡（替代店铺级三按钮 + 文字业务员列表） */
.ag-dcard { border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin-top: 12px;
  background: var(--panel, #fff); }
.ag-dhead { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--brand); }

@media (max-width: 760px) {
  .ag-bask { font-size: 14px; }
}
@media (max-width: 360px) {
  .ag-bwho { flex-basis: 78px; }
  .ag-bask { font-size: 13px; padding: 0 8px; }
}
@media (min-width: 761px) {
  .ag-bar { display: none; }
  .ag-mask { align-items: center; }
  .ag-sheet { border-radius: 18px; max-width: 460px; }
}

/* ---------- 后台：顾问编辑区（设置弹层里） ---------- */
.ag-edit-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.up-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--ink2); background: var(--panel); }

/* 后台：超时线索 + 渠道标签 */
.tbl-leads tr.lead-overdue td { background: rgba(220, 38, 38, .07); }
.tbl-leads tr.lead-overdue td:first-child { box-shadow: inset 3px 0 0 #DC2626; }
.lead-wait { margin-top: 4px; font-size: 11px; font-weight: 700; color: #DC2626; }
.via-chip { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--brand);
  border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; line-height: 1.7; }
