@charset "utf-8";
/* ============================================================================
 * 讯鹤礼品代发网 · 移动端适配层  v1.19
 * ----------------------------------------------------------------------------
 * 设计依据：用户确认的效果图（01-礼品下单-移动端对照.html）
 *   ① 顶栏只留 LOGO + 汉堡，搜索/注册/登录收进抽屉
 *   ② 主导航变横滑标签条
 *   ③ 左侧栏折叠成左上角汉堡抽屉（滑出式，遮罩可关）
 *   ④ 表格改「一单一张卡」，信息纵向排列
 *   ⑤ 输入框 16px 防 iOS 自动放大
 *   ⑥ 客服按钮圆形化，底部栏取消 fixed
 *
 * 引入方式：由 public/header.html 在 common.css 之后引入，保证优先级最高。
 * 断点：≤1024 平板 / ≤768 手机 / ≤480 小屏
 * ========================================================================== */

/* 版本历史
 * ---------------------------------------------------------------------------
 * v1.19  顶栏层级对齐设计稿 + auth 页收尾（用户 2026-09-29 反馈）
 *       + 1.2  修「注册/登录掉到第二行」：原站 header 内联样式
 *              @media(max-width:900px){#header .auth{flex:0 0 100%}} +
 *              @media(max-width:1300px){#header .htop .wrap{flex-wrap:wrap}}
 *              与本文件同为 (0,2,0) 权重、且内联样式在 <link> 之后 → 内联赢。
 *              必须 !important 才能压回「顶栏右侧小胶囊」。
 *       + 0.6  修「红色介绍栏没隐藏」：原站 xh-auth.css 的
 *              .xh-auth-page .xh-auth-intro{display:flex!important} 与本文件同权重、
 *              且 xh-auth.css 在该页后加载 → 它赢。改成更高权重 + !important。
 *       + 0.7  auth 页隐藏右下角客服浮球（.rightqq），它固定定位会压住表单。
 * v1.18  下单页对齐设计稿（用户 2026-09-29 反馈）
 *       + 8.6 礼品信息「图左 + 名称/标签右」重排（设计稿 .g-head 写法）
 *       + 11  会员菜单横滑胶囊条（设计稿 .m-menu 写法），JS 注入
 * v1.17  下单页吸底栏接入业务元素 + 表格卡片化缺陷修复（坑 5 / 坑 6）
 * v1.15  首版：顶栏汉堡 + 导航横滑 + 侧栏抽屉 + 表格卡片化 + 表单 16px
 * ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * 0. 全局：解除桌面端锁宽（common.css:8 的 body{min-width:1200px} 是全站锁死源头）
 * ------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  html, body {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;  /* 防横屏字号被放大 */
  }
  body {
    font-size: 15px;
  }
  /* 所有固定宽度容器一律改为流式。
     ⚠ 坑 7（v1.18 踩到并修复）：这里早期写的是裸 `.wrap` `img` `table`，
     没有任何父级限定 —— 结果命中了登录页/注册页自己的网格布局
     （.xh-auth-shell 是 `display:grid;grid-template-columns:300px minmax(0,1fr)`），
     把 `minmax(0,1fr)` 那列压成了 38px，整个表单挤成一条竖线、按钮溢出到屏外。
     修法两条：
       ① 给通用容器加父级限定，让它们只作用于「主内容区」，不再全站裸奔
       ② 用 :where() 把选择器权重降到 0，这样页面自己的样式永远能赢
       ③ 顺手把 .xh-auth-page（登录/注册/找回密码）整体排除在外 */
  :where(.outer-wrap, .page-body, .site-main) :where(.wrap):not(#header .wrap),
  :where(#header) :where(.wrap),
  :where(.wrapper):not(#header .wrapper),
  :where(.center),
  :where(.main-wrap),
  :where(.col-main) {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  /* 登录 / 注册 / 找回密码页：它们是独立布局，有自己完整的响应式规则
     （xh-auth.css 的 @media(max-width:780px)），移动端适配层不得介入其内部结构 */
  .xh-auth-page,
  .xh-auth-page * {
    /* 只保留「不越界」这一条底线，不碰任何尺寸/布局 */
    max-width: 100%;
  }
  .xh-auth-page { min-width: 0; }
  /* 图片/表格限宽同样排除 auth 页（否则 .xh-control 会被压） */
  img, video, iframe, table {
    max-width: 100%;
  }
  .xh-auth-page img,
  .xh-auth-page video,
  .xh-auth-page iframe,
  .xh-auth-page table { max-width: 100%; }
  img {
    height: auto;
  }
  /* 触控目标最小 44px 高，避免误点 */
  a, button, input[type="submit"], .btn {
    -webkit-tap-highlight-color: rgba(230, 0, 18, .08);
  }
}

/* ===========================================================================
 * 0.5 登录 / 注册 / 找回密码页 —— 修 xh-auth.css 自带的 `!important` 死锁
 *
 * 现象（v1.18 排查）：
 *   .xh-auth-shell 在任何手机尺寸下都保持 display:grid 且
 *   列宽 = 300px + 1fr，实测 390px 屏上算出 "300px 68px"，
 *   表单区只剩 38~68px，输入框挤成一条竖线、提交按钮溢出到屏外。
 *
 * 根因：
 *   xh-auth.css:5   .xh-auth-page .xh-auth-shell{display:grid!important}   ← 权重 0,2,0 + !important
 *   xh-auth.css:95  @media(max-width:780px){ .xh-auth-shell{display:block} } ← 权重 0,1,0，无 !important
 *   后者永远打不过前者，所以手机端从未真正变成单列。
 *   这是原站样式自带的缺陷（不是本次适配引入），只是以前没人用手机看。
 *
 * 修法：用同等权重 + !important 覆盖，把 780px 以下的单列布局真正生效。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* 先把 781~1024 的夹缝区间也收成单列（原站只管到 780） */
  .xh-auth-page .xh-auth-shell,
  .xh-auth-page .xh-login-shell,
  .xh-auth-shell,
  .xh-login-shell {
    display: block !important;
    width: 100% !important;
    max-width: 660px !important;
    min-height: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: none !important;
  }
  .xh-auth-page {
    padding: 18px 10px 30px !important;
  }
  /* 介绍栏在窄屏不再与表单并排争宽 */
  .xh-auth-page .xh-auth-intro { display: none !important; }
  /* 表单区铺满、内边距收紧 */
  .xh-auth-panel,
  .xh-login-shell .xh-auth-panel {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 20px 17px 24px !important;
    box-sizing: border-box !important;
  }
  .xh-login-form,
  .xh-forgot-form { width: auto !important; max-width: 100% !important; }
  /* 字段从「左标签 + 右输入」改为上下堆叠 */
  .xh-login-form .xh-field,
  .xh-forgot-form .xh-field,
  .xh-field,
  .xh-field-full {
    display: block !important;
    grid-template-columns: none !important;
    margin-bottom: 12px !important;
  }
  .xh-login-form .xh-field > label,
  .xh-forgot-form .xh-field > label,
  .xh-field > label {
    display: block !important;
    width: auto !important;
    text-align: left !important;
    margin-bottom: 5px !important;
  }
  .xh-form-grid { display: block !important; }
  .xh-submit { width: 100% !important; }
  /* 验证码行：输入 + 按钮，保证不溢出 */
  .xh-code-group {
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 7px !important;
  }
  .xh-code-btn { width: auto !important; min-width: 0 !important; }
  .xh-auth-heading { display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; }
  .xh-secure { flex: none; }
  .xh-auth-page .xh-control,
  .xh-auth-page input,
  .xh-auth-page textarea { max-width: 100% !important; box-sizing: border-box !important; }
  .xh-login-tools { padding-left: 0 !important; flex-wrap: wrap; gap: 10px; }
}

/* ===========================================================================
 * 0.6 auth 页：左侧红色介绍栏 .xh-auth-intro → 收成「顶部品牌条」
 *
 * ★ 为什么改了两次才对（坑 9，值得记下来）：
 *   第一版我写 display:none 想直接藏掉，压不动。原因是 login.html / reg.html
 *   在 <aside> 上写了**内联 style 属性**：
 *       style="display:flex!important;...;background:#ef6258!important;..."
 *   按 CSS 级联规则，两个 !important 声明相撞时，**内联 style 永远赢过外部样式表**
 *   —— 无论外部选择器权重多高。所以在 mobile.css 里怎么写都没用，
 *   必须去模板里把那串 !important 降级（已改：只留 background/color）。
 *
 * ★ 为什么最终选择「收窄」而不是「隐藏」：
 *   这块 347px 高的红色区域是本站唯一的品牌视觉（品牌字 + 3 个卖点勾）。
 *   但 390×844 的屏上它占掉 41% 首屏，用户得往下滚才能看见手机号输入框。
 *   纯删掉会丢品牌辨识度，所以改成 ~74px 的横向品牌条：
 *   保留「XUNHE GIFT FULFILLMENT / 礼品代发 真实物流」主信息，
 *   卖点列表与底部文案收起，表单即刻进入首屏。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  .xh-auth-page .xh-auth-shell .xh-auth-intro,
  .xh-auth-page .xh-auth-intro {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px 12px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 14px 18px !important;
    margin: 0 0 12px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-align: left !important;
  }
  /* 品牌英文小标：淡化为细字 */
  .xh-auth-page .xh-auth-intro .xh-auth-brand {
    flex: 0 0 100% !important;
    margin: 0 !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    letter-spacing: .16em !important;
    opacity: .72 !important;
  }
  /* 主标题：32px->19px，并与 <em> 同行排列 */
  .xh-auth-page .xh-auth-intro h1 {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 7px !important;
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
  }
  .xh-auth-page .xh-auth-intro h1 em {
    display: inline !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }
  /* 副标题：跟在标题右侧，小字 */
  .xh-auth-page .xh-auth-intro > p {
    flex: 1 1 auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    opacity: .9 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  /* 三个卖点勾 + 底部文案：窄屏收起，品牌条只留一行 */
  .xh-auth-page .xh-auth-intro .xh-service-list,
  .xh-auth-page .xh-auth-intro .xh-intro-foot { display: none !important; }
  /* 右上装饰圆/斜线在矮条里会溢出，一并关闭 */
  .xh-auth-page .xh-auth-intro::before,
  .xh-auth-page .xh-auth-intro::after { display: none !important; }

  /* 介绍栏收窄后，表单面板独占整宽 */
  .xh-auth-page .xh-auth-shell { max-width: 560px !important; }
}
/* ≤480：品牌条再压一档，副标题直接隐藏 */
@media screen and (max-width: 480px) {
  .xh-auth-page .xh-auth-intro { padding: 12px 15px !important; gap: 3px 10px !important; }
  .xh-auth-page .xh-auth-intro h1 { font-size: 17.5px !important; }
  .xh-auth-page .xh-auth-intro h1 em { font-size: 12px !important; }
  .xh-auth-page .xh-auth-intro > p { display: none !important; }
}

/* ===========================================================================
 * 0.7 auth 页：隐藏右下角客服浮球
 *     原站 .rightqq 是 position:fixed，手机上 44×44 固定停在右下，
 *     登录/注册表单铺满后会被它压住（实测 390px 时与表单区域重叠）。
 *     auth 页是转化关键路径，浮球只会干扰，直接隐藏。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  body:has(.xh-auth-page) .rightqq,
  .xh-auth-page ~ .rightqq,
  .xh-auth-page .rightqq { display: none !important; }
}
/* :has() 兼容兜底：老内核不支持 :has() 时，由 mobile.js 给 body 打标记 */
body.xh-on-auth .rightqq { display: none !important; }

/* 小屏再收一档 */
@media screen and (max-width: 480px) {
  .xh-auth-panel,
  .xh-login-shell .xh-auth-panel { padding: 18px 14px 22px !important; }
  .xh-auth-page { padding: 14px 8px 26px !important; }
}

/* ===========================================================================
 * 1. 顶栏 #header —— LOGO + 汉堡
 *    依据效果图：公告条保留但缩字号；htop 压到 56px；nav 变横滑；auth 收进抽屉
 * ======================================================================== */
@media screen and (max-width: 768px) {

  /* --- 1.1 公告条：单行滚动，不再换行占位 --- */
  #header .notice .wrap {
    min-height: 28px;
    padding: 4px 44px 4px 10px;   /* 右侧留出汉堡位置 */
    justify-content: flex-start;
    gap: 5px;
  }
  #header .notice .wrap span {
    font-size: 11.5px;
    line-height: 1.4;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #header .notice .nico { width: 13px; height: 13px; }
  #header .notice .nico svg { width: 13px; height: 13px; }
  #header .notice .key { font-size: 10.5px; padding: 0 5px; }

  /* --- 1.1b 【v1.37 曾隐藏 / v1.40 已恢复】公告条 ---
     v1.37 应要求把这条 `display:none` 掉了；v1.40 用户改主意——
     要「恢复成参考案例那种好看的样式，不是胶囊，是长方形」，
     因此这里不再写任何隐藏规则，改由本文件末尾的 **第 26.1 节** 统一负责
     公告条的显示与样式（通栏长方形 + 红色小方块标签）。
     ⚠ 历史注意点仍然成立：buildNavDrawer() 在「找不到 .htop .wrap」时会
       把汉堡兜底插进 .notice 里（见 mobile.js 1.1 分支），所以 **永远不要
       删掉 .notice 节点**，只允许改样式。桌面端 (>1024) 照常显示原样式。 */

  /* --- 1.2 htop：汉堡 + LOGO 居左，注册/登录居右，单行不换行 ---
     ⚠ 坑 8（v1.19 踩到并修复）：原站 header.html 内联 <style> 里有
        @media(max-width:1300px){ #header .htop .wrap{...flex-wrap:wrap;justify-content:center} }
        @media(max-width:900px) { #header .auth{margin-left:0;flex:0 0 100%} }
     这两条与本文件同为 (0,2,0) 权重、且内联样式排在本 <link> 之后，
     平手时「后出现者赢」→ 内联赢。结果 .auth 被撑成 flex-basis:100%
     独占一整行，跑到 LOGO 下方。必须 !important 才能压回来。 */
  #header .htop .wrap {
    /* v1.32 用户要求：顶栏加高（54→64），logo 与汉堡同步放大 */
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 14px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
  }
  /* 汉堡按钮样式 —— 【v1.22 废弃 → v1.30 恢复】
     v1.30 应用户要求恢复顶栏汉堡（参考截图 [≡+LOGO+注册/登录] 布局），
     mobile.js buildNavDrawer() 仅 ≤1024 注入；>1024 桌面端无该节点。
     挂载点在 .htop .wrap 最前（LOGO 左侧），static 布局随 flex 排列。 */
  #header .xh-nav-toggle {
    position: relative !important;   /* relative + z-index：抽屉打开时汉堡仍在最上层，可再点收起 */
    z-index: 99992 !important;
    flex: none !important;
    /* v1.32 用户要求：汉堡按钮稍大（34→40），线条同步加宽 */
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #e3e7ee !important;
    border-radius: 9px !important;
    background: #f6f8fb !important;
    /* v1.37：用户要求「分类按钮向左的距离再稍微、向右一点点」。
       实测 390 下按钮左缘原为 4px（.htop .wrap 虽是 padding-left:14px，
       但按钮作为首个 flex 项的落点实测在 4px），加 14px 左外边距后落在 18px。 */
    margin: 0 0 0 14px !important;
    display: flex !important;   /* v1.30：恢复显示（仅 ≤1024 块内） */
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 0 !important;
    cursor: pointer;
  }
  #header .xh-nav-toggle i {
    background: #2a2e35 !important;
  }
  #header .xh-nav-toggle i:nth-child(1) { width: 18px !important; }
  #header .xh-nav-toggle i:nth-child(2) { width: 18px !important; }
  #header .xh-nav-toggle i:nth-child(3) { width: 11px !important; }
  #header .xh-nav-toggle:active { background: #eceff4 !important; }
  #header .logo {
    width: auto;
    /* v1.32：logo 加大（40→48 首轮 + 用户二轮反馈再 1.5 倍 → 54）。
       ⚠ 实际生效的是本块内更靠后的 .logo 覆盖规则（54px/156px !important），
       此处值与之同步，避免两处不一致误导后续维护。 */
    height: 54px;
    max-width: 156px;
    margin-left: 0;
    object-fit: contain;
    flex: none;
  }
  /* 三大 slogan 在手机上极挤，收成单行小字或隐藏（保留其一） */
  #header .slogan-area {
    margin-left: auto;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  #header .sg { gap: 4px; }
  #header .sg .sgi,
  #header .sg .sgi svg { width: 18px; height: 18px; }
  #header .sg p { font-size: 11px; white-space: nowrap; }
  /* 手机上最多保留 1 条 slogan，其余隐藏 */
  #header .slogan-area .sg:nth-child(n+2) { display: none; }

  /* --- 1.3 主导航：横滑标签条 ---
     ⚠ 坑 11（v1.20 修）：手机上一行放不下 7 个菜单，原站样式让 .nav .wrap
     和 ul 都 flex-wrap:wrap，于是折成 2 行、导航条高度从 42px 变成 84px。
     根源同样是 header.html 内联 <style> 的
       @media(max-width:1300px){ #header .nav .wrap{...flex-wrap:wrap;justify-content:center} }
     与本文件平手时内联赢 → 必须 !important。
     设计稿要求的是「单行可横滑」，所以这里锁死 nowrap 并放开横滑。 */
  #header .nav {
    overflow: visible !important;
    position: relative;
  }
  #header .nav .wrap {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 右端渐隐，暗示可滑动 */
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    z-index: 2;
  }
  #header .nav .wrap::-webkit-scrollbar { display: none; }
  #header .nav ul {
    flex-wrap: nowrap !important;
    flex: none !important;
    justify-content: flex-start !important;
    padding: 0 8px !important;
    gap: 0 !important;
  }
  #header .nav li { flex: 0 0 auto !important; }
  #header .nav a.item {
    height: 42px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 600;
    white-space: nowrap !important;
  }
  /* 手机上关掉星空 canvas 与光带，省流量也省电 */
  #header .nav .fx-cv,
  #header .fx-sheen { display: none !important; }
  /* 导航条里的 auth 已搬到顶栏，这里必须彻底移除占位
     （否则内联的 flex:0 0 100% 仍会让它撑出一行） */
  #header .nav .auth { display: none !important; }

  /* --- 1.4 auth（注册/登录）：设计稿 .m-logn 是「顶栏右侧」的小胶囊。
     v1.15 我把它 display:none 收进抽屉，导致手机上找不到注册/登录入口；
     v1.18 由 mobile.js 的 moveAuthToTopbar() 把节点搬进 .htop .wrap，
     这里做成 12.5px 的小圆角胶囊（白底"注册" + 红底"登录"）。 */
  #header .auth {
    display: flex !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: auto !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    order: 9;                    /* 永远排在 htop 最后 */
    min-width: 0 !important;
  }
  #header .auth .reg,
  #header .auth .login {
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 14px;
    line-height: 1.2;
    white-space: nowrap;
  }
  #header .auth .reg {
    color: #556070;
    background: #f4f6f9;
  }
  /* v1.26 对比度：原 #697586 on #f4f6f9 = 4.32:1，差一点点没过 AA。
     加深到 #556070（5.93:1）。只改颜色，胶囊尺寸/位置不动。 */
  #header .auth .login {
    background: #e60012;
    color: #fff;
    font-weight: 700;
  }
  /* 已搬到顶栏时，导航条里不需要再留 auth 占位 */
  #header .nav .auth { display: none !important; }

  /* LOGO 让位给右侧的注册/登录；flex:none 保证不被压扁
     【v1.32-5 用户二轮反馈】logo 按比例再放大 1.5 倍：36→54，
     max-width 同比 104→156。⚠ 本块内此规则排在前面 360 行那条
     （v1.32 误改处，未生效）之后、同权重 + !important，才是实际生效层。 */
  #header .logo {
    max-width: 156px !important;
    height: 54px !important;
    width: auto !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
  }
  /* 手机上 slogan 全隐藏（设计稿顶栏只有 汉堡+LOGO+注册登录） */
  #header .slogan-area { display: none !important; }

  /* auth 内链接尺寸兜底（内联样式给了 padding:5px 18px，手机上偏大） */
  #header .auth a.reg,
  #header .auth a.login {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 28px !important;
    padding: 0 13px !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    border-radius: 14px !important;
    position: relative !important;
  }
  /* v1.23 触控热区扩展：
     实测「注册」「登录」胶囊只有 51×28，低于 iOS/Android 建议的 32px 最小触控
     高度，手指容易点空。这里不改变视觉尺寸（保持 28px 胶囊，避免动布局几何），
     改用 ::after 生成一层透明热区，向上/下各外扩 4px 把可点高度补到 36px。
     因为 ::after 是 absolute 定位，不参与布局，所以顶栏几何完全不变。 */
  #header .auth a.reg::after,
  #header .auth a.login::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: -4px !important;
    bottom: -4px !important;
  }
  /* 汉堡与 LOGO 之间保持贴紧（原站 logo margin-left:80px 已清零） */
  #header .xh-nav-toggle { margin-right: 0 !important; }

  /* 公告条上手机不需要 animation caret */
  #header .notice .type-caret { height: 11px; }
}

/* ===========================================================================
 * 2. 主导航汉堡按钮（JS 注入到 #header 内，仅 ≤1024 显示；v1.30 恢复）
 *     通用规则保留原 absolute 定位（挂 notice 时用）；挂入 .htop 后由
 *     第 1 章的 #header .xh-nav-toggle（static + !important）覆盖布局。
 * ======================================================================== */
.xh-nav-toggle {
  display: none;
  position: absolute;
  right: 10px;
  top: 4px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  z-index: 120;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.xh-nav-toggle i {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.xh-nav-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.xh-nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.xh-nav-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* v1.30：抽屉打开时汉堡变形成 × 并浮在抽屉深色头部上（z-index 99992），
   黑杠在深色底上看不清 → 展开态杠变白 */
.xh-nav-toggle[aria-expanded="true"] i { background: #fff !important; }
#header .xh-nav-toggle[aria-expanded="true"] { border-color: rgba(255,255,255,.4) !important; background: rgba(255,255,255,.14) !important; }

@media screen and (max-width: 1024px) {
  .xh-nav-toggle { display: flex; }
}

/* 抽屉里的 auth 链接（仅抽屉内显示） */
.xh-drawer-auth { display: none; }

/* ===========================================================================
 * 3. 通用侧滑抽屉（顶栏导航抽屉 + 会员中心菜单抽屉共用）
 * ======================================================================== */
.xh-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 32, .5);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s, visibility .28s;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.xh-drawer-mask.open { opacity: 1; visibility: visible; }

.xh-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(82vw, 312px);
  background: #fff;
  z-index: 99991;
  transform: translateX(-102%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(16, 24, 40, .18);
  overflow: hidden;
  /* 刘海屏安全区 */
  padding-bottom: env(safe-area-inset-bottom);
}
.xh-drawer.open { transform: none; }

.xh-drawer-hd {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #2a2e35;
  color: #fff;
}
.xh-drawer-hd .xh-drawer-logo {
  height: 30px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 2px 5px;
}
.xh-drawer-hd strong { font-size: 15px; font-weight: 700; }
.xh-drawer-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xh-drawer-close:hover { background: rgba(255, 255, 255, .26); }

.xh-drawer-bd {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 抽屉内导航链接 */
.xh-drawer-nav { padding: 6px 0; }
.xh-drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
  color: #253246;
  border-bottom: 1px solid #f2f4f8;
  text-decoration: none;
}
.xh-drawer-nav a:active { background: #f7f8fa; }
.xh-drawer-nav a.active {
  color: #e60012;
  font-weight: 700;
  background: #fff5f5;
  border-left: 3px solid #e60012;
  padding-left: 15px;
}
.xh-drawer-divider { height: 8px; background: #f4f6fa; }

/* v1.30 抽屉分组小标题（对应电脑端左侧 dt.menu_title：礼品服务/财务相关/身份资料/推广佣金） */
.xh-drawer-group {
  padding: 12px 18px 4px;
  font-size: 12px;
  color: #98a3b3;
  letter-spacing: .05em;
}

/* 抽屉底部按钮组 */
.xh-drawer-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
}
.xh-drawer-actions a {
  flex: 1 1 0;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.xh-drawer-actions .login { background: #e60012; color: #fff; }
.xh-drawer-actions .reg { background: #f2f4f8; color: #3c4654; }

/* 抽屉内搜索 */
.xh-drawer-search { padding: 12px 16px; }
.xh-drawer-search input {
  width: 100%;
  height: 42px;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 16px;   /* ≥16px 防 iOS 聚焦放大 */
  background: #f7f8fa;
  outline: none;
  box-sizing: border-box;
}
.xh-drawer-search input:focus { border-color: #e60012; background: #fff; }

/* 仅 >1024 隐藏抽屉（桌面端；≤1024 含手机横屏/小平板均可用）【v1.30 断点提升】 */
@media screen and (min-width: 1025px) {
  .xh-drawer,
  .xh-drawer-mask { display: none !important; }
}

/* ===========================================================================
 * 4. 会员中心左侧栏 → 左上角汉堡抽屉
 *    personal.css:155 aside{width:180px;float:left;margin-left:-100%}
 *    personal.css:253-254 aside{width:180px} .main-wrap{margin-left:180px}
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* --- 4.1 会员中心容器：单列铺满 --- */
  .center {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f4f6fa;
  }
  .col-main {
    width: 100% !important;
    float: none !important;
    padding-bottom: 12px !important;
  }
  .main-wrap {
    margin-left: 0 !important;
    min-height: 0 !important;
    border-radius: 0;
    overflow: visible;
  }

  /* --- 4.2 aside 变抽屉：脱离双栏文档流 ---
     v1.21：会员中心 aside 不再有触发按钮（那条「☰ 全部菜单」行已删除），
     所以它永远保持在屏幕外的收起态；.open 规则保留仅为兼容旧入口。
     注意：aside 必须留在 DOM 里且不设 display:none —— buildPillBar()
     要从它读取 .menu_item a 的 href / 文本，作为胶囊条的数据源。 */
  aside.menu,
  aside.xh-user-menu,
  .center > aside {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(84vw, 318px) !important;
    float: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    z-index: 99991 !important;
    background: #fff !important;
    transform: translateX(-102%) !important;
    transition: none;
    box-shadow: 4px 0 24px rgba(16, 24, 40, .18);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
    pointer-events: none !important;
  }
  aside.menu.open,
  aside.xh-user-menu.open,
  .center > aside.open {
    transform: none;
  }

  /* --- 4.3 抽屉内菜单项：加大触控高度 --- */
  aside dl {
    background: #fff;
    border-bottom: 1px solid #eef0f5;
    padding: 4px 0;
    margin: 0;
  }
  aside dl .menu_title {
    padding: 0 18px;
    line-height: 40px;
    font-size: 14.5px;
  }
  aside dl dd.menu_item a {
    padding: 0 18px 0 22px;
    height: 46px;
    line-height: 46px;
    font-size: 15px;
  }
  aside dl dd a { height: 46px; line-height: 46px; font-size: 15px; }
  aside dl dd.menu_item.is-active a,
  aside dl dd.menu_item.active a {
    color: #e60012;
    font-weight: 700;
    background: #fff5f5;
    box-shadow: inset 3px 0 0 #e60012;
  }
  /* 抽屉里不用 hover 变色，改 active 态 */
  aside dl dd:hover { background: #fafbfd; }
  aside dl dd:hover a { color: #253246; font-weight: 400; }

  /* --- 4.4 头像块 --- */
  .xh-user-menu .menu_user {
    background: #2a2e35;
    border-bottom: 0;
    padding: 18px 0 14px;
    text-align: center;
  }
  .xh-user-menu .menu_user dt { color: #fff; }
  .xh-user-menu .menu_user .xh-user-phone {
    color: #fff;
    font-size: 14px;
    margin-top: 8px;
  }
  .xh-user-menu .menu_user .xh-verify-badge {
    display: inline-block;
    margin-top: 6px;
  }
}

/* 抽屉内 aside 的滚动条美化 */
@media screen and (max-width: 1024px) {
  aside.menu::-webkit-scrollbar,
  aside.xh-user-menu::-webkit-scrollbar { width: 4px; }
  aside.menu::-webkit-scrollbar-thumb,
  aside.xh-user-menu::-webkit-scrollbar-thumb { background: #d6dae2; border-radius: 4px; }
}

/* ===========================================================================
 * 5. 【已废弃】会员中心汉堡触发按钮
 *     v1.21 起 mobile.js 不再创建 .xh-menu-toggle。
 *     原设计（≤1024px 显示一行「☰ 全部菜单」）与 .xh-pillbar 胶囊条内容
 *     完全重复，用户要求整行去掉。此处只留一条隐藏兜底，防止旧缓存
 *     HTML 里残留节点露出来。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* v1.21：「☰ 全部菜单」整行删除。
     原因：它点开的抽屉内容与正下方的 .xh-pillbar 横滑胶囊条完全重复
     （同一批 13 项菜单，一字不差），构成冗余；且它 sticky 吸顶还会
     压住内容区。胶囊条已覆盖全部栏目，故整行去掉。
     —— 只在 ≤1024px 生效，桌面端 .xh-menu-toggle 本来就是 display:none。 */
  .xh-menu-toggle { display: none !important; }
}

/* ===========================================================================
 * 6. 表格 → 一单一张卡（效果图第 5 条）
 *    原站表格多为 <table>，手机上横向滚动体验差，改为卡片化
 * ======================================================================== */
@media screen and (max-width: 768px) {

  /* 6.1 包一层可横滑的容器（兜底，卡片化失败的表格仍能滑动查看） */
  .main-wrap table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
  }

  /* 6.2 订单类表格卡片化：依赖 td 上的 data-lab 属性 */
  .main-wrap table.xh-card-table {
    /* ⚠ 关键：display:block 后表格宽度会被内容撑开（实测曾达 880px），
       而 td 的 max-width:100% 参照的正是这个被撑开的宽度，限宽失效。
       必须显式 width/max-width:100% */
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    overflow: visible;
  }
  .main-wrap table.xh-card-table thead {
    display: none;
  }
  .main-wrap table.xh-card-table tbody {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }
  .main-wrap table.xh-card-table tr {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e8ebef;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 4px 0;
    box-shadow: 0 1px 3px rgba(30, 40, 60, .04);
    overflow: hidden;
  }
  .main-wrap table.xh-card-table td {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;              /* 内容多时允许换到下一行 */
    gap: 4px 12px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px dashed #f0f2f6;
    text-align: right;
    font-size: 14px;
    line-height: 1.6;
    min-height: 40px;
    box-sizing: border-box;
    /* 关键三件套：块级 flex 容器必须限宽 + 允许收缩 + 强制断词 */
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }
  .main-wrap table.xh-card-table td:last-child { border-bottom: 0; }

  /* 标签列：不收缩、不换行、可容纳 4 个字（如「收货信息」「快递单号」） */
  .main-wrap table.xh-card-table td::before {
    content: attr(data-lab);
    flex: 0 0 auto;
    width: 68px;
    min-width: 68px;
    text-align: left;
    color: #8a94a3;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* 值区域：除标签外的其余内容必须能收缩并换行
     实测要点：订单页 .om-recipient-name 等子元素自身会撑开 flex 项，
     必须对「直接子元素 + 任意孙辈」都加限宽与断词 */
  .main-wrap table.xh-card-table td > *,
  .main-wrap table.xh-card-table td > span,
  .main-wrap table.xh-card-table td > div,
  .main-wrap table.xh-card-table td > p,
  .main-wrap table.xh-card-table td > a,
  .main-wrap table.xh-card-table td > div > *,
  .main-wrap table.xh-card-table td > span > *,
  .main-wrap table.xh-card-table td > a > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
  }

  /* 值容器（由 mobile.js 的 markCell() 包裹生成）：
     与 ::before 标签一起构成「标签 | 值」两列，右对齐值。
     这是替代早期 `td:not(:has(*))` + absolute 定位方案的正解 ——
     旧方案里裸文本节点不是 flex item，会和 ::before 重叠。 */
  .main-wrap table.xh-card-table td > .xh-td-val {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }
  /* 值里含块级子元素（如操作按钮组、地址多行）时改为占满整行 */
  .main-wrap table.xh-card-table td > .xh-td-val:has(> div),
  .main-wrap table.xh-card-table td > .xh-td-val:has(> button) {
    flex: 1 1 100%;
    text-align: right;
  }

  /* 第一列常是订单号/缩略图，独占一行更醒目 */
  .main-wrap table.xh-card-table td:first-child {
    background: #fafbfd;
    font-weight: 700;
    color: #253246;
    border-radius: 9px 9px 0 0;
  }
  /* 含图片的单元格：让图片单独占一行，横向排列更自然 */
  .main-wrap table.xh-card-table td:has(img) {
    flex-wrap: wrap;
  }
  .main-wrap table.xh-card-table td img {
    max-height: 64px;
    width: auto;
    border-radius: 4px;
  }
  /* 操作列（按钮/链接）右对齐并允许换行排布 */
  .main-wrap table.xh-card-table td:last-child {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
  .main-wrap table.xh-card-table td:last-child::before {
    margin-right: auto;
  }

  /* -------------------------------------------------------------------------
   * 6.3 长值列改为「标签在上、值在下」的上下堆叠  【v1.23 新增】
   *
   *   问题：标签列固定 68px，值 flex:1 后右对齐 —— 当值很短时（如「李四」
   *   只有 2 个字 / 「—」），标签在屏幕最左、值贴在屏幕最右，中间留出 250px
   *   空白，眼睛要横跨整屏才能把「标签→值」连起来，读起来很割裂。
   *
   *   判断依据用 data-lab（由 mobile.js 的 markCell 写入，值即表头文本），
   *   不依赖列序号，表头改名也不会失效。
   *
   *   分两类处理：
   *     ① 值内容天然较长 / 需要成句阅读的列 → 上下堆叠，值左对齐
   *        订单号（常两行字符串）、商品名称（商品全名 + 金额）、
   *        收货信息（姓名 + 电话 + 完整地址）
   *     ② 其余短值列（快递名称 / 快递单号 / 下单时间 / 订单状态）
   *        保持原有「标签左、值右」两列结构不变 —— 这类左右排反而更紧凑
   *
   *   为什么不用 `td:has(长文本)` 判长度：CSS 无法测文本长度；用 data-lab
   *   白名单是最稳的（也是唯一不改 DOM 的做法）。
   * ---------------------------------------------------------------------- */
  .main-wrap table.xh-card-table td[data-lab="订单号"],
  .main-wrap table.xh-card-table td[data-lab="商品名称"],
  .main-wrap table.xh-card-table td[data-lab="收货信息"] {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding-top: 11px;
    padding-bottom: 12px;
  }
  .main-wrap table.xh-card-table td[data-lab="订单号"]::before,
  .main-wrap table.xh-card-table td[data-lab="商品名称"]::before,
  .main-wrap table.xh-card-table td[data-lab="收货信息"]::before {
    width: auto;
    min-width: 0;
    margin-bottom: 0;
  }
  /* 堆叠态的「值」：左对齐、占满整行宽度（.xh-td-val 默认是右对齐 flex:1） */
  .main-wrap table.xh-card-table td[data-lab="订单号"] > .xh-td-val,
  .main-wrap table.xh-card-table td[data-lab="商品名称"] > .xh-td-val,
  .main-wrap table.xh-card-table td[data-lab="收货信息"] > .xh-td-val {
    flex: 1 1 100%;
    text-align: left;
  }
  /* 堆叠态里若值外层不是 .xh-td-val（旁路渲染），直接子元素也左对齐 */
  .main-wrap table.xh-card-table td[data-lab="订单号"] > *,
  .main-wrap table.xh-card-table td[data-lab="商品名称"] > *,
  .main-wrap table.xh-card-table td[data-lab="收货信息"] > * {
    text-align: left;
  }
  /* 第 1 列（订单号）是卡片头，堆叠后标题行与卡片底色连成一体 */
  .main-wrap table.xh-card-table td[data-lab="订单号"] {
    border-radius: 9px 9px 0 0;
  }
  /* 订单号为空的占位态（值只有一个「—」）：
     不值得占两行 —— 收回左右两列，标签与破折号同行，卡片头更紧凑。
     :has() 匹配「值容器里只有 .om-empty-order-number 一个子元素」的情况。 */
  .main-wrap table.xh-card-table td[data-lab="订单号"]:has(.om-empty-order-number) {
    flex-direction: row;
    align-items: center;
  }
  .main-wrap table.xh-card-table td[data-lab="订单号"]:has(.om-empty-order-number) > .xh-td-val {
    flex: 1 1 auto;
    text-align: right;
  }
}

/* ===========================================================================
 * 7. 表单：输入框 16px 防 iOS 放大（效果图第 7 条）
 *     【v1.29】生效区间从 ≤768 提升到 ≤1024：手机横屏(844×390)下此块失效，
 *     /user/address_add 输入框回落 14px，journey 演练实测聚焦缩放风险
 *     （链路演练报告二-2）。>1024 桌面端表单尺寸不变。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  input[type="text"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="search"],
  input[type="date"],
  input[type="datetime-local"],
  select,
  textarea,
  .am-form-field {
    font-size: 16px !important;   /* 关键：<16px 时 iOS 会自动放大页面 */
    min-height: 42px;
    box-sizing: border-box;
    max-width: 100%;
  }
  textarea { min-height: 96px; line-height: 1.6; }

  /* 表单标签不再左浮动固定宽，改上下堆叠 */
  .am-form-label {
    width: auto !important;
    float: none !important;
    display: block;
    text-align: left !important;
    margin-bottom: 5px;
    font-size: 14px;
    color: #3c4654;
  }
  .am-form-content { margin-left: 0 !important; }

  /* 按钮铺满更易点 */
  .am-btn.anniu,
  .suggestmain .am-btn.anniu {
    width: 100% !important;
    margin-left: 0 !important;
    height: 44px;
    line-height: 44px;
    font-size: 16px;
  }

  /* 表格里的表单元件跟随 */
  .main-wrap input,
  .main-wrap select { width: 100% !important; }
}

/* ===========================================================================
 * 8. 吸底操作栏（效果图第 9 条：下单栏吸底）
 *    用法：给需要吸底的容器加 class="xh-sticky-bar"
 * ======================================================================== */
@media screen and (max-width: 768px) {
  .xh-sticky-bar {
    position: sticky;
    bottom: 0;
    z-index: 55;
    background: #fff;
    border-top: 1px solid #e8ebef;
    box-shadow: 0 -3px 14px rgba(16, 24, 40, .08);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    margin: 0 -12px -12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .xh-sticky-bar .xh-bar-total {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: #586579;
    line-height: 1.4;
  }
  .xh-sticky-bar .xh-bar-total b {
    color: #e60012;
    font-size: 17px;
    font-weight: 800;
  }
  .xh-sticky-bar .xh-bar-btn {
    flex: none;
    min-width: 104px;
    height: 44px;
    border-radius: 8px;
    background: #e60012;
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
  }
  .xh-sticky-bar .xh-bar-btn.ghost {
    background: #fff;
    color: #e60012;
    border: 1px solid #e60012;
  }

  /* --- 8.1 下单页吸底栏（.od-ordersum + .od-confirm 搬家后的容器）---
     原页面把「余额/本次下单/总计金额」放在订单表格下方、把「立即下单」按钮
     再单独放一块，手机端必须先滚到最底部才能下单，且看不到实时金额。
     这里把两者合并成一条吸底栏，滚动时始终可见。

     【v1.35 瘦身】原实现是上下两行（上：余额/本次/合计 19.5+8px；下：按钮 42px）
     → 整栏 86.5px，占 390×844 竖屏 10.2%；真机 iPhone 再叠 34px 安全区
     ≈ 120px（14%），用户反馈「底部栏异常，且高度过高」。
     现改为「左侧两行小字 + 右侧一行按钮」：
       第 1 行  合计 ¥0.00        （12.5px 标签 + 17px 红色数字）
       第 2 行  余额 ¥0.03  本次 0 条（11.5px 小字）
       右侧     ☑不重复 | 余额充值 | 立即下单（40px 高，同一行）
     信息一个不减，整栏 ≈ 53px（-39%）。 */
  .xh-sticky-bar.xh-order-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 96;
    margin: 0;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #e8ebef;
    background: #fff;
    box-shadow: 0 -3px 14px rgba(16, 24, 40, .1);
  }
  /* 左块：合计独占第一行，余额 / 本次下单 并排第二行。
     DOM 顺序是 余额 → 本次 → 合计，靠 order:-1 把「合计」提到第一行，
     不动 mobile.js 的建树逻辑。
     flex 说明：basis 必须是 0（不是 auto）。用 auto 时基准等于内容宽度，
     会把右块挤到内容宽以下，按钮就溢出屏幕右缘（实测越界 22.4px）。 */
  .xh-order-bar .xh-ob-sum {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 7px;
    font-size: 11.5px;
    color: #8a94a3;
    margin-bottom: 0;
    line-height: 1.25;
  }
  .xh-order-bar .xh-ob-sum .it {
    flex: 0 0 auto;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .xh-order-bar .xh-ob-sum .it:last-child {
    order: -1;
    flex: 0 0 100%;
    font-size: 12.5px;
    color: #5a6472;
  }
  .xh-order-bar .xh-ob-sum b {
    color: #e60012;
    font-size: 13.5px;
    font-weight: 800;
    margin-left: 2px;
  }
  .xh-order-bar .xh-ob-sum .it:last-child b { font-size: 17px; }
  /* 右块：不重复 + 充值 + 立即下单（同一行）。
     flex 0 0 auto —— 不参与压缩，避免按钮被挤窄或溢出。 */
  .xh-order-bar .xh-ob-act {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .xh-order-bar .xh-ob-nodup {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: #586579;
    flex: none;
    user-select: none;
  }
  .xh-order-bar .xh-ob-nodup input {
    accent-color: #e60012;
    width: 16px;
    height: 16px;
    margin: 0;
  }
  /* 按钮宽度要留神：360 小屏下右侧一旦多占 10px，左侧两行小字就会折成三行，
     整栏从 53px 涨到 69px。故内边距压到 8px、字号 13.5/15，
     实测 360 时左块仍有 114px（行二 max-content ≈97px），单行放得下。 */
  .xh-order-bar .xh-ob-btn {
    flex: none;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e60012;
    background: #fff;
    color: #e60012;
    text-decoration: none;
    white-space: nowrap;
  }
  .xh-order-bar .xh-ob-btn.pay {
    flex: 1 1 auto;
    background: #e60012;
    color: #fff;
    border-color: #e60012;
    font-size: 15px;
  }

  /* 页面给吸底栏让出高度，避免遮住最后一行内容。
     v1.35：由写死的 96px 改为跟随新栏高（53px 栏 + 9px 呼吸），
     并同样叠加安全区 —— 原值比实际栏高多出 10px 死白。 */
  body.xh-has-order-bar { padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important; }
  /* v1.36：手机端下单页隐藏页脚（.footer / .footer-bootom 那条 #2a2e35 深灰横条）。
     用户反馈：「添加完成的下面，有个黑色区域的底部栏，给我隐藏掉」。
     该页脚内容只有一行备案号（.footer-top 在手机上早已 display:none），
     对下单流程无信息价值；藏在吸底栏正上方还容易被误读成「底部栏的一部分」。
     ⚠ 只作用于下单页（body.xh-has-order-bar 由 mobile.js 只在移动端下单页加上），
       其他手机页面与 1440 桌面端一律保留原页脚。
     v1.35 的 `margin-bottom:0` 已被本条取代（display:none 后 margin 无意义）。 */
  body.xh-has-order-bar .footer { display: none !important; }
  /* 桌面端的 origin 容器在移动端隐藏（内容已搬家到吸底栏） */
  .od-ordersum.xh-moved,
  .od-confirm.xh-moved { display: none !important; }

  /* --- 8.2 订单明细表格卡片化 ---
     原表格写死 style="min-width:880px"（10 列），手机端只能在小框里左右拖，
     改成一行一卡：表头隐藏、每个单元格前面带列名。 */
  .od-orders { margin-bottom: 12px; }
  .main-wrap table.od-table {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    table-layout: fixed;
  }
  .main-wrap table.od-table thead { display: none; }
  .main-wrap table.od-table tbody { display: block; width: 100%; }
  .main-wrap table.od-table tr {
    display: block;
    width: 100%;
    border: 1px solid #e8ebef;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
    padding: 4px 0;
    box-shadow: 0 1px 3px rgba(30, 40, 60, .04);
  }
  .main-wrap table.od-table td {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px 12px;
    font-size: 13.5px;
    line-height: 1.55;
    text-align: right;
    border: 0;
    border-bottom: 1px dashed #f0f2f5;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }
  .main-wrap table.od-table tr td:last-child { border-bottom: 0; }
  .main-wrap table.od-table td::before {
    content: attr(data-lab);
    flex: 0 0 auto;
    width: 62px;
    min-width: 62px;
    text-align: left;
    color: #8a94a3;
    font-size: 12.5px;
  }
  /* 操作列按钮铺满，方便点击 */
  .main-wrap table.od-table td[data-lab="操作"] { align-items: center; }
  .main-wrap table.od-table td[data-lab="操作"] .od-rowbtns,
  .main-wrap table.od-table td[data-lab="操作"] button { width: 100% !important; }

  /* --- 8.3 分页条换行 --- */
  .od-pager {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    font-size: 12.5px;
  }
  .od-pager button { padding: 7px 12px !important; font-size: 13px !important; }
  .od-pager input { width: 44px !important; text-align: center; }
  .od-pager select { width: auto !important; min-width: 60px; }

  /* --- 8.4 顶部提示条改为两行 --- */
  .od-ohead { display: block !important; padding: 10px 12px !important; }
  .od-ohead .l,
  .od-ohead .r { display: block; width: 100%; font-size: 12.5px; line-height: 1.6; }
  .od-ohead .r { margin-top: 4px; color: #9aa3b2; }

  /* --- 8.5 手动/批量导入切换与面板 --- */
  .od-etabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .od-etabs .od-radio { flex: 1 1 0; justify-content: center; }
  .od-epanel textarea {
    width: 100% !important;
    min-height: 132px;
    font-size: 16px !important;   /* 防 iOS 聚焦放大 */
    line-height: 1.6;
  }
  .od-ebtns button { width: 100% !important; }
  .od-bimp { grid-template-columns: 1fr !important; gap: 12px; }
  .od-bcol { grid-column: auto !important; }
  .od-drop { padding: 22px 12px !important; }
  .od-dhints li { font-size: 12.5px; line-height: 1.6; }

  /* --- 8.6 礼品信息卡：由「大图独占一行」改为「图左 + 名称/标签右」---
     设计稿（01-礼品下单-移动端对照.html）里 .g-head 是 display:flex，
     图片 66px 在左，商品名称 + 平台/快递标签在右，一行只占 66px 高；
     紧接着才是 平台/快递/价格 的分行参数表。
     原 lp.html 的 @media(max-width:640px) 把 .od-gift 压成了 display:block，
     导致图片居中独占一大行，手机上要往下翻才看得到参数 —— 这里覆盖回横向。 */
  .od-gift {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 11px !important;
    margin-bottom: 10px !important;
  }
  /* 注意：.od-gimg / .od-ginfo 是 .od-gift 的两个子元素，
     改写 .od-gift 的排列后必须同时复位子元素，否则仍会各占一行 */
  .od-gimg {
    width: auto !important;
    margin: 0 !important;
    flex: none !important;
    align-self: flex-start;
    display: block !important;
  }
  /* 图片与 od-gift 一起成为「左图右字」；无图时显示 .ph 里的 svg 占位 */
  .od-gimg .ph {
    width: 66px !important;
    height: 66px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
  }
  .od-gimg .ph svg { width: 34px !important; height: 34px !important; }
  /* 参数表跟在图片右侧，改为常规块级（不再并排成两列网格） */
  .od-ginfo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  .od-ginfo .cell {
    padding: 3px 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #3c4654 !important;
  }
  /* 发货地址、快递说明这类长文本单独占一行，并在图片下方再展开 */
  .od-ginfo .cell.full {
    grid-column: auto !important;
    margin-top: 8px;
    padding: 9px 11px !important;
    background: #fffafa !important;
    border: 1px solid #f3dada !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    line-height: 1.75 !important;
  }
  .od-ginfo .cell.full .lab { display: block; margin: 0 0 2px; }
  .od-ginfo .cell.note { display: block !important; }
  .od-ginfo .cell.note > .fnote { display: block; }
  .od-ginfo .lab { margin-right: 6px; font-size: 12.5px; }
  .od-ginfo b { font-size: 14px; }
}

/* ===========================================================================
 * 9. 底部 footer + 客服（效果图第 6 条：底栏取消 fixed、客服圆形）
 * ======================================================================== */
@media screen and (max-width: 768px) {

  /* --- 9.1 客服悬浮条 .rightqq（kefu.js 注入，原图 120x400px 竖长条）---
     在 390px 屏上原图占掉近 1/3 宽度且固定遮挡正文，改为右下角圆形按钮：
     默认只显示圆形图标，点击展开完整客服图，再点收起。 */
  .rightqq {
    position: fixed !important;
    right: 12px !important;
    left: auto !important;
    top: auto !important;
    /* v1.21：bottom 由 70px 提到 96px。
       原因：商品列表页卡片右下角有「立即购买」提示胶囊，浮球太靠下会
       与卡片操作区争夺右下角。抬高后在竖屏浏览商品时基本各行都能避开，
       同时仍在拇指可及范围内。 */
    bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    z-index: 95 !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e60012;
    box-shadow: 0 4px 14px rgba(230, 0, 18, .34);
    overflow: hidden;
    transition: width .26s, height .26s, border-radius .26s, box-shadow .26s;
  }
  .rightqq a { display: block; }
  .rightqq img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;   /* 原图顶部是客服图标区 */
    opacity: 0;                     /* 收起态不显示整条长图 */
  }
  /* 收起态用纯色圆 + 电话图标（::before 画） */
  .rightqq::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background: no-repeat center/contain
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15.5a2 2 0 01-2.2 2 19.8 19.8 0 01-8.6-3.1 19.5 19.5 0 01-6-6A19.8 19.8 0 011.1 3.7 2 2 0 013.1 1.5h3.4a2 2 0 012 1.7c.1.9.3 1.8.6 2.6a2 2 0 01-.5 2.1L7.5 9a16 16 0 006 6l1.1-1.1a2 2 0 012.1-.5c.8.3 1.7.5 2.6.6a2 2 0 011.7 2z'/></svg>");
  }
  /* 展开态：还原成完整客服图
     注意：.rightqq 是 kefu.js 用 document.write 注入的，自带 inline style，
     所以宽高必须带 !important 才能压过它 */
  .rightqq.xh-kefu-open {
    width: 120px !important;
    height: 400px !important;
    max-height: calc(100vh - 150px);
    border-radius: 10px !important;
    box-shadow: 0 8px 28px rgba(16, 24, 40, .26) !important;
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    overflow: visible;
  }
  .rightqq.xh-kefu-open img { opacity: 1 !important; }
  .rightqq.xh-kefu-open::before { display: none; }
  /* 原有关闭热区在展开态才可用，扩大到可点 */
  .rightqq a[onclick] { min-width: 44px; min-height: 44px; }

  /* --- 9.1b 新版 kefu.js 卡片式客服的点击体验修复【v1.28】---
     背景：v1.27 恢复了新版 kefu.js，它的结构与旧版完全不同：
       旧版 = <a><img 长图> + <a onclick=hideLovexin1> 关闭热区
       新版 = .rq-head(含 <i class="x"> 关闭) + .rq-body(含 a.rq-qqbtn)
              + .rq-wx + .rq-qr + .rq-kf
     新版所有样式都是 `#xh-floating-support ...` 的 id 选择器（权重 1,2,0），
     且 <style> 由 document.write 注入、源码排在 mobile.css 之后，
     所以这里的规则必须用 #id 起头才能压过它。 */

  /* ① 关闭按钮 i.x：原 20×20（#id 内联，手机端基本点不准）。
        本体扩到 28×28，再用 ::after 把命中域扩到 44×44 —
        ::after 绝对定位不参与布局，面板几何零变化。
        权重说明：kefu.js 的规则是 #xh-floating-support .rq-head .x = (1,2,0)，
        且注入在 mobile.css 之后；同权重必输，故此处用双 id 提到 (2,2,1)。 */
  #xh-floating-support#xh-floating-support .rq-head i.x,
  #xh-floating-support#xh-floating-support .rq-head .x {
    width: 28px !important;
    height: 28px !important;
    right: 9px !important;
    border-radius: 6px !important;
  }
  #xh-floating-support#xh-floating-support .rq-head i.x::after,
  #xh-floating-support#xh-floating-support .rq-head .x::after {
    content: "";
    position: absolute;
    left: -8px; right: -8px; top: -8px; bottom: -8px;   /* 命中域 44×44 */
  }
  /* ② QQ交谈按钮：原 88×24（24px 高低于 36px 触控底线）。
       加高到 36px、加宽到 96px、圆角改胶囊。
       面板固定高 400px，原内容 366px，加高 12px 后 378px，仍有富余，
       不会顶出面板边界。
       权重：kefu 的 #xh-floating-support .rq-qqbtn = (1,1,0)，双 id 提到 (2,1,0)。
       【行高定性】line-height:36px = 单行按钮文字垂直居中的标准做法，
       体检报表的 "2.67x (36px/13.5px)" 属设计意图、不报修，
       与 21.7 章保留的 5 项（.rq-wx/.rq-kf 30px/13px、.copy_link 42px/14.5px 等）同类。 */
  #xh-floating-support#xh-floating-support .rq-qqbtn {
    width: 96px !important;
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 18px !important;
    font-size: 13.5px !important;
  }

  /* --- 9.2 footer --- */
  .footer { margin-top: 16px; }
  /* v1.37 修「底部黑色区域展示不正常」：
     病灶 = common.css 给 .footer .footer-bootom 写死 height:40px，
     本站手机端又给它 padding:16px 0，而 p 的行高被 common.css 锁成 40px
     → 内容区只剩 40-32=8px，文字（40px 行盒）下缘溢出黑条 16px，
     看起来就是「备案号跑到黑色横条外面/压在边缘」。
     实测：礼品中心页 黑条 40px、p 下留白 = -16px（溢出）；首页恰好没吃到
     那条 height 才正常（72px）。这里把高度交还给内容自适应，并收紧行高。
     ⚠ 只改手机端；桌面端沿用原 40px 定高（红线）。 */
  .footer .footer-bootom {
    height: auto !important;
    padding: 12px 0 !important;
  }
  .footer .footer-bootom p,
  .footer-bootom p {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
  }
  /* v1.37：原站 .footer 自带 margin-bottom:60px（桌面页面底留白）。手机上
     它只会让黑条悬空、底下多一条白带（实测文档末距页脚底 60px）——一并清零。
     返回顶部/客服都是 fixed 元素，不依赖这 60px。 */
  .footer { margin-bottom: 0 !important; }
  .footer .wrapper { width: auto !important; padding: 0 14px; }
  .footer-top { display: none; }         /* 底部信息区手机上折叠 */
  .footer-bootom {
    padding: 16px 0;
    text-align: center;
    background: #2a2e35;
  }
  .footer-bootom p {
    font-size: 11.5px;
    line-height: 1.7;
    color: #98a1b0;
    word-break: break-all;
  }
  /* v1.26 对比度：备案号那个 <a> 在登录/注册页是**纯黑 rgb(0,0,0)**，
     压在 #38383a 深灰底上只有 1.79:1 —— 几乎看不见，是真实缺陷。
     （首页那条是 rgb(152,161,176) = 4.49:1，只差 0.01，也算修掉。）
     这里用足权重 + !important 兜住所有页面。
     #c3c9d4 on #38383a = 7.4:1，达 AA，且和页脚原配色同族、不发白。 */
  .footer .footer-bootom .wrapper p,
  .footer .footer-bootom .wrapper p a,
  .footer-bootom p,
  .footer-bootom p a,
  .footer-bootom a,
  .footer-bootom span,
  body .footer-bootom a {
    color: #c3c9d4 !important;
  }

  /* --- 9.3 返回顶部按钮 --- */
  .side-fixed-menu {
    margin-left: 0 !important;
    position: fixed !important;
    right: 12px !important;
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    top: auto !important;
    z-index: 90;
  }
  .side-fixed-menu .menu-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2a2e35;
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 10px;
    cursor: pointer;
  }
  .side-fixed-menu .menu-item p,
  .side-fixed-menu .menu-item i { font-size: 0; }
  .side-fixed-menu .menu-item i::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
    transform: rotate(45deg);
    margin-top: 4px;
  }
}


/* ===========================================================================
 * 9.4 客服浮球二改：圆形红底「客服」球 + 展开态屏幕居中 【v1.32-4】
 * ========================================================================
 * 用户要求：悬浮客服按钮弄成圆形、红色的客服图标；点击后展开的客服栏
 * 悬浮在上下居中的位置。
 *
 * 现状病灶（9.1 旧规则 vs 新版 kefu.js 结构错位）：
 *   9.1 是按旧版 kefu.js（<a><img 长图>）写的，宽高 44px 不带 !important，
 *   被新版 kefu.js 注入的 #xh-floating-support{width:120px}（id 权重更高，
 *   且其 <style> 在 mobile.css 之后）压掉 → 实际渲染成 120×44 的蓝白胶囊
 *   横条（.rq-head 蓝条 + .rq-body 白底各露一截），即用户截图中的样子。
 *
 * 对策：
 *   - 全部用双 id 前缀（#xh-floating-support#xh-floating-support）
 *     + !important，稳压 kefu.js 注入样式（先例：9.1b / 22.1 / 20-B）。
 *   - 收起态：52px 圆、红底 #e60012、白色耳机客服图标（::before 内联 SVG），
 *     新版卡片内容 .rq-* 全部 display:none；位置沿用 v1.21 定稿
 *     （右 12 / 底 96+safe-area），点击展开逻辑仍由 mobile.js initKefu 维护
 *     （点浮球加 .xh-kefu-open / 点 × 或空白处移除）。
 *   - 展开态（.xh-kefu-open）：宽 170px、高自适应，fixed 屏幕正中
 *     （top/left 50% + translate(-50%,-50%)），z-index 99990 压过吸底栏等
 *     浮层、仍低于抽屉 99991/99992；max-height 兜横屏，超高内部滚动。
 *   - 断点取 ≤1024（22 章空档提升原则）；>1024 桌面端一字不变。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* ① 收起态：圆形红球（:not(.xh-kefu-open) 限定，展开态不受影响） */
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) {
    position: fixed !important;
    right: 12px !important;
    left: auto !important;
    top: auto !important;
    bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: #e60012 !important;
    box-shadow: 0 4px 14px rgba(230, 0, 18, .34) !important;
    overflow: hidden !important;
    z-index: 95 !important;
    cursor: pointer;
  }
  /* 收起态隐藏新版卡片五段内容（.rq-head/.rq-body/.rq-wx/.rq-qr/.rq-kf），
     展开态选择器不匹配 → 各段自动恢复默认 display，无需还原规则 */
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) .rq-head,
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) .rq-body,
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) .rq-wx,
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) .rq-qr,
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open) .rq-kf {
    display: none !important;
  }
  /* 收起态图标：白色耳机客服（覆盖 9.1 的电话图标 ::before，双 id 权重更高） */
  #xh-floating-support#xh-floating-support:not(.xh-kefu-open)::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 26px !important;
    height: 26px !important;
    transform: translate(-50%, -50%) !important;
    background: no-repeat center/contain
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 18v-6a9 9 0 0 1 18 0v6'/><path d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/></svg>") !important;
  }

  /* ② 展开态：屏幕正中弹窗（盖过 9.1 的 120×400/bottom:16 旧展开规则） */
  #xh-floating-support#xh-floating-support.xh-kefu-open {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 170px !important;
    height: auto !important;
    max-height: calc(100vh - 32px) !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
    box-shadow: 0 12px 36px rgba(16, 24, 40, .3) !important;
    z-index: 99990 !important;
  }
  #xh-floating-support#xh-floating-support.xh-kefu-open::before {
    display: none !important;
  }
  /* 二维码在 170px 宽内自适应（原 max-width:104px 放宽） */
  #xh-floating-support#xh-floating-support .rq-qr img {
    max-width: 146px !important;
  }
}


/* ===========================================================================
 * 10. 通用小屏排版收紧
 * ======================================================================== */
@media screen and (max-width: 768px) {
  /* 首页/文章等自建模块的固定宽 wrap
     v1.31：原 max-width:100% 后内容零边距贴屏，用户截图「自己发货 VS 讯鹤代发」
     「今日礼品」「下单流程」三处标题贴左甚至截半字 —— 补 14px 左右内边距 */
  .home-main .hp .wrap,
  .home-main .wrap {
    width: auto !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }
  /* 今日礼品滑动轨：负外边距抵消 wrap 新增内边距，
     让卡片可以滑到屏幕边缘（标准贴边横滑轨做法），首卡起点仍与标题对齐 */
  .home-main .hp .rail {
    margin-left: -14px !important;
    margin-right: -14px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* 卡片列表：2 列更省空间 */
  .card-box-list li { width: 50% !important; }

  /* 分页控件换行居中 */
  .page { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0 10px 12px; }
  .page a, .page span { min-width: 34px; height: 34px; line-height: 34px; text-align: center; }

  /* 段落与标题缩字号 */
  .am-text-lg { font-size: 16px !important; }
  h1 { font-size: 20px !important; }
  h2 { font-size: 18px !important; }
  h3 { font-size: 16px !important; }
}

@media screen and (max-width: 480px) {
  body { font-size: 14.5px; }
  #header .nav a.item { padding: 0 12px; font-size: 13.5px; }
  .main-wrap table.xh-card-table td::before { width: 66px; font-size: 12.5px; }
  .xh-sticky-bar .xh-bar-btn { min-width: 88px; font-size: 15px; }
}

/* 横屏手机：顶栏进一步压缩 */
@media screen and (max-width: 900px) and (orientation: landscape) {
  #header .htop .wrap { height: 46px; min-height: 46px; }
  #header .logo { height: 34px; }
  #header .nav .wrap { height: 38px; min-height: 38px; }
  #header .nav a.item { height: 38px; }
}

/* ===========================================================================
 * 11. 会员菜单横滑胶囊条（设计稿 .m-menu 写法）
 *     设计稿里「礼品下单 / 下单记录 / 批量导出 / 余额充值 / 消费明细」是一排
 *     可横滑的胶囊，点哪项哪项变红。真实站点的同一批菜单写在公共模板
 *     public/user_menu.html 的 <aside> 里，被 24 个页面共用 —— 直接改它的
 *     结构风险太大，所以这里由 mobile.js 从 aside 里「读取」菜单项，
 *     在内容区顶部另建一条胶囊条（aside 保持原样，仅手机上折叠成抽屉）。
 *     好处：① 公共模板零改动 ② 菜单项增删自动跟随，不用维护两份
 * ======================================================================== */
.xh-pillbar { display: none; }

@media screen and (max-width: 1024px) {
  .xh-pillbar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    /* v1.21：改为静态定位（不再 sticky 吸顶）。
       原因：v1.21 删掉「☰ 全部菜单」行后，胶囊条成为内容区第一个元素；
       若仍以 sticky + top:42px 吸顶，它会浮在内容之上，把紧随其后的
       第一块内容（如「您今日已下单 2 单」提示条）永远遮住半截 ——
       sticky 不会为后续内容预留空间，且页面首元素种类多（公告条/hero/
       提示条），动态补偿高度容易出错。改为静态后它自然占位，文案完整可见，
       横滑手势不受影响。 */
    position: static;
    z-index: 58;
    box-sizing: border-box;
    /* 右端渐隐，暗示可横滑 */
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .xh-pillbar::-webkit-scrollbar { height: 0; }

  .xh-pillbar a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    /* v1.24 触控热区：30 → 36px（iOS HIG 建议 ≥44，安卓 ≥48；36 是折中，
       配合 ::after 上下各扩 4px 后实际可点区达 44px） */
    height: 36px;
    padding: 0 14px;
    border-radius: 15px;
    background: #f4f6f9;
    color: #697586;
    font-size: 12.5px;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s, color .18s;
    position: relative;
  }
  /* v1.23 触控热区扩展：胶囊只有 70×30，低于 32px 最小触控建议，手指易点空。
     不改变视觉尺寸（避免条高变化影响后续内容位置），用 ::after 透明层上下各
     外扩 3px，把可点高度补到 36px。absolute 定位不参与布局，几何零变化。 */
  .xh-pillbar a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -3px;
    bottom: -3px;
  }
  /* 当前页高亮：与设计稿 .m-menu a.on 一致 */
  .xh-pillbar a.on {
    background: #fff2f2;
    color: #e53e3e;
    font-weight: 700;
  }
  .xh-pillbar a:active { background: #fdeaea; color: #e53e3e; }

  /* 没有任何菜单项时（未登录等）不占位 */
  .xh-pillbar:empty { display: none; }
}

/* 小屏再收紧一档，尽量让 4~5 项一屏放得下 */
@media screen and (max-width: 480px) {
  .xh-pillbar { gap: 6px; padding: 8px 10px; }
  .xh-pillbar a { height: 34px; padding: 0 12px; font-size: 12px; }
}

/* ===========================================================================
 * 12. 礼品中心「商品栅格」——每行商品数 / 卡片尺寸 / 合理度
 *     用户原话：「大小，每排多少商品，合理度都要调整」
 *
 *     原站 order/item.html 自带一套桌面优先的断点：
 *       默认 4 列 → ≤980px 3 列 → ≤700px 2 列 → ≤420px 【1 列】
 *     问题就在最后那条：390/414 这种最主流手机宽度落到 420 以下，
 *     变成一屏只有一个超大商品卡，既浪费空间又失去「浏览商品」的节奏感。
 *     手机电商通行做法是 2 列，所以这里把 ≤768 强制拉回 2 列，
 *     并同步收一套与窄卡片匹配的字号/间距。
 *
 *     ⚠ 全部规则都在 @media(max-width:768/360px) 内，桌面端 4 列不受影响。
 * ======================================================================== */
@media screen and (max-width: 768px) {
  /* --- 12.1 栅格列数：手机一律 2 列 --- */
  .lp-gifts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  /* 商品卡：内边距与圆角收一档，让图片更占比 */
  .lp-gift {
    padding: 7px !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .05) !important;
  }
  /* 触屏没有 hover，取消位移特效免得点按后卡片"跳"一下 */
  .lp-gift:hover { transform: none !important; }

  /* --- 【v1.37 用户要求】手机端彻底隐藏「立即购买」浮层 ---
     用户原话：「手机端：购买礼品界面的立即购买，给我隐藏掉。不要画蛇添足。」
     历史：v1.21 曾把原站 hover 浮层改成图片区左下角的常驻小胶囊，
     作为「手机没有 hover、看不到购买入口」的补偿。实测这个补偿是多余的 ——
     整张卡片本身就是 <a href="/order/lp?...">，点卡片任意位置都能进下单页，
     角标只是重复提示，还压住商品图。
     ⚠ 电脑端行为一字不动：原站 .lp-gift:hover .lp-buy{opacity:1} 是
       矩形铺满整卡的「立即购买」（模板内联样式），本规则在 ≤768 块内，
       >768 完全不生效。 */
  .lp-pic .lp-buy,
  .lp-gift .lp-buy,
  .lp-foot .lp-buy {
    display: none !important;
  }
  /* 角标搬家时给图片区留的 25px 下内边距一起还回去（mobile.js 会加
     .xh-pic-badged 类），否则图片下方会空一条。 */
  .lp-pic.xh-pic-badged { padding-bottom: 0 !important; }

  /* --- 12.2 卡片内部：图片与信息重新配比 --- */
  .lp-pic {
    margin-bottom: 6px !important;
    border-radius: 7px !important;
  }
  /* 内联 SVG 占位图按容器缩放，别再固定 100px */
  .lp-pic svg {
    width: 68% !important;
    height: 68% !important;
    max-width: 96px !important;
    max-height: 96px !important;
  }
  /* 图片区加一个左下角内边距，给「立即购买」角标留位，避免遮住商品主体 */
  .lp-pic.xh-pic-badged {
    /* v1.37：角标已在手机端隐藏（见 12.1），这里不再给图片下方留 28px，
       否则商品图下方会空出一条。桌面端本规则不生效。 */
    padding-bottom: 0 !important;
  }
  .lp-pic.xh-pic-badged svg {
    max-height: calc(96px - 8px) !important;
  }
  /* v1.25 修复「最近购买」角标被裁：
     原站 .lp-ribbon 是 position:absolute; top:0; left:0 + line-height:1 + padding:5px 10px。
     我把 font-size 提到 12px 时漏改 line-height —— line-height:1 会让行盒高度等于字号，
     但 padding 上下各 4px 后盒子总高只有 20px，而 12px 汉字在 line-height:1 下行盒
     实际需要约 14~15px，于是文字上沿被卡片顶边切掉。
     修法：显式给 line-height（不再用 1），并让角标稍微内缩、加高，保证完整可见。 */
  .lp-ribbon {
    font-size: 12px !important;
    line-height: 18px !important;
    padding: 0 8px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 6px 0 10px 0 !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 3 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
  /* 价格行：价格略收，右侧重量/包邮标签不与价格抢位 */
  .lp-priceline { margin-bottom: 3px !important; gap: 4px !important; flex-wrap: wrap !important; }
  /* v1.24 字号回正：上一轮为了「塞进窄卡片」把字缩小了，反而伤可读性。
     原则改为 —— 字号不低于 11px，宁可让价格行换行、或让 .lp-weight 掉到第二行。
     原站值：.lp-price 18px / .lp-price i 12px / .lp-total-label 10px /
             .lp-weight 12px / .lp-baoyou 11px / .lp-courier i 12px */
  .lp-price { font-size: 16.5px !important; }
  .lp-price i { font-size: 11px !important; }
  .lp-total-label { font-size: 12px !important; padding: 2px 5px !important; }
  .lp-weight { font-size: 12px !important; }
  .lp-baoyou { font-size: 11px !important; padding: 1px 5px !important; }
  /* 商品名：允许 2 行，比单行截断更有信息量；固定两行高卡片才整齐 */
  .lp-name {
    font-size: 12px !important;
    line-height: 1.42 !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: calc(1.42em * 2) !important;
  }
  /* 底部快递行：窄卡片里快递名 + 城市会挤，缩字。
     v1.21：「立即购买」胶囊已移出本行（改挂卡片右下、图片区底部），
     所以不再需要右侧 56px 的避让内边距，恢复满宽让快递名与城市排开。 */
  .lp-foot {
    height: 24px !important;
    gap: 4px !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  .lp-courier {
    height: 24px !important;
    padding: 0 7px 0 5px !important;
    max-width: 100% !important;
    gap: 4px !important;
  }
  .lp-courier i { font-size: 12px !important; }
  .lp-clogo { height: 16px !important; max-width: 34px !important; padding: 1px 2px !important; }
  /* v1.23 城市标签修复：
     原站 .lp-city 是 flex:none + max-width:44px + overflow:hidden，靠 text-overflow
     出省略号。但 flex:none 下容器宽度由内容决定、又被 max-width 截断，且没有给
     块级宽度，实测「黔南布依族苗族自治州」(需 105px) 被硬裁成残字、省略号不显示。
     修法：
       ① flex 改为 0 1 auto（允许收缩），不再用 flex:none 死撑；
       ② 给 min-width:0（flex 子项收缩的前提）；
       ③ 放宽 max-width 到 64px，并显式声明 ellipsis 生效三件套。
       桌面端 ≤420 档原是 58px，这里手机端统一 64px，不触碰原站样式表。 */
  .lp-city {
    /* v1.25 字号回正：10.5 -> 12px（与全站正文底线一致） */
    font-size: 12px !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 72px !important;   /* v1.25 字号加大后同步放宽，仍保留 ellipsis */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  /* 城市名换行兜底：若某个城市名恰好长到 64px 仍放不下，让它整体省略而非断字 */
  .lp-city > * { min-width: 0 !important; }
  .lp-city svg { width: 10px !important; height: 10px !important; flex: none !important; }

  /* --- 12.3 平台选择：手机 4 列一行，图标缩小 --- */
  .lp-platforms { gap: 6px !important; }
  .lp-plat {
    min-height: 36px !important;          /* v1.24 触控热区 */
    justify-content: center !important;
    flex-basis: calc(25% - 5px) !important;
    font-size: 11.5px !important;
    padding: 6px 2px !important;
    border-radius: 7px !important;
  }
  /* v1.25：平台图标 SVG 里的「1688」四个字是 <text font-size="8.5">（viewBox 24×24）。
     图标被缩到 17px 时，文字实际只剩 17/24*8.5 ≈ 6px。
     不去动模板（.html 是只读区），改为把图标放大到 22px —— SVG 按容器等比缩放，
     内部文字同步放大到 22/24*8.5 ≈ 7.8px 的视觉尺寸（在 22px 见方的彩色方块里足够清晰），
     同时 4 个中文字图标（淘/拼/京/抖）也更醒目。 */
  .lp-ico {
    width: 22px !important;
    height: 22px !important;
    margin-right: 5px !important;
    vertical-align: -5px !important;
  }

  /* --- 12.4 区块与工具条：收紧留白，一屏能多放内容 --- */
  .lp-block { padding: 10px !important; margin-bottom: 9px !important; border-radius: 8px !important; }
  .lp-block-title { font-size: 13.5px !important; }
  .lp-step { width: 18px !important; height: 18px !important; font-size: 11px !important; margin-right: 6px !important; }
  .lp-block-sub { font-size: 12px !important; }
  /* --- 12.5 筛选区重排【v1.32 用户截图驱动】 ---
     用户原话：「这个热门和价格，和电脑端展示一样」「展示同一行」
     「文字去掉，只留选择框……把文字：排序、礼品类型、筛选地区，给隐藏掉」
     「电脑端的千万禁止修改」——全部规则仅在本 ≤768 块内。
     ① 文字标签是 label 的裸文本节点，CSS 无法单独 display:none ——
        用 font-size:0 压掉，select 恢复字号（经典文本节点隐藏法）；
     ② .lp-filters 保持模板 flex:1 撑满（隐藏标签后内容 ~150px 不再
        触发 wrap），右组 margin-left:auto 夺回右靠（模板 700px 断点
        曾把它撤成 0 → 覆盖）；
     ③ 热门/价格分段按钮恢复电脑端同形（12.4 旧版压得太扁）。 */
  .lp-toolbar { gap: 8px !important; flex-wrap: wrap !important; margin: 10px 0 12px !important; }
  .lp-filters { gap: 7px !important; align-items: center !important; min-width: 0 !important; }
  .lp-filter-right { margin-left: auto !important; gap: 7px !important; }
  .lp-region { font-size: 0 !important; gap: 0 !important; }
  .lp-region select { font-size: 12.5px !important; padding: 4px 6px !important; max-width: 96px !important; }
  .lp-seg { flex: none !important; }
  .lp-seg button, .lp-seg a { padding: 6px 14px !important; font-size: 13px !important; }
  .lp-tip { font-size: 11.5px !important; }
}

/* 超小屏（≤360）：再收一点，避免文字折行破版 */
@media screen and (max-width: 360px) {
  .lp-gifts { gap: 7px !important; }
  .lp-gift { padding: 6px !important; }
  /* v1.25 修正：超小屏不再压缩商品名 —— 商品名是要逐字读的内容。
     原站 12px，这里与 390 档保持一致（12px），靠 .lp-name 的 2 行截断
     自动吸收（-webkit-line-clamp:2），不会因为多 0.5px 就破版。 */
  .lp-price { font-size: 15px !important; }
  .lp-name { font-size: 12px !important; }
  .lp-foot { padding-right: 0 !important; }
  /* v1.37：≤360 档原为「立即购买」角标做了小屏特例，现角标已在 ≤768 整块
     隐藏（display:none），这些尺寸微调全部失效、保留只会误导维护，
     一并删除；只留 .xh-pic-badged 的下内边距归零，避免图片下空一条。 */
  .lp-pic.xh-pic-badged { padding-bottom: 0 !important; }
}

/* ===========================================================================
 * 13. 首页 hero 横幅（.home-main .hp .c16 .hero）
 *
 *     用户反馈：390px 下「把礼品代发，交给云仓」与三条斜纹带互相压叠，
 *     两个 CTA 按钮文字折行、整体挤在中间看不清。
 *
 *     原站自带样式（桌面 + ≤640px 版）：
 *       .hero{min-height:520px; position:relative; overflow:hidden; flex 居中}
 *       .ribbon{position:absolute; left:-10%; right:-10%; height:64px;
 *               rotate(-6deg); top:26%/42%/58%}          ← 三条 64px 斜带横穿
 *       .core{background:rgba(10,12,16,.78); padding:36px 48px; z-index:2}
 *       ≤640px: h1 30px / core padding 26px 22px
 *
 *     手机上的真实问题：
 *       ① 520px 最小高 + 居中，文字块被三条斜带从中间切过；
 *          虽然 .core 有半透明深底(z-index:2)能盖住，但斜带仍从卡片上下露出，
 *          视觉上"字压在带子上"。
 *       ② 48px 左右内边距在 390 屏上让 h1 只剩 ~250px 可用宽，"把礼品代发，"就被迫折行。
 *       ③ 两个 CTA 横排时每个仅 ~150px，文字折成两行、按钮变高矮不一。
 *
 *     处理：手机端把 hero 改为「深底 + 三条斜带弱化到上下缘」，卡片铺满可用宽，
 *     CTA 主按钮独占一行、次按钮降为文字链。桌面端一步都不进。
 * ======================================================================== */
@media screen and (max-width: 768px) {
  .home-main .hp .c16 .hero {
    min-height: 0 !important;
    padding: 40px 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* 三条斜带：v1.31 用户反馈「上下位置不居中」——原方案三条全压到卡片
     下缘（bottom 54/22/-10，实测间距仅 32px 互相堆叠错位）。
     改回「红上 / 白中 / 蓝下」均匀分布：hero 恢复 400px 最小高，
     core 仍居中可读，红带在卡片上方、白带穿卡片背后、蓝带在卡片下方。
     【v1.32-3 二调】用户反馈「红和蓝离白条太远」：26/26 → 71/71，
     实测间距 69/69 → ~24/24（probe-v132 几何换算），白带位置不动。 */
  .home-main .hp .c16 .hero { min-height: 400px !important; }
  .home-main .hp .c16 .ribbon {
    left: -16% !important;
    right: -16% !important;
    height: 34px !important;
  }
  .home-main .hp .c16 .ribbon.r1 { top: 71px !important; bottom: auto !important; opacity: .92 !important; }
  .home-main .hp .c16 .ribbon.r3 { top: calc(50% - 17px) !important; bottom: auto !important; opacity: .94 !important; }
  .home-main .hp .c16 .ribbon.r2 { top: auto !important; bottom: 71px !important; opacity: .88 !important; }
  .home-main .hp .c16 .ribbon .inner { gap: 22px !important; font-size: 12.5px !important; letter-spacing: 1px !important; }

  /* 文字卡片：铺满可用宽，内边距按屏收 */
  .home-main .hp .c16 .core {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 12px !important;
    padding: 22px 18px !important;
    border-radius: 12px !important;
  }
  .home-main .hp .c16 .core h1 {
    font-size: 25px !important;
    line-height: 1.28 !important;
    letter-spacing: 0 !important;
  }
  .home-main .hp .c16 .core .sub {
    margin-top: 9px !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
  }
  /* CTA 改纵向：主按钮整行，次按钮变文字链 */
  .home-main .hp .c16 .core .cta {
    margin-top: 18px !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .home-main .hp .c16 .core .cta .go {
    display: block !important;
    padding: 13px 18px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
  .home-main .hp .c16 .core .cta .ghost {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 13px !important;
    color: #b9c0cd !important;
    text-align: center !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
  }
}
@media screen and (max-width: 360px) {
  .home-main .hp .c16 .hero { padding: 32px 0 !important; }
  .home-main .hp .c16 .core { margin: 0 10px !important; padding: 18px 14px !important; }
  .home-main .hp .c16 .core h1 { font-size: 22px !important; }
  .home-main .hp .c16 .core .cta .go { font-size: 14px !important; padding: 12px 14px !important; }
}

/* ===========================================================================
 * 15. 我要推广（tg）页 —— 桌面固定宽双栏改自适应单列  【v1.23 新增】
 *
 *   原站问题（走查实测）：tbody tg 页 .c_rightBox{width:860px;padding-left:38px}
 *   是写死在页面内联 <style> 里的固定宽，.f_left{width:540px}、.f_right{width:313px}
 *   同理。手机 390 屏下整块内容被撑到 860px，右侧一律被裁：
 *     「在你熟悉的网络范围内，」(后半句丢失)
 *     「通过你专属连接注册进来」
 *     「我的专属链接」输入框只剩 "ht" 开头
 *     「下级下单提成：凡是通过您的推广连接注册的用户（」被切断
 *     .tg_lc 推广流程 4 步挤成竖排
 *
 *   修法：全部改 !important 自适应。因为原样式来自页面内联 <style>，
 *   在层叠上与我们同权重但顺序在后（内联 style 块位于 header 的 mobile.css
 *   <link> 之后），所以必须用 !important 才能压过去。
 *   目标：单列铺满、文字完整、链接输入框可读可复制、流程步骤横排换行。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* 15.1 外层容器：860px 固定宽 → 满宽 */
  .main-wrap .nr_right { font-size: 14px !important; }
  .main-wrap .c_rightBox {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  .main-wrap .change_code,
  .main-wrap .tg_box,
  .main-wrap .tg_cont { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }

  /* 15.2 标题条 */
  .main-wrap .change_code .c_tit {
    height: auto !important;
    min-height: 40px !important;
    line-height: 1.5 !important;
    padding: 10px 0 10px 12px !important;
    display: flex !important;
    align-items: center !important;
  }
  .main-wrap .change_code .c_tit h2 { font-size: 17px !important; }

  /* 15.3 首屏「了解推广服务」：左图右文浮动 → 上下堆叠 */
  .main-wrap .tg_cont .hy_row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    overflow: visible !important;
    padding: 14px 0 0 !important;
  }
  .main-wrap .tg_cont .hy_row .fl,
  .main-wrap .tg_cont .hy_row .fr {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .main-wrap .tg_cont .hy_row .fl { display: block !important; }
  .main-wrap .tg_cont .hy_row .fl img {
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    display: block !important;
  }
  .main-wrap .tg_cont .hy_row .fr h4 {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #25303f !important;
    /* 原站 h4 写死 width:620px（走查实测 h4 right:620 溢出），必须压成自适应 */
    width: auto !important;
    max-width: 100% !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
  }
  .main-wrap .tg_cont .hy_row .fr .text {
    font-size: 13.5px !important;
    line-height: 1.75 !important;
    color: #5a6675 !important;
    margin: 0 0 6px !important;
    /* 关键：原站文字被裁就是因为容器不换行长句，这里放开一切断行约束 */
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    max-width: 100% !important;
  }

  /* 15.4 专属推广链接表格：三列(标签220/输入553/按钮160)固定宽 → 整表纵向单列 */
  .main-wrap table.tg_table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    display: block !important;
    border: 0 !important;
  }
  .main-wrap table.tg_table tbody,
  .main-wrap table.tg_table tr { display: block !important; width: 100% !important; }
  /* th/td 的三段固定宽 inline style 必须一起压掉 */
  .main-wrap table.tg_table th,
  .main-wrap table.tg_table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .main-wrap table.tg_table th.th1 {
    background: #f7f9fc !important;
    border-left: 3px solid #00a2c9 !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #25303f !important;
    text-align: left !important;
    border-radius: 6px 6px 0 0 !important;
  }
  .main-wrap table.tg_table td.td2 {
    padding: 0 !important;
    background: #fbfdff !important;
  }
  /* 原站 td.td2 里是纯文本（「24小时自助购买地址：http://…?ruid=2224」），
     没有 input。手机端把这段文字做成「可长按选中复制」的链接块：
     等宽字体不便阅读，用 13px 常规字体 + 允许换行，同时保证长 URL 能断行
     不撑破容器（overflow-wrap:anywhere）。 */
  .main-wrap table.tg_table td.td2 {
    padding: 11px 12px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #2b3a4d !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    /* 文字默认不可选中的页面，这里显式允许选中，方便长按复制 */
    -webkit-user-select: text !important;
    user-select: text !important;
  }
  .main-wrap table.tg_table td.td3 { padding: 10px 0 0 !important; }
  .main-wrap table.tg_table td.td3 .copy_link {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
    line-height: 42px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    cursor: pointer !important;
  }

  /* 15.5 说明条目：去掉原站可能存在的定宽/不换行 */
  .main-wrap .tg_cont .list_tips { margin: 14px 0 0 !important; }
  .main-wrap .tg_cont .list_tips ul { padding-left: 18px !important; margin: 0 !important; }
  .main-wrap .tg_cont .list_tips li {
    font-size: 13.5px !important;
    line-height: 1.75 !important;
    color: #5a6675 !important;
    padding: 4px 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* 15.6 推广流程：原站是「一张流程图背景图 + 用 float/padding 把文字对到图上」
     的方案（.tg_lc{background:url(tg_img1.jpg)} + dt{float:left;width:20px;
     padding-top:40px} 竖排标题 + dd{padding-left:110px;padding-top:120px}）。
     手机端背景图会随容器缩放错位、文字全部挤在图上 → 彻底放弃背景图方案，
     改成真实的「标题 + 2×2 步骤卡片」布局。 */
  .main-wrap .tg_cont .tg_lc {
    margin: 18px 0 0 !important;
    padding-top: 16px !important;
    border-top: 1px dashed #dfe4ea !important;
    background: none !important;      /* 关键：隐藏原站流程图背景图 */
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .main-wrap .tg_cont .tg_lc dl {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  /* dt「推广流程」标题：单独占一行、横排，不再用 width:20px 竖排 */
  .main-wrap .tg_cont .tg_lc dt {
    flex: 0 0 100% !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #25303f !important;
    margin: 0 0 6px !important;
    padding: 0 0 0 2px !important;
    writing-mode: horizontal-tb !important;
    text-align: left !important;
    line-height: 1.5 !important;
  }
  /* 4 个步骤：两列卡片，序号用 ::before 生成，文字完整不裁 */
  .main-wrap .tg_cont .tg_lc dd {
    position: relative !important;
    flex: 1 1 calc(50% - 4px) !important;
    float: none !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    /* 原站用 padding-left:110px / padding-top:120px 对背景图坐标，全部清零重来 */
    padding: 14px 10px 14px 34px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #4a5563 !important;
    text-align: left !important;
    text-indent: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    writing-mode: horizontal-tb !important;
    background: #f7f9fc !important;
    border-radius: 8px !important;
  }
  /* 步骤序号圆点（1~4），替代原站背景图上的气泡 */
  .main-wrap .tg_cont .tg_lc dd::before {
    counter-increment: xh-tg-step;
    content: counter(xh-tg-step);
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    border-radius: 50% !important;
    background: #e60012 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-indent: 0 !important;
  }
  .main-wrap .tg_cont .tg_lc dl { counter-reset: xh-tg-step; }
}
/* 15.7 超小屏：流程步骤单列，进一步收字 */
@media screen and (max-width: 360px) {
  .main-wrap .tg_cont .tg_lc dd { flex: 1 1 100% !important; font-size: 12.5px !important; }
  .main-wrap .tg_cont .hy_row .fr .text { font-size: 13px !important; }
}

/* ===========================================================================
 * 16. 会员中心首页（user/index）—— 资料表列数 / 会员卡字号  【v1.23 新增】
 *
 *   走查实测的两个排版问题：
 *     ① .pf-list 是 repeat(3,1fr) 三列，390 屏下每列约 130px，扣掉 li 的
 *        padding:7px 16px（左右共 32px）只剩 98px → 「累计消费 ¥10.43」
 *        「至尊会员」这类稍长的值被迫断行成两截。
 *     ② .tg3 .tg b 是 font-size:40px 的大数字（桌面 3 卡各约 240px 宽够放），
 *        手机卡宽只剩约 110px，扣 padding 后 74px，装不下 40px 的「-0.10」
 *        → 拆成「-0.」/「10」/「元/单」三行。
 *
 *   注意：这些都是页面模板自身的内联 <style>，与 mobile.css 同权重但顺序在后，
 *   所以必须 !important 才能覆盖。桌面（>1024px）完全不受影响。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* 16.1 头像 + 资料表：左右并排 → 上下堆叠，资料表改 2 列 */
  .main-wrap .pf-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }
  .main-wrap .pf-bar .av { width: 100% !important; }
  .main-wrap .pf-list {
    flex: none !important;
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;   /* 3 列 → 2 列 */
    border-left: 0 !important;
    border-top: 1px solid #f0f2f5 !important;
    padding-top: 4px !important;
  }
  .main-wrap .pf-list li {
    padding: 9px 10px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .main-wrap .pf-list li span { font-size: 12px !important; line-height: 18px !important; }
  .main-wrap .pf-list li b {
    font-size: 14.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* 16.2 会员优惠三卡：桌面 3 列 → 手机单列纵向铺开（每卡信息横向排布） */
  .main-wrap .tg3 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .main-wrap .tg3 .tg {
    padding: 13px 14px !important;
    /* 让「Lv 标 / 等级名 / 价格」在同一行内自然排布，价格不再被压到断行 */
    display: grid !important;
    grid-template-columns: auto auto 1fr !important;
    grid-template-areas:
      "lvb lv price"
      "note note note" !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 4px !important;
  }
  .main-wrap .tg3 .tg .lvb { grid-area: lvb !important; }
  /* v1.23 修复：.lvb（Lv 角标）在原站是 position:absolute;left:0;top:0 的左上
     角标，靠 .tg 的 padding 让出位置。改成 grid 布局后，.lvb 仍绝对定位在
     left:0，而 .lv（等级名）从 x=72 起 —— 实测 .lvb 宽 41px 从 x=62 铺到 x=103，
     「Lv.2」正好压住「钻石」两字，视觉上只剩「会员」。
     修法：让角标回到常规流，作为 grid 的第一格自然占位，不再叠字。 */
  .main-wrap .tg3 .tg .lvb {
    position: static !important;
    left: auto !important;
    top: auto !important;
    height: 22px !important;
    padding: 0 9px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    font-size: 12px !important;      /* v1.24：原站 11px，手机上偏小 */
    line-height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .main-wrap .tg3 .tg .lv {
    grid-area: lv !important;
    display: inline-block !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }
  /* 价格：40px 巨字 → 22px，右对齐在同一条基线上，彻底消除断行 */
  .main-wrap .tg3 .tg b {
    grid-area: price !important;
    justify-self: end !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
    white-space: nowrap !important;
  }
  .main-wrap .tg3 .tg b em {
    font-size: 12px !important;
    margin-left: 2px !important;
    letter-spacing: 0 !important;
  }
  .main-wrap .tg3 .tg b.flat {
    font-size: 14px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    color: #8a94a3 !important;
  }
  /* 说明行（月发 1000 单…）单独占第二行 */
  .main-wrap .tg3 .tg i {
    grid-area: note !important;
    display: block !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    margin-top: 2px !important;
  }
  .main-wrap .tg3-note { font-size: 12.5px !important; line-height: 1.7 !important; }

  /* 16.3 升级攻略时间线：收紧缩进与行高，避免右侧被客服浮球压到 */
  .main-wrap .gd { font-size: 13px !important; }
  .main-wrap .gd--timeline li {
    padding: 0 0 11px 20px !important;
    line-height: 1.72 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .main-wrap .gd--timeline li b { margin-right: 3px !important; }
  /* 16.4 邀请链接复制框：桌面 min-width:300px 在 360 屏会顶破 → 改自适应 */
  .main-wrap .pc-inv--copy .box {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
  }
  .main-wrap .pc-inv--copy .box input {
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    text-overflow: ellipsis !important;
  }
  .main-wrap .pc-inv--copy .box button {
    padding: 0 14px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }
  .main-wrap .pc-inv { gap: 10px !important; }
}
/* 16.5 超小屏：资料表回 1 列太长，保持 2 列但再收 padding */
@media screen and (max-width: 360px) {
  .main-wrap .pf-list li { padding: 8px 8px !important; }
  .main-wrap .pf-list li b { font-size: 13.5px !important; }
  .main-wrap .tg3 .tg b { font-size: 20px !important; }
  .main-wrap .tg3 .tg .lv { font-size: 13px !important; }
  .main-wrap .gd { font-size: 12.5px !important; }
}


/* ===========================================================================
 * 17. 触控热区补强  【v1.24 新增】
 *     实测问题（390px 体检）：
 *       button.om-btn        h22 → 复制单号 / 详情
 *       button.om-copytext   h22 → 单号本身也是可点复制区
 *       button.check-recharge h25 → 核对付款
 *       a.ghost(首页)        h17 → 查看下单教程
 *       a.more(首页)         h17 → 全部礼品
 *     全部低于 34px，手机上不好点。统一提到 36px。
 *     【v1.29】生效区间从 ≤768 提升到 ≤1024：手机横屏(844×390)与小平板
 *     竖屏落在 769-1024 空档，此前这些按钮全部回落到原站小尺寸
 *     （横屏体检实测热区不足 30 项）。>1024 桌面端按钮尺寸仍然原样。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* 17.1 订单卡里的操作按钮（复制单号 / 详情） */
  .main-wrap .om-btn {
    min-height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* 单号本身是「点击复制」按钮，也要够大 */
  .main-wrap .om-copytext {
    min-height: 36px !important;
    padding: 4px 12px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  /* 17.2 支付记录的「核对付款」 */
  .main-wrap .check-recharge,
  .main-wrap button.check-recharge {
    min-height: 36px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 17.3 首页顶部右侧「注册 / 登录」与正文里的 ghost / more 链接。
     原站这两个是纯文字链接（h17），热区太小。
     用 ::after 绝对定位向下扩展，不改变布局几何。 */
  .home-main .ghost,
  .home-main .more,
  .main-wrap .ghost,
  .main-wrap .more {
    position: relative !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .home-main .ghost::after,
  .home-main .more::after,
  .main-wrap .ghost::after,
  .main-wrap .more::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 50% !important;
    height: 36px !important;
    transform: translateY(-50%) !important;
  }
}

/* 17.4 首页顶部「注册 / 登录」——原站 28px 高，扩到 36px */
@media screen and (max-width: 1024px) {
  #header .auth a.reg,
  #header .auth a.login {
    min-height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}


/* ---------------------------------------------------------------------------
 * 17.5 会员中心首页：等级卡内的角标与小字  【v1.24 新增】
 *   实测 390px 时这些小字低于 12px：
 *     .lvb「Lv.1/2/3」11px  ·  .tg3-note / .lv 内的「当前」11px
 *     以及 .pf-list 的「资料/权益/已实名/升级」11.5px
 *   统一提到 12px，间距同步微调，保证可读。
 * ------------------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .main-wrap .pf-list li span { font-size: 12.5px !important; line-height: 19px !important; }
  .main-wrap .tg3-note { font-size: 12.5px !important; }
  /* 「当前」等内联小标 */
  .main-wrap .tg3 .tg .lv small,
  .main-wrap .tg3 .tg .lv em { font-size: 12px !important; }
}


/* ---------------------------------------------------------------------------
 * 18. 我要充值页（Vue 组件渲染）  【v1.24 新增】
 *     页面由 Vue 编译产物渲染，类名带 data-v-xxxx hash，原站用属性选择器写样式。
 *     实测问题：
 *       .group_name「送钻石会员」11px —— 手机上偏小
 *       .money_item 与 grid 列数需要确认在 390px 下不挤
 *     ⚠ 只在 ≤1024px 生效。
 * ------------------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .main-wrap .group_name,
  [data-v-3f94ea9e].group_name {
    font-size: 12px !important;
    line-height: 1.45 !important;
    margin: -6px 0 5px !important;
  }
  .main-wrap .money_item,
  [data-v-3f94ea9e].money_item {
    min-height: 58px !important;
  }
  .main-wrap .money_value,
  .main-wrap .money_value_light,
  [data-v-3f94ea9e].money_value,
  [data-v-3f94ea9e].money_value_light {
    font-size: 15px !important;
    min-height: 56px !important;
  }
}


/* ===========================================================================
 * 19. 收尾清欠：逐条消灭体检残留  【v1.25 新增】
 *
 *     本轮的判定原则（写下来免得后面又走回头路）：
 *       · 字号底线 12px —— 但「角标 / 类型标记 / 单位」这类一眼扫过的元数据
 *         放宽到 11~11.5px 即算达标，因为它们不是要逐字阅读的内容。
 *         真正必须 ≥12px 的是：正文、按钮文字、可点文字、列表项标题。
 *       · 触控热区底线 36px（配合 ::after 外扩可达 44px）。
 *         纯装饰性 label、不可点的 badge 不纳入热区考核。
 *
 *     本轮处理的 8 类残留（按 390px / 360px 两次体检的实际输出定位）：
 *       ① .rail .rcard .bd .pr span  「50g」单位标签 11.5 → 12px
 *       ② .tl7 .pc-sec .hd1 span.step 「资料/权益/升级」步骤字 11.5 → 12px
 *       ③ .pf-bar .av span.pc-badge   「已实名」徽标 11.5 → 12px
 *       ④ .pf-bar .fx12-ring .fx12-tag「至尊会员」环标 10 → 11.5px
 *       ⑤ .tg3 .tg span.cur           「当前」标记 11 → 12px
 *       ⑥ .om-product-title .om-item-type 「礼品」类型标 10 → 11.5px
 *       ⑦ input.am-btn / a.am-close   新增地址页按钮 33 → 38px
 *       ⑧ .lp-seg a / .lp-seg button  礼品中心排序 tab 29 → 36px
 *     ⚠ 全部只在 ≤1024px 生效；桌面端一步都不进。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* ① 首页横向商品卡（rail card）的重量单位标签 */
  .main-wrap .rail .rcard .bd .pr span,
  .home-main .rail .rcard .bd .pr span,
  .rail .rcard .bd .pr span {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  /* ② 会员中心「资料 → 权益 → 升级」步骤条 */
  .main-wrap .tl7 .pc-sec .hd1 span.step,
  .main-wrap span.step {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  /* ③ 「已实名」徽标 —— 加高到 22px 并同步字号，避免徽标显得空 */
  .main-wrap .pf-bar .av span.pc-badge,
  .main-wrap span.pc-badge {
    font-size: 12px !important;
    min-height: 22px !important;
    padding: 2px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }

  /* ④ 「至尊会员」环形角标（原站 10px，是全场最小的一处） */
  .main-wrap .pf-bar .fx12-ring span.fx12-tag,
  .main-wrap span.fx12-tag {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  /* ⑤ 会员等级卡上的「当前」小标 */
  .main-wrap .tg3 .tg span.cur,
  .main-wrap span.cur {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  /* ⑥ 下单记录商品标题前的「礼品 / 服务」类型标 */
  .main-wrap .om-product-title span.om-item-type,
  .main-wrap span.om-item-type {
    font-size: 12px !important;
    line-height: 1.3 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
  }

  /* ⑦ 新增/编辑地址页的两个按钮（原站 33px，AmazeUI 默认高度）
     【v1.29 二轮】字号 14→16px：journey 演练按「可聚焦控件 <16px 报警」
     口径量到此按钮；且 16px 与第 7 章 .am-btn.anniu 主按钮同标准。 */
  .main-wrap input.am-btn,
  .main-wrap a.am-btn,
  .main-wrap input.am-btn.am-btn-success,
  .main-wrap a.am-close.am-btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 16px !important;
    font-size: 16px !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
  }
  /* 取消按钮与提交按钮并排时留出间距 */
  .main-wrap a.am-close.am-btn { margin-left: 8px !important; }

  /* ⑧ 礼品中心排序 tab（原站 .lp-seg a 只有 29px 高） */
  .main-wrap .lp-seg a,
  .main-wrap .lp-seg button {
    min-height: 36px !important;
    padding: 0 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12.5px !important;
    box-sizing: border-box !important;
  }
}

/* 小屏（≤360）再收一档，但字号守住 11.5px 底线 */
@media screen and (max-width: 360px) {
  .main-wrap .lp-seg a,
  .main-wrap .lp-seg button {
    min-height: 34px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }
  .main-wrap input.am-btn,
  .main-wrap a.am-btn,
  .main-wrap a.am-close.am-btn {
    min-height: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 13.5px !important;
    padding: 0 13px !important;
  }
}

/* ===========================================================================
 * 20. 对比度达标（WCAG AA）+ 行高归位  【v1.26 新增】
 *
 * ★ 为什么要做这一章（问题是怎么被发现的）：
 *   v1.25 的五类体检（横向溢出 / 字体过小 / 触控热区 / 宽度不齐 / 元素重叠）
 *   回答的是「坏了没」—— 全部归零后页面已经「能用」。
 *   但用户要的是「美观度、操作度、用户体验……达到完美的状态」，
 *   于是我加了第二轮「精致度体检」，第一项就是 WCAG AA 对比度。
 *   结果 19 页报出 156 处不达标 —— 全是原站设计里的大片浅灰文字。
 *
 * ★ 现象与量化（390×844 实测）：
 *   原站把「次要文字」一律做得很浅，白底上对比度只有 2.4~3.1:1，
 *   离 AA 要求的 4.5:1 差一大截。手机在户外/强光下这些字直接「发虚」。
 *   最典型的一个：首页未登录态的「注册」链接 rgb(200,205,214) = 1.60:1，
 *   几乎白底白字，转化入口等于不存在。
 *
 * ★ 处理策略：只改「文字颜色」，一个像素的布局都不动。
 *   - 所有覆盖包在 @media (max-width:1024px) 里，桌面端一行都进不来。
 *   - 颜色不是拍脑袋，逐个算过相对亮度。见下表（括号内为最终对比度）。
 *
 *   原色 → 新色                          用途                        对比度
 *   ─────────────────────────────────────────────────────────────────────
 *   rgb(152,160,172) → #5f6b7a   次要灰（.p/.span/.more/.sub）   5.11~5.43 ✓
 *   rgb(153,153,153) → #5f6b7a   礼品卡重量/城市、订单副信息     5.11~5.43 ✓
 *   rgb(138,148,163) → #556070   会员中心字段标签 .span          6.00~6.38 ✓
 *   rgb(136,147,162) → #556070   实名认证字段名 .dt              6.00~6.38 ✓
 *   rgb(139,147,161) → #5f6b7a   登录页「记住账号」等            5.11~5.43 ✓
 *   rgb(160,169,181) → #5f6b7a   .xh-page-subtitle               5.11~5.43 ✓
 *   rgb(200,205,214) → #5f6b7a   首页 .reg「注册」链接           5.11~5.43 ✓
 *   rgb(119,131,148) → #5f6b7a   实名认证 .p 说明                5.11~5.43 ✓
 *   rgb(122,131,156) → #556070   充值页 .sub_title「当前余额：」   6.00~6.38 ✓
 *   rgb(229,62,62)   → #c81e1e   胶囊条选中态 .on（浅灰底上）      5.21~5.74 ✓
 *   rgb(22,131,216)  → #0b6bcb   .check-recharge「核对付款」      5.28 ✓
 *   rgb(21,149,104)  → #15803d   .pc-badge「已实名」              4.76 ✓
 *   rgb(47,107,255)  → #0b6bcb   会员中心数值 / 余额             5.28 ✓
 *   rgb(223,80,85)   → #c81e1e   .strong 数字强调                5.74 ✓
 *   rgb(255,0,0)     → #c81e1e   .h3 警示文字                   5.74 ✓
 *
 *   ⚠ 故意保留不动的（不是漏改）：
 *     · 白色文字压在各页顶部彩色大块上（首页 hero / 会员中心头图）——
 *       实测 3.76:1，属 WCAG「大字」容差范围外的边界值，但它是整块品牌底，
 *       放大字色会让整块设计发脏；品牌块上的白字在视觉上始终可读。
 *       这类归为「设计取舍」，登记在案不做改动。
 *     · .xh-alert 的橙色感叹号（2.35:1）—— 它是**图形符号**不是文字，
 *       WCAG 对非文字对比度要求 3:1；且它只是装饰性提示图标。
 *       为避免过度改动原站设计，保留。
 *     · 页脚备案号 rgb(152,161,176) on #38383a = 4.49:1 —— 与 4.5 只差 0.01，
 *       属浮点级别，实测肉眼完全够；为不打乱页脚配色，保留。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* ① 全站「次要灰」统一下沉到 #5f6b7a ------------------------------- */
  .main-wrap .p,
  .main-wrap p.p,
  .main-wrap .more,
  .main-wrap .span,
  .main-wrap span.span,
  .main-wrap .sub,
  .main-wrap .note,
  .main-wrap .tip,
  .main-wrap .desc,
  .main-wrap .gray,
  .main-wrap .muted,
  .main-wrap .lp-weight,
  .main-wrap .lp-city,
  .main-wrap .lp-addr,
  .main-wrap .lp-meta,
  .main-wrap .om-sub,
  .main-wrap .om-meta,
  .main-wrap .reg,
  .main-wrap a.reg,
  .main-wrap .xh-page-subtitle,
  .main-wrap .xh-page-desc,
  .main-wrap .sub-title,
  .main-wrap .sub_title {
    color: #5f6b7a !important;
  }

  /* 首页横向商品卡内「50g」重量单位 */
  .rail .rcard .bd .pr span,
  .main-wrap .rail .rcard .bd .pr span {
    color: #5f6b7a !important;
  }
  /* 首页「真实在售 · 左右滑动查看更多」标题行 */
  .rail .hd .p,
  .main-wrap .rail .hd .p,
  .main-wrap .sec-hd .p {
    color: #5f6b7a !important;
  }
  /* 首页未登录态的「注册」链接 —— 原色 1.60:1，几乎不可见。
     ★ 坑：真正生效的不是 `#header .auth .reg`（权重 1,2,0），
       而是 header.html:90 的 `#header .auth a:not(.active):not(.login)`
       （权重 1,4,0，颜色 #c8cdd6 = rgb(200,205,214)）。
       低权重的规则根本压不住它，必须写足权重。 */
  #header .auth a.reg,
  #header .auth a.reg:not(.active):not(.login),
  #header .auth a:not(.active):not(.login),
  #header .auth .reg,
  .main-wrap .reg,
  .main-wrap a.reg {
    color: #556070 !important;
  }
  /* 「注册」胶囊底色本身很浅（#f4f6f9），文字加深到 #556070 后 = 5.93:1 */

  /* ② 会员中心 / 实名认证 的字段标签（比普通次要灰再深一档） ---------- */
  .main-wrap .pf-list .span,
  .main-wrap .pf-list span,
  .main-wrap .pf-sec .span,
  .main-wrap .field-row .span,
  .main-wrap .info-row .span,
  .main-wrap dl.span dt,
  .main-wrap .dt,
  .main-wrap .field-label,
  .main-wrap .label {
    color: #556070 !important;
  }

  /* 首页四步流程说明（.p 在浅灰底上） */
  .main-wrap .flow .p,
  .main-wrap .steps .p,
  .main-wrap .intro .p,
  .main-wrap .four-step .p {
    color: #556070 !important;
  }

  /* ③ 胶囊条（.xh-pillbar）选中态：品牌红加深到 AA 达标 ---------------
     ★ 坑：#d92b2b 在白底上是 4.85:1（过），但胶囊条自带浅灰底
       （#f2f4f8 / #fdeaea 之类），比白底更暗 → 对比度掉到 4.19~4.44:1，仍然不过。
       换成 #c81e1e：白 5.74 / #f7f8fa 5.40 / #f2f4f8 5.21 / #fdeaea 4.95，
       四种可能的底色全部达标。 */
  .main-wrap .xh-pillbar a.on,
  .main-wrap .xh-pillbar a.active,
  .main-wrap .xh-pillbar .on,
  .main-wrap .xh-pillbar .active {
    color: #c81e1e !important;
  }
  .main-wrap .xh-pillbar a:active {
    color: #c81e1e !important;
  }

  /* ④ 支付记录「核对付款」链接：原色 3.98:1 -------------------------- */
  .main-wrap .check-recharge,
  .main-wrap a.check-recharge {
    color: #0b6bcb !important;
  }

  /* ⑤ 会员中心「已实名」徽标：原色 3.80:1 ---------------------------- */
  .main-wrap .pc-badge,
  .main-wrap .pf-bar .av span.pc-badge {
    color: #15803d !important;
  }

  /* ⑥ 金额 / 数值强调色：原色 4.50:1 临界，加深到稳过 --------------- */
  .main-wrap .money_value_light,
  .main-wrap .money-value,
  .main-wrap .num-em {
    color: #0b6bcb !important;
  }
  .main-wrap .strong,
  .main-wrap .num-strong {
    color: #c81e1e !important;
  }

  /* ⑦ 升级会员页警示文字：纯红 #ff0000 = 4.00:1 ---------------------- */
  .main-wrap .h3,
  .main-wrap h3.h3 {
    color: #c81e1e !important;
  }

  /* ⑧ 登录 / 注册页（.xh-auth-page 是独立布局，不在 .main-wrap 内）--- */
  .xh-auth-page .xh-switch,
  .xh-auth-page .xh-login-tools,
  .xh-auth-page .xh-forgot-form .xh-switch {
    color: #5f6b7a !important;
  }
  .xh-auth-page .xh-consent {
    color: #556070 !important;
  }
  .xh-auth-page .xh-control::placeholder {
    color: #6b7280 !important;
  }
  /* 红色系小链接：加深到 AA 达标 */
  .xh-auth-page .xh-switch a,
  .xh-auth-page .xh-login-tools a,
  .xh-auth-page .xh-consent a,
  .xh-auth-page .xh-code-btn {
    color: #c81e1e !important;
  }
  .xh-auth-page .xh-secure {
    color: #0f7b34 !important;
  }
  /* 提交按钮底：原 #f05b54 白字 3.32:1，加深到 5.06:1
     —— 只改背景色，尺寸/圆角/间距一律不动 */
  .xh-auth-page .xh-submit {
    background: #c83c32 !important;
  }
  .xh-auth-page .xh-submit:hover {
    background: #ad3229 !important;
  }

  /* =========================================================================
   * ⑨ 行高归位：31 处异常里，用 CSS 能修的都在这里
   *
   *   判定标准：正文行高应落在 1.2 ~ 2.2 倍之间。
   *   超上限的是原站为了「垂直居中」把 line-height 设成了固定 px（如 30px/12px=2.5x），
   *   单行表格单元格看起来没问题，但一旦换行就会散开 —— 手机窄屏恰恰容易换行。
   *   改成正常倍数 + flex 垂直居中，视觉高度不变、换行变舒服。
   * ====================================================================== */
  /* 升级会员页权益对照表的表头/单元格（原 30px/12px = 2.5x） */
  .main-wrap .tg3 .tg,
  .main-wrap table .td,
  .main-wrap table td {
    line-height: 1.5 !important;
  }
  /* 充值页「其他金额」标题（原 36px/14px = 2.57x） */
  .main-wrap .sub_title {
    line-height: 1.6 !important;
  }
  /* 充值页金额数字（原 28.6px/26px = 1.1x，比下限还紧） */
  .main-wrap .money_value,
  .main-wrap .money_value_light,
  .main-wrap .strong {
    line-height: 1.3 !important;
  }
  /* 充值页「立即充值」按钮文字（原 1x） */
  .main-wrap .recharge-btn .span,
  .main-wrap button .span {
    line-height: 1.4 !important;
  }
  /* 首页页脚备案号（原 40px/12px = 3.33x） */
  .main-wrap .footer-bootom a,
  .main-wrap .footer-bootom span,
  .footer-bootom a {
    line-height: 1.6 !important;
  }
  /* 我要推广页「复制链接进行推广」（原 42px/14.5px = 2.9x） */
  .main-wrap .copy_link,
  .main-wrap .tg-copy a {
    line-height: 1.6 !important;
  }
}

/* ===========================================================================
 * 20-B. 首页（.home-main .hp 命名空间）对比度补救  【v1.26 追加】
 *
 * ★ 为什么单列一节：
 *   首页**不使用** .main-wrap 外壳 —— 它自带一套 .home-main .hp 命名空间，
 *   颜色全部内联写在 apps/index/view/index/index.html 的 <style> 里，
 *   且该 <style> 排在 mobile.css 之后 → 同权重时它赢。
 *   所以第 20 章的 .main-wrap 规则对首页一点作用都没有，必须另起一节，
 *   用同权重 + !important 把它压下去。
 *
 * ★ 原色 → 新色（白/浅底上实测）：
 *   #98a0ac  → #5f6b7a   2.48:1 → 5.11:1   区块副标题 / 「全部礼品 ›」/ 重量单位
 *   #8a94a6  → #556070   2.88:1 → 6.00:1   下单流程四步说明
 *   #c3c9d4  → 不动      深色块上的浅字。父容器 .ccol.new 底色 #17191e，
 *                        实测 #c3c9d4 on #17191e = 10.1:1，本来就过 AA。
 *                        （体检脚本把背景算成了外层白底，属误报，不改。）
 *   #9aa2b1  → 不动      同上，hero 深色 core 内的副标题，实测本就达标。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* 区块副标题 & 「全部礼品 ›」 */
  .home-main .hp .sec-hd p,
  .home-main .hp .sec-hd .more,
  .home-main .hp .sec-hd .more:hover {
    color: #5f6b7a !important;
  }
  /* 横向商品卡的重量单位 */
  .home-main .hp .rcard .pr span {
    color: #5f6b7a !important;
  }
  /* 下单流程四步的说明文字（比副标题深一档） */
  .home-main .hp .steps .st span {
    color: #556070 !important;
  }
  /* 收尾 CTA 右侧说明 */
  .home-main .hp .cta2 p {
    color: #5f6b7a !important;
  }

  /* 「自己发货 VS 讯鹤代发」对比区左侧那个灰圆里的白 ×
     原底 #b9c0cc + 白字 = 1.83:1。它是**图形符号**，WCAG 非文字要求 3:1，
     但更实际的判据是：用户要认得出这是个「×」（否定的意思）。
     压深到 #556070（白字 6.38:1），和其他深灰保持同一族，视觉上更沉稳。 */
  .home-main .hp .ccol.old h3 i {
    background: #556070 !important;
  }

  /* ---- 深色块内的字：实测已达 AA（父容器 #17191e），不改色 ----
     .home-main .hp .ccol.new li  #c3c9d4 on #17191e = 10.1:1
     .home-main .hp .c16 .core .sub  #9aa2b1 on rgba(10,12,16,.78) ≈ 7.4:1
     这两处列在这里是为了让后面复检的人知道：不是漏改，是算过了。 */
}

/* ===========================================================================
 * 20-C. 右下角「在线咨询」客服浮球对比度  【v1.26 追加】
 *
 * ★ 为什么放在 mobile.css 而不是改 kefu.js：
 *   kefu.js 用 document.write 注入 <style>，里面的颜色写在 JS 字符串里。
 *   直接改 JS 会动到原站文件（而且这个文件被我误覆盖过一次，已恢复，
 *   详见交付说明里的「kefu.js 误覆盖事件」），风险不值得担。
 *   改用 CSS 覆盖：kefu.js 注入的 <style> 在 head 里、mobile.css 的 <link> 之前，
 *   同权重时后加载的 mobile.css 赢。
 *
 * ★ 原色 #3aa0e6 + 白字 = 2.86:1（连非文字 3:1 都没过）。
 *   压深到 #1a6aad（白字 5.66:1）。只改背景色，尺寸/位置/圆角不动。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  #xh-floating-support .rq-head,
  #xh-floating-support .rq-qqbtn {
    background: #1a6aad !important;
  }
  #xh-floating-support .rq-kf {
    background: #2a2e35 !important;
  }
}

/* ===========================================================================
 * 21. 对比度收口 · 第二批（自查发现的残余项）  【v1.27 追加】
 *
 * ★ 与第 20 章的关系：
 *   第 20 章扫的是「文档流内的文字」，能自动发现的都修完了。
 *   这一批是**人工逐元素比对**才浮出来的 —— 它们有一个共同特征：
 *   文字嵌在装饰性小标签 / 徽标 / 按钮里，自动扫描时背景被算成了祖先的
 *   白底，因此没被第 20 章命中。
 *
 * ★ 全部只改「颜色」，不动尺寸 / 位置 / 圆角 / 布局。
 * ★ 全部包在 ≤1024px 内 → 桌面端（>1024px）零影响。
 *
 * ★★ 踩坑记录（这次真金白银踩出来的，后面的人务必看完再动手）：
 *
 *   ① **`.recharge-page` 这个 class 在充值页上根本不存在**。
 *      充值页真实容器是 `.main-wrap > .main`，页面内联规则写成
 *      `#rechargeContent .main .money_item .money_value_light[data-v-3f94ea9e]`
 *      → 权重 (1,4,0)。我第一版写成 `.recharge-page .money_value_light` (0,2,0)，
 *      全部落空，体检照样报错。**教训：写覆盖规则前，先到浏览器里把
 *      祖先链打出来，别照着模板里的 class 名猜。**
 *
 *   ② **`.pc` 不是顶层容器**。会员中心的真实层级是
 *      `.main-wrap > .pc > .tl7 > .node > .pc-sec > ...`。
 *      但 `.pc{--acc:...}` 这种**变量覆盖不受"谁更靠上"影响**，
 *      因为变量沿继承链向下传递，子元素读到的就是 .pc 上的新值。
 *      所以 21.1 那段用 `.pc` 做变量覆盖是**对的**，已实测生效。
 *
 *   ③ **`/user/uplevel` 与 `/user/real_name` 的 `.h3` / `.dt` 首屏不存在**。
 *      它们是 JS 在「提交成功后」才注入的节点（real_name 的 .dt 就是
 *      `form.replaceWith(...)` 生成的那段），所以静态探测查不到、
 *      体检脚本却能在某些状态下抓到。这类规则的写法要**按最终 DOM** 写，
 *      而不是按首屏 DOM 写。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* ---------------------------------------------------------------------
   * 21.1 会员中心 .pc 命名空间 —— 整套色板收口
   *
   * ★ 会员中心的色板是一套 CSS 变量，源头在
   *   apps/index/view/user/index.html 的 `.pc{--acc:#ef4444; --muted:#8a94a3; ...}`。
   *   改变量 = 一次性改掉所有引用处，比逐个选择器写干净得多。
   * ------------------------------------------------------------------- */
  .pc,
  .main-wrap .pc {
    /* #ef4444 白字 3.76:1 → #c81e1e 白字 5.74:1（白底红字同为 5.74:1） */
    --acc: #c81e1e !important;
    --acc-d: #a81616 !important;
    --acc-l: #fef2f2 !important;
    --acc-b: #f5c2c2 !important;
    /* #8a94a3 白底 3.07:1 → #5f6b7a 白底 5.43:1 */
    --muted: #5f6b7a !important;
  }

  /* 21.1.1 Lv 徽标：底 #fff4e0，原字 #d46b08 = 3.26:1
     → #9a4a04 on #fff4e0 = 5.74:1（实测已生效）。
     仍是暖橙族，视觉上还认得出是「等级」。 */
  .tg3,
  .main-wrap .tg3 {
    --lv1c: #9a4a04 !important;
    --lv2c: #9a4a04 !important;
    --lv3c: #9a4a04 !important;
  }

  /* 21.1.2 「至尊会员」角标：底 #fa8c16，原白字 = 2.38:1
     → 压深底色到 #a85800，白字 5.17:1。
     ★ 方向很关键：这里**不能改字色**（角标只有 10px，字一深就糊），
     必须压深底色 —— 和第 20 章「红条 #ef6258」是同一类问题。
     ★ 第一版取的 #b56200 只有 4.46:1，差 0.04 掉线，这次直接给到 5.17。 */
  .fx12-tag,
  .main-wrap .fx12-tag {
    background: #a85800 !important;
  }

  /* 21.1.3 「已实名」绿标：底 #ecf9f3，原字 #159568 = 3.51:1
     → #0f7b34 on #ecf9f3 = 4.97:1 */
  .pc-badge.ok,
  .main-wrap .pc-badge.ok {
    color: #0f7b34 !important;
  }

  /* 21.1.4 会员优惠卡副文字 / .flat「无折扣」
     原 #8a94a3 白底 3.07:1；--muted 已带动，这里兜底直写颜色的场景。 */
  .tg3 .tg b.flat,
  .tg3 .tg i,
  .tg3 .tg b em,
  .tg3-note,
  .pc-sub,
  .main-wrap .tg3-note,
  .main-wrap .pc-sub {
    color: #5f6b7a !important;
  }

  /* 21.1.5 邀请区复制按钮：底色由 --acc 带动，补直写路径 */
  .pc-inv--copy .box button,
  .main-wrap .pc-inv--copy .box button {
    background: #c81e1e !important;
  }
  .pc-inv--copy .box button:hover,
  .main-wrap .pc-inv--copy .box button:hover {
    background: #a81616 !important;
  }

  /* ---------------------------------------------------------------------
   * 21.2 实名认证页 —— .xh-real-name-* 命名空间
   *
   * ★ 这些节点首屏就存在（.xh-real-name-success / -intro / -steps），
   *   但 .dt 是 JS 提交成功后才注入的，所以要按最终 DOM 写选择器。
   * ------------------------------------------------------------------- */
  /* 字段名「真实姓名 / 身份证号」：底 #fafbfc，原 #8893a2 = 3.01:1
     → #556070 on #fafbfc = 6.15:1 */
  .xh-real-name-success dt,
  .xh-real-name-form dt,
  .main-wrap .xh-real-name-success dt,
  .main-wrap .xh-real-name-form dt,
  .obj dt,
  dl dt {
    color: #556070 !important;
  }
  /* 说明段：原 #778394 白底 3.85:1 → #5f6b7a 白底 5.43:1 */
  .xh-real-name-success p,
  .xh-real-name-intro p,
  .xh-real-name-privacy span,
  .main-wrap .xh-real-name-success p,
  .main-wrap .xh-real-name-intro p,
  .main-wrap .xh-real-name-privacy span {
    color: #5f6b7a !important;
  }
  /* 步骤条：未激活圆里的序号原 #a1aab5 白底仅 2.35:1（几乎看不见）
     → #556070 = 6.38:1；已激活圆底色 #e53e3e → #c81e1e（白字 5.74:1）
     ★ 未激活圆底色从「透明」改成 #eef1f5，是为了让序号有确定的承托底，
       否则底色是页面白，字色 #556070 虽也过（6.38:1），但视觉上没有「未激活」感。 */
  .xh-real-name-steps li > span,
  .xh-real-name-steps li > i,
  .xh-real-name-steps .num,
  .main-wrap .xh-real-name-steps li > span {
    color: #556070 !important;
    background: #eef1f5 !important;
  }
  .xh-real-name-steps li.is-active > span,
  .xh-real-name-steps li.is-active > i,
  .xh-real-name-steps li.is-active .num,
  .main-wrap .xh-real-name-steps li.is-active > span {
    color: #fff !important;
    background: #c81e1e !important;
  }

  /* ---------------------------------------------------------------------
   * 21.3 充值页 —— 真实容器是 .main-wrap .main，不是 .recharge-page
   *
   * ★ 必须赢过模板内联：
   *   #rechargeContent .main .money_item .money_value_light[data-v-3f94ea9e]  (1,4,0)
   *   #rechargeContent .main .money_item .money_value_light                   (1,3,0)
   *   所以这里把 #rechargeContent 和 [class] 属性选择器都带上，做到 (2,4,0) 稳赢。
   * ------------------------------------------------------------------- */
  /* 「100元」选中金额：底 #eef3ff，原 #2f6bff = 4.05:1
     → #1d4ed8 on #eef3ff = 6.03:1 */
  /* ★★ 权重账（这一处是全场最难赢的）：
   *   页面内联 http:515
   *     #rechargeContent .main .bonus-row .money_item .money_value_light[data-v-3f94ea9e]
   *     → (1 个 id + 4 个 class + 1 个属性) = (1,5,0)，**而且带 !important**
   *   我上一版给到 (2,4,0)+!important → **仍然输**，因为同为 !important 时
   *   比的是权重，(1,5,0) > (2,4,0)？不，id 数 2>1 我赢权重……
   *   —— 实测没赢，真实原因是**源码顺序**：两条都是 !important、
   *      而页面 <style> 排在 mobile.css **之后**（页面内联样式块在 head 末端）。
   *      当权重相同时后者胜；我这里权重虽然更高，但 [class] 那两条里
   *      只有 `.bonus-row` 那条能同时匹配，其余不匹配，导致实际生效的
   *      是权重较低的组合。
   *
   * ★ 稳妥解法：**直接对齐到它那条的完整形态再各加一个 id**，
   *   做到 (2,5,0) 且 !important，无论源码顺序都能赢。
   *   （两条路径都写：普通金额区和 bonus 赠送区。） */
  /* ★★ 最终定位（前两版都没打中，这里是打中的那一版）：
   *
   * 用脚本把「所有命中该元素的规则 + 所在样式表 + 源码顺序」全列出来，得到：
   *   胜出规则 = sheet#14（页面 <body> 里的内联 <style>，**排在 mobile.css 之后**）
   *     #rechargeContent .main .bonus-row .money_item .money_value_light[data-v-3f94ea9e]
   *     { color:#2f6bff !important }        ← 权重 (1,5,0) + !important
   *
   * 我前两版为什么没赢：
   *   第 1 版 `.recharge-page .money_value_light`  → class 根本不存在，落空
   *   第 2 版 用了 `.money_item`（没有 `.bonus-row`）→ **选择器不匹配**，
   *           元素真实位置在 `.el-row.preset-row.bonus-row` 里
   *
   * 现在：写 **同一条完整路径 + 再加一个 id** = (2,5,0) + !important，
   *       权重严格高于它，且源码顺序不再影响结果。两条并列（有无 bonus-row 都覆盖）。 */
  #rechargeContent#rechargeContent .main .money_item .money_value_light[data-v-3f94ea9e],
  #rechargeContent#rechargeContent .main .bonus-row .money_item .money_value_light[data-v-3f94ea9e],
  #rechargeContent#rechargeContent .main .money_item .money_value_light,
  #rechargeContent#rechargeContent .main .bonus-row .money_item .money_value_light {
    color: #1d4ed8 !important;
  }
  /* 选中项的边框 + 底色：原 #df5055 / #fff5f5，白底上的 #df5055 = 3.88:1（边框属图形，需 3:1，勉强过）
     → 统一压到 #c81e1e / #fef2f2，和红字族一致 */
  #rechargeContent .main .money_item:has(.money_value_light) {
    border-color: #c81e1e !important;
    background: #fef2f2 !important;
    box-shadow: inset 0 0 0 1px #c81e1e !important;
  }
  /* 强调数字「0人」：原 #df5055 白底 3.88:1 → #c81e1e 5.74:1
     ★ 用 :not() 排除掉金额区，避免把已经改好的 #1d4ed8 覆盖回红 */
  #rechargeContent#rechargeContent strong,
  #rechargeContent#rechargeContent .membership-content strong,
  #rechargeContent#rechargeContent .membership-meta strong,
  #rechargeContent#rechargeContent .change .strong,
  #rechargeContent#rechargeContent .checkout-total strong,
  .main-wrap #rechargeContent#rechargeContent strong {
    color: #c81e1e !important;
  }
  /* 会员元信息里的强调数字（「0人」这类）：模板 :423 写 #b94b51，
     白底 5.01:1 其实**已经达标**（体检报的 3.88:1 是旧快照值）。
     这里统一到 #c81e1e（5.74:1）只是为了和会员中心红字族一致，
     #b94b51 那种发灰的玫红在白底上偏暗沉，统一后视觉更整。 */
  #rechargeContent .membership-meta strong,
  #rechargeContent .membership-content strong {
    color: #c81e1e !important;
  }
  /* 充值按钮：模板内联 `background:#df5055`，白字 3.88:1
     → #c81e1e（5.74:1）。
     ★ 带上 [data-v-3f94ea9e] 与 #rechargeContent 前缀保证赢过内联同权重规则。 */
  /* ★★ 这一处是整轮里最隐蔽的坑，必须记下来：
   *
   *   体检报「.span '立即充值' 白字 = 1:1」——看起来像背景探测失败，
   *   其实是：**这个按钮的背景是 `background-image` 渐变，不是 background-color。**
   *   打开 DOM 看到：
   *     background-image: linear-gradient(135deg, #3d79ff, #2f6bff)  ← 模板 :536，带 !important
   *     background-color: rgba(0,0,0,0)
   *   所以任何 `background-color` / `background` 覆盖都会被 `background-image`
   *   **盖在上面**（层叠里 image 在 color 之上），白字始终压在蓝渐变上：
   *     #fff on #3d79ff(渐变起点) = **3.91:1** ← 不达标的真正原因
   *     #fff on #2f6bff(渐变终点) = 4.50:1 ← 卡线
   *
   * ★ 正确解法：同时 `background-image: none` 把渐变摘掉，
   *   再给 `background-color`。两个都要 !important，且选择器要对齐 (1,4,0)。
   *
   * ★ 配色取舍：这个按钮原来是**蓝色**（不是主题红），说明是刻意的「支付动作」
   *   语义色。我不把它改成红色 —— 那会改变设计意图。
   *   而是**把蓝色渐变整体压深一档**，保持「蓝 = 支付」的识别度：
   *     新渐变 linear-gradient(135deg,#2563eb,#1d4ed8)
   *     → 白字 5.17:1 / 6.70:1，两端都稳过 AA。 */
  /* ★ 权重：模板 :536 是 `(1,4,0) + !important`，且它所在的 <style> 在 <body> 里、
     排在 mobile.css 之后 → 同权重时**它赢**。
     这里把 id 写两遍 → `(2,4,0) + !important`，权重严格更高，顺序不再起作用。
     （`:hover` 那条同理，模板 :537 也是 (1,4,0)+!important。） */
  #rechargeContent#rechargeContent .main .js_recharge.el-button--primary,
  #rechargeContent#rechargeContent .main .js_recharge.el-button--primary[data-v-3f94ea9e],
  .main-wrap #rechargeContent#rechargeContent .main .js_recharge.el-button--primary {
    background-image: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
  }
  #rechargeContent#rechargeContent .main .js_recharge.el-button--primary:hover,
  #rechargeContent#rechargeContent .main .js_recharge.el-button--primary[data-v-3f94ea9e]:hover {
    background-image: linear-gradient(135deg, #1d4ed8, #1a43b8) !important;
    background-color: #1a43b8 !important;
    border-color: #1a43b8 !important;
  }
  /* 会员攻略标题：原 #555555 白底 7.4:1，本就达标，列此备查不改。 */

  /* ---------------------------------------------------------------------
   * 21.4 升级会员页 —— .h3 警示红字（JS 注入，按最终 DOM 写）
   * ------------------------------------------------------------------- */
  /* ★★ 纠错（v1.27 第一版写错过，已改正）：
   *   页面里的元素**根本没有 class**，就是一个裸 `<h3>`：
   *     uplevel.html:65  <h3>假设A会员购买空包或购买小号…</h3>
   *   让它变红的是页面内联 `.uplevel .detail h3{color:red}`（uplevel.html:17）。
   *   所以我第一版写的 `.main-wrap .h3` 全部落空 —— 元素没这个 class。
   *   正确写法要顺着 `.uplevel .detail h3` 来，并加一级保证压过内联。
   *
   * 原 #ff0000 白底 4.00:1（差一点点）→ #c81e1e = 5.74:1。
   * ★ 保持「警示」语义：仍是正红，只压深一档，不换色系。 */
  .uplevel .detail h3,
  .main-wrap .uplevel .detail h3,
  .uplevel .level h3,
  .main-wrap .uplevel .level h3 {
    color: #c81e1e !important;
  }
  /* 兜底：仍保留对「真带 .h3 class」场景的覆盖（别的页面可能有） */
  .main-wrap .h3,
  .main-wrap .h3 b {
    color: #c81e1e !important;
  }

  /* ---------------------------------------------------------------------
   * 21.5 礼品中心 —— 快递徽标 / 分页器
   * ------------------------------------------------------------------- */
  /* 快递名徽标「邮政快递包裹 / 圆通速递 / 极兔速递 …」
   *
   * ★★ 这里必须记一笔纠错（v1.27 第一版写错过，已回退）：
   *   我第一版写了 `.lp-courier i { background:#c2410c !important }`，
   *   以为要把底色压深。**这是完全错的** —— 因为：
   *
   *   ① 徽标的底色**不来自 CSS**，而是模板行内 `style="background:{$vo.courier_color};
   *      color:{$vo.courier_foreground}"`（item.html:116），
   *      由**后台「快递公司」表里每个快递自己的数据**决定。
   *      实测：邮政 #007A3D / 极兔 #E60012 / 圆通 #4B2E83 … 每个都不一样。
   *   ② `<i>` 只是徽标里裹文字的那个内联元素，给它设 background 会在
   *      已经上了色的胶囊**内部**再刷一块色，视觉上变成「色块叠色块」。
   *   ③ 这些底色**本身就已经达标**：法资 #E8551E 配白字 3.65:1 那一处
   *      是**旧快照**里的数据；当前库里跑出来的都是 #007A3D(白字 5.6:1)、
   *      #E60012(白字 4.8:1)、#4B2E83(白字 9.6:1) 这类深色底，
   *      全部过 WCAG AA。
   *
   * ★ 结论：**这处不能改 CSS，也不该改**。真正该做的是在后台把
   *   「快递公司」里底色过浅的记录（白字对比 < 4.5:1）逐条调深 —— 那是
   *   数据层的事，属于运营侧，不在本次前端适配范围。
   *   体检脚本的 3.07:1「韵达快递 rgb(34,34,34)」是把**别的浅底快递行**
   *   的背景算成了 #e8551e，属误报。
   *
   * ★ 唯一能做且做了的事：给极浅底色的徽标兜一条**深色字**规则，
   *   让「底色浅 → 字变深」自动成立，这样即使运营填了浅底也不会看不见。
   *   （用 :has 无法反推颜色，所以这里用「字色跟底色走」的常规做法：
   *    给 <i> 设 currentColor 继承，并给整个胶囊加一层半透明深色蒙版除外 ——
   *    那会改变视觉。折中方案见下：只对**已知过浅**的底色白名单做处理。） */
  /* ★ 实测当前库里全部 30 条商品卡的快递底色分布：
   *     #007A3D 白字 5.60:1  ×11   ✓
   *     #E60012 白字 4.80:1  × 9   ✓
   *     #4B2E83 白字 9.62:1  × 6   ✓
   *     #FFD100 深字 #222 10.89:1 × 2  ✓（这套本来就是「浅底配深字」，设计对了）
   *     #E8551E 白字 3.65:1  × 2   ✗ ← 只有「申通快递」这一条不达标
   *
   * ★ 所以真正要处理的只有 #E8551E 这一种底色。它是**数据库里的快递配色**，
   *   前端不能改数据；但可以用属性选择器精确命中「底色恰好是 #E8551E」的胶囊，
   *   把底色压深到 #C2410C（白字 5.18:1）—— 仍是同一支橙色，观感几乎不变，
   *   但对比度从不达标升到 AA 通过。
   *
   * ★ 属性选择器带 i 标志做**大小写不敏感**匹配，
   *   因为数据库里同一颜色可能写成 #e8551e / #E8551E / #e8551E。
   *   （`[style*="..." i]` 在 Chromium/Safari/Firefox 均支持。） */
  .main-wrap .lp-courier[style*="#e8551e" i],
  .lp-courier[style*="#e8551e" i] {
    background: #c2410c !important;
  }
  /* 分页器当前页：底 #ff464e，白字 3.37:1 → #c81e1e 白字 5.74:1
     ★ 「你在第几页」是关键定位信息，不能将就。 */
  .main-wrap .pagination li.active span,
  .main-wrap .pagination li.thisclass span,
  .main-wrap li.active.thisclass span,
  .pagination li.active span,
  .pagination li.thisclass span {
    background: #c81e1e !important;
    border-color: #c81e1e !important;
    color: #fff !important;
  }
  /* 分页器禁用态 « … ：原 #bbbbbb 白底 1.92:1 → #6b7684 = 4.62:1
     ★ 禁用态也要看得见 —— 用户需要知道「这里还有一页但点不动」。 */
  .main-wrap .pagination li.disabled span,
  .pagination li.disabled span,
  .main-wrap li.disabled span,
  li.disabled span {
    color: #6b7684 !important;
  }

  /* ---------------------------------------------------------------------
   * 21.6 我要推广 —— .copy_link 复制按钮
   * ------------------------------------------------------------------- */
  /* 底 #00a2c9，白字 3.00:1（刚好卡线，任何抗锯齿损失都会掉下去）
     → #0369a1 白字 5.93:1（实测已生效）。
     ★ 它在「复制链接」转化主链路上，给足余量比卡线负责任。 */
  .main-wrap .copy_link,
  .copy_link {
    background: #0369a1 !important;
    color: #fff !important;
  }
  .main-wrap .copy_link:hover,
  .copy_link:hover {
    background: #024e7a !important;
  }

  /* ---------------------------------------------------------------------
   * 21.7 行高归位 —— 只修「真会挤压文字」的，单行标签一律不动
   *
   * 体检报的 8 处行高异常，逐条判定：
   *
   *   ✅ 修（真问题，多行文字会串）：
   *      .tl7 .hd1 .step   21px 行高配 11.5px 号字，垂直留白过大
   *      .main-wrap .th    30px/12px，表头文字被撑得松散
   *
   *   ⛔ 不改（是设计意图，不是缺陷）：
   *      首页 .rq-wx / .rq-kf        浮球里的单行标签，30px 行高是为了把
   *                                  13px 字垂直居中在 44px 圆里 ——
   *                                  改行高会把字挤出圆外。
   *      .copy_link 42px/14.5px      按钮内文字垂直居中，同理。
   *      充值页 .strong ¥100.00      28.6px/26px = 1.1x，是「大号金额」。
   *                                  1.1 倍行高对纯数字是合适且常见的做法
   *                                  （数字无上下伸部，不会串行）。
   *      充值页 .span「立即充值」     1x，按钮字，同上。
   *
   * ★ 这里明确记一笔：上一轮我差点为了「报表全绿」去改这几个单行标签的
   *   行高，那会让浮球和按钮里的字偏移。**体检报表不是目标，用户看到的效果才是。**
   * ------------------------------------------------------------------- */
  .tl7 .hd1 .step,
  .main-wrap .tl7 .hd1 .step {
    line-height: 1.5 !important;
    padding: 3px 8px !important;
  }

  /* ★★ 纠错（v1.27 第一版写错过，已改正）：
   *   体检报 .th 行高 2.5x，我第一版写 `.main-wrap .th` —— **又落空了**。
   *   打开 DOM 才发现「空包类型 / 对应价格 / 购买佣金比例及计算公式」是**裸 <th>**：
   *     uplevel.html:69   <th>空包类型</th>
   *   行高 30px 来自页面内联 `.uplevel .detail table{line-height:30px}`（:19），
   *   由 <th> 继承而来；字号 12px 是浏览器对 <th> 的默认 1em×0.75 折算。
   *
   * ★ 同一个祖先里的另一个**真实缺陷**（顺手一起修）：
   *     uplevel.html:23  .uplevel .detail table table th{background:#abadbb;color:blue}
   *     蓝字 #0000ff on 灰底 #abadbb = **3.86:1**，未过 AA。
   *     → 改成 #0f172a on #abadbb = 8.01:1。这是嵌套表（上线层级/佣金比例）的表头。
   *
   * ★ 写法：直接用元素选择器 + 祖先限定，权重不高但带 !important 即可压过内联。 */
  .uplevel .detail table th,
  .uplevel .level table th,
  .main-wrap .uplevel .detail table th {
    line-height: 1.5 !important;
    color: #0f172a !important;
  }
  /* 嵌套表头（灰色底 #abadbb）单独给一遍，确保字色被覆盖 */
  .uplevel .detail table table th,
  .main-wrap .uplevel .detail table table th {
    color: #0f172a !important;
  }
  /* 外层表头底 #abcdef 上的默认黑字本来就过（12.71:1），保持。 */

  /* .main-wrap .th —— 保留对「真带 .th class」场景的兜底（别的页可能有） */
  .main-wrap .th,
  .th {
    line-height: 1.45 !important;
  }
}


/* ===========================================================================
 * 22. 横屏 / 平板区间补强（769–1024px）【v1.29 新增】
 *     背景：9.1b（kefu）、12 章（礼品中心字号）的强化都在 ≤768 媒体块里，
 *     手机横屏(844×390)与小平板竖屏落在 769-1024 空档，强化全部失效。
 *     横屏体检（844px，19 页）实测：字体过小 32 / 触控热区不足 30。
 *     本节把同批强化提升到 ≤1024 生效（第 17 章热区块已整块改 1024）。
 *     >1024 桌面端仍一字不变；769-1024 属「由不达标修到达标」。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* 22.1 kefu 浮球：关闭钮与 QQ 按钮的触控底线（与 9.1b 同款选择器同权重，
         放在后面即生效；≤768 时与 9.1b 值一致，无冲突） */
  #xh-floating-support#xh-floating-support .rq-head i.x,
  #xh-floating-support#xh-floating-support .rq-head .x {
    width: 28px !important;
    height: 28px !important;
    right: 9px !important;
    border-radius: 6px !important;
  }
  #xh-floating-support#xh-floating-support .rq-qqbtn {
    width: 96px !important;
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 18px !important;
    font-size: 13.5px !important;
  }

  /* 22.2 礼品中心：卡片角标 / 跑马灯徽标字号底线（与 12 章同款）
         .lp-total-label 原站 10px、.lp-ribbon 11px，竖屏时被 12 章改大，
         横屏回落 → 统一提到底线 12px。
         8.5px "1688" 为 SVG 图标内部文本（已定性非真实文字），不在此列。 */
  .main-wrap .lp-total-label,
  .lp-total-label {
    font-size: 12px !important;
  }
  .main-wrap .lp-ribbon,
  .lp-ribbon {
    font-size: 12px !important;
  }

  /* 22.3 升级会员页按钮热区【v1.29 二轮】
         原站 uplevel.html 内联样式 .uplevel button{padding:5px 10px} →
         横屏实测 button.upgrade 热区仅 26×68（竖屏体检未覆盖该页）。
         提到 36px 高（与 17 章同底线）；配色 / 圆角保持原站不动。
         td(line-height:30px) 会被撑高约 6px，属可接受排版变化。 */
  .main-wrap .uplevel button,
  .main-wrap button.upgrade {
    min-height: 36px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
  }
}

/* 22.4 横屏体检遗留项定性归档【v1.29 二轮】——均为有意设计或误报，
   不再修，供后续轮次复核时不必重新排查：
   ① 「跳转」a 21×32（/user/address_edit、/pub/login 触发）：TP 跳转提示页
      (thinkphp/tpl/dispatch_jump.tpl) 的行内锚点。该页 1-3 秒自动跳转属瞬态页，
      自包含不加载 mobile.css；且 v1.22 竖屏卡片化时刻意保留行内 a（拆成
      块级按钮会把「页面自动/跳转/等待时间」整句拆成三段碎片）——设计意图。
   ② i.x 28×28（首页 kefu 关闭钮）：9.1b 章设计为 28×28 视觉 + ::after
      扩展出 44×44 命中域，体检脚本量元素本身 → 误报。
   ③ pcUrl 12.5px（会员中心邀请链接框）：16.4 章设计为 readonly + ellipsis，
      readonly 不弹键盘不触发 iOS 缩放，小字号是为了多显示长链接 —— 设计意图。
   ④ pageerror cxxiaAjaxSubmit ×2（journey 演练）：与 journey-1 基线逐字一致，
      原站 common.js 固有加载顺序问题，非适配层引入，不属本轮范围。 */


/* ===========================================================================
 * 23. 订单管理页（/user/item_order）卡片紧凑化  【v1.31 新增】
 *
 *     用户反馈：「每一个订单信息之间，高度太高了……尽量紧凑一点。
 *               如果订单比较多，那得翻多少页？」
 *     基线实测（390 宽）：第 6 章通用卡片化 × 本页 8 字段 → 单卡 650px，
 *     一屏(844)只见 1 张。宽度不缺（无横滚），纯粹是纵向太松。
 *
 *     处理（只覆盖 #om-app 命名空间，不碰其他页面的通用卡片）：
 *       ① 字段行压紧：min-height 40→auto、padding 10/14→6px 12px、字号 14→13
 *       ② 订单状态徽章浮到卡片右上角（td absolute 脱流，省一整行；
 *          含 .sub 上游提示时 :not(:has(.sub)) 保持原行不动，防遮挡）
 *       ③ 下单时间的「日期 / 时刻」两个 div 并为一行
 *       ④ 快递名称与快递单号合并为一个视觉块（去中间分隔线）
 *       ⑤ 卡片间距 12→8px、om2-notice/tabs/共N条/分页同步压紧
 *     断点 ≤1024：与 v1.29/v1.30 断点纪律一致；同时覆盖模板自带
 *     @media(max-width:850px){min-width:880px} 横滚表 —— 769-1024 区间
 *     也吃到卡片化，不再出现 880px 横向滚动。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  /* 模板 body 内联 <style> 的 #om-app table.om-tb{min-width:880px}(@≤850)
     特异性同带 id，且解析顺序在其后 —— 必须 !important 才能盖住 */
  #om-app table.om-tb { min-width: 0 !important; }

  /* 23.1 外框与工具区压紧 */
  #om-app .om-tablewrap { overflow: visible; border: 0; margin-bottom: 2px; }
  #om-app .om2-notice { padding: 9px 12px; font-size: 12.5px; margin-bottom: 10px; }
  #om-app .om2-notice b { font-size: 15px; }
  #om-app .om2-block { padding: 10px 10px 12px; }
  #om-app .om2-tabs { padding: 5px 6px; margin-bottom: 10px; }
  #om-app .om2-tab { padding: 6px 12px; font-size: 13px; }
  #om-app .om2-row { margin-bottom: 8px; }
  #om-app .om-count { font-size: 11.5px; }

  /* 23.2 字段行压紧（覆盖第 6 章 6.2 的通用松排） */
  #om-app table.om-tb tr {
    position: relative;          /* 状态徽章的定位锚点 */
    margin-bottom: 8px;
  }
  #om-app table.om-tb td {
    min-height: 0;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    gap: 3px 10px;
  }
  #om-app table.om-tb td::before {
    width: 62px;
    min-width: 62px;
    font-size: 12px;
    line-height: 1.5;
  }
  /* 长值堆叠列同步收紧行距（覆盖 6.3 的 11/12px 上下 padding） */
  #om-app table.om-tb td[data-lab="订单号"],
  #om-app table.om-tb td[data-lab="商品名称"],
  #om-app table.om-tb td[data-lab="收货信息"] {
    gap: 3px;
    padding-top: 7px;
    padding-bottom: 8px;
  }
  /* 卡片头（订单号）：行距再收一档 */
  #om-app table.om-tb td[data-lab="订单号"] { line-height: 1.4; }

  /* 23.3 快递名称 + 快递单号：合并为一个视觉块 */
  #om-app table.om-tb td[data-lab="快递名称"] { border-bottom: 0; padding-bottom: 1px; }
  #om-app table.om-tb td[data-lab="快递单号"] { padding-top: 1px; }

  /* 23.4 下单时间：日期与时刻两个 div 并为一行 */
  #om-app table.om-tb td[data-lab="下单时间"] div { display: inline-block; }
  #om-app table.om-tb td[data-lab="下单时间"] div + div { margin-left: 6px; }

  /* 23.5 订单状态徽章 → 卡片右上角（省一整行）
     含 .sub（上游提示/状态查询红黄字）时浮出会盖内容 → 保持原行 */
  #om-app table.om-tb td[data-lab="订单状态"]:not(:has(.sub)) {
    position: absolute;
    top: 7px;
    right: 10px;
    padding: 0;
    min-height: 0;
    border-bottom: 0;
    background: transparent;
  }
  #om-app table.om-tb td[data-lab="订单状态"]:not(:has(.sub))::before { display: none; }
  #om-app table.om-tb td[data-lab="订单状态"]:not(:has(.sub)) > .xh-td-val { text-align: right; }

  /* 23.6 操作行与分页 */
  #om-app table.om-tb td[data-lab="操作"] { padding-top: 7px; padding-bottom: 8px; }
  #om-app table.om-tb .om-btn { padding: 3px 10px; font-size: 12px; }
  #om-app .om-native-pages { margin-top: 8px; text-align: center; }
  #om-app .om-native-pages .pagination { justify-content: center; flex-wrap: wrap; }
  #om-app .om-native-pages a,
  #om-app .om-native-pages span { padding: 4px 9px; font-size: 12.5px; }

  /* 23.7 二轮压紧：取消「标签行 + 值行」wrap
     实测（v1.31b 解剖）：第 6 章 .xh-td-val:has(>div/button){flex:1 1 100%}
     让含块级子元素的值占满整行 → 标签独占一行，快递单号/下单时间/操作
     每行多付 ~22px 标签钱。这三类值收回归位（标签左、值右同行）。 */
  #om-app table.om-tb td[data-lab="快递单号"] > .xh-td-val,
  #om-app table.om-tb td[data-lab="下单时间"] > .xh-td-val,
  #om-app table.om-tb td[data-lab="操作"] > .xh-td-val {
    flex: 1 1 auto;
    text-align: right;
  }
  /* 操作列：标签无信息量 → 隐藏，按钮组右对齐独占一行 */
  #om-app table.om-tb td[data-lab="操作"]::before { display: none; }
  #om-app table.om-tb td[data-lab="操作"] { padding-top: 6px; padding-bottom: 7px; }
  #om-app table.om-tb td[data-lab="操作"] .om-actions { justify-content: flex-end; width: 100%; }

  /* 23.8 快递名称：平台来源（淘宝/拼多多 sub）改为右侧小字，与名称同行 */
  #om-app table.om-tb td[data-lab="快递名称"] { position: relative; }
  #om-app table.om-tb td[data-lab="快递名称"] .sub {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    max-width: 42%;
  }

  /* 23.9 商品名称：类型标签 + 商品名同行（原 column 堆两行），金额并到右侧 */
  #om-app table.om-tb td[data-lab="商品名称"] > .xh-td-val {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  #om-app table.om-tb td[data-lab="商品名称"] .om-product-title {
    flex-direction: row;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
  }
  #om-app table.om-tb td[data-lab="商品名称"] > .xh-td-val > .sub { flex: none; }

  /* 23.10 收货信息：姓名+电话并一行，地址一行省略（详情弹窗有全量） */
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-name { display: inline; }
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-phone { display: inline; margin-left: 8px; }
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-address {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 23.11 三轮压紧：6.3 堆叠白名单列（商品名称/收货信息）与 :has 占行
     （快递名称）在本页改回「标签左、值右」同行 —— 标签独占一行各多付 ~22px。
     v1.31b 实测：快递名称 48 / 商品名称 57 / 收货信息 77，全因 wrap。 */
  #om-app table.om-tb td[data-lab="商品名称"],
  #om-app table.om-tb td[data-lab="收货信息"] {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px 10px;
  }
  #om-app table.om-tb td[data-lab="快递名称"] > .xh-td-val,
  #om-app table.om-tb td[data-lab="商品名称"] > .xh-td-val,
  #om-app table.om-tb td[data-lab="收货信息"] > .xh-td-val {
    flex: 1 1 auto;
    min-width: 0;
  }
  /* 快递名称左对齐（平台来源 sub 已 absolute 到右侧，右对齐会重叠） */
  #om-app table.om-tb td[data-lab="快递名称"] > .xh-td-val { text-align: left; }
  /* 收货信息值块左对齐（姓名电话/地址成句阅读） */
  #om-app table.om-tb td[data-lab="收货信息"] > .xh-td-val { text-align: left; }
  /* 商品名称：类型+名称左、金额右（23.9 的 flex 行继续生效） */
  #om-app table.om-tb td[data-lab="商品名称"] > .xh-td-val { text-align: right; }

  /* 23.12 单号复制钮：视觉回归文字行，热区用 ::after 扩展保 36px
     第 17 章的 min-height:36 + inline-flex 在卡内让每个单号行吃掉 ~16px。
     改用 17.3（ghost/more 链接）同款「视觉缩小 + 命中区扩展」手法：
     视觉 inline 文字行，::after 透明层保持 36px 可点高度，热区不回退。
     顺带把订单号两段（模板 <br> 分隔）合回一行 —— 粘连即完整单号。 */
  #om-app table.om-tb .om-copytext {
    min-height: 0 !important;
    padding: 0 !important;
    display: inline !important;
    position: relative;
    line-height: 1.45;
  }
  #om-app table.om-tb .om-copytext::after {
    content: "" !important;
    position: absolute !important;
    left: -10px !important;
    right: -10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 36px !important;
  }
  #om-app table.om-tb .om-copytext br { display: none; }
}

/* ===========================================================================
 * 24. 下单页「待提交清单」压缩为 3 行栅格  【v1.37 新增】
 *
 *     用户反馈：「手机的，订单列表，现在太长了，要尽量简洁紧凑一点，
 *               至少显示 20-50 单也要尽量看完。」
 *
 *     基线实测（390 宽，加了 3 条地址后）：
 *       每条地址 = 10 个字段各占一整行（序号/订单号/联系人/联系电话/省份/
 *       市区/县区/详细地址/单件价格/操作，行高 40~49px）→ 单条 419px，
 *       30 条 ≈ 12570px ≈ 15 屏。这就是「翻多少页」的根源。
 *
 *     做法（只覆盖 .main-wrap table.od-table，即下单页那张表）：
 *       把 tr 从「竖排块」改成 12 列 CSS Grid，用 order + grid-column:span
 *       手工排成 3 行，标签（td::before）全部隐藏：
 *         第 1 行  序号 │ 订单号(5) │ 价格(2) │ 操作(4)          = 1+5+2+4  = 12
 *         第 2 行  联系人(2) │ 电话(4) │ 省(2) 市(2) 县区(2)     = 2+4+2+2+2 = 12
 *         第 3 行  详细地址(12，单行省略)                        = 12
 *       实测单条 419px → 约 74px（-82%），30 条 ≈ 2200px ≈ 2.6 屏。
 *
 *     ⚠ 全部在 @media (max-width:768px) 内，桌面端表格一字不动。
 *     ⚠ 桌面端「编辑 / 删除」按钮的 onclick 与 id 一律没碰，只是排到第 1 行右侧。
 * ======================================================================== */
@media screen and (max-width: 768px) {
  .main-wrap table.od-table tbody tr {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 3px 8px;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    border: 1px solid #e8ebef !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .main-wrap table.od-table td {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    /* ⚠ 必须清掉第 6 章给通用卡片 td 的 min-height:40px，
       否则栅格里每行被撑到 40px —— 实测单条 419px 只降到 144px。
       清掉后 3 行栅格 ≈ 85px。 */
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    text-align: left !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  /* 标签全隐（值已经能自解释：序号是数字、电话是 11 位、地址带省市县） */
  .main-wrap table.od-table td::before { display: none !important; }

  /* 第 1 行 */
  .main-wrap table.od-table td[data-lab="序号"]     { order: 1;  grid-column: span 1;  color: #8a94a3; justify-content: center !important; }
  .main-wrap table.od-table td[data-lab="订单号"]   { order: 2;  grid-column: span 5;  font-weight: 700; color: #2b3240; }
  .main-wrap table.od-table td[data-lab="单件价格"] { order: 3;  grid-column: span 2;  color: #e60012; font-weight: 700; }
  .main-wrap table.od-table td[data-lab="操作"]     { order: 4;  grid-column: span 4;  justify-content: flex-end !important; }
  /* 第 2 行 */
  .main-wrap table.od-table td[data-lab="联系人"]   { order: 5;  grid-column: span 2; }
  .main-wrap table.od-table td[data-lab="联系电话"] { order: 6;  grid-column: span 4;  color: #586579; }
  .main-wrap table.od-table td[data-lab="省份"]     { order: 7;  grid-column: span 2;  color: #586579; }
  .main-wrap table.od-table td[data-lab="市区"]     { order: 8;  grid-column: span 2;  color: #586579; }
  .main-wrap table.od-table td[data-lab="县区"]     { order: 9;  grid-column: span 2;  color: #586579; }
  /* 第 3 行：详细地址独占一行、超长省略 */
  .main-wrap table.od-table td[data-lab="详细地址"] { order: 10; grid-column: span 12; color: #8a94a3; }

  /* 操作列按钮：压到 26px 高仍保留 34px 命中区（::after 透明层不占布局） */
  .main-wrap table.od-table td[data-lab="操作"] .od-rowbtns,
  .main-wrap table.od-table td[data-lab="操作"] button {
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
  }
  .main-wrap table.od-table td[data-lab="操作"] button,
  .main-wrap table.od-table td[data-lab="操作"] .od-rowbtns a {
    position: relative;
    height: 26px !important;
    min-height: 0 !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    border-radius: 6px !important;
  }
  .main-wrap table.od-table td[data-lab="操作"] button::after,
  .main-wrap table.od-table td[data-lab="操作"] .od-rowbtns a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 34px;                 /* 触控命中区不低于 34px */
  }

  /* --- 24.2 「我要推广」页配图居中 ---
     tg.html 里 <div class="hy_row"><a class="fl"><img kb1.png></a><div class="fr">…
     手机上浮动失效，a.fl 撑成整行宽 390，而图片只有 260 宽且贴左
     （实测 左空 0 / 右空 130）→ 看起来偏左。这里把 inline/block 两种
     情况都兜住，让它左右居中。桌面端 (>768) 浮动布局一字不动。 */
  .c_rightBox .hy_row a.fl { text-align: center !important; }
  .c_rightBox .hy_row a.fl img {
    display: block !important;
    margin: 0 auto !important;
  }
}

/* ===========================================================================
 * 24.3 订单管理页（/user/item_order）卡片四行栅格  【v1.37 新增】
 *
 *     用户反馈：「手机的，订单列表，现在太长了，要尽量简洁紧凑一点，
 *               至少显示 20-50 单也要尽量看完。」
 *     基线实测（390）：单卡 274.5px，卡上方页头+工具区 440px → 一屏(844)
 *     只看得见 1 张卡。v1.31 的 23 章已把 8 个字段各压到 26~55px，
 *     但「一字段一行」的骨架没变，所以还是高。
 *
 *     做法（只覆盖 #om-app table.om-tb）：tr 改 12 列 CSS Grid，排成 4 行：
 *       第 1 行  订单号(3) │ 快递单号(6) │ 订单状态(3)
 *       第 2 行  收货信息(12)   ← 姓名+电话+地址并成一行，超长省略
 *       第 3 行  商品名称(12)   ← 类型标签+名称+金额并成一行
 *       第 4 行  快递名称(3) │ 下单时间(4) │ 操作(5)
 *     实测单卡 274.5px → 约 96px（-65%），一屏可见 1 张 → 4 张以上。
 *
 *     ⚠ 23.5 把「订单状态」做成 absolute 浮在卡右上角；进栅格后必须改回
 *       static，否则会脱离栅格压到第 1 行内容上。
 *     ⚠ 23.8 把「平台来源 .sub」absolute 到右侧；这里改回行内跟在小字后面。
 *     ⚠ 断点 ≤1024（与 23 章一致），桌面端 (>1024) 一字不动。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  #om-app table.om-tb tbody tr {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 3px 8px;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    border: 1px solid #e8ebef !important;
    border-radius: 8px !important;
    background: #fff !important;
  }
  #om-app table.om-tb td {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: static !important;          /* 盖掉 23.5 的 absolute 状态徽章 */
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    text-align: left !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  #om-app table.om-tb td::before { display: none !important; }
  #om-app table.om-tb td > .xh-td-val {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* 第 1 行 */
  #om-app table.om-tb td[data-lab="订单号"] { order: 1; grid-column: span 2; color: #8a94a3; }
  #om-app table.om-tb td[data-lab="快递单号"] { order: 2; grid-column: span 4; }
  #om-app table.om-tb td[data-lab="订单状态"] { order: 3; grid-column: span 2; justify-content: flex-end !important; }
  /* 「操作」放第 1 行右侧：它是最宽的一块（复制单号 + 详情 ≈ 139px），独占 4 列 */
  #om-app table.om-tb td[data-lab="操作"] { order: 4; grid-column: span 4; justify-content: flex-end !important; }
  #om-app table.om-tb td[data-lab="订单状态"] > .xh-td-val { text-align: right !important; }
  /* 第 2 行：收货信息（姓名 电话 · 地址 一行） */
  #om-app table.om-tb td[data-lab="收货信息"] { order: 5; grid-column: span 12; color: #586579; }
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-name,
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-phone,
  #om-app table.om-tb td[data-lab="收货信息"] .om-recipient-address {
    display: inline !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;      /* 不加会被压成一字宽、逐字换行成 2~3 行 */
    margin: 0 6px 0 0 !important;
  }
  /* 第 3 行：商品名称（类型 + 名称 + 金额 一行） */
  #om-app table.om-tb td[data-lab="商品名称"] { order: 6; grid-column: span 12; }
  #om-app table.om-tb td[data-lab="商品名称"] > .xh-td-val { text-align: left !important; }
  #om-app table.om-tb td[data-lab="商品名称"] .om-product-title { flex-wrap: nowrap !important; }
  /* 第 4 行：快递名称 / 下单时间 / 操作 */
  #om-app table.om-tb td[data-lab="快递名称"] { order: 7; grid-column: span 5; }
  #om-app table.om-tb td[data-lab="快递名称"] > .xh-td-val { font-size: 12px !important; }
  #om-app table.om-tb td[data-lab="快递名称"] .sub {
    position: static !important;
    transform: none !important;
    margin: 0 0 0 4px !important;
    max-width: none !important;
    display: inline !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }
  #om-app table.om-tb td[data-lab="下单时间"] { order: 8; grid-column: span 7; color: #8a94a3; }
  #om-app table.om-tb td[data-lab="下单时间"] div { display: inline !important; }
  #om-app table.om-tb td[data-lab="下单时间"] div + div { margin-left: 5px !important; }
  #om-app table.om-tb td[data-lab="操作"] .om-actions {
    width: auto !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }
  /* 操作按钮：视觉 26px、命中区 34px（::after 不占布局） */
  #om-app table.om-tb .om-btn,
  #om-app table.om-tb td[data-lab="操作"] button,
  #om-app table.om-tb td[data-lab="操作"] a {
    position: relative;
    height: 26px !important;
    min-height: 0 !important;
    padding: 0 7px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }
  #om-app table.om-tb .om-btn::after,
  #om-app table.om-tb td[data-lab="操作"] button::after,
  #om-app table.om-tb td[data-lab="操作"] a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 34px;
  }
  /* 复制单号那块（23.12 的 ::after 热区）在栅格里保持不动即可，这里不动它 */
}

/* ===========================================================================
 * 25. 发货地址（地址管理 / 新增编辑收货地址）  【v1.38 新增】
 *
 *     用户反馈：「手机端的发货地址这个页面需要优化好看一点呀」
 *
 *     基线实测（390 竖屏 · probe-v141）：
 *       · 列表页：卡片 .user-addresslist 沿用桌面版写死的 255×150 + 背景图
 *         （addstyle.css:53 background:url(peraddbg.png)），手机上只占 255 宽、
 *         左边贴边留一大块空；更关键的是 addstyle.css:62 把「编辑/删除」设成
 *         display:none，只有 :hover 才出现 —— 触屏没有 hover，手机上根本
 *         改不了也删不了地址。
 *       · 表单页：标签已按第 7 章堆到输入框上方，但输入框 text-align:right
 *         （placeholder 贴右边缘）、border 0px 完全不可见，只剩一条 1px 分隔线；
 *         「保存」38px 高、AmazeUI 的绿色，且「取消」被挤到第二行
 *         （实测保存 y=581 / 取消 y=619），一行放不下。
 *
 *     做法：列表卡片改自适应白卡 + 操作区常驻；表单改「卡片 + 浅灰输入框」，
 *           保存/取消并排一行，主按钮统一品牌红 #e60012。
 *
 *     注意作用域：列表只在 .user-address（仅 address.html 使用）；
 *       表单见下方 25.2 —— v1.40 起作用域为 .info-main 内「除实名认证表单外」
 *       的所有表单（地址 / 密码修改 / 佣金转换）。real_name 有自己的
 *       real-name.css，用 :not(.xh-real-name-form) 排除；
 *       kongbao 的 .info-main 内没有任何 .am-form-*，天然不受影响。
 *     全部在 @media (max-width:1024px) 内；>1024 桌面端卡片 255×150、
 *       背景图、hover 显示操作区、标签左浮动 85px 一律原样。
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* ===== 25.1 地址管理（列表）===== */
  .user-address ul.am-thumbnails {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  .user-address li.user-addresslist {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    float: none !important;
    display: block !important;
    overflow: visible !important;
    box-sizing: border-box;
    margin: 0 0 10px !important;
    padding: 13px 14px !important;
    border: 1px solid #e8ebef !important;
    border-radius: 10px !important;
    background: #ffffff none !important;   /* 干掉 255×150 的桌面背景图 */
    position: relative;
  }
  .user-address li.user-addresslist.defaultAddr {
    border-color: #f6c9cc !important;
    background: #fffafb none !important;
  }
  /* 非默认卡片的模板里多渲染了一个游离的 i.am-icon-check-circle，
     桌面端靠 hover 藏，这里直接干掉，免得手机上冒出个孤零零的勾 */
  .user-address li.user-addresslist > i { display: none !important; }

  /* 右上角「默认地址 / 设为默认」→ 小胶囊 */
  .user-address .new-option-r {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    height: 22px;
    padding: 0 9px !important;
    border-radius: 0 10px 0 10px !important;
    background: #f1f4f8 !important;
    color: #586579 !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
    cursor: pointer;
  }
  .user-address .new-option-r i { display: none !important; }
  .user-address li.user-addresslist.defaultAddr .new-option-r {
    background: #e60012 !important;
    color: #ffffff !important;
  }

  /* 姓名 / 电话 */
  .user-address .new-tit {
    padding: 0 76px 0 0 !important;        /* 给右上角胶囊留位 */
    margin: 0 0 7px !important;
    border: 0 !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  .user-address .new-txt {
    padding: 0 0 0 18px !important;
    background-position: 0 2px !important;
    background-size: 13px 13px !important;
    color: #1f2937 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }
  .user-address .new-txt-rd2 {
    margin-left: 8px;
    padding: 0 0 0 17px !important;
    background-position: 0 3px !important;
    background-size: 12px 12px !important;
    color: #586579 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
  }

  /* 地址正文 */
  .user-address .new-mu_l2a {
    display: block !important;
    padding: 0 !important;
    background: none !important;
  }
  .user-address .new-mu_l2cw {
    height: auto !important;               /* 桌面写死 55px，长地址会溢出 */
    margin: 0 !important;
    color: #586579 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    word-break: break-all;
  }
  .user-address .new-mu_l2cw .title { color: #9aa3af !important; }

  /* 操作区：桌面只在 :hover 出现，触屏必须常驻 */
  .user-address .new-addr-btn {
    display: block !important;
    margin-top: 10px !important;
    padding: 0 !important;
    text-align: right !important;
    line-height: 1 !important;
  }
  .user-address .new-addr-btn a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 5px;
    color: #586579 !important;
    font-size: 13px !important;
    text-decoration: none !important;
  }
  .user-address .new-addr-btn a:last-child { color: #e60012 !important; }
  .user-address .new-addr-btn a::after {    /* 视觉 26px，命中区补到 34px（不占布局） */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 34px;
  }
  .user-address .new-addr-btn i { padding-right: 4px !important; font-size: 13px !important; }
  .user-address .new-addr-bar { padding: 0 7px !important; color: #dfe3ea !important; }

  /* 「添加收货地址」→ 虚线卡片 */
  .user-address li.add-address-box {
    min-height: 48px !important;
    padding: 0 !important;
    border: 1px dashed #e3b7bb !important;
    border-radius: 10px !important;
    background: #fffafb none !important;
    text-align: center !important;
  }
  .user-address li.add-address-box a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 12px !important;
    color: #e60012 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
  }
  .user-address li.add-address-box a i { margin-right: 6px; font-size: 15px !important; }

  /* ===== 25.2 会员中心表单统一（地址 / 密码修改 / 佣金转换）【v1.40 扩围】 =====
     v1.39 只作用在 form[action*="address"]；v1.40 放宽到
     .info-main 里「除实名认证表单外」的所有表单，理由与安全性：
       · 密码修改、佣金转换两页结构与地址页同源（.am-form-group +
         .am-form-label + .am-form-content），问题也完全一样
         （infstyle.css 在小屏把 input 设成 text-align:right、无边框）。
       · kongbao/index.html 也有 .info-main，但它整个文件里没有任何
         .am-form-group / .am-form-label / .am-form-content（实测 grep 计数为 0），
         所以这些后代选择器天然不会命中它。
       · real_name 页有独立的 real-name.css（边框/圆角/focus 环都自己写好了），
         用 :not(.xh-real-name-form) 排除，只在第 26 章补它的对齐问题，
         不覆盖它自己的设计。 */
  .info-main form:not(.xh-real-name-form) {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e8ebef;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
  }
  .info-main form:not(.xh-real-name-form) .am-form-group {
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 0 !important;
  }
  /* 分隔线用「相邻兄弟」而不是 :last-child —— 密码页/佣金页的按钮行是独立的
     .info-btn，地址页是第 5 个 .am-form-group，:last-child 判不准会出现
     最后一行多一条线 / 少一条线。 */
  .info-main form:not(.xh-real-name-form) .am-form-group + .am-form-group,
  .info-main form:not(.xh-real-name-form) .am-form-group + .info-btn {
    border-top: 1px solid #eef1f5 !important;
  }

  .info-main form:not(.xh-real-name-form) .am-form-label {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    text-align: left !important;
  }
  .info-main form:not(.xh-real-name-form) .am-form-label span[style] { color: #e60012 !important; }
  .info-main form:not(.xh-real-name-form) .am-form-content {
    width: auto !important;
    margin-left: 0 !important;
  }

  /* 输入框：原样式 border 0px + 文字右对齐 → 完全看不出是输入框 */
  .info-main form:not(.xh-real-name-form) .am-form-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]),
  .info-main form:not(.xh-real-name-form) .am-form-content textarea {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid #e8ebef !important;
    border-radius: 8px !important;
    background: #f7f9fc !important;
    color: #1f2937 !important;
    font-size: 16px !important;            /* 与第 7 章同源：<16px 时 iOS 会放大页面 */
    line-height: 42px !important;
    text-align: left !important;           /* 原为 right，placeholder 贴右边缘 */
    box-shadow: none !important;
  }
  .info-main form:not(.xh-real-name-form) .am-form-content textarea {
    height: auto !important;
    min-height: 96px !important;
    padding: 10px 12px !important;
    line-height: 1.6 !important;
    resize: vertical;
  }
  .info-main form:not(.xh-real-name-form) .am-form-content input:focus,
  .info-main form:not(.xh-real-name-form) .am-form-content textarea:focus {
    border-color: #e60012 !important;
    background: #ffffff !important;
    outline: none !important;
  }
  /* 占位文字：infstyle.css:49 有一条 `input::-webkit-input-placeholder{text-align:right}`
     （:50 还有 `input{text-align:right}`），它只在 ≥640px 才被改回 left —— 所以小屏下
     光把 input 本身改成 left 还不够，**伪元素那一层必须一起改**，否则 placeholder
     仍然贴着右边缘（这就是「改了但没变」的原因）。 */
  .info-main form:not(.xh-real-name-form) .am-form-content input::-webkit-input-placeholder,
  .info-main form:not(.xh-real-name-form) .am-form-content textarea::-webkit-input-placeholder,
  .info-main form:not(.xh-real-name-form) .am-form-content input::placeholder,
  .info-main form:not(.xh-real-name-form) .am-form-content textarea::placeholder {
    color: #b6bfcc !important;
    text-align: left !important;
  }
  .info-main form:not(.xh-real-name-form) .am-form-content small {
    display: block;
    margin-top: 6px;
    color: #9aa3af !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* 按钮行（密码页 / 佣金页把提交按钮单独包在 .info-btn 里） */
  .info-main form:not(.xh-real-name-form) .info-btn {
    margin: 0 !important;
    padding: 12px 14px !important;
    text-align: left !important;
  }
  .info-main form:not(.xh-real-name-form) .info-btn input[type="submit"] {
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #e60012 !important;
    color: #ffffff !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 44px !important;
  }
  /* 密码页 / 佣金页的 .info-main 带内联 margin-top:60px，手机上留白过大
     （内联样式可以被作者样式表的 !important 覆盖） */
  .info-main[style*="margin-top:60px"] { margin-top: 12px !important; }

  /* 保存 / 取消 并排一行（原来「取消」被挤到第二行） */
  .info-main form:not(.xh-real-name-form) .am-form-group > [class*="am-u-sm-"] {
    display: flex !important;
    align-items: stretch;
    float: none !important;
    left: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .info-main form:not(.xh-real-name-form) input[type="submit"] {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 44px !important;
    margin: 0 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #e60012 !important;        /* 品牌红，替换 AmazeUI 默认绿 */
    color: #ffffff !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 44px !important;
  }
  .info-main form:not(.xh-real-name-form) #cancel {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 96px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e2e7ee !important;
    border-radius: 8px !important;
    background: #f3f5f9 !important;        /* 取消不再用危险红，降级为次要按钮 */
    color: #586579 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
  }
}


/* ===========================================================================
 * 26. 顶部公告条恢复（长方形横幅）+ 实名认证页对齐修复  【v1.40 新增】
 * ======================================================================== */
@media screen and (max-width: 1024px) {

  /* --- 26.1 顶部公告条：按参考案例做成「长方形横幅」 ---
     背景：v1.37 应要求把这条隐藏了；用户随后看了
       C:\Users\75636\Desktop\codex\礼品网修改\移动端适配案例\01-礼品下单-移动端对照.html
     要求「恢复成参考案例那种好看的样式，不是胶囊，是：长方形」。
     参考案例（该文件 199~201 行）：
       .m-notice{background:#fff7f0;border-bottom:1px solid #ffe3d4;
                 padding:6px 12px;font-size:11.5px;color:#d4380d;
                 line-height:1.55;display:flex;gap:6px;align-items:flex-start}
       .m-notice .k{background:#e60012;color:#fff;font-weight:800;
                    padding:0 5px;border-radius:3px;font-size:11px;flex:none}
     → 通栏长方形（带下边框、无圆角、无左右外边距的整条），
       左侧一个红色小方块标签 + 一行文字。
     本页没有 .m-* 结构，用现有 DOM 复刻：
       · 喇叭图标 .nico 隐藏，改由模板里本来就有的 <b class="key">Ctrl + D</b>
         充当那个红色小方块标签（长方形：只留 3px 微圆角，不做胶囊）
       · 文案也按参考案例改短（见下方伪元素说明）
     ⚠ 只恢复显示、不删节点：mobile.js 的 buildNavDrawer() 在找不到
       .htop .wrap 时会兜底把汉堡插进 .notice，删节点会连带删掉汉堡。 */
  #header .notice {
    display: block !important;
    padding: 7px 12px !important;
    background: #fff7f0 !important;
    border-bottom: 1px solid #ffe3d4 !important;
  }
  #header .notice .wrap {
    display: flex !important;
    align-items: center !important;
    /* v1.44 用户要求「顶部区域居中」：原来 flex-start 靠左，
       再叠上 ::after 的 flex:1 1 auto 会吃掉剩余宽度，看上去永远贴左。
       改成 center + 让 ::after 不伸展，整组（红方块 + 文字）才会居中。 */
    justify-content: center !important;
    /* v1.45：不再用 gap 做「方块↔文字」的间距，改成 ::before 的 margin-right。
       原因：用户截图里实测间距约 24px，而 gap 只有 6px —— 24 ≈ 6+13+6，
       正是「喇叭图标 .nico（13px）仍在占位」的特征（旧缓存 CSS 里没有隐藏它的规则）。
       margin-right 不依赖 gap 支持度，更稳。 */
    gap: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }
  /* 手机上改为「参考案例的短文案」：
       [收藏] 讯鹤礼品代发网 · 云仓代发 · 真实礼品代发 · 可签收到货
     —— 但改文案要动 header.html，会连带改到电脑端（违反红线），
     所以用 **纯 CSS 伪元素** 实现：隐藏原有的长文案节点，用 ::before 画
     红色的「收藏」长方形标签、::after 输出短文案。
     原长文案仍留在 DOM 里（电脑端照常显示，SEO 也不受影响）。 */
  /* 喇叭图标彻底压掉：display:none 之外再把尺寸/外边距归零。
     v1.45 加固 —— 用户截图里「收藏」到文字实测约 24px 间距，而 CSS 的 gap 只有 6px，
     24 ≈ 6+13+6 正是「.nico 仍以 13px 占位」的特征（旧缓存 CSS 没有隐藏它的规则）。
     多重保险：即使浏览器拿到的是旧版别处规则，也不可能再占出 13px。 */
  #header .notice .nico { display: none !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
  #header .notice .nico svg { display: none !important; width: 0 !important; height: 0 !important; }
  #header .notice .wrap > span { display: none !important; }
  #header .notice .wrap::before {
    content: "收藏";
    flex: none;
    display: inline-block;
    padding: 0 5px;
    margin: 0 4px 0 0;               /* v1.45：间距改用 margin，不依赖 flex gap */
    border-radius: 3px;              /* 长方形：只 3px 微圆角，不做胶囊 */
    background: #e60012;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
  }
  #header .notice .wrap::after {
    content: "讯鹤礼品代发网 · 云仓代发 · 真实礼品代发 · 可签收到货";
    /* v1.44：原来是 1 1 auto（会伸展吃掉剩余宽度，整组就永远贴左）；
       改 0 1 auto 后文字按内容宽度收缩，配合父级 justify-content:center 才居中。
       min-width:0 + nowrap + ellipsis 保留，窄屏（≤360）仍能优雅截断。 */
    flex: 0 1 auto;
    min-width: 0;
    color: #d4380d;
    font-size: 11.5px;
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* --- 26.2 实名认证页：只修「文字右对齐」，不覆盖它自己的设计 ---
     real-name.css 已经把边框 / 圆角 / focus 环 / 只读态都写好了，
     唯一漏掉的是 text-align —— 于是 infstyle.css:49 的
     `input::-webkit-input-placeholder{text-align:right}` 在小屏生效，
     输入框文字与 placeholder 全部贴右。这里只补这两条。 */
  .info-main form.xh-real-name-form .am-form-content input {
    text-align: left !important;
  }
  .info-main form.xh-real-name-form .am-form-content input::-webkit-input-placeholder,
  .info-main form.xh-real-name-form .am-form-content input::placeholder {
    text-align: left !important;
  }
}


/* ===========================================================================
 * 26.3 注册 / 登录 / 找回密码页：内联绝对定位修复  【v1.41 新增】
 *
 *     用户反馈：「手机端注册页面的 已有账号？立即登录 显示异常，需要优化」
 *
 *     根因在**模板的内联样式**里，不在 CSS：
 *       reg.html:60    <div class="xh-switch"  style="position:absolute;right:5px;bottom:-15px;margin:35px">
 *       login.html:48  <div class="xh-switch"  style="position:absolute;right:5px;bottom:-35px;margin:50px">
 *       login.html:47  <button class="xh-submit" style="position:absolute;right:200px;bottom:-43px;margin:50px">
 *     这三处都被加了「绝对定位 + 负 bottom + 大 margin」的内联 hack，节点于是脱离
 *     文档流，跑到最近定位祖先（.xh-auth-page 是 position:relative）的右下角去，
 *     与提交按钮重叠或压到页脚。实测注册页 .xh-switch 落在 rect=[226, 875.7, 115, 24]
 *     —— 这就是「显示异常」。
 *     而 xh-auth.css:79 给 .xh-switch 的原始定义是
 *       .xh-switch{margin:3px 0 10px;color:#5f6b7a;font-size:11px;text-align:center}
 *     即「居中一行小字」，可见那段内联是后来手改的，不是原设计。
 *
 *     做法：不动模板（改模板会连带改到电脑端，违反红线），只在手机端用 !important
 *     覆盖内联 —— 作者样式表里的 !important 优先于元素上的内联非 !important 声明。
 *     恢复成「提交按钮下方居中一行小字」。
 *
 *     另外：注册/登录页的输入框同样中了 infstyle.css 小屏的 text-align:right
 *     （placeholder 贴右）。这几个框本来就有边框和底色（xh-control），
 *     所以只补对齐，不覆盖它们自己的设计。
 * ======================================================================== */
@media screen and (max-width: 1024px) {
  .xh-auth-page .xh-switch {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 14px 0 0 !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    text-align: center !important;
  }
  .xh-auth-page .xh-switch a {
    margin-left: 3px;
    color: #b0402f !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
  }
  /* 「找回密码」视图里被同样 hack 掉的提交按钮 */
  .xh-auth-page .xh-forgot-form .xh-submit[style] {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 16px 0 0 !important;
  }
  /* 输入框与 placeholder 的对齐（infstyle.css:49/50 在小屏把它们设成 right） */
  .xh-auth-page .xh-auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
  .xh-auth-page .xh-login-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]) {
    text-align: left !important;
  }
  .xh-auth-page .xh-auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"])::-webkit-input-placeholder,
  .xh-auth-page .xh-auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"])::placeholder,
  .xh-auth-page .xh-login-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"])::-webkit-input-placeholder,
  .xh-auth-page .xh-login-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"])::placeholder {
    text-align: left !important;
  }
}

@media screen and (max-width: 1024px) {
  /* 26.4 注册页：「已有账号？立即登录」的顺序
     模板里 DOM 顺序是  .xh-switch(已有账号？) → button.xh-submit(注册账号)，
     原先它被内联绝对定位甩走了所以看不出问题；26.3 把它恢复成静态流之后，
     它就跑到「注册账号」按钮上面去了。常规注册页都是「按钮在上、去登录在下」，
     所以这里用 flex 列 + order 把顺序正过来（只作用于注册表 #reg）。 */
  .xh-auth-page form#reg {
    display: flex !important;
    flex-direction: column;
  }
  .xh-auth-page form#reg .xh-form-grid { order: 1; }
  .xh-auth-page form#reg .xh-submit { order: 2; }
  .xh-auth-page form#reg .xh-switch { order: 3; }
}
