/* 首页（集签地图 + Job Pilot）专属样式。全站通用样式见 style.css */
  :root{--accent:#3b82f6;--accent-soft:rgba(59,130,246,.12);--text:#111827;--muted:#6b7280;
    --border:rgba(17,24,39,.12);--shadow:0 10px 28px rgba(15,23,42,.18);}
  *{box-sizing:border-box}
  html,body{margin:0;height:100%;overflow:hidden;color:var(--text);
    font-family:-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif}
  #pilotMap{position:absolute;inset:0}

  /* ── 经典页眉下方：点选信息卡 ── */
  .tStack{position:fixed;top:56px;left:10px;right:10px;z-index:19;
    display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none}
  .tStack .infoBar{max-width:520px}
  /* 经典 nav 固定在顶层，地图全屏铺底 */
  header.nav{position:fixed;top:0;left:0;right:0;z-index:30}

  /* ══ Job Pilot 对话层 ══ */
  .pilotBar{position:fixed;left:50%;transform:translateX(-50%);bottom:10px;z-index:26;
    width:min(94vw,560px);display:flex;gap:7px;align-items:center}
  .pilotInput{flex:1;display:flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--border);
    border-radius:999px;box-shadow:var(--shadow);padding:0 5px 0 13px;height:48px}
  .pilotInput .robo{font-size:17px;flex:none}
  .pilotInput input{flex:1;border:none;outline:none;font-size:14px;background:transparent;min-width:0}
  .pilotInput button{border:none;background:var(--accent);color:#fff;font-weight:700;font-size:13px;
    border-radius:999px;height:38px;padding:0 15px;cursor:pointer;flex:none}
  .pilotInput button:disabled{opacity:.5}
  .chatToggle{flex:none;height:38px;border-radius:999px;background:#fff;border:1px solid var(--border);
    box-shadow:var(--shadow);font-size:11.5px;font-weight:700;cursor:pointer;color:#374151;display:none;
    padding:0 10px;white-space:nowrap}
  .chatToggle.on{display:block}

  /* 底部堆叠容器：对话 + 引导气泡，垂直排列，谁显示谁占位，永不重叠 */
  .bStack{position:fixed;left:50%;transform:translateX(-50%);bottom:66px;z-index:24;
    width:min(94vw,560px);display:flex;flex-direction:column;gap:7px;pointer-events:none;
    /* 顶到信息卡下缘：页眉50 + 信息卡~72 + 小间隙 ≈ 132px */
    max-height:calc(100vh - 66px - 132px)}
  /* 对话气泡：地图当背景，容器不挡拖动，只有气泡本身可交互 */
  .chatLog{flex:0 1 auto;min-height:0;max-height:calc(100vh - 66px - 132px - 42px);/* 再让出引导气泡一行 */
    overflow-y:auto;display:none;flex-direction:column;gap:7px;
    padding:4px 2px;pointer-events:none;-webkit-overflow-scrolling:touch;
    mask-image:linear-gradient(to bottom,transparent 0,#000 24px)}
  .chatLog.show{display:flex}
  .msg{max-width:86%;padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.55;
    pointer-events:auto;box-shadow:0 2px 10px rgba(15,23,42,.14);white-space:pre-wrap;word-break:break-word;
    -webkit-user-select:text;user-select:text;position:relative}
  .msg .cpBtn{position:absolute;top:4px;right:4px;border:none;background:transparent;color:#9ca3af;
    font-size:12px;cursor:pointer;padding:2px 4px;opacity:.6}
  .msg .cpBtn:active{color:var(--accent)}
  .msg.user{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:4px}
  .msg.bot{align-self:flex-start;background:rgba(255,255,255,.96);border:1px solid var(--border);border-bottom-left-radius:4px}
  .msg.sys{align-self:center;background:rgba(17,24,39,.72);color:#fff;font-size:12px;padding:5px 12px;border-radius:999px}
  .msg .thinking{display:inline-block;animation:blink 1s infinite}
  @keyframes blink{50%{opacity:.3}}

  /* 建议 chips：点选点后出现，引导第一句话 */
  .hintChips{display:none;flex-wrap:wrap;gap:6px;justify-content:center}
  .hintChips.show{display:flex}
  .hintChips .hc{pointer-events:auto;background:rgba(255,255,255,.95);border:1px solid var(--accent);color:var(--accent);
    font-size:11.5px;font-weight:600;border-radius:999px;padding:5px 11px;cursor:pointer;box-shadow:0 3px 10px rgba(15,23,42,.12)}
  @media(min-width:769px){
    .hintChips .hc{font-size:12.5px;padding:6px 13px}
  }

  /* 点选信息卡（顶部） */
  .infoBar{display:none;width:100%;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);
    padding:10px 13px;align-items:center;gap:9px;pointer-events:auto}
  .infoBar.show{display:flex}
  .infoBar .dot{width:11px;height:11px;border-radius:50%;flex:none}
  .infoBar .txt{flex:1;min-width:0;font-size:12.5px;line-height:1.5}
  .infoBar .txt b{font-size:13.5px}
  .infoBar .ok{color:#16a34a;font-weight:700}.infoBar .no{color:#dc2626;font-weight:700}
  .infoBar .closeX{flex:none;border:none;background:transparent;color:#9ca3af;font-size:17px;cursor:pointer;padding:2px 4px}

  /* 对话内的工作结果（一行一个）*/
  .msg.list{max-width:100%;width:100%}
  .msg.list .jt{font-weight:700;font-size:13px;margin-bottom:5px}
  .msg.list .jl{font-size:12.5px;line-height:1.7;color:var(--text);border-bottom:1px dashed rgba(17,24,39,.08);
    display:flex;align-items:baseline;gap:5px}
  .msg.list .jl:last-of-type{border-bottom:none}
  .msg.list .jl .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .msg.list .jl .kind{display:inline-block;vertical-align:baseline;margin:0 3px;padding:0 5px;border-radius:5px;
    background:rgba(15,118,110,.09);color:#0f766e;border:1px solid rgba(15,118,110,.18);
    font-size:10.5px;font-weight:800;line-height:1.55}
  .msg.list .jl .kind.zone{background:rgba(37,99,235,.08);color:#1d4ed8;border-color:rgba(37,99,235,.18)}
  .msg.list .jl a{text-decoration:none;flex:none}
  .msg.list .more{font-size:12px;color:var(--muted);margin-top:5px}
  .msg.list.pilotStep{border-left:3px solid var(--accent)}
  .msg.list.pilotStep.is-stale{opacity:.62;border-left-color:var(--border)}
  .msg.list.pilotStep.is-stale button{cursor:default}
  .msg.list.pilotPlan{border-left:3px solid #0f766e;background:#f8fffd}
  .pilotPlanLine{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.55;
    padding:4px 0;border-bottom:1px dashed rgba(15,23,42,.08)}
  .pilotPlanLine:last-child{border-bottom:none}
  .pilotPlanNo{display:grid;place-items:center;width:18px;height:18px;flex:none;border-radius:50%;
    background:#0f766e;color:#fff;font-size:11px;font-weight:800;margin-top:1px}
  .pilotStepNote{font-size:12px;color:var(--muted);line-height:1.45;margin:3px 0 8px}
  .pilotStepActions{display:flex;flex-direction:column;gap:7px;margin-top:7px}
  .pilotStepActions button{width:100%;text-align:left;border:1px solid var(--border);background:#fff;color:#1f2937;
    border-radius:7px;padding:9px 10px;font-size:12.5px;font-weight:700;line-height:1.35;cursor:pointer}
  .pilotStepActions button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
  .pilotStepActions button.secondary{color:var(--accent);border-color:rgba(59,130,246,.42);background:rgba(59,130,246,.07)}

  .toast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:40;background:#fff;
    border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:14px 18px;font-size:13px}

/* ── 侧边图例：收起=竖排色点药丸，展开=说明卡（不挡地图主操作）── */
.legendDock{position:fixed;left:8px;top:188px;z-index:18;display:flex;align-items:flex-start;gap:6px}  /* 避开顶部信息卡（约152px处收尾） */
.legendPill{display:flex;flex-direction:column;gap:5px;align-items:center;background:rgba(255,255,255,.94);
  border:1px solid var(--border);border-radius:999px;padding:8px 6px;cursor:pointer;box-shadow:0 3px 12px rgba(15,23,42,.14)}
.legendPill .ld{width:11px;height:11px;border-radius:50%;display:block}
.legendCard{background:rgba(255,255,255,.97);border:1px solid var(--border);border-radius:12px;
  box-shadow:0 6px 20px rgba(15,23,42,.16);padding:9px 12px;font-size:11.5px;line-height:1.75;
  max-width:min(64vw,300px);color:var(--text)}
.legendCard b{font-size:11px;color:var(--muted);display:block;margin-bottom:2px}

.legendCard .lgHint{color:var(--muted);font-size:10.5px;margin-top:3px}

/* ── Workspace layout: map + dedicated Pilot surface ── */
:root{--pilot-panel-width:420px;--nav-height:50px}
#pilotMap{right:var(--pilot-panel-width)}
.pilotPanel{position:fixed;top:var(--nav-height);right:0;bottom:0;z-index:25;width:var(--pilot-panel-width);
  display:flex;flex-direction:column;background:rgba(248,250,252,.97);border-left:1px solid var(--border);
  box-shadow:-8px 0 24px rgba(15,23,42,.08);backdrop-filter:blur(14px)}
.pilotPanelTop{height:58px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 14px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.78)}
.pilotPanelIdentity{display:flex;align-items:center;gap:10px;min-width:0}
.pilotMark{display:block;width:30px;height:30px;flex:none;border-radius:8px;background:#fff;border:1px solid rgba(15,23,42,.08);
  padding:2px;box-sizing:border-box;object-fit:contain}
.pilotPanelTitle{display:flex;flex-direction:column;min-width:0}
.pilotPanelTitle strong{font-size:14px;line-height:1.25}
.pilotPanelTitle span{font-size:11.5px;line-height:1.35;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pilotPanel .tStack{position:static;inset:auto;z-index:auto;display:block;flex:none;padding:10px 12px 0;pointer-events:auto}
.pilotPanel .tStack .infoBar{max-width:none}
.pilotPanel .infoBar{border-radius:6px;box-shadow:none;background:#fff;padding:9px 10px}
.pilotPanel .bStack{position:static;inset:auto;transform:none;z-index:auto;width:auto;max-height:none;min-height:0;flex:1;
  display:flex;justify-content:flex-end;padding:10px 12px 4px;pointer-events:auto;overflow:hidden}
.pilotPanel:not(.has-chat) .bStack{justify-content:flex-start}
.pilotPanel .chatLog{flex:1;max-height:none;width:100%;padding:2px 2px 8px;pointer-events:auto;mask-image:none}
.pilotPanel .chatLog.show{display:flex}
.pilotPanel .msg{max-width:92%;border-radius:8px;box-shadow:none}
.pilotPanel .msg.bot{background:#fff}
.pilotPanel .msg.user{background:#2563eb}
.pilotPanel .msg.sys{max-width:96%;background:#eef2f7;color:#475569;border:1px solid rgba(15,23,42,.06);border-radius:6px}
.pilotPanel .msg.list{border-radius:6px;padding:11px 12px}
.pilotPanel .hintChips{width:100%;justify-content:flex-start;gap:7px;padding:0 1px 4px}
.pilotPanel .hintChips .hc{border-radius:7px;box-shadow:none;text-align:left;background:#fff;padding:7px 10px;line-height:1.35}
.pilotPanel .pilotBar{position:static;inset:auto;transform:none;z-index:auto;width:auto;display:block;flex:none;padding:8px 12px 12px}
.pilotPanel .pilotInput{height:46px;border-radius:8px;padding-left:11px;box-shadow:0 6px 18px rgba(15,23,42,.10)}
.pilotPanel .pilotInput .robo{color:#2563eb;font-size:14px}
.pilotPanel .pilotInput button{width:36px;height:36px;padding:0;border-radius:7px;font-size:18px;line-height:1}
.pilotPanel .chatToggle{display:none;box-shadow:none;border-radius:7px;height:34px;padding:0 9px}
.pilotEmpty{pointer-events:auto;display:flex;flex-direction:column;gap:9px;padding:4px 2px 8px;color:#111827;
  min-height:0;max-height:100%;overflow:visible}
.pilotEmpty[hidden]{display:none}
.pilotEmptyBrand{display:flex;align-items:center;gap:10px;padding:6px 2px 2px}
.pilotEmptyMark{display:block;width:34px;height:34px;border-radius:9px;background:#fff;border:1px solid rgba(15,23,42,.08);
  padding:3px;box-sizing:border-box;object-fit:contain;flex:none}
.pilotEmptyBrand strong{display:block;font-size:14px;line-height:1.25}
.pilotEmptyBrand span{display:block;font-size:11.5px;color:#64748b;line-height:1.3}
.pilotGuideEyebrow{align-self:flex-start;border:1px solid rgba(37,99,235,.16);background:#eff6ff;color:#1d4ed8;
  border-radius:999px;padding:4px 8px;font-size:11.5px;font-weight:800;line-height:1.2}
.pilotEmpty h2{margin:0;font-size:18px;line-height:1.18;letter-spacing:0;font-weight:800}
.pilotEmpty p{margin:0;color:#64748b;font-size:12.5px;line-height:1.55}
.pilotSkipButton{border:1px solid rgba(37,99,235,.24);background:#fff;color:#2563eb;border-radius:8px;
  padding:9px 10px;font-size:12.5px;font-weight:800;line-height:1.2;text-align:center;cursor:pointer}
.pilotSkipButton:hover{background:#eff6ff;border-color:rgba(37,99,235,.45)}
.pilotGuideGrid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:1px}
.pilotGuideGrid div{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:8px;padding:8px 9px}
.pilotGuideGrid b{display:block;color:#111827;font-size:12px;line-height:1.2;margin-bottom:3px}
.pilotGuideGrid span{display:block;color:#64748b;font-size:11.5px;line-height:1.35}
.pilotGuideGrid div:last-child{grid-column:1/-1}
.pilotGuideExample{border:1px solid rgba(37,99,235,.16);background:#f8fbff;border-radius:8px;padding:8px 9px;
  color:#334155;font-size:12px;font-weight:700;line-height:1.45}
.legendDock{top:70px}
.toast{left:calc((100vw - var(--pilot-panel-width))/2)}

@media(max-width:1100px) and (min-width:901px){
  :root{--pilot-panel-width:370px}
}

@media(max-width:900px){
  :root{--pilot-panel-width:0px}
  #pilotMap{right:0}
  .pilotPanel{top:auto;left:0;right:0;bottom:0;width:100%;max-height:72dvh;border-left:none;border-top:1px solid var(--border);
    border-radius:12px 12px 0 0;box-shadow:0 -8px 24px rgba(15,23,42,.14);background:rgba(248,250,252,.98)}
  .pilotPanel.chat-open{height:min(72dvh,620px)}
  .pilotPanelTop{height:48px;padding:7px 10px;border-radius:12px 12px 0 0}
  .pilotMark{width:27px;height:27px;font-size:12px}
  .pilotPanelTitle strong{font-size:13.5px}
  .pilotPanelTitle span{font-size:11px;max-width:230px}
  .pilotPanel .chatToggle.on{display:block}
  .pilotPanel.has-chat:not(.chat-open) .tStack,
  .pilotPanel.has-chat:not(.chat-open) .bStack{display:none}
  .pilotPanel .tStack{padding:7px 10px 0}
  .pilotPanel .infoBar{padding:8px 9px}
  .pilotPanel .infoBar .txt{font-size:11.5px;line-height:1.4}
  .pilotPanel .infoBar .txt b{font-size:12.5px}
  .pilotPanel .bStack{padding:7px 10px 2px}
  .pilotEmpty{display:none}
  .pilotPanel .chatLog{padding-bottom:7px}
  .pilotPanel .msg{max-width:94%;font-size:13px}
  .pilotPanel .hintChips{gap:5px}
  .pilotPanel .hintChips .hc{flex:1 1 100%;font-size:11.5px;padding:7px 9px}
  .pilotPanel .pilotBar{padding:7px 10px calc(9px + env(safe-area-inset-bottom,0px))}
  .pilotPanel .pilotInput{height:44px}
  .legendDock{top:62px;left:7px}
  .legendCard{max-width:min(76vw,280px)}
  .toast{left:50%;top:38%}
}
