/* ============================================================
   曼陀雅华 · 电脑端统一适配层  pc-desktop.css
   只在 min-width:1024px 生效，手机端完全不受影响。
   策略：只放宽 .page 容器 + 列表多列 + 字号提档；不动 body>.wrap，
        避免把登录/表单这类窄内容页拉变形。
   ============================================================ */
@media (min-width: 1000px) {

  /* 1. 仅 .page 容器放宽（65 页使用），表单页若无 .page 则不受影响 */
  .page {
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
  }

  /* 2. 基础字号提一档 */
  html { font-size: 16px; }
  body { font-size: 15.5px; line-height: 1.7; }

  /* 3. 底部 tabbar 隐藏（电脑用顶部导航） */
  .tabbar, .tab-bar, .bottom-nav, #tabbar, .foot-tab, .bnav, .app-tabbar { display: none !important; }

  /* 4. 顶栏加宽对齐 */
  .nav { max-width: 1240px; margin-left: auto !important; margin-right: auto !important;
         padding-left: 40px !important; padding-right: 40px !important; }
  .nav h1 { font-size: 19px !important; }

  /* 5. 列表容器：单列 -> 自适应多列（只对明确的列表容器） */
  .list, .rp-list, .card-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
    gap: 18px !important;
  }

  /* 6. 常见卡片内边距/字号放大 */
  .rp, .card, .row-card { padding: 20px 22px !important; }
  .rp-t, .card h3 { font-size: 16.5px !important; }
  .rp-meta, .card p { font-size: 13px !important; }

  /* 7. 表格舒展 */
  th, td { padding: 12px 14px !important; font-size: 14.5px !important; }

  /* 8. 标题层级 */
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  /* 9. 按钮更好点 */
  .btn, button.btn { min-height: 42px; font-size: 15px !important; }

  /* 10. 表单类（登录/注册/设置）：保持窄栏居中，不拉满 */
  .login-card, .auth-card, .form-card, .login-box {
    max-width: 560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 11. 手机壳模拟页（.phone 390x844）：展开成整页，不再套手机框 */
  .phone {
    width: 100% !important;
    max-width: 1240px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .phone .scroll {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding-bottom: 24px !important;
  }

  /* ============================================================
     第二层 · 核心页专属多栏布局
     ============================================================ */

  /* ---- 通用列表容器（8 页共用：records/cases/celebrities/reports/
         brokerage/integral/regional-order/books）：单列 -> 多列 ---- */
  .list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(360px,1fr)) !important; gap: 16px !important; }

  /* ---- 测算记录 records：.rp 卡片 ---- */
  .rp { margin-bottom: 0 !important; padding: 18px 20px !important; }
  .rp-t { font-size: 16px !important; }
  .rp-meta { font-size: 12.5px !important; }

  /* ---- 案例库 / 名人库：卡片内边距 ---- */
  .list > .c, .list > .celeb, .list > .rc { padding: 16px 18px !important; }

  /* ---- 商城 shop：.lst 单列 -> 三列商品 ---- */
  /* 商城列表：.grid 写死 2 列 -> 自适应多列 */
  #grid{ grid-template-columns: repeat(auto-fill, minmax(226px,1fr)) !important; gap: 16px !important; }
  #grid .it{ min-width: 0; }
  #grid .it .nm{ font-size: 14.5px; }
  #grid .it .pr{ font-size: 17px; }
  .page:has(.grid){ max-width: 1440px !important; }
  .page:has(.lst){ max-width: 1400px !important; }
  .lst { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(232px,1fr)) !important; gap: 16px !important; padding: 16px 0 !important; }
  .lst .it, .lst > *{ min-width: 0; }

  /* ---- 选服务 consume：操作页，保持单列但居中限宽 + 放大（多栏会把分组切散，不采用） ---- */
  .page:has(.g-hd) {
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .page:has(.g-hd) .sv {
    padding: 18px 22px !important;
    margin-bottom: 12px !important;
  }
  .page:has(.g-hd) .sv-t { font-size: 16px !important; }
  .page:has(.g-hd) .sv-d { font-size: 12.5px !important; }
  .page:has(.g-hd) .sv-p { font-size: 16px !important; }
  .page:has(.g-hd) .g-hd h2 { font-size: 19px !important; }

  /* ---- 充值 recharge：档位卡更宽更好点 ---- */
  .plans { gap: 14px !important; }
  .card { padding: 18px 20px !important; }

  /* ---- 我的 mine：账户卡与推广卡并排 ---- */
  .acc { padding: 20px 22px !important; }

  /* ---- 课程/学习：卡片列表多列 ---- */
  .course-list, .cs-list, .lesson-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(340px,1fr)) !important;
    gap: 16px !important;
  }

  /* ============================================================
     电脑站统一顶部导航（pc-nav.js 注入）
     ============================================================ */
  .pcnav {
    position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 999;
    background: rgba(253,252,248,.96); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line, #E8DDC9);
    box-shadow: 0 2px 14px rgba(0,0,0,.04);
  }
  .pcnav .pcnav-in {
    max-width: 1240px; height: 64px; margin: 0 auto; padding: 0 40px;
    display: flex; align-items: center; gap: 34px;
  }
  .pcnav-logo { display: flex; align-items: center; gap: 10px; flex: none; }
  .pcnav-seal {
    border: 2px solid #C00000; border-radius: 7px; padding: 4px 7px;
    color: #C00000; font: 700 8px/1 -apple-system,"Segoe UI",Arial,sans-serif; letter-spacing: .3px;
  }
  .pcnav-nm { font-family: "Noto Serif SC","Songti SC",SimSun,serif; font-size: 20px;
    font-weight: 700; color: #9D1C1B; letter-spacing: 2px; }
  .pcnav-links { display: flex; gap: 26px; margin-left: auto; }
  .pcnav-links a { font-size: 15.5px; color: #6B6359; padding: 6px 0;
    border-bottom: 2px solid transparent; text-decoration: none; }
  .pcnav-links a:hover { color: #C00000; border-bottom-color: #C00000; }
  .pcnav-links a.on { color: #C00000; border-bottom-color: #C00000; font-weight: 600; }
  .pcnav-cta { background: #C00000; color: #fff !important; font-size: 14.5px;
    padding: 9px 20px; border-radius: 8px; text-decoration: none; flex: none; }
  .pcnav-cta:hover { background: #9D1C1B; }

  /* 内容下移避让固定导航 */
  html.has-pcnav body { padding-top: 64px !important; }
  html.has-pcnav .phone { margin-top: 0 !important; }
  /* 原手机顶栏在电脑端作为二级标题保留，但不再 sticky 抢位 */
  html.has-pcnav .nav { position: static !important; }

  /* ---- 导航「全部功能」下拉 ---- */
  .pcnav-more { position: relative; display: flex; align-items: center; }
  .pcnav-more .mt {
    font-size: 15.5px; color: #6B6359; cursor: pointer; padding: 6px 0;
    white-space: nowrap; border-bottom: 2px solid transparent;
  }
  .pcnav-more:hover .mt { color: #C00000; border-bottom-color: #C00000; }
  .pcnav-more .mp {
    display: none; position: absolute; top: calc(100% + 12px); right: -40px;
    width: min(1260px, calc(100vw - 70px)); background: #fff; border: 1px solid #E8DDC9;
    border-radius: 14px; box-shadow: 0 22px 60px rgba(74, 12, 12, .16);
    padding: 22px 26px; grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 16px 24px; z-index: 60;
    max-height: calc(100vh - 110px); overflow: auto;
  }
  .pcnav-more:hover .mp { display: grid; }
  .pcnav-more .mg h4 {
    font-size: 13.5px; color: #C00000; font-weight: 700; margin: 0 0 10px;
    padding-bottom: 8px; border-bottom: 1px solid #F1E6D6; letter-spacing: 1px;
  }
  .pcnav-more .mg a {
    display: block; font-size: 14px; color: #2E2A26; padding: 4.5px 0;
    text-decoration: none;
  }
  .pcnav-more .mg a:hover { color: #C00000; }

  /* ---- 右下角客服 ---- */
  .pcfab { position: fixed; right: 28px; bottom: 34px; z-index: 80; }
  .pcfab-b {
    width: 56px; height: 56px; border-radius: 50%; background: #C00000; border: 0;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(192, 0, 0, .30); transition: background .15s, transform .15s;
  }
  .pcfab-b:hover { background: #9D1C1B; transform: translateY(-2px); }
  .pcfab-b svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.8; }
  .pcfab-pop {
    display: none; position: absolute; right: 0; bottom: 70px; width: 268px;
    background: #fff; border: 1px solid #E8DDC9; border-radius: 14px;
    box-shadow: 0 18px 50px rgba(74, 12, 12, .18); padding: 18px 18px 16px; text-align: center;
  }
  .pcfab.open .pcfab-pop { display: block; }
  .pcfab-pop img {
    width: 200px; height: 200px; object-fit: contain; margin: 0 auto 10px;
    border-radius: 8px; border: 1px solid #F0E6D6;
  }
  .pcfab-pop .t { font-size: 14.5px; color: #2E2A26; font-weight: 600; }
  .pcfab-pop .s { font-size: 12.5px; color: #6B6359; margin-top: 6px; line-height: 1.8; }



  /* =============== 排盘 paipan：表单居中 + 结果区两列 =============== */
  .wrap:has(#result){
    max-width: 1240px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
  .wrap:has(#result) > .card{
    max-width: 820px; margin-left: auto; margin-right: auto;
  }
  #result{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
    align-items: start;
  }
  #result > .card{ margin: 0 !important; }
  #result > .card:first-child{ grid-column: 1 / -1; }
  #result > .card:last-child{ grid-column: 1 / -1; }
  #result > .card:first-child .pan{ max-width: 100%; }

  /* =============== 报告 report：正文限宽舒适阅读 =============== */
  .page:has(+ #thread){ max-width: 880px !important; }
  #thread{ max-width: 880px !important; margin-left: auto !important; margin-right: auto !important; }
  .acts{ max-width: 880px !important; margin-left: auto !important; margin-right: auto !important; }

  /* =============== 商城详情 shop-item：左图右信息 =============== */
  .page:has(> #body > .hero){
    max-width: 1180px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
  .page:has(> #body > .hero) > .nav{
    max-width: 1180px; margin: 0 auto;
    padding-left: 28px; padding-right: 28px;
  }
  .page:has(> #body > .hero) > .foot{ max-width: 1180px; }

  .page:has(> #body > .hero) #body{
    display: grid !important;
    grid-template-columns: minmax(0,500px) minmax(0,1fr);
    column-gap: 40px;
    align-items: start;
  }
  .page:has(> #body > .hero) #body > .hero{
    grid-column: 1;
    grid-row: 1 / 100;
    align-self: start;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(40,20,10,.10);
  }
  .page:has(> #body > .hero) #body > *:not(.hero):not(.tip){ grid-column: 2; }
  .page:has(> #body > .hero) #body > .tip{ grid-column: 1 / -1; margin-top: 24px; }

  .page:has(> #body > .hero) #body > .bd{
    padding: 0 0 20px;
    background: transparent;
    border-bottom: 1px solid var(--line);
  }
  .page:has(> #body > .hero) #body > .bd .nm{ font-size: 25px; line-height: 1.45; }
  .page:has(> #body > .hero) #body > .bd .pr{ font-size: 32px; margin-top: 12px; }
  .page:has(> #body > .hero) #body > .bd .sub{ font-size: 14px; margin-top: 8px; }
  .page:has(> #body > .hero) #body > .card{ margin-top: 16px; }
  .page:has(> #body > .hero) #body > .card .row{ padding: 11px 0; font-size: 14.5px; }


  /* =============== 旧玫红渐变统一为品牌红（仅宽屏，手机端不动） =============== */
  .hero:has(.h-v),
  .hero:has(.one),
  .hero:has(.cols),
  .hero:has(.line),
  .hero:has(> .card){
    background-image: linear-gradient(135deg,#C00000 0%,#9D1C1B 100%) !important;
    max-width: 1040px !important;
    margin: 0 auto 20px !important;
    border-radius: 16px !important;
    padding: 28px 34px !important;
  }
  .btn-main,
  .contact{
    background-image: linear-gradient(90deg,#C00000 0%,#B01818 100%) !important;
  }
  .foot button:not(.ghost){
    background-image: linear-gradient(90deg,#C00000 0%,#B01818 100%) !important;
    border-color: transparent !important;
  }

  /* =============== 蓝版残留清理（红版不得出现蓝版主色） =============== */
  .tabs button.on,
  .toc button.on,
  .i-tag,
  .pmsg.err,
  .cf-row b,
  .cf-body b,
  .plan .pr b,
  .hd .s b,
  .lock .buytip a,
  .bal b{ color: #C00000 !important; }
  .i-tag{ background: #FBEFE0 !important; }
  .sum{
    background-image: linear-gradient(135deg,#C00000 0%,#9D1C1B 100%) !important;
  }

  /* =============== 含白卡的红底 hero（佣金/收益类页）：改成品牌红圆角面板 =============== */
  .hero:has(> .card){
    background: linear-gradient(120deg,#C00000 0%,#9D1C1B 100%) !important;
    border-radius: 16px;
    padding: 26px 28px 30px !important;
  }
  .hero:has(> .card) > .card{
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 10px 6px 6px !important;
  }
  .hero:has(> .card) .lbl{ font-size: 13.5px !important; color: rgba(255,255,255,.74) !important; }
  .hero:has(> .card) .amt{ font-size: 36px !important; color: #fff !important; }
  .hero:has(> .card) .grid > *{ font-size: 14px !important; color: #fff !important; }
  .hero:has(> .card) .grid > * > *:first-child{ color: rgba(255,255,255,.72) !important; }
  .hero:has(> .card) .cash{
    background: linear-gradient(90deg,#E4C27A,#C9A04A) !important;
    color: #3A0A0A !important; font-weight: 600 !important;
  }

  /* =============== 课程 course：单列列表 -> 三列卡片 =============== */
  .clist{
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(376px,1fr)) !important;
    gap: 14px !important;
    margin-top: 14px !important;
  }
  .clist .citem{ margin: 0 !important; }
  .clist .ci-t{ font-size: 16px !important; }

  /* =============== 充值 recharge：档位限宽 + 多列 =============== */
  .page:has(.mtier){ max-width: 940px !important; }
  .page:has(.equity){ max-width: 1000px !important; }
  .page:has(.plans) .plans{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 14px !important;
  }
  .page:has(.mtier) .mtier{ padding: 24px 26px !important; }
  .page:has(.mtier) .mtier .mt-name{ font-size: 21px !important; }



  /* ============================================================
     第三层 · 非标准容器页（没有 .page 的自定义布局页）
     这些页在手机端自成一派，宽屏下会挤成一条窄缝，逐个兜住。
     ============================================================ */

  /* ---- 全部产物 artifacts ---- */
  body:has(> .head) > .head,
  body:has(> .head) > .tabs{
    max-width: 1240px; margin-left: auto; margin-right: auto;
    padding-left: 40px; padding-right: 40px;
  }
  /* 列表容器是 .wrap#list（自带 560 限宽），宽屏下改成两列栅格，日期头整行 */
  body:has(> .head) > .wrap{
    max-width: 1240px !important; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr));
    gap: 10px 20px; align-items: start;
  }
  body:has(> .head) > .wrap > .day{ grid-column: 1 / -1; margin: 14px 4px 2px; }
  body:has(> .head) > .wrap > .item{ margin: 0 !important; max-width: none !important; }
  body:has(> .head) > .empty{ max-width: 1160px; margin: 40px auto; }

  /* ---- 积分 integral：nav/hero/tabs/tip/list 平铺在 body 下 ---- */
  body:has(> .nav):has(> .hero) > .nav,
  body:has(> .nav):has(> .hero) > .hero,
  body:has(> .nav):has(> .hero) > .tabs,
  body:has(> .nav):has(> .hero) > .tip{
    max-width: 1000px; margin-left: auto; margin-right: auto;
    padding-left: 24px; padding-right: 24px;
  }
  body:has(> .nav):has(> .hero) > .list{
    max-width: 1000px; margin: 12px auto 0;
    padding-left: 24px; padding-right: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px,1fr)) !important;
  }

  /* ---- 阿数顾问 robot：对话页居中 ---- */
  body:has(> .ai-note) > .hd,
  body:has(> .ai-note) > .main{
    max-width: 860px; margin-left: auto; margin-right: auto;
  }
  body:has(> .ai-note) > .ft{
    max-width: 860px; left: 0; right: 0; margin-left: auto; margin-right: auto;
  }

  /* ---- 先生 / 开运文案（.ky-top/.ky-body/.ky-foot 同一套壳） ---- */
  body:has(> .ky-top) > .ky-top{ max-width: 100%; }
  body:has(> .ky-top) > .ky-body{
    max-width: 900px; margin-left: auto; margin-right: auto;
  }
  body:has(> .ky-top) > .ky-foot{
    max-width: 900px; left: 0; right: 0; margin-left: auto; margin-right: auto;
  }

  /* ---- 算力码卡面 cards：印刷版式居中 ---- */
  body:has(> .bar) > .bar, body:has(> .bar) > .grid{
    max-width: 1040px; margin-left: auto; margin-right: auto;
  }

  /* ---- 排盘 paipan：结果区两列（已在上文 #result 处理，这里补表单宽度） ---- */
  .wrap:has(#result) > .hint,
  .wrap:has(#result) > .form{ max-width: 820px; margin-left: auto; margin-right: auto; }



  /* =============== 1000–1279 窄桌面：导航收紧，避免挤爆 =============== */
  @media (max-width: 1279px) {
    .pcnav .pcnav-in { gap: 16px; padding: 0 22px; }
    .pcnav-links { gap: 13px; }
    .pcnav-links a { font-size: 14px; white-space: nowrap; }
    .pcnav-more .mt { font-size: 14px; }
    .pcnav-logo .pcnav-nm { font-size: 17px; letter-spacing: 1px; }
    .pcnav-seal { padding: 3px 5px; font-size: 7px; }
    .pcnav-cta { padding: 8px 14px; font-size: 13.5px; }
    .pcnav-more .mp { right: -60px; }
  }


  /* =============== 测算记录 / 用户列表：姓名列加宽，别把三个字挤成两行 =============== */
  .b{ padding: 13px 22px !important; }
  .b-m{ width: 152px !important; }
  .b-t{ font-size: 16px !important; white-space: nowrap; }
  .b-s{ font-size: 12px !important; }
  .b-gz{ gap: 18px !important; }
  .b-col{ font-size: 15px !important; }
  .b-cnt{ font-size: 13px !important; }


  /* 记录行右侧：生肖/加号 与「删」按钮原来叠在一起，给删除键单独留位 */
  .b{ padding-right: 78px !important; }
  .b-del{ right: 16px !important; }


  /* 页面自带的吸顶标题栏（.top/.hd/.bar/.head）在电脑端让位给全局导航，
     否则它的上沿会被固定导航压住、圆角被切平（推广中心/收益类页最明显） */
  html.has-pcnav body > .top,
  html.has-pcnav body > .hd,
  html.has-pcnav body > .bar,
  html.has-pcnav body > .head,
  html.has-pcnav body > .navbar,
  html.has-pcnav body > .appbar{
    position: static !important; top: auto !important;
  }


  /* 列表里的分组小标题（如「佣金流水」）在多列栅格中要独占整行，
     否则它会占掉第一格，卡片从第二列开始排，左边留个洞 */
  .list > .lbl,
  .list > .tip,
  .list > .day,
  .list > .grp,
  .list > .nomore,
  .list > div[style*="padding:8px"]{ grid-column: 1 / -1; }

}
