/* 手机端商城风设计系统（D1 组，2026-11-25 全站重排）
   全站共用：D2/D3 各页直接用这些 class。
   全部规则包在 @media (max-width:600px) 里，桌面端原样不动。
   品牌绿/金只做点缀与主按钮，大面积留白 + 浅灰底。 */

/* 「更多 >」链接：桌面端不显示（只在手机端出现），避免改动桌面端 */
.m-sec-more { display: none; }

/* 念寿门卡实拍图（2026-11-27 G1：::before 背景图改成真实 <img>，见下方）：
   桌面端深绿整幅区不配图，默认隐藏；手机端在媒体查询内显示。 */
main .container > section.hero .ns-card-img { display: none; }

@media (max-width: 600px) {
  /* —— 契约（D1/D2/D3 共用，原样实现） —— */
  body.m-shop { background: #f5f5f5; font-size: 0.85rem; line-height: 1.6; }
  body.m-shop h1 { font-size: 1.05rem; font-weight: 700; }
  body.m-shop h2 { font-size: 1rem; font-weight: 700; }
  body.m-shop h3 { font-size: 0.95rem; font-weight: 700; }
  .m-sec { background: #fff; border-radius: 12px; padding: 16px; margin: 12px 16px 0; }
  .m-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .m-sec-title { font-size: 1rem; font-weight: 700; color: #222; margin: 0; }
  .m-sec-more { display: inline-block; font-size: 0.72rem; color: #999; text-decoration: none; white-space: nowrap; }
  .m-king { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .m-king-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: #333; font-size: 0.72rem; }
  .m-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .m-sub { font-size: 0.72rem; color: #999; line-height: 1.5; }
  .m-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-prod-card { background: #fff; border-radius: 12px; overflow: hidden; }
  .m-prod-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  .m-price { font-size: 1rem; font-weight: 700; color: #e4393c; }
  /* 适配：站内 .card .price 是 (0,2,0) 深红 1.5rem，会压过上面的契约规则；
     这里用同等特异度 + 后加载胜出，价格回到契约的 1rem 亮红。 */
  .m-prod-card .m-price { font-size: 1rem; font-weight: 700; color: #e4393c; }

  /* —— 适配规则（不改契约，只解冲突） —— */
  /* 首页 hero 大标题是品牌主视觉，不吃 body.m-shop h1 的 1.05rem；
     保留首页内联样式里的 1.75rem（见 index.html 的 hero 移动规则）。 */
  body.m-shop .hero-title { font-size: 1.75rem; }
  /* .section-title 自带金色横线（::after），放进 .m-sec-head 做标题时
     横线会挤占「更多 >」的位置，这里去掉，标题行只留标题 + 更多。 */
  .m-sec-head .section-title::after { display: none; }
  .m-sec-head .section-title { flex: 1; min-width: 0; }
  /* 金刚区图标 28px（首页复用现有 module-card 结构时的适配；
     新页直接用 .m-king-item 时图标 class 同样是 .icon）。 */
  .m-king-item .icon { font-size: 28px; line-height: 1; }
  /* 首页今日养护挂件：两按钮上下排（2026-11-25 一眼看懂整改）——
     并排时康养指数按钮只剩约 200px 内容宽，12 字文案必折行；上下排后各占整行宽，文案一行。 */
  #care-widget > div { flex-direction: column; }

  /* —— 健康之路手机端隐藏（2026-11-25 用户要求：手机端不再表现，PC 端保留） ——
     首页旅程区段 + 首次来访引导卡 + 走完后的今日健康清单（同一位置）；
     hub-me 本周小结卡（旅程交付的一部分）；
     各页底部「下一步」金色条：journey.js 注入的 [data-ky-next-bar]，
     及 mall/念寿门页的降级版 .journey-next-wrap。
     （未加载本文件的页由 journey.js 的 matchMedia 兜底不注入。） */
  #journey-section,
  #journey-first-visit,
  #daily-checklist,
  #week-summary-card,
  [data-ky-next-bar],
  .journey-next-wrap {
    display: none !important;
  }

  /* —— 万能搜索手机端隐藏（2026-11-26 用户要求：只藏首页手机端大卡片，PC 端保留） ——
     首页顶栏已有搜索入口，首页中段的「想找什么？用大白话说就行」
     大卡片重复，故手机端隐藏；桌面端保留。
     2026-11-29 F-M1 修复：旧规则按 id 全站隐藏，连 search.html /
     formulas.html / hospitals.html 的唯一输入框也被藏掉，手机端失去自由文本
     搜索入口。现只藏首页槽位（带 .home-search-slot 的那个），其余页面的
     槽位在手机上正常显示、可输入。 */
  #universal-search-slot.home-search-slot {
    display: none !important;
  }

  /* —— 手机端首页简约/大气/高端重做（2026-11-25 用户要求） ——
     节奏：首屏轮播 + 金刚区 + 办事台；区段之间留白 20px（见 index.html D1 块）；
     颜色克制：白底 + 深绿 + 金色点缀；卡片紧凑、介绍 clamp 2 行带展开；
     配图只用站内已有图片，不新生成、不外链；不要拼多多式密密麻麻商城风。 */

  /* 念寿门专区：深绿大卡改白底图文卡——左图右文，标题通栏，合规文字通栏 clamp 2 行带展开。
     左图是真实 <img class="ns-card-img">（2026-11-27 G1：原 ::before 背景图改成实图——
     背景图在 DOM 里查不到，审计探针误判整张卡“丢失”；实图可被探针/读屏/加载检查直接验证，
     视觉与原来完全一致：96px 列、cover 裁切、center 20% 取景、圆角 10px、最小高 128px）。
     标题颜色注意：index.html 里 h2 已去掉行内 style="color:#fff"（行内样式赢过本规则，
     曾让白卡上的标题白字看不见）；桌面端 h2 仍从 .hero 继承白色，不变。 */
  main .container > section.hero {
    background: #fff; color: var(--text);
    padding: 14px;
    display: grid; grid-template-columns: 96px 1fr; column-gap: 12px;
  }
  main .container > section.hero .ns-card-img {
    display: block; grid-column: 1; grid-row: 2 / 4;
    width: 96px; height: 128px; object-fit: cover; object-position: center 20%;
    border-radius: 10px; align-self: start;
  }
  main .container > section.hero h2 { grid-column: 1 / -1; color: var(--green-dark); font-size: 1.05rem; margin: 0 0 10px; }
  main .container > section.hero p { color: var(--text); font-size: 0.85rem !important; line-height: 1.55; margin: 0; }
  main .container > section.hero > p:nth-of-type(1) { grid-column: 2; grid-row: 2; }
  main .container > section.hero > p:nth-of-type(2) { grid-column: 2; grid-row: 3; align-self: end; }
  main .container > section.hero > p:nth-of-type(3) { grid-column: 1 / -1; grid-row: 4; font-size: 0.75rem !important; color: var(--muted); margin-top: 10px; }
  main .container > section.hero .btn-gold { min-height: 44px; font-size: 0.95rem; padding: 10px 16px; width: auto; display: inline-flex; }
  main .container > section.hero .m-expand-btn { grid-column: 1 / -1; }

  /* 免费测一测漏斗横幅：手机端压矮（2026-11-26 用户要求：这几个板块面积太大） ——
     实测改前整条 264px：两个按钮各 91px（6 字文案折成两行）是大头；
     标题 1.35rem→1.05rem，说明 1rem→0.85rem，按钮单行并排、各 flex:1、52px 高、
     字不折行（white-space:nowrap），内边距 20px→12px。ID 选择器压过后加载的 funnel.css。 */
  #funnel-anchor { margin-top: 12px !important; }
  #funnel-anchor .funnel-home-banner { padding: 12px 14px; gap: 10px; margin: 12px 0; }
  #funnel-anchor .funnel-home-banner-text { gap: 4px; }
  #funnel-anchor .funnel-home-banner-text strong { font-size: 1.05rem; line-height: 1.4; }
  #funnel-anchor .funnel-home-banner-text span { font-size: 0.85rem; line-height: 1.5; }
  #funnel-anchor .funnel-home-banner-btns { flex-wrap: nowrap; gap: 8px; width: 100%; }
  #funnel-anchor .funnel-home-banner-btns .btn { flex: 1 1 0; min-width: 0; min-height: 52px; font-size: 0.95rem; padding: 8px 6px; white-space: nowrap; justify-content: center; }
  /* A-1：匿名态"需登录"标注的 wrapper 与另一按钮等宽，两按钮各占一半 */
  #funnel-anchor .funnel-home-banner-btns .funnel-btn-wrap { flex: 1 1 0; min-width: 0; }
  #funnel-anchor .funnel-home-banner-btns .funnel-btn-wrap .btn { flex: none; width: 100%; }

  /* 康养圈子：顶部配一张天山横幅图，介绍 clamp 2 行，按钮改小一号 */
  #community-sec { overflow: hidden; padding: 0 0 10px; margin-top: 20px !important; }
  #community-sec::before {
    content: ""; display: block; height: 72px; margin: 0 0 8px;
    background: url(/images/hero-tianshan.jpg) center 35% / cover no-repeat;
    border-radius: 10px 10px 0 0;
  }
  #community-sec > p { font-size: 0.85rem !important; margin-bottom: 8px; }
  #community-sec .btn-gold { min-height: 44px; font-size: 0.95rem; padding: 8px 16px; width: auto; }
  #community-sec > p:last-child { margin-bottom: 0; }

  /* 广告轮播：内容定高——之前 .carousel-slide min-height:260px + 底部 72px 留白，
     3 行短文字下方空出一大片绿；改成内容撑高（2026-11-26 再压一半：实测手机端
     现高 233px，目标约 115px——说明段手机端隐藏只留标题+链接，内边距 10/40px，
     左右箭头隐藏（与 hero 同款做法，滑动+圆点+自动轮播还在），圆点 44px→30px）。 */
  #carousel .carousel-slide { min-height: 0; padding: 10px 16px 40px; }
  #carousel .carousel-slide h2 { font-size: 1.05rem; margin-bottom: 4px; }
  #carousel .carousel-slide p { font-size: 0.9rem; }
  #carousel .carousel-slide p:first-of-type { display: none; }
  #carousel .carousel-arrow { display: none; }
  #carousel .carousel-dots { bottom: 8px; }
  #carousel .carousel-dots button { width: 30px; height: 30px; }

  /* 首屏 hero：三张的次要描边按钮（进入寿元商城 / 一键复购王浆 / 进入调养中心）
     手机端全部去掉，只留金色主按钮（2026-11-26 用户要求）。选择器带 .hero-main
     （特异度高于 index.html 内联样式里的 .hero-cta-ghost），桌面端原样。 */
  .hero-main .hero-cta-ghost { display: none; }

  /* 分享赚积分：说明 clamp 2 行带展开；两按钮并排小一号（行内 min-width:200px 用 !important 压掉）；
     2026-11-26 再收紧：按钮 46px→44px、内边距收小，卡片上下内边距 16px→12px，区段间距 24px→20px */
  #share-sec { margin-top: 20px !important; padding-top: 12px; padding-bottom: 12px; }
  #share-sec h2 { font-size: 1rem; margin-bottom: 6px; }
  #share-sec > p:first-of-type { font-size: 0.85rem !important; margin-bottom: 6px; }
  #share-sec .btn { min-width: 0 !important; width: auto; flex: 1 1 0; min-height: 44px; font-size: 0.95rem; padding: 8px 10px; }

  /* 合规声明：只收紧标题和内边距（2026-11-26），文字一字不删、不改，仍 2 行 clamp + 展开全部 */
  #compliance-sec { margin-top: 20px !important; padding-top: 12px; padding-bottom: 12px; }
  #compliance-sec h2 { font-size: 0.95rem; margin-bottom: 6px; }
  #compliance-sec p { font-size: 0.85rem !important; line-height: 1.55; margin-bottom: 6px; }

  /* 视频专区：手机端只剩视频框（2026-11-26 用户要求：文字去掉、只留视频） ——
     卡片里的标题 h3、副标题 <p>、「观看」按钮（包在 <p> 里）全部隐藏；
     缩略图 16:9 不动（index.html 移动规则）；卡片内边距清零、thumb 下边距清零，
     视频框贴满卡片、不留大白边；点缩略图仍走现有弹窗播放逻辑；桌面端原样。 */
  #video-sec .video-card { padding: 0; overflow: hidden; }
  #video-sec .video-card h3,
  #video-sec .video-card > p { display: none !important; }
  #video-sec .video-card .thumb-block { margin-bottom: 0; }

  /* 收起/展开（mobile-expand.js 配合；规则只在 ≤600px 内存在，桌面端永不收起） */
  .m-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .m-clamped.m-expanded { display: block; -webkit-line-clamp: unset; }
  #compliance-sec.m-expanded .m-clamped { display: block; -webkit-line-clamp: unset; }
  .m-expand-btn { display: inline-block; margin-top: 4px; padding: 4px 0; border: none; background: none; color: var(--green-dark); font-size: 0.8rem; font-weight: 700; cursor: pointer; }

  /* hub 页按同一标准顺手带一下：区段留白 20px（mobile-hub.css 里是 12px） */
  body.m-hub .m-sec { margin-top: 20px; }

  /* 公告跑马灯恢复滚动（2026-11-26 用户要求：手机端不滚动了，请修复） ——
     根因：2026-11-24 美化组把手机端跑马灯停掉改静态（animation: none），
     2026-11-25 D1 组又改成一行截断 + ✕（animation: none 仍在），两处叠加把滚动停了；
     桌面端跑马灯（style.css:76）原样滚动，不受影响。
     修复：手机端恢复桌面端同款跑马灯（inline-block + padding-left:100% + marquee 30s 动画）；
     ✕ 按钮改绝对定位浮在右端、不参与 flex，滚动文字从它下面经过、按钮不动。
     减弱动效用户（prefers-reduced-motion）仍保持静止。 */
  .announce-bar .announce-inner { display: block; position: relative; padding-right: 40px; }
  /* 手机端公告：跑马灯一次只能看到几个字（136 字要滚 30 秒，用户只能
     看到开头「欢迎来到中国人」），改成一条一条整条轮换（见 nav.js：
     每 4 秒换一条、淡入淡出，点一下立即换下一条）。滚动动画与左侧
     padding 在手机端全部取消，文字自然换行、每条都完整可见；桌面端
     跑马灯原样不动。 */
  .announce-bar .marquee {
    display: block; padding-left: 0;
    animation: none;
    white-space: normal; overflow: visible; text-overflow: clip;
    flex: none; min-width: 0;
    transition: opacity .25s ease;
  }
  .announce-bar .announce-close {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    z-index: 1; background: var(--green-dark);
  }

  /* 页脚（.site-footer）手机端缩小约一半（2026-11-26 用户要求）——
     用户实拍：页脚三栏在手机上占满一屏还多，实测高 715px。只改手机端 ≤600px，桌面原样；
     文字一字不删、不改：全文仍在 DOM 内，点「展开全部」恢复全文；
     心理援助热线三行（12356 / 400-161-9995 / 拨打 120）全部保留可见、不折叠。
     省空间的办法（715px→约 350px）：字号 1rem→0.85rem、行高 1.7→1.5、标题 1.15rem→0.95rem；
     上下内边距 36/28px→14/10px；栏间 grid 间距 20px 清零、分隔 margin 18px→8px；
     段落间距 0.5em→4px；平台简介两段与客服电话一行各收成 1 行省略（点展开看全文）；
     「展开全部」按钮保持 40px 点按高。 */
  .site-footer { padding: 14px 0 10px; font-size: 0.85rem; }
  .site-footer .grid { gap: 0; }
  .site-footer .grid > div { padding-bottom: 8px; margin-bottom: 8px; }
  .site-footer h4 { font-size: 0.95rem; margin: 0 0 4px; }
  .site-footer .footer-col p { line-height: 1.5; margin: 0 0 4px; }
  .site-footer .footer-col:first-child p { -webkit-line-clamp: 1; }
  .site-footer .footer-col:last-child p:last-child { -webkit-line-clamp: 1; }
  .site-footer .footer-expand-btn { font-size: 0.85rem; padding: 6px 18px; margin-top: 2px; min-height: 40px; }

  /* 页脚（.site-footer，深绿大块）手机端整个隐藏（2026-11-26 用户要求）——
     只改 ≤600px，桌面原样。页脚内容与首页合规卡（#compliance-sec）重复，
     热线（12356 / 400-161-9995 / 拨打 120）与合规声明在合规卡里仍可见
     （点「展开全部」看全文）。 */
  .site-footer { display: none; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .announce-bar .marquee { animation: none; padding-left: 0; }
}
