/* 手机端改版（10-20，方案见项目根目录《移动端改版方案.md》）
   只在 ≤640px 生效，放在所有样式最后加载；电脑排版不受影响。
   卡片组的「一行两张 / 横向滑动」由 mobile.js 按内容自动判断后加 m-two / m-swipe。 */
@media (max-width:640px){
  html,body{overflow-x:hidden}

  /* ---- 区块间距：80–120px → 52px ---- */
  .sec{padding-top:52px}
  .sec-g{padding:44px 0;margin-top:52px}
  .fd-sec,.ab-sec{padding-top:52px!important;padding-bottom:52px!important}
  .up-sec{padding-top:52px!important;padding-bottom:52px!important;margin-top:0!important}
  .fd-hero,.ab-hero{padding-top:56px!important;padding-bottom:36px!important}
  .mt{margin-top:24px}
  .sh .sub,.lead{font-size:15px;line-height:1.6}

  /* ---- 首页首屏：对话框收成一个输入条，点了从底部弹出完整的小盒 ---- */
  .hero{padding-bottom:8px}
  .hero-top h1{margin-top:6px}
  .hero-sub{font-size:15px;line-height:1.6;margin-top:12px}
  #hero-chat{margin-top:20px;border-radius:16px;padding:0;min-height:0;height:auto}
  #hero-chat .chat-hd,#hero-chat .chat-log,#hero-chat .chat-tl,#hero-chat .chat-disc{display:none!important}
  #hero-chat .chat-cmp{margin:0;padding:0;background:none;box-shadow:none;border:0}
  #hero-chat textarea{height:52px!important;min-height:0;padding:15px 48px 15px 16px;font-size:15px;line-height:22px;resize:none;background-color:transparent;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='16' fill='%23111'/%3E%3Cpath d='M16 22V10M10.5 15.5 16 10l5.5 5.5' stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:right 10px center;background-size:32px}
  #hero-chat textarea::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hero .sugg{flex-wrap:nowrap!important;overflow-x:auto;justify-content:flex-start!important;margin:12px -18px 0;padding:0 18px 4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hero .sugg::-webkit-scrollbar{display:none}
  .hero .sugg button{flex:none;white-space:nowrap}
  .hero .alt{margin-top:14px;flex-wrap:wrap;row-gap:6px}

  /* ---- 首页演示：手机上不用原来的（会隐藏右半边），换成按电脑宽度缩小的 iframe ---- */
  .hero .hd{display:none}
  .hd-m:not([hidden]){display:block;margin-top:28px;position:relative;overflow:hidden;transition:height .35s ease;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 1px var(--ln)}
  .hd-m iframe{position:absolute;left:0;top:0;width:960px;border:0;transform-origin:0 0;pointer-events:auto}
  .hd-m-n{display:block!important;font-size:11.5px;color:var(--k4);text-align:right;margin-top:8px}

  /* ---- 「介绍 / 演示 / 知识」三个竖排大按钮 → 一行三个小标签 ---- */
  .ntabs{display:flex!important;gap:8px;flex-direction:row!important}
  .ntabs a{flex:1;padding:10px 8px!important;text-align:center;min-width:0}
  .ntabs a span{display:none}

  /* ---- 文章卡片：去掉大封面，左小图右标题 ---- */
  .agrid{display:block!important}
  .agrid .acard{display:grid;grid-template-columns:88px 1fr;column-gap:14px;row-gap:4px;padding:14px 0!important;border-radius:0!important;background:none!important;box-shadow:none!important;border:0;border-bottom:1px solid var(--ln)}
  .agrid .acard:not(.has-cv){grid-template-columns:1fr}
  .agrid .acard .acv{grid-row:1/4;width:88px;height:66px;aspect-ratio:auto;margin:0!important;border-radius:8px;overflow:hidden}
  .agrid .acard .acv img{width:100%;height:100%;object-fit:cover}
  .agrid .acard small{font-size:11.5px}
  .agrid .acard b{font-size:15px;line-height:1.4}
  .agrid .acard>span{display:none}
  .agrid .acard em{font-size:12px}

  /* ---- 卡片组：一行两张 ---- */
  .m-two{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;grid-auto-flow:row}
  .m-two>*{padding:14px!important;margin:0!important;min-width:0}
  .m-two>* h3,.m-two>* h4{font-size:15px;line-height:1.35}
  .m-two>* p,.m-two>* span{font-size:13px;line-height:1.5}
  .m-two>*:last-child:nth-child(odd){grid-column:1/-1}

  /* 首页四个产品区块右边的示意小窗口：手机上不放，文字和按钮保留 */
  .sec.need .ui{display:none!important}

  /* ---- 卡片组：横向滑动，一屏露一张半 ---- */
  .m-swipe{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px!important;
    margin-left:-18px!important;margin-right:-18px!important;padding:2px 18px 6px!important;scroll-padding:0 18px;scrollbar-width:none;-webkit-overflow-scrolling:touch;grid-template-columns:none!important}
  .m-swipe::-webkit-scrollbar{display:none}
  .m-swipe>*{flex:0 0 80%!important;max-width:80%!important;width:auto!important;scroll-snap-align:start;margin:0!important;padding:18px!important}
  .m-swipe>*+*{border-top-width:inherit}
  .m-hint{display:flex;align-items:center;gap:6px;margin:8px 0 0;font-size:12px;color:var(--k4)}
  .m-hint i{display:inline-flex;gap:4px}
  .m-hint i b{width:5px;height:5px;border-radius:50%;background:var(--ln);transition:background .2s}
  .m-hint i b.on{background:var(--k)}

  /* ---- 术语表：每个术语只留名称 + 两行解释，点名称进详情 ---- */
  .gl div{padding:12px 0!important;gap:4px!important}
  .gl dd{font-size:14px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .gl dd br,.gl dd a{display:none}
  .gl-intro{font-size:14px}

  /* ---- 常见问题：每条收紧一点 ---- */
  .faq details summary{padding-top:14px;padding-bottom:14px}

  /* 横滑后，原来时间轴上的连接线和圆点没有意义，隐藏（FDE「五步走」等） */
  .m-swipe::before,.m-swipe::after,.m-swipe>.bar,.m-swipe>*::before{display:none!important}

  /* 小盒对话框顶部：收藏、分享、调出记录、清屏收成一组靠右，彼此挨近（10-20 王朋友：隔太开排版奇怪） */
  .chat-hd>.chat-ib+.chat-ib,.chat-hd>.chat-ib+.chat-rst,.chat-hd>.chat-rst+.chat-clr{margin-left:-6px!important}

  /* 卡片里单独占一行的「→」去掉（整张卡片可点） */
  .m-arrow{display:none!important}
}
@media (max-width:640px) and (prefers-reduced-motion:reduce){.m-hint i b{transition:none}}
