/* 小保 AI · 电脑网页端适配（2026-10-31）
   原则：只在 ≥900px 生效，手机端（<900px）一行都不改。
   做法：首页 section.empty 从「竖排手机流」变成「左内容 / 右功能」两栏；
        顶栏与主内容同宽对齐；聊天页不动（本来就是 820 居中）。
   回滚：删掉 index.html 里对 xb-desktop.css 的引用即可。 */

@media (min-width: 900px) {
  /* ── 顶栏：内容与主区同宽，不贴屏幕两侧 ── */
  .topbar {
    padding-left: max(24px, calc((100vw - 1120px) / 2));
    padding-right: max(24px, calc((100vw - 1120px) / 2));
  }
  .topbar .icon-btn { width: 38px; height: 38px; font-size: 17px; }
  #inboxBell { width: 34px; height: 34px; font-size: 15px; }
  .guide { font-size: 12px; padding: 8px 12px; }

  /* 桌面顶栏太素：☰ 后面补一个品牌字标（纯 CSS，手机端不出现） */
  .topbar-left #menu { order: 0; }
  .topbar-left::after {
    content: "小保 AI";
    order: 1;
    font: 700 16px/1 inherit;
    color: #0f7b5f;
    letter-spacing: .5px;
    white-space: nowrap;
  }
  .topbar-left .guide { order: 2; }

  /* ── 首页：两栏 + 整体垂直居中（避免下半屏一大片空） ── */
  section.empty {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    grid-auto-rows: min-content;
    gap: 16px 40px;
    align-items: start;
    align-content: safe center;
    width: 1120px;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 0;
    box-sizing: border-box;
  }
  section.empty > .brand-logo,
  section.empty > .brand-title { display: none !important; }

  /* 轮播：占满左栏，保持原始 2172:724，不裁切不放大 */
  #xbHeroCarousel {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    aspect-ratio: 2172 / 724;
    margin: 0;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(16, 40, 32, .07);
  }
  #xbHeroCarousel .xbh-slide > img { width: 100%; height: 100%; object-fit: contain; }
  #xbHeroCarousel .xbh-dots { bottom: 6px; }

  section.empty > .xb-quote { grid-column: 1; grid-row: 2; margin: 0; }
  section.empty > .brand-lead { grid-column: 1; grid-row: 3; margin: 0; font-size: 15px; }

  section.empty > .demo-q {
    grid-column: 1;
    grid-row: 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 2px 0 0;
  }
  section.empty > .demo-q .dq {
    width: 100%;
    height: auto;
    padding: 10px 12px;
    font-size: 13px;
    white-space: normal;
    line-height: 1.5;
  }

  /* 功能六宫格：右栏 3×2 */
  section.empty > .life-grid {
    grid-column: 2;
    grid-row: 1 / span 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(140px, 1fr));
    align-self: stretch;          /* 与左栏等高，两栏底边齐平 */
    align-content: stretch;
    gap: 14px;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  section.empty > .life-grid .life-btn { min-height: 142px; padding: 16px 14px; }
  section.empty > .life-grid .lb-ic { font-size: 27px; }
  section.empty > .life-grid .lb-nm { font-size: 16.5px; }
  section.empty > .life-grid .lb-sub { font-size: 12.5px; line-height: 1.6; }
  section.empty > .life-grid .lb-tag { font-size: 12px; }

  /* 底部：保单 PK / 送礼参谋（若显示）并排；今日工作、入口条整行。不写死行号，避免空行留白 */
  section.empty > .pk-home { grid-column: span 1; width: 100%; margin: 0; }
  section.empty > .day-card { grid-column: 1 / -1; width: 100%; max-width: none; margin: 0; }
  section.empty > .xb-life-entry { grid-column: 1 / -1; width: 100%; max-width: none; margin: 0; }

  /* 页脚输入区：整条横栏不动，内部保持居中不拉满 */
  .composer .mode-row,
  .composer .composer-card,
  .composer .foot-line { max-width: 820px; margin-left: auto; margin-right: auto; }
}

/* 宽屏（≥1400）：主内容再宽松一点，避免缩在中间 */
@media (min-width: 1400px) {
  section.empty { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 18px 48px; }
}
