:root {
  color-scheme: dark;
  --color-scheme: dark;
  --page: #000;
  --canvas: #0a0a0f;
  --surface: #0b0b0f;
  --panel: #141417;
  --card: #1c1c1e;
  --raised: #26262a;
  --hover: #2c2c33;
  --text: #fff;
  --text-body: #e8e8ed;
  --text-secondary: #c8c8d0;
  --muted: #8e8e93;
  --subtle: #6d7380;
  --accent: #3a7afe;
  --accent-text: #8fb4ff;
  --selected: #1a2438;
  --composer: #191c29;
  --border: rgba(255,255,255,.09);
  --divider: rgba(255,255,255,.07);
  --soft: rgba(255,255,255,.06);
  --green: #30d158;
  --red: #ff453a;
  --amber: #ff9f0a;
  --navigation: rgba(8,8,10,.92);
  --bottom-fade: linear-gradient(to bottom, transparent, rgba(6,10,26,.9) 40%, #060a1a);
}
:root[data-theme="light"] {
  color-scheme: light;
  --color-scheme: light;
  --page: #f0f7ff;
  --canvas: #e8f3ff;
  --surface: #f3f9ff;
  --panel: #f8fbff;
  --card: #fbfdff;
  --raised: #e8f3fe;
  --hover: #dfedfc;
  --text: #173554;
  --text-body: #294865;
  --text-secondary: #466581;
  --muted: #607e99;
  --subtle: #728da5;
  --accent: #8bc3f3;
  --accent-text: #4277a5;
  --selected: #e1f0ff;
  --composer: #fbfdff;
  --border: rgba(34,52,83,.13);
  --divider: rgba(34,52,83,.09);
  --soft: rgba(34,52,83,.05);
  --green: #168348;
  --red: #d13738;
  --amber: #a16308;
  --navigation: rgba(247,251,255,.96);
  --bottom-fade: linear-gradient(to bottom, transparent, rgba(240,247,255,.94) 40%, #f0f7ff);
}
html body { color:var(--text-body); background:#fff; }
.theme-trigger { width:100%; text-align:left; border:0; font:inherit; }
.theme-choices { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
.theme-choice { display:flex; flex-direction:column; align-items:center; gap:12px; padding:20px 12px; border:1px solid var(--border); border-radius:16px; color:var(--text); background:var(--card); font:inherit; cursor:pointer; }
.theme-choice.selected { border-color:var(--accent); background:var(--selected); box-shadow:inset 0 0 0 1px var(--accent); }
.theme-choice svg { width:28px; height:28px; color:var(--accent); }
.theme-choice:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
:root .sheet:not(.on) { visibility:hidden; pointer-events:none; }

/* Keep white foregrounds on brand-colored actions in both themes. */
:root .msg.user .bubble, :root .btn.primary, :root .xy-tool.send, :root .nbadge, :root .sw-del,
:root .intro-btn-primary, :root .sim-logo, :root .pm-save, :root .soc-save { color:#fff; }
:root .dynamic-island { background:#101216; }
:root[data-theme="light"] body { background:#fff; }
:root[data-theme="light"] .screen svg[stroke="#fff"] { stroke:var(--text); }
:root[data-theme="light"] .statusbar svg[fill="#fff"],
:root[data-theme="light"] .screen .more-grid svg[fill="#fff"] { fill:var(--text); }
:root[data-theme="light"] .sw-del svg[stroke="#fff"] { stroke:#fff; }
:root[data-theme="light"] .screen [style*="color:#fff"],
:root[data-theme="light"] .screen [style*="color: #fff"] { color:var(--text) !important; }
:root[data-theme="light"] .sim-panel { box-shadow:0 16px 48px rgba(34,52,83,.12); }
:root[data-theme="light"] .sheet { box-shadow:0 -8px 30px rgba(34,52,83,.10); }
:root[data-theme="light"] .intro-card { background:var(--panel); box-shadow:0 24px 70px rgba(34,52,83,.16); }
:root[data-theme="light"] .pd-node .cir { background:var(--raised); }
:root[data-theme="light"] .pd-mode { background:var(--selected); }
:root[data-theme="light"] .msg.user .bubble { background:#dcefff; color:#294865; }
:root[data-theme="light"] .xy-tool.send { background:#c4e3fc; color:#315b7e; }
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .intro-btn-primary,
:root[data-theme="light"] .pm-save,
:root[data-theme="light"] .soc-save { background:#c4e3fc; color:#294865; box-shadow:none; }

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  body {
    background:var(--canvas);
    font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
    display:flex; align-items:center; justify-content:center; min-height:100vh; padding:20px;
  }
  /* ============ 手机壳 ============ */
  .phone-slot { position:relative; width:393px; height:852px; flex-shrink:0; }
  .phone {
    width:393px; height:852px; background:var(--page); border-radius:54px;
    box-shadow:0 0 0 12px #1b1b1f, 0 0 0 14px #333;
    position:absolute; top:0; left:0; overflow:hidden; transform-origin:top left;
  }
  /* Clip off-screen drawers without turning the whole phone screen into a scroll container. */
  .screen { position:absolute; inset:0; border-radius:54px; overflow:clip; background:var(--page); }
  .dynamic-island {
    position:absolute; top:12px; left:50%; transform:translateX(-50%);
    width:122px; height:34px; background:var(--page); border-radius:20px; z-index:200;
  }
  /* Share one header color across the station status bar, toolbar and hero. */
  .screen { --pd-header:#202f45; }
  :root[data-theme="light"] .screen { --pd-header:#d6eafa; }
  .screen:has(#plant-detail.show) .statusbar { background:var(--pd-header); }
  /* 状态栏 */
  .statusbar {
    position:absolute; top:0; left:0; right:0; height:54px;
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 30px 0; color:var(--text); font-size:16px; font-weight:600; z-index:350;
    pointer-events:none;
  }
  .statusbar .right { display:flex; align-items:center; gap:6px; }
  .app-control-mask { position:absolute;inset:0;z-index:1000;display:flex;align-items:center;padding:20px;background:#08162766; }
  .app-control-dialog { width:100%;padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--card);color:var(--text);font-size:14px; }
  .app-control-dialog h3 { margin:0 0 14px;font-size:18px; }.app-control-dialog label { display:block;line-height:1.7; }.app-control-dialog input { display:block;box-sizing:border-box;width:100%;margin:10px 0;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--page);color:var(--text);font:inherit; }.app-control-dialog p { font-size:12px;line-height:1.6;color:var(--text-secondary); }.app-control-dialog form,.app-control-dialog>div { display:flex;gap:10px;margin-top:16px; }.app-control-dialog button { flex:1;padding:10px;border:1px solid var(--border);border-radius:20px;background:var(--raised);color:var(--text);font:inherit;cursor:pointer; }.app-control-dialog button[type=submit] { background:#176aff;color:#fff; }
  .screen:has(#xiaoyuan.open) .statusbar { background:var(--page); }
  .screen:has(#xiaoyuan.open) .dynamic-island,
  .screen:has(#plant-detail.show) .dynamic-island { z-index:351; }
  /* ============ 页面结构 ============ */
  .page { position:absolute; top:54px; left:0; right:0; bottom:83px; overflow-y:auto; overflow-x:hidden; display:none; scrollbar-width:none; }
  .page::-webkit-scrollbar { display:none; }
  .page.active { display:block; }
  .tabbar {
    position:absolute; bottom:0; left:0; right:0; height:83px; z-index:100;
    background:var(--navigation); backdrop-filter:blur(20px);
    border-top:.5px solid var(--border);
    display:flex; justify-content:space-around; align-items:flex-start; padding-top:9px;
  }
  .tab { display:flex; flex-direction:column; align-items:center; gap:3px; width:64px; cursor:pointer; position:relative; }
  .tab .tlabel { font-size:10.5px; color:var(--muted); }
  .tab.active .tlabel { color:var(--accent); }
  .tab svg { width:26px; height:26px; }
  .tab .dot { position:absolute; top:-1px; right:14px; width:7px; height:7px; background:var(--red); border-radius:50%; }
  /* 通用 */
  .pg-title { color:var(--text); font-size:27px; font-weight:700; padding:18px 20px 4px; }
  .seg-row { display:flex; align-items:baseline; gap:14px; padding:12px 20px 2px; }
  .seg-row .seg { font-size:24px; font-weight:700; color:var(--text); cursor:pointer; }
  .seg-row .seg.dim { font-size:16px; font-weight:500; color:var(--muted); }
  .more-grid { position:absolute; top:14px; right:20px; color:var(--text); cursor:pointer; z-index:5; }
  .app-menu-trigger { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border:0; border-radius:10px; background:transparent; }
  .app-menu-trigger:hover, .app-menu-trigger[aria-expanded="true"] { background:var(--soft); }
  .app-menu-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .app-more-menu { position:absolute; top:54px; right:16px; z-index:180; min-width:224px; padding:6px; background:var(--panel); border:1px solid var(--border); border-radius:14px; box-shadow:0 12px 30px rgba(0,0,0,.18); }
  .app-more-menu[hidden] { display:none; }
  .app-more-menu a { display:flex; align-items:center; gap:10px; padding:13px 12px; border-radius:9px; text-decoration:none; color:var(--text-body); font-size:14px; white-space:nowrap; }
  .app-more-menu a:hover, .app-more-menu a:focus-visible { background:var(--selected); outline:none; }
  .app-more-menu a span:last-child { margin-left:auto; color:var(--muted); }
  .topbar-actions { display:flex; justify-content:space-between; align-items:center; padding:16px 20px 12px; }
  .topbar-actions .act { display:flex; align-items:center; gap:8px; color:var(--text); font-size:16.5px; font-weight:600; cursor:pointer; padding:8px 24px; border-radius:12px; }
  .topbar-actions .act:active { background:var(--border); }
  .divider-v { width:1px; height:22px; background:rgba(255,255,255,.18); }
  /* 搜索栏 */
  .searchbar { display:flex; align-items:center; gap:10px; padding:10px 20px 14px; }
  .search {
    flex:1; display:flex; align-items:center; gap:8px; background:var(--card);
    border-radius:12px; height:42px; padding:0 12px;
  }
  .search input { flex:1; background:none; border:none; outline:none; color:var(--text); font-size:15px; }
  .search input::placeholder { color:var(--subtle); }
  .search .in-ic { color:var(--accent); flex-shrink:0; cursor:pointer; }
  .filter-btn { color:var(--text); cursor:pointer; flex-shrink:0; }
  /* 卡片 */
  .card { background:var(--card); border-radius:16px; margin:0 16px 14px; padding:16px; color:var(--text); }
  /* ---- 首页 电站 ---- */
  .chip-row { display:flex; gap:9px; padding:0 20px 6px; }
  .chip {
    flex:1; background:var(--card); border-radius:12px; text-align:center; padding:9px 0;
    color:var(--muted); cursor:pointer; border:1px solid transparent;
  }
  .chip .n { font-size:20px; font-weight:700; }
  .chip .t { font-size:11.5px; margin-top:1px; }
  .chip.on { background:var(--selected); border-color:var(--accent); }
  .chip.on .n, .chip.on .t { color:var(--text); }
  .chip .n.red { color:var(--red); } .chip .n.green { color:var(--green); }
  .station { display:flex; gap:12px; position:relative; }
  .station .thumb { width:72px; height:72px; border-radius:12px; flex-shrink:0; overflow:hidden; }
  .station .body { flex:1; min-width:0; padding-right:48px; }
  .station .name { font-size:17px; font-weight:600; }
  .station .addr { font-size:11.5px; color:var(--muted); margin:3px 0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .station .stats { display:flex; gap:14px; color:var(--muted); font-size:12px; flex-wrap:wrap; }
  .station .stats span { display:inline-flex; align-items:center; gap:4px; }
  .tag {
    position:absolute; top:2px; right:0; font-size:11px; padding:2.5px 8px; border-radius:6px;
  }
  .tag.ok { background:rgba(48,209,88,.16); color:var(--green); }
  .tag.off { background:var(--border); color:var(--muted); }
  .tag.fault { background:rgba(255,159,10,.16); color:var(--amber); }
  /* ---- 运维 告警 ---- */
  .donut-wrap { display:flex; align-items:center; padding:8px 20px 4px; }
  .donut { position:relative; width:104px; height:104px; flex-shrink:0; }
  .donut svg { width:104px; height:104px; transform:rotate(-90deg); }
  .donut .c { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--text); }
  .donut .c .n { font-size:24px; font-weight:700; line-height:1.05; }
  .donut .c .t { font-size:11px; color:var(--muted); }
  .alarm-counts { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:10px 8px; padding-left:24px; }
  .alarm-counts .ac .n { font-size:20px; font-weight:700; color:var(--text); }
  .alarm-counts .ac .l { font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:5px; margin-top:2px; }
  .pdot { width:7px; height:7px; border-radius:50%; display:inline-block; }
  .alarm-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
  .alarm-head .ic { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .alarm-head .ti { font-size:17.5px; font-weight:700; }
  .kv { display:flex; margin-top:9px; font-size:13.5px; }
  .kv .k { width:82px; color:var(--muted); flex-shrink:0; }
  .kv .v { color:var(--text-body); }
  /* ---- 设备 ---- */
  .dev-toolbar { position:relative; display:flex; align-items:center; gap:12px; padding:10px 20px 14px; }
  .name-sort { display:flex; align-items:center; gap:5px; color:var(--text); font-size:17px; font-weight:600; cursor:pointer; white-space:nowrap; }
  .sort-menu {
    position:absolute; left:14px; top:46px; z-index:80; min-width:138px; padding:6px;
    background:var(--raised); border-radius:14px; border:.5px solid var(--border);
    box-shadow:0 14px 34px rgba(0,0,0,.65); display:none;
  }
  .sort-menu.on { display:block; animation:menuIn .16s ease both; }
  @keyframes menuIn { from{opacity:0; transform:translateY(-6px)} to{opacity:1; transform:none} }
  .sort-item { display:flex; align-items:center; justify-content:space-between; gap:18px;
    color:var(--text-body); font-size:15px; padding:11px 12px; border-radius:10px; cursor:pointer; }
  .sort-item:active { background:var(--divider); }
  .sort-item.on { color:var(--accent-text); }
  .sort-item .ck { opacity:0; flex-shrink:0; }
  .sort-item.on .ck { opacity:1; }
  .dev-empty { color:var(--subtle); font-size:14px; text-align:center; padding:40px 0; }
  .empty-tip { color:var(--muted); font-size:15px; text-align:center; padding:44px 0 30px; }
  .bridge-tip {
    display:flex; align-items:flex-start; gap:8px; margin:0 16px 10px; padding:9px 11px;
    border-radius:10px; font-size:11.5px; line-height:1.45;
    background:rgba(255,159,10,.13); border:1px solid rgba(255,159,10,.3); color:#ffcf8a;
  }
  .bridge-tip.stale { background:rgba(255,214,10,.1); border-color:rgba(255,214,10,.24); color:#e7d894; }
  .bridge-tip b { font-weight:600; color:#ffb340; }
  .bridge-tip.stale b { color:#ffd60a; }
  .bridge-tip svg { flex:none; margin-top:1px; }
  .bridge-tip .tip-go {
    flex:none; align-self:center; margin-left:2px; padding:4px 9px; border-radius:8px;
    font-size:11px; font-weight:600; text-decoration:none; white-space:nowrap;
    color:var(--surface); background:#ffb340; transition:opacity .15s;
  }
  .bridge-tip .tip-go:active { opacity:.7; }
  /* ---- 首页统计 ---- */
  .stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:12px 16px 14px; }
  .stat-grid .card { margin:0; }
  .stat-k .v { color:var(--text); font-size:22px; font-weight:700; }
  .stat-k .v i { font-style:normal; font-size:13px; color:var(--text-secondary); margin-left:2px; }
  .stat-k .l { color:var(--muted); font-size:13px; margin-top:6px; }
  .stat-chart, .stat-rank, .stat-social { padding:16px; }
  .sc-title { color:var(--text); font-size:17px; font-weight:700; margin-bottom:14px; }
  .seg-pills { display:flex; background:var(--panel); border-radius:22px; padding:4px; }
  .seg-pills span { flex:1; text-align:center; color:var(--text-secondary); font-size:14.5px; padding:8px 0; border-radius:18px; cursor:pointer; }
  .seg-pills span.on { background:var(--text-body); color:var(--panel); font-weight:600; }
  .date-row { display:flex; align-items:center; justify-content:space-between; margin:16px 0 4px; }
  .date-row > span { color:var(--text); font-size:17.5px; font-weight:600; display:flex; align-items:center; gap:6px; cursor:pointer; }
  .legend { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; margin:10px 0 2px; }
  .legend .ldot { width:7px; height:7px; border-radius:50%; background:var(--green); }
  #stat-bars svg { width:100%; display:block; }
  .rank-row { display:flex; align-items:center; gap:11px; padding:12px 0; }
  .rank-row + .rank-row { border-top:.5px solid var(--divider); }
  .rank-medal { width:26px; flex-shrink:0; text-align:center; color:var(--muted); font-size:16px; }
  .rank-thumb { width:40px; height:40px; border-radius:9px; overflow:hidden; flex-shrink:0; }
  .rank-name { flex:1; min-width:0; color:var(--text); font-size:15.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rank-val { color:var(--text); font-size:16px; font-weight:700; flex-shrink:0; }
  .rank-val i { font-style:normal; font-size:11px; color:var(--muted); font-weight:400; margin-left:2px; }
  .soc-grid { display:flex; gap:10px; }
  .soc { flex:1; border-radius:14px; padding:12px 12px 0; height:124px; position:relative; overflow:hidden; }
  .soc .v { color:var(--text); font-size:19px; font-weight:700; }
  .soc .v i { font-style:normal; font-size:11.5px; font-weight:400; color:var(--text-secondary); margin-left:1px; }
  .soc .sl { color:var(--muted); font-size:11px; margin-top:4px; position:relative; z-index:2; }
  .soc svg { position:absolute; left:0; right:0; bottom:0; width:100%; height:44px; }
  /* ---- 选择电站页 ---- */
  .picker {
    position:absolute; top:54px; left:0; right:0; bottom:0; background:var(--page); z-index:320;
    display:none; flex-direction:column;
  }
  .picker.open { display:flex; }
  .pk-top { display:flex; align-items:center; gap:12px; padding:8px 16px 12px; color:var(--text); }
  .pk-top .bk { cursor:pointer; display:flex; padding:4px; }
  .pk-top .ti { font-size:19px; font-weight:600; }
  .pk-search { flex:none; margin:0 16px 12px; }
  .pk-list { flex:1; overflow-y:auto; padding:0 16px 8px; scrollbar-width:none; }
  .pk-list::-webkit-scrollbar { display:none; }
  .pk-org, .pk-row { display:flex; align-items:center; gap:11px; padding:13px 2px; color:var(--text); font-size:15.5px; cursor:pointer; }
  .pk-org { font-weight:600; }
  .pk-row { padding-left:40px; }
  .pk-row .pnm { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .cbox { margin-left:auto; width:20px; height:20px; border-radius:5px; border:1.5px solid #55555c; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
  .cbox.on { background:#2f66e8; border-color:#2f66e8; }
  .cbox svg { display:none; }
  .cbox.on svg { display:block; }
  .pk-bottom { display:flex; gap:12px; padding:12px 16px 24px; }
  /* ---- 设置页（我的 → 设置） ---- */
  .set-list { flex:1; overflow-y:auto; padding:6px 16px 24px; scrollbar-width:none; }
  .set-list::-webkit-scrollbar { display:none; }
  .set-row { display:flex; align-items:center; gap:12px; background:var(--card); border-radius:16px; padding:17px 16px; color:var(--text); font-size:16.5px; margin-bottom:10px; cursor:pointer; }
  .set-row:active { background:var(--raised); }
  .set-row .sv { margin-left:auto; color:var(--muted); font-size:14px; display:flex; align-items:center; gap:5px; white-space:nowrap; }
  .set-row .reddot { width:7px; height:7px; background:var(--red); border-radius:50%; margin-left:auto; }
  .set-quit { margin:28px auto 0; display:block; width:72%; height:46px; border-radius:23px; background:var(--card); color:var(--red); font-size:16px; border:none; cursor:pointer; font-family:inherit; }
  .set-quit:active { background:var(--raised); }
  /* ---- 筛选抽屉 ---- */
  .f-label { color:var(--text-secondary); font-size:14px; margin:15px 0 10px; }
  .f-chips { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .fchip { text-align:center; padding:10px 4px; border-radius:12px; background:var(--raised); color:var(--text-body); font-size:14px; cursor:pointer; border:1px solid transparent; }
  .fchip.on { background:#1d3a75; color:var(--text); }
  .f-row { display:flex; align-items:center; gap:10px; }
  .f-row .dash { color:var(--subtle); }
  .f-date { flex:1; height:42px; background:var(--card); border:1px solid var(--border); border-radius:12px; color:var(--text); padding:0 12px; font-family:inherit; font-size:13.5px; color-scheme:var(--color-scheme); outline:none; }
  .f-in { width:100%; height:42px; background:var(--card); border:1px solid var(--border); border-radius:12px; color:var(--text); padding:0 12px; font-family:inherit; font-size:13.5px; outline:none; }
  .f-in::placeholder, .f-date::placeholder { color:var(--subtle); }
  .f-bottom { display:flex; gap:12px; margin-top:22px; }
  .btn.textbtn { background:none; color:var(--accent); }
  .sheet.scrollable { max-height:80%; overflow-y:auto; scrollbar-width:none; }
  .sheet.scrollable::-webkit-scrollbar { display:none; }
  /* 禁止浏览器自动填充把输入框变成白底 */
  input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    transition: background-color 99999s ease-out;
  }
  .dev-card { position:relative; }
  .dev-card .head { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
  .dev-card .head .nm { font-size:18px; font-weight:700; }
  .dev-card .link-row { display:flex; justify-content:space-between; align-items:center; border-top:.5px solid var(--border); margin-top:13px; padding-top:12px; }
  .dev-card .link-row a { color:var(--accent); font-size:14.5px; text-decoration:none; cursor:pointer; }
  /* ---- 服务 ---- */
  .grp-label { color:var(--muted); font-size:14px; padding:16px 20px 10px; }
  .grid-card { display:flex; padding:20px 8px 18px; }
  .grid-card .gitem { flex:1; display:flex; flex-direction:column; align-items:center; gap:9px; cursor:pointer; color:var(--text); font-size:13.5px; }
  .gicon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; position:relative; }
  .gicon .badge { position:absolute; top:-2px; right:-2px; width:8px; height:8px; background:var(--red); border-radius:50%; }
  /* ---- 我的 ---- */
  .profile { display:flex; align-items:center; gap:15px; padding:18px 16px; cursor:pointer; }
  .profile .avatar { width:58px; height:58px; border-radius:50%; overflow:hidden; flex-shrink:0; background:linear-gradient(135deg,#5e7ce2,#7fd0c4); display:flex; align-items:center; justify-content:center; }
  .profile .nm { font-size:20px; font-weight:700; color:var(--text); }
  .profile .ph { font-size:13.5px; color:var(--muted); margin-top:3px; }
  .profile .chev { margin-left:auto; color:var(--subtle); }
  .list-item { display:flex; align-items:center; gap:13px; padding:16px; color:var(--text); font-size:16.5px; }
  .list-item + .list-item { border-top:.5px solid var(--divider); }
  .list-item .chev { margin-left:auto; color:var(--subtle); }
  .list-item .reddot { width:7px; height:7px; background:var(--red); border-radius:50%; margin-left:auto; }
  .list-item .chev + .reddot { margin-left:8px; }
  .nbadge { margin-left:auto; background:var(--red); color:var(--text); font-size:12.5px; font-weight:600; padding:2px 9px; border-radius:20px; }
  .group { padding:0; }
  /* ---- 小源 ---- */
  .xiaoyuan {
    position:absolute; top:54px; left:0; right:0; bottom:0; background:var(--page); z-index:300; display:none;
    flex-direction:column;
  }
  .xiaoyuan.open { display:flex; }
  .xy-top { position:relative; display:flex; align-items:center; padding:8px 18px 10px; color:var(--text); }
  .xy-top .bk { cursor:pointer; padding:6px; display:flex; }
  .xy-top .ti { font-size:19px; font-weight:600; flex:1; text-align:center; margin-right:34px; }
  .xy-top .ric { display:flex; gap:20px; position:absolute; right:18px; top:50%; transform:translateY(-50%); }
  .xy-hero { text-align:center; padding:30px 16px 22px; }
  .orb {
    width:86px; height:86px; margin:0 auto 14px; position:relative;
    filter:drop-shadow(0 0 34px rgba(80,120,255,.4));
  }
  .xy-ball-art, .xy-ball-art > svg { display:block; width:100%; height:100%; }
  .xy-spin { transform-box:view-box; transform-origin:50% 50%; animation:xySpin 16s linear infinite; }
  @keyframes xySpin { to { transform:rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .xy-spin { animation:none; } }
  .xy-hero .hi { color:var(--text); font-size:23px; font-weight:700; }
  .xy-hero .sub { color:var(--muted); font-size:13.5px; margin-top:8px; }
  .xy-welcome { padding:0 16px 16px; }
  .xy-welcome-controls { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
  .xy-welcome-switch { display:flex; gap:3px; border-radius:14px; padding:3px; background:var(--soft); }
  .xy-welcome button { font:inherit; cursor:pointer; }
  .xy-welcome button:focus-visible { outline:2px solid var(--accent-text); outline-offset:2px; }
  .xy-welcome-switch button { border:0; border-radius:11px; background:transparent; color:var(--text-secondary); font-size:13px; padding:8px 12px; }
  .xy-welcome-switch button[aria-pressed="true"] { background:var(--card); color:var(--text); font-weight:600; }
  .xy-welcome .xy-refresh { border:0; background:none; color:var(--accent-text); padding:8px 4px; font-size:12px; }
  .xy-refresh[hidden] { display:none; }
  .xy-sugs { display:grid; gap:8px; }
  .xy-welcome .xy-sug {
    display:grid; grid-template-columns:32px minmax(0,1fr) 10px; gap:10px; align-items:center;
    min-height:62px; width:100%; text-align:left; padding:9px 12px;
    border:1px solid var(--border); border-radius:14px; background:var(--card); color:var(--text);
  }
  .xy-sug::after { content:""; width:6px; height:6px; border-top:1px solid var(--muted); border-right:1px solid var(--muted); transform:rotate(45deg); }
  .xy-welcome .xy-sug:hover, .xy-welcome .xy-sug:active { background:var(--raised); }
  .xy-sug-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:var(--selected); color:var(--accent-text); font-size:17px; }
  .xy-sug-copy { display:grid; gap:2px; }
  .xy-sug-copy strong { font-size:14px; font-weight:600; }
  .xy-sug-copy > span { color:var(--text-secondary); font-size:12.5px; line-height:1.4; }
  .xy-bottom .xy-welcome-skill { display:none; }
  .xy-intro:not(.hide) ~ .xy-bottom .om-compact-heading {
    flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain;
    scrollbar-width:thin; scrollbar-color:var(--border) transparent; padding:2px;
  }
  .xy-intro:not(.hide) ~ .xy-bottom .om-compact-label { min-height:32px; white-space:nowrap; }
  .xy-intro:not(.hide) ~ .xy-bottom .xy-welcome-skill { display:inline-flex; }
  .xy-welcome-skill:hover { background:var(--selected); }
  /* 对话区 */
  .xy-intro { flex:1; min-height:0; overflow-y:auto; scrollbar-width:none; }
  .xy-intro::-webkit-scrollbar { display:none; }
  .xy-intro.hide { display:none; }
  .xy-chat { flex:1; overflow-y:auto; overflow-x:hidden; padding:8px 16px 4px; display:none; scrollbar-width:none; }
  .xy-chat::-webkit-scrollbar { display:none; }
  .xy-chat.on { display:block; }
  .msg { display:flex; gap:9px; margin-bottom:16px; align-items:flex-start; animation:msgIn .28s ease both; }
  @keyframes msgIn { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }
  .bubble {
    max-width:78%; padding:11px 14px; border-radius:16px; font-size:15px; line-height:1.55;
    color:var(--text-body); background:var(--card); border-top-left-radius:5px; word-break:break-word; white-space:pre-wrap;
  }
  .msg.user { flex-direction:row-reverse; }
  .bubble.markdown-body { white-space:normal; overflow-wrap:anywhere; }
  .markdown-body > :first-child { margin-top:0; }
  .markdown-body > :last-child { margin-bottom:0; }
  .markdown-body p { margin:0 0 12px; }
  .markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6 { font-size:1.08em; line-height:1.5; margin:18px 0 10px; }
  .markdown-body ul,.markdown-body ol { padding-left:23px; margin:10px 0; }
  .markdown-body li { margin:5px 0; }
  .markdown-body blockquote { margin:12px 0; padding-left:12px; border-left:3px solid var(--accent); color:var(--text-secondary); }
  .markdown-body code { font-size:.88em; background:var(--panel); padding:2px 4px; border-radius:4px; }
  .markdown-body pre { overflow-x:auto; padding:12px; background:var(--panel); border-radius:9px; white-space:pre; }
  .markdown-body pre code { padding:0; background:none; }
  .markdown-body a { color:var(--accent-text); }
  .markdown-table-scroll { max-width:100%; overflow-x:auto; margin:12px 0; border:1px solid var(--divider); border-radius:8px; }
  .markdown-body table { border-collapse:collapse; width:100%; font-size:13px; }
  .markdown-body th,.markdown-body td { padding:9px 11px; border-bottom:1px solid var(--divider); border-right:1px solid var(--divider); min-width:75px; white-space:normal; word-break:normal; }
  .markdown-body th { background:var(--panel); font-weight:600; text-align:left; }
  .markdown-body tr:last-child td { border-bottom:0; }
  .markdown-body th:last-child,.markdown-body td:last-child { border-right:0; }
  .msg.xy-timed-answer { flex-direction:column; gap:5px; }
  .xy-answer-status { color:var(--text-secondary); font-size:12px; }
  .xy-answer-status summary { display:flex; align-items:center; gap:7px; list-style:none; cursor:pointer; min-height:24px; }
  .xy-answer-status summary::-webkit-details-marker { display:none; }
  .xy-answer-status summary svg { width:18px; height:18px; flex:none; }
  .xy-answer-status summary::after { content:""; width:6px; height:6px; margin-left:3px; border:solid currentColor; border-width:0 1.4px 1.4px 0; transform:translateY(-2px) rotate(45deg); }
  .xy-answer-status[open] summary::after { transform:translateY(1px) rotate(225deg); }
  .xy-answer-detail { padding:2px 0 4px 25px; font-size:11px; }
  .msg.ai .bubble:not(.typing) { width:100%; max-width:100%; min-width:0; }
  .msg.user .bubble { background:linear-gradient(135deg,#2f66e8,#2450c4); color:var(--text); border-top-left-radius:16px; border-top-right-radius:5px; }
  .msg .bmeta { font-size:11px; color:#5a5a60; margin-top:6px; }
  /* 小源内联控制卡：储能 SOC 区间 */
  .bubble .soc-intro { font-size:13.5px; color:var(--text-secondary); line-height:1.55; margin-bottom:9px; }
  .soc-card { background:var(--panel); border:1px solid rgba(58,122,254,.34); border-radius:12px; padding:10px 11px 11px; }
  .soc-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:9px; }
  .soc-h b { font-size:12.5px; color:var(--text); font-weight:600; }
  .soc-h span { font-size:10.5px; color:var(--subtle); max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .soc-line { display:grid; grid-template-columns:56px 1fr 38px; align-items:center; gap:8px; margin-bottom:7px; }
  .soc-line > span { font-size:11px; color:var(--muted); }
  .soc-line > b { font-size:12px; color:var(--accent); text-align:right; font-variant-numeric:tabular-nums; }
  .soc-line input[type=range] { -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:3px;
    background:linear-gradient(90deg,var(--accent),#0a84ff); outline:none; }
  .soc-line input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:15px; height:15px; border-radius:50%;
    background:var(--text); border:2.5px solid var(--accent); box-shadow:0 1px 5px rgba(0,0,0,.5); cursor:pointer; }
  .soc-presets { display:flex; gap:6px; margin:2px 0 9px; flex-wrap:wrap; }
  .soc-presets span { font-size:10.5px; color:var(--muted); border:1px solid var(--hover); border-radius:6px; padding:2px 7px; cursor:pointer; }
  .soc-presets span:active { background:rgba(58,122,254,.2); }
  .soc-ok { width:100%; border:0; border-radius:9px; padding:8px 0; font-size:12.5px; font-weight:600; color:var(--text);
    background:linear-gradient(135deg,#2f66e8,#2450c4); cursor:pointer; }
  .soc-ok:active { transform:scale(.99); }
  /* 小源内联功率曲线卡：光伏 / 储能 / 负载 / 电网 实时曲线 */
  .bubble.wide { max-width:100%; flex:1; min-width:0; }
  .pw-card { background:var(--panel); border:1px solid rgba(48,209,88,.26); border-radius:12px; padding:10px 11px 9px; }
  .pw-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:8px; }
  .pw-h b { font-size:12.5px; color:var(--text); font-weight:600; }
  .pw-h span { font-size:10.5px; color:var(--subtle); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
  .pw-vals { display:grid; grid-template-columns:1fr 1fr; gap:7px 10px; margin-bottom:8px; }
  .pw-vals > div { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); min-width:0; }
  .pw-vals i { width:7px; height:7px; border-radius:2px; flex:none; }
  .pw-vals b { font-size:11.5px; color:var(--text-body); font-variant-numeric:tabular-nums; margin-left:auto; white-space:nowrap; font-weight:600; }
  .pw-chart svg { display:block; width:100%; height:auto; }
  .pw-plot { position:relative; margin-top:2px; touch-action:pan-y; cursor:crosshair; }
  .pw-overlay { position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .12s; }
  .pw-overlay.on { opacity:1; }
  .pw-vline { position:absolute; top:2px; bottom:12px; width:1px; background:rgba(255,255,255,.34); }
  .pw-pt { position:absolute; width:7px; height:7px; border-radius:50%; transform:translate(-50%,-50%);
    box-shadow:0 0 0 2px rgba(10,10,14,.92); }
  .pw-info { display:none; margin-top:7px; border-top:1px solid var(--card); padding-top:8px; }
  .pw-info.on { display:block; animation:pwInfoIn .16s ease both; }
  @keyframes pwInfoIn { from{opacity:0; transform:translateY(-3px)} to{opacity:1; transform:none} }
  .pwi-t { display:flex; align-items:baseline; gap:6px; font-size:10.5px; color:var(--muted); margin-bottom:6px; }
  .pwi-t b { font-size:12px; color:var(--text); font-variant-numeric:tabular-nums; font-weight:600; }
  .pwi-grid { display:grid; grid-template-columns:1fr 1fr; gap:4px 10px; margin-bottom:7px; }
  .pwi-grid > div { display:flex; align-items:center; gap:5px; font-size:10.5px; color:var(--muted); min-width:0; }
  .pwi-grid i { width:6px; height:6px; border-radius:2px; flex:none; }
  .pwi-grid b { margin-left:auto; font-size:11px; color:var(--text-body); font-variant-numeric:tabular-nums; font-weight:600; }
  .pw-why { font-size:11px; line-height:1.65; color:var(--text-secondary); background:rgba(58,122,254,.09);
    border-left:2px solid var(--accent); border-radius:0 7px 7px 0; padding:6px 9px; }
  .pw-why b { color:var(--text-body); font-weight:600; }
  .pw-empty { color:var(--subtle); font-size:11.5px; text-align:center; padding:26px 0; }
  /* 图表类型切换（曲线 / 柱状 / 面积 / 表格） */
  .pw-tabs { display:flex; gap:4px; margin:0 0 8px; flex-wrap:wrap; }
  .pw-tabs span { font-size:10.5px; color:var(--muted); padding:3px 9px; border-radius:7px;
    border:1px solid var(--raised); cursor:pointer; transition:.13s; user-select:none; }
  .pw-tabs span:hover { color:var(--text-secondary); border-color:#3a4152; }
  .pw-tabs span.on { color:#08130c; background:var(--green); border-color:var(--green); font-weight:600; }
  .pw-tWrap { max-height:152px; overflow-y:auto; scrollbar-width:thin; }
  .pw-table { width:100%; border-collapse:collapse; font-size:10.5px; font-variant-numeric:tabular-nums; }
  .pw-table th { color:var(--subtle); font-weight:500; padding:3px 5px; border-bottom:1px solid var(--raised); text-align:right; white-space:nowrap; }
  .pw-table td { color:var(--text-secondary); padding:3px 5px; text-align:right; border-bottom:1px solid var(--divider); white-space:nowrap; }
  .pw-table th:first-child, .pw-table td:first-child { text-align:left; color:var(--subtle); }
  .pw-table tr:last-child td { border-bottom:none; }
  .pw-foot { display:flex; align-items:center; gap:5px; font-size:10px; color:var(--subtle); margin-top:5px; }
  .pw-dot { width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 6px var(--green); animation:pwPulse 1.6s ease-in-out infinite; }
  @keyframes pwPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
  .soc-note { font-size:10px; color:var(--subtle); margin-top:7px; line-height:1.45; }
  /* ===== 小源 · 参数面板卡（所有可设置参数） ===== */
  .pm-card { background:var(--panel); border:1px solid rgba(58,122,254,.34); border-radius:12px; padding:10px 11px 11px; }
  .pm-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:7px; }
  .pm-h b { font-size:12.5px; color:var(--text); font-weight:600; }
  .pm-h span { font-size:10.5px; color:var(--subtle); max-width:132px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pm-sec { font-size:9.5px; color:var(--subtle); letter-spacing:.5px; margin:9px 0 6px; }
  .pm-row { display:grid; grid-template-columns:60px 1fr 48px; align-items:center; gap:8px; margin-bottom:8px; }
  .pm-row > span { font-size:10.5px; color:var(--muted); }
  .pm-row > b { font-size:11px; color:var(--accent); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; }
  .pm-inp { width:100%; background:var(--card); border:1px solid var(--hover); border-radius:7px; color:var(--text);
    font-size:12px; padding:5px 7px; outline:none; font-family:inherit; min-width:0; }
  .pm-inp:focus { border-color:var(--accent); }
  .pm-rng { -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:3px; background:var(--hover); outline:none; }
  .pm-rng::-webkit-slider-thumb { -webkit-appearance:none; width:14px; height:14px; border-radius:50%; background:var(--accent); border:2px solid var(--surface); }
  .pm-seg { display:flex; gap:5px; flex-wrap:wrap; grid-column:2 / -1; }
  .pm-seg span { font-size:10.5px; color:var(--muted); border:1px solid var(--hover); border-radius:7px; padding:4px 8px; cursor:pointer; white-space:nowrap; }
  .pm-seg span.on { color:var(--text); background:#1d3a75; border-color:var(--accent); }
  .pm-d { color:var(--muted) !important; font-weight:400 !important; text-align:left !important; font-size:11.5px; }
  .pm-ok { width:100%; border:0; border-radius:9px; padding:8px 0; font-size:12.5px; font-weight:600; color:var(--text);
    background:linear-gradient(135deg,#2f66e8,var(--accent)); margin-top:5px; font-family:inherit; cursor:pointer; }
  .pm-ok:active { transform:scale(.99); }
  .pm-note { font-size:10px; color:var(--subtle); margin-top:7px; line-height:1.45; }
  /* 单参数聚焦调节卡（SOC 同款交互） */
  .pm-big { display:flex; align-items:baseline; gap:6px; margin:2px 0 9px; }
  .pm-big b { font-size:26px; color:var(--text); font-weight:600; font-variant-numeric:tabular-nums; }
  .pm-big i { font-size:12px; color:var(--subtle); font-style:normal; }
  .pm-e-rng { -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:3px; background:var(--hover); outline:none; margin:2px 0 4px; }
  .pm-e-rng::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; border-radius:50%; background:var(--accent); border:2px solid var(--surface); }
  .pm-pick { max-width:126px; font-size:10.5px; padding:3px 5px; height:24px; }
  .pm-tabs { display:flex; gap:4px; margin:6px 0 8px; padding-bottom:7px; border-bottom:1px solid var(--raised); }
  .pm-tabs span { font-size:10.5px; color:#8e94a3; padding:4px 8px; border-radius:7px; cursor:pointer; white-space:nowrap; }
  .pm-tabs span.on { color:var(--text); background:#1d3a75; }
  .pm-pane { display:none; }
  .pm-pane.on { display:block; }
  .pm-sel { width:100%; background:var(--card); border:1px solid var(--hover); border-radius:7px; color:var(--text);
    font-size:11.5px; padding:5px 6px; outline:none; font-family:inherit; min-width:0; -webkit-appearance:none; appearance:none; }
  .pm-sel:focus { border-color:var(--accent); }
  .pm-date { display:flex; align-items:center; gap:4px; grid-column:2 / -1; }
  .pm-date i { font-size:10px; color:var(--subtle); font-style:normal; }
  .pm-inp.pm-sm { width:46px; padding:4px 4px; text-align:center; font-size:11.5px; }
  .typing { display:flex; gap:4px; padding:13px 14px; }  .typing i { width:6px; height:6px; border-radius:50%; background:#7a7a82; animation:blink 1.1s infinite; }
  .typing i:nth-child(2){ animation-delay:.18s } .typing i:nth-child(3){ animation-delay:.36s }
  @keyframes blink { 0%,60%,100%{opacity:.25; transform:translateY(0)} 30%{opacity:1; transform:translateY(-3px)} }
  .xy-bottom { margin-top:auto; padding:0 16px 22px; position:relative;
    background:var(--bottom-fade);
  }
  .xy-new-chat { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%; background:transparent; color:var(--text-secondary); cursor:pointer; }
  .xy-input-wrap { background:var(--composer); border:1px solid var(--border); border-radius:24px; padding:7px; }
  .xy-input-wrap:focus-within { border-color:rgba(111,157,255,.35); }
  .xy-input-wrap input { flex:1; min-width:0; width:0; height:38px; background:none; border:none; outline:none; color:var(--text); font:inherit; font-size:15px; }
  .xy-input-wrap input::placeholder { color:var(--subtle); }
  .xy-input-row { display:flex; align-items:center; gap:6px; }
  .xy-tool { flex:none; width:36px; height:36px; border-radius:50%; background:transparent; border:0; display:flex; align-items:center; justify-content:center; color:var(--text-secondary); cursor:pointer; padding:0; touch-action:manipulation; }
  .xy-tool:hover, .xy-new-chat:hover { background:var(--divider); }
  .xy-tool:focus-visible, .xy-new-chat:focus-visible { outline:2px solid var(--accent-text); outline-offset:2px; }
  .xy-tool.send { color:var(--text); background:var(--accent); }
  /* ===== 模型设置抽屉 ===== */
  .sheet-mask { position:absolute; inset:0; background:rgba(0,0,0,.55); z-index:480; opacity:0; pointer-events:none; transition:opacity .22s; }
  .sheet-mask.on { opacity:1; pointer-events:auto; }
  .sheet { position:absolute; left:0; right:0; bottom:0; z-index:490; background:var(--panel); border-radius:24px 24px 0 0;
    padding:18px 18px 26px; transform:translateY(102%); transition:transform .28s cubic-bezier(.3,.9,.3,1);
    box-shadow:0 -12px 40px rgba(0,0,0,.7); border-top:1px solid var(--border); }
  .sheet.on { transform:translateY(0); }
  .sheet-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
  .sheet-title { color:var(--text); font-size:17px; font-weight:700; }
  .sheet-close { color:var(--muted); cursor:pointer; padding:4px; }
  .src-row { display:flex; gap:10px; margin-bottom:16px; }
  .src-card { flex:1; border:1px solid var(--border); border-radius:14px; padding:12px; cursor:pointer; background:var(--card); }
  .src-card.sel { border-color:var(--accent); background:var(--selected); }
  .src-card .sc-title { color:var(--text); font-size:14.5px; font-weight:600; }
  .src-card .sc-sub { color:var(--muted); font-size:11.5px; margin-top:3px; line-height:1.4; }
  .src-card .sc-badge { color:var(--accent-text); font-size:11.5px; margin-top:8px; }
  .sheet-label { color:var(--muted); font-size:12.5px; margin:2px 0 8px; }
  .key-row { display:flex; align-items:center; gap:10px; background:var(--card); border-radius:12px; padding:0 12px; height:44px; margin-bottom:8px; border:1px solid var(--border); }
  .key-row input { flex:1; background:none; border:none; outline:none; color:var(--text); font-size:14px; letter-spacing:.5px; }
  .key-row input::placeholder { color:var(--subtle); }
  .key-eye { color:var(--accent); font-size:13px; cursor:pointer; }
  .sheet-hint { color:var(--subtle); font-size:11.5px; line-height:1.5; margin-bottom:14px; }
  .model-pills { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
  .mpill { color:var(--text-secondary); font-size:12.5px; padding:7px 12px; border-radius:10px; background:var(--card); border:1px solid var(--border); cursor:pointer; }
  .mpill.on { color:var(--text); background:var(--selected); border-color:var(--accent); }
  .sheet-actions { display:flex; gap:9px; }
  .btn { flex:1; height:44px; border-radius:12px; border:none; font-size:14.5px; font-weight:600; cursor:pointer; font-family:inherit; }
  .btn.ghost { background:var(--raised); color:var(--text-body); }
  .btn.primary { background:#2f66e8; color:var(--text); }
  .sheet-status { text-align:center; font-size:12.5px; margin-top:10px; min-height:16px; }
  /* ===== 小源提问范围 ===== */
  .scope-list { max-height:360px; overflow-y:auto; margin:2px -6px 0; scrollbar-width:none; }
  .scope-list::-webkit-scrollbar { display:none; }
  .scope-row { display:flex; align-items:center; gap:10px; padding:13px 12px; border-radius:12px; cursor:pointer; }
  .scope-row:active { background:var(--raised); }
  .scope-row.on { background:var(--selected); }
  .scope-row .sn { flex:1; min-width:0; color:var(--text); font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .scope-row .ss { flex-shrink:0; font-size:11.5px; padding:2px 7px; border-radius:8px; }
  .scope-row .ss.ok { color:var(--green); background:rgba(48,209,88,.14); }
  .scope-row .ss.off { color:var(--muted); background:rgba(142,142,147,.16); }
  .scope-row .tick { flex-shrink:0; width:16px; }
  /* 实时功率卡 */
  .live-badge {
    display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:600; color:var(--green);
    background:rgba(48,209,88,.14); border:1px solid rgba(48,209,88,.3);
    padding:2px 7px; border-radius:6px; margin-left:8px; vertical-align:2px; letter-spacing:.5px;
  }
  .live-badge::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--green); animation:pulse 1.4s infinite; }
  @keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.25; } }
  #live-chart svg { display:block; width:100%; height:auto; }
  .tag.live { background:rgba(48,209,88,.16); color:var(--green); }
  .live-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--green); margin-left:6px; vertical-align:3px; box-shadow:0 0 7px var(--green); }
  .st-power { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--green); margin-top:6px; }
  /* 悬浮小源球按钮 */
  .xy-ball-fab {
    position:absolute; left:323px; top:626px; width:56px; height:56px; border-radius:50%; z-index:250;
    filter:drop-shadow(0 4px 16px rgba(0,0,0,.65));
    cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none;
  }
  .xy-ball-fab:active { cursor:grabbing; }
  .bubble .retry { color:var(--accent-text); cursor:pointer; margin-left:10px; font-size:13.5px; border-bottom:1px solid rgba(111,157,255,.5); }
  /* 电站缩略图 */
  .house-thumb { width:100%; height:100%; }
  .toast {
    position:absolute; left:50%; bottom:130px; transform:translateX(-50%);
    background:rgba(50,50,54,.95); color:var(--text); font-size:13.5px; padding:9px 18px;
    border-radius:20px; z-index:400; opacity:0; transition:opacity .25s; pointer-events:none; white-space:nowrap;
  }
  .toast.show { opacity:1; }
  :root[data-theme="light"] .screen .toast {
    background:var(--card); color:var(--text);
    border:1px solid var(--border);
    box-shadow:0 4px 18px rgba(34,52,83,.14);
  }
  /* ===== 电站详情页（点击首页电站卡弹出） ===== */
  .pdetail { position:absolute; top:54px; left:0; right:0; bottom:0; z-index:150; display:none;
    background:var(--page); overflow-y:auto; overflow-x:hidden; scrollbar-width:none; }
  .pdetail::-webkit-scrollbar { display:none; }
  .pdetail.show { display:block; animation:pdIn .18s ease both; }
  @keyframes pdIn { from { transform:translateX(26px); opacity:.4; } to { transform:none; opacity:1; } }
  .pd-top { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:13px; padding:11px 15px;
    background:rgba(0,0,0,.86); backdrop-filter:blur(14px); }
  .pd-back { cursor:pointer; display:flex; flex:none; }
  .pd-top .nm { flex:1; font-size:19px; font-weight:700; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pd-alarm { display:flex; align-items:center; gap:9px; margin:2px 12px 10px; padding:12px 12px;
    background:linear-gradient(180deg,#4b1d22,#381317); border-radius:12px; cursor:pointer; }
  .pd-alarm .lab { background:#e0343c; color:var(--text); font-size:10.5px; border-radius:5px; padding:2px 7px; font-weight:600; flex:none; }
  .pd-alarm .tx { flex:1; color:#ff7b7b; font-size:13px; font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pd-weather { display:flex; align-items:center; gap:6px; padding:2px 16px 0; color:var(--text-body); font-size:14px; }
  .pd-weather .rt { margin-left:auto; background:var(--border); border-radius:14px; padding:4px 11px; font-size:11.5px; color:var(--text-secondary); display:flex; align-items:center; gap:5px; }
  .pd-flow { position:relative; height:296px; margin:0 10px; }
  .pd-flow svg.wire { position:absolute; inset:0; width:100%; height:100%; }
  .pd-node { position:absolute; width:78px; text-align:center; transform:translate(-50%,-50%); }
  .pd-node .lb { margin-top:5px; font-size:12.5px; color:var(--text-secondary); }
  .pd-call { position:absolute; right:4px; top:2px; width:40px; height:40px; border-radius:50%;
    background:var(--border); display:flex; align-items:center; justify-content:center; cursor:pointer; }
  .pd-sec { margin:10px 12px 0; background:var(--panel); border-radius:14px; padding:13px 14px 15px; }
  .pd-sec .t { font-size:14.5px; font-weight:700; color:var(--text); margin-bottom:10px; }
  .pd-price-big { font-size:24px; font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; line-height:1.15; }
  .pd-price-big small { font-size:12px; color:var(--muted); font-weight:500; }
  .pd-price-sub { font-size:11px; color:var(--muted); margin:4px 0 9px; }
  .pd-ftref { color:var(--subtle); font-size:12px; text-decoration:underline dashed rgba(109,115,128,.7); text-underline-offset:5px; margin-bottom:8px; }
  .pd-chart svg { display:block; width:100%; height:auto; }
  .pd-note { font-size:10px; color:#4d5462; margin-top:6px; }
  .pd-soc3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; }
  .pd-soc3 > div { border-radius:12px; padding:12px 10px 40px; position:relative; overflow:hidden; min-width:0; }
  .pd-soc3 .v { font-size:16px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
  .pd-soc3 .v small { font-size:10px; color:var(--muted); font-weight:500; }
  .pd-soc3 .l { font-size:10.5px; color:var(--muted); margin-top:4px; }
  .pd-soc3 svg { position:absolute; left:0; right:0; bottom:0; width:100%; height:38px; opacity:.95; }
  .pd-tab { position:sticky; bottom:0; display:flex; background:rgba(8,8,10,.95); border-top:.5px solid var(--border);
    backdrop-filter:blur(16px); margin-top:12px; }
  .pd-tab > div { flex:1; text-align:center; padding:9px 0 15px; font-size:10.5px; color:var(--subtle); }
  .pd-tab > div.on { color:var(--accent); }
  .pd-tab .ic { display:flex; align-items:center; justify-content:center; margin-bottom:3px; }
  /* ============ 分享体验引导层（首次访问才出现） ============ */
  .intro-mask {
    position:fixed; inset:0; z-index:900; display:none; align-items:center; justify-content:center;
    padding:20px; background:rgba(4,6,12,.78); backdrop-filter:blur(14px);
  }
  .intro-mask.show { display:flex; }
  .intro-card {
    width:100%; max-width:430px; min-width:0; max-height:92vh; overflow-y:auto; color:var(--text); scrollbar-width:none;
    background:linear-gradient(168deg,#151b28 0%,#0b0e15 58%,var(--surface) 100%);
    border:1px solid rgba(110,150,255,.24); border-radius:24px; padding:24px 22px 20px;
    box-shadow:0 28px 80px rgba(0,0,0,.7), inset 0 1px 0 var(--divider);
    animation:introIn .32s cubic-bezier(.2,.9,.25,1) both;
  }
  .intro-card::-webkit-scrollbar { display:none; }
  @keyframes introIn { from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:none; } }
  .intro-top { display:flex; gap:13px; align-items:flex-start; margin-bottom:14px; }
  .intro-logo {
    width:42px; height:42px; border-radius:13px; flex:none;
    display:flex; align-items:center; justify-content:center;
    background:linear-gradient(150deg,#ffcf5c,#ff8a1f); box-shadow:0 8px 22px rgba(255,150,30,.32);
  }
  .intro-badge {
    display:inline-block; font-size:11px; letter-spacing:.4px; color:#8fb2ff;
    background:rgba(58,122,254,.14); border:1px solid rgba(58,122,254,.3);
    border-radius:999px; padding:3px 9px; margin-bottom:7px;
  }
  .intro-card h2 { font-size:20px; font-weight:700; line-height:1.35; }
  .intro-desc { font-size:13px; line-height:1.7; color:#98a3b8; margin-bottom:14px; }
  .intro-desc b { color:#dbe4f5; font-weight:600; }
  .intro-list { list-style:none; display:flex; flex-direction:column; gap:9px; margin-bottom:13px; }
  .intro-list li { display:flex; gap:9px; font-size:12.5px; line-height:1.55; color:#b4bfd2; min-width:0; }
  .intro-list li span { flex:1; min-width:0; overflow-wrap:anywhere; }
  .intro-desc, .intro-note, .intro-foot, .intro-card h2 { overflow-wrap:anywhere; }
  .intro-list i {
    flex:none; width:18px; height:18px; border-radius:50%; font-style:normal;
    font-size:11px; font-weight:700; color:var(--surface); background:#5b8dff;
    display:flex; align-items:center; justify-content:center; margin-top:1px;
  }
  .intro-note {
    font-size:11.5px; line-height:1.6; color:#c9a86a; background:rgba(255,159,10,.09);
    border:1px solid rgba(255,159,10,.22); border-radius:11px; padding:9px 11px; margin-bottom:16px;
  }
  .intro-btn-primary {
    display:block; width:100%; border:0; cursor:pointer; font-family:inherit;
    background:linear-gradient(150deg,#4d8bff,#2563eb); color:var(--text);
    font-size:15px; font-weight:600; padding:13px; border-radius:13px;
    box-shadow:0 10px 26px rgba(37,99,235,.35); transition:transform .12s, opacity .12s;
  }
  .intro-btn-primary:active { transform:scale(.99); opacity:.9; }
  .intro-btn-ghost {
    display:block; width:100%; border:0; background:transparent; cursor:pointer;
    font-family:inherit; color:#8e97a8; font-size:13px; padding:11px 0 4px;
  }
  .intro-foot { text-align:center; font-size:11px; color:#5c6474; line-height:1.6; margin-top:6px; }

  /* ============ 小源：语音输入 / 图片输入 ============ */
  .xy-iw.voice #xy-input { display:none; }
  .xy-voice-hold {
    display:none; flex:1; min-width:0; align-items:center; justify-content:center; gap:8px; height:38px;
    border-radius:12px; background:rgba(58,122,254,.10);
    border:1px solid rgba(58,122,254,.22); color:var(--accent-text); font-size:13px;
    cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
  }
  .xy-iw.voice .xy-voice-hold { display:flex; }
  .xy-voice-hold.rec { background:rgba(255,69,58,.18); border-color:rgba(255,69,58,.5); color:#ff9a92; transform:scale(.985); }
  .xy-rec { display:none; padding:10px 2px 6px; }
  .xy-rec.on { display:block; }
  .xy-wave { display:flex; align-items:flex-end; justify-content:center; gap:4px; height:40px; }
  .xy-wave i { width:4px; border-radius:3px; background:linear-gradient(180deg,#7aa8ff,var(--accent)); height:8px; animation:wv .85s ease-in-out infinite; }
  @keyframes wv { 0%,100%{ height:7px; opacity:.5 } 50%{ height:30px; opacity:1 } }
  .xy-rec-t { text-align:center; font-size:12.5px; color:#c7d2e6; margin-top:8px; }
  .xy-rec-txt { text-align:center; font-size:12.5px; color:var(--accent-text); margin-top:6px; line-height:1.45; min-height:17px; max-height:52px; overflow:hidden; }
  .xy-attach { display:flex; gap:8px; flex-wrap:wrap; }
  .xy-attach:not(:empty) { padding:5px 5px 10px; }
  .xy-attach:empty { display:none; }
  .xy-thumb { position:relative; width:54px; height:54px; border-radius:11px; overflow:hidden; border:1px solid rgba(255,255,255,.16); flex:none; }
  .xy-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
  .xy-thumb i { position:absolute; top:0; right:0; width:18px; height:18px; border-radius:0 10px 0 9px; background:rgba(0,0,0,.75); color:var(--text); font-style:normal; font-size:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
  .msg .bubble .bubble-imgs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
  .msg .bubble .bubble-imgs img { width:112px; border-radius:10px; display:block; }

  /* ============ 首页电站卡：iOS 风格滑动 ============ */
  .sw-row { position:relative; margin:0 16px 14px; border-radius:16px; overflow:hidden; }
  .sw-row .card.station {
    margin:0; position:relative; z-index:2; background:var(--card);
    transition:transform .24s cubic-bezier(.25,.85,.3,1); touch-action:pan-y; will-change:transform;
  }
  .sw-row.drag .card.station { transition:none; }
  .sw-acts { position:absolute; right:0; top:0; bottom:0; width:92px; display:flex; align-items:center; justify-content:center; background:var(--red); border-radius:0 16px 16px 0; }
  .sw-del { color:var(--text); font-size:13px; display:flex; flex-direction:column; align-items:center; gap:5px; cursor:pointer; }
  .sw-row.open .card.station { transform:translateX(-92px); }
  .sw-hint { animation:swHint 1.1s ease 1; }
  @keyframes swHint { 0%{transform:translateX(0)} 45%{transform:translateX(-26px)} 100%{transform:translateX(0)} }

  /* 删除确认 */
  .cf-mask { position:absolute; inset:0; background:rgba(0,0,0,.55); z-index:520; display:none; align-items:center; justify-content:center; padding:0 34px; }
  .cf-mask.on { display:flex; }
  .cf-box { width:100%; background:#1e1e22; border-radius:18px; overflow:hidden; text-align:center; color:var(--text); }
  .cf-box .t { padding:20px 18px 14px; font-size:14.5px; line-height:1.5; }
  .cf-box .t b { color:#ff6b6b; }
  .cf-box .b { display:flex; border-top:1px solid var(--border); }
  .cf-box .b span { flex:1; padding:14px 0; font-size:15px; cursor:pointer; }
  .cf-box .b span:first-child { border-right:1px solid var(--border); color:var(--muted); }
  .cf-box .b span:last-child { color:var(--red); font-weight:600; }

  /* ============ 电站详情：能量流 / 天气 / 关站 ============ */
  .pd-weather .wt { display:flex; align-items:center; gap:6px; }
  .pd-weather .wt b { font-weight:600; color:var(--text); }
  .pd-weather .irr { font-size:11px; color:var(--subtle); }
  .pd-flow .flowline { stroke-dasharray:5 4; animation:flowDash 1.1s linear infinite; }
  @keyframes flowDash { to { stroke-dashoffset:-18; } }
  .pd-ops { padding:14px 16px 26px; }
  .pd-ops button {
    width:100%; border:0; border-radius:13px; padding:13px; font-family:inherit; font-size:14.5px;
    font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px;
  }
  .pd-ops .off-btn { background:rgba(255,69,58,.14); color:#ff6b5e; border:1px solid rgba(255,69,58,.34); }
  .pd-ops .on-btn { background:rgba(48,209,88,.14); color:var(--green); border:1px solid rgba(48,209,88,.34); }
  .pd-ops .o-note { text-align:center; font-size:11px; color:var(--subtle); margin-top:8px; line-height:1.5; }
  .pd-off-badge { display:inline-flex; align-items:center; gap:5px; margin-left:7px; font-size:10.5px; color:#ffb3ad; background:rgba(255,69,58,.16); border-radius:6px; padding:2px 7px; vertical-align:2px; }
  /* 图片选择动作面板 */
  .pick-mask { position:absolute; inset:0; background:rgba(0,0,0,.5); z-index:530; display:none; align-items:flex-end; }
  .pick-mask.on { display:flex; }
  .pick-sheet { width:100%; background:var(--panel); border-radius:20px 20px 0 0; padding:6px 0 20px; color:var(--text); }
  .pick-sheet .ph { text-align:center; font-size:12px; color:#7d8698; padding:12px 0 8px; }
  .pick-sheet .row { display:flex; align-items:center; gap:12px; padding:15px 22px; font-size:15px; cursor:pointer; }
  .pick-sheet .row:active { background:var(--divider); }
  .pick-sheet .row.cancel { justify-content:center; color:var(--muted); border-top:1px solid var(--border); margin-top:6px; font-size:14px; }

.xy-query-source{display:block;margin-top:10px;padding-top:7px;border-top:1px solid var(--border);color:var(--muted);font-size:10px;white-space:normal}
  /* 电站概况 */
  .pdetail {
    --pd-hero:var(--pd-header); --pd-toolbar:var(--pd-header); --pd-nav:var(--panel);
    --pd-wire:#637587;
    --pd-danger:#49262d; --pd-danger-text:#ffb7b9;
    --pd-good:#75e3b1;
    background:linear-gradient(180deg,var(--pd-hero),var(--page) 300px) no-repeat,var(--page);
  }
  :root[data-theme="light"] .pdetail {
    --pd-nav:#f8fbfe;
    --pd-wire:#a8bac9;
    --pd-danger:#ffeced; --pd-danger-text:#aa3039;
    --pd-good:#08754c;
  }
  .pd-top { background:var(--pd-toolbar); color:var(--text); }
  .pd-top .nm { font-size:18px; font-weight:500; }
  .pd-weather .wt b { font-weight:400; }
  .pd-weather { padding:12px 18px 0; flex-wrap:wrap; }
  .pd-weather .rt { background:var(--panel); color:var(--text-secondary); cursor:pointer; }
  .pd-alarm { background:var(--pd-danger); }
  .pd-alarm .tx { color:var(--pd-danger-text); }
  .pd-alarm .lab { color:#fff; background:#b8313b; }
  .pd-state { padding:8px 18px 0; color:var(--pd-good); font-size:12px; }
  .pd-state.offline { color:var(--pd-danger-text); }
  .pd-flow { height:264px; margin:8px 18px 0; }
  .pd-flow .pd-wire-base { stroke:var(--pd-wire); stroke-width:1.1; }
  .pd-node { width:88px; transform:translate(-50%,-64px); color:var(--text); font-variant-numeric:tabular-nums; pointer-events:none; }
  .pd-node b { font-size:14px; font-weight:400; }
  .pd-node small { font-size:10px; color:var(--muted); }
  .pd-node .lb { margin:1px 0 2px; font-size:10px; }
  .pd-node .pd-soc { color:var(--pd-good); }
  .pd-node svg { display:block; width:100%; height:61px; filter:drop-shadow(1px 3px 2px #253e5428); }
  .pd-call { width:27px; height:27px; background:var(--panel); color:var(--text-secondary); }
  .pd-sec { margin:16px 16px 0; border-radius:16px; padding:16px; }
  .pd-sec .t { font-size:15px; font-weight:500; margin-bottom:15px; }
  .pd-flow + .pd-current { margin-top:32px; }
  .pd-current summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; }
  .pd-current summary::-webkit-details-marker { display:none; }
  .pd-current summary::after { content:""; width:7px; height:7px; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:rotate(45deg); margin-right:3px; }
  .pd-current:not([open]) summary { margin-bottom:0; }
  .pd-current:not([open]) summary::after { transform:rotate(-45deg); }
  .pd-current-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 14px; }
  .pd-metric { display:flex; gap:7px; align-items:center; min-width:0; }
  .pd-metric-icon { flex:0 0 30px; height:30px; display:grid; place-items:center; border-radius:8px; color:var(--pd-icon); background:color-mix(in srgb,var(--pd-icon) 14%,var(--panel)); }
  .pd-metric-icon svg { width:18px; height:18px; }
  .pd-metric-day { --pd-icon:#65d8a6; }
  .pd-metric-rev { --pd-icon:#ffcd70; }
  .pd-metric-charge { --pd-icon:#6cddde; }
  .pd-metric-discharge { --pd-icon:#c5aaff; }
  .pd-metric-rated { --pd-icon:#95baff; }
  .pd-metric-total { --pd-icon:#ffab93; }
  :root[data-theme="light"] .pd-metric-day { --pd-icon:#13764f; }
  :root[data-theme="light"] .pd-metric-rev { --pd-icon:#8c580b; }
  :root[data-theme="light"] .pd-metric-charge { --pd-icon:#087880; }
  :root[data-theme="light"] .pd-metric-discharge { --pd-icon:#7546b0; }
  :root[data-theme="light"] .pd-metric-rated { --pd-icon:#305ec0; }
  :root[data-theme="light"] .pd-metric-total { --pd-icon:#ad4d32; }
  .pd-metric .v { color:var(--text); font-size:13px; font-weight:400; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .pd-metric .v small { color:var(--muted); font-size:9px; font-weight:500; white-space:nowrap; }
  .pd-metric .l,.pd-period,.pd-note { color:var(--text-secondary); font-size:10px; }
  .pd-period { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:12px; padding-top:9px; border-top:1px solid var(--border); }
  .pd-period b { color:var(--text); font-weight:400; }
  .pd-soc3 > div { padding:10px 7px 33px; background:var(--raised); }
  .pd-soc3 .v { font-size:14px; font-weight:400; overflow-wrap:anywhere; }
  .pd-soc3 svg { opacity:.45; height:32px; pointer-events:none; }
  .pd-price-big { font-size:17px; font-weight:400; }
  .pd-ops .off-btn,.pd-ops .on-btn { background:var(--panel); border-color:var(--border); }
  :root[data-theme="light"] .pd-ops .off-btn { color:var(--pd-danger-text); }
  .pd-tab .ic svg { width:16px; height:16px; }
  .pd-tab { z-index:4; background:var(--pd-nav); }
  .pd-tab > div { color:var(--text-secondary); cursor:pointer; }
  @media (prefers-reduced-motion:reduce) { .pd-flow .flowline { animation:none; } }
  .pd-sankey header { display:flex; justify-content:space-between; align-items:center; gap:8px; }
  .pd-sankey header .t { margin:0; }
  .pd-sankey header button { border:0; background:none; color:var(--text-secondary); font-size:11px; cursor:pointer; padding:5px 0 5px 8px; }
  .pd-sankey-caption,.pd-sankey-empty { font-size:11px; color:var(--text-secondary); margin:6px 0 0; }
  .pd-sankey-empty { padding:16px 0; text-align:center; }
  .pd-sankey-body svg { display:block; width:100%; margin-top:8px; color:var(--text-secondary); }
  .pd-sankey-body text { fill:var(--text); font-size:11px; }
  .pd-sankey-body .pd-sankey-value { fill:var(--text-secondary); font-size:10px; }
  .xy-plant-chart-link { display:block; margin-top:10px; border:0; border-radius:9px; padding:8px 12px; background:var(--selected); color:var(--accent-text); font-size:12px; cursor:pointer; }
  .production-plan > p { margin:5px 0; }
  .production-plan > small,.production-plan details small { color:var(--text-secondary); }
  .production-plan details { margin:9px 0; }
  .production-plan summary { cursor:pointer; color:var(--accent-text); }
  .production-plan details > div { padding:8px 0; border-bottom:1px solid var(--divider); font-size:12px; }
  #xy-attach .xy-plant-chart-link { max-width:100%; margin:4px 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .xy-excel-file { display:flex; align-items:center; gap:10px; padding:9px; border-radius:10px; background:var(--panel); color:var(--text); }
  .xy-excel-with-text .xy-excel-file { margin-bottom:8px; }
  .xy-excel-icon { display:grid; place-items:center; flex:0 0 34px; height:34px; border-radius:8px; background:#187957; color:#fff; }
  .xy-excel-icon svg { width:22px; height:22px; }
  .xy-excel-info { min-width:0; line-height:1.35; }
  .xy-excel-info strong { display:block; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
  .xy-excel-info small { display:block; margin-top:3px; font-size:10px; color:var(--text-secondary); }
  .screen:has(#xiaoyuan.open) #xy-ball,
  .screen:has(#xiaoyuan.open) #xy-reminder-float {
    visibility:hidden;
    pointer-events:none;
  }

.xr-float{--xr-bg:#172b43;--xr-border:#5496e8;position:absolute;z-index:251;width:300px;box-sizing:border-box;padding:16px 18px;border:1.5px solid var(--xr-border);border-radius:18px;background:var(--xr-bg);color:var(--text);box-shadow:0 8px 26px rgba(36,105,192,.2)}
:root[data-theme="light"] .xr-float{--xr-bg:#edf5ff;--xr-border:#85b5f2}
.xr-float[hidden]{display:none}
.xr-float::after{content:'';position:absolute;bottom:-6px;left:var(--xr-arrow-x,210px);width:10px;height:10px;background:var(--xr-bg);border-right:1.5px solid var(--xr-border);border-bottom:1.5px solid var(--xr-border);transform:rotate(45deg)}
.xr-float.xr-below::after{top:-6px;bottom:auto;transform:rotate(225deg)}
.xr-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:16px;font-weight:700}
.xr-heading>span{color:var(--accent-text)}
.xr-float button,.xr-drawer button{font:inherit;cursor:pointer}
.xr-heading button{border:1px solid var(--xr-border);background:var(--card);color:var(--accent-text);font-size:12px;font-weight:600;padding:6px 9px;border-radius:16px;white-space:nowrap}
.xr-preview{display:block;width:100%;margin-top:8px;padding:0;text-align:left;color:var(--text);background:none;border:0}
.xr-preview strong{display:block;font-size:16px;line-height:1.55;font-weight:600}
.xr-preview p{margin:7px 0 0;font-size:13px;line-height:1.7;color:var(--text-secondary);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.xr-empty{font-size:12px;color:var(--muted);line-height:1.6;margin:8px 0 0}
.xr-tag{display:inline-block;padding:3px 7px;border-radius:6px;background:var(--soft);color:var(--muted);font-size:10px;margin:0 5px 7px 0}
.xr-tag.warning{color:var(--amber)}.xr-tag.urgent{color:var(--red)}.xr-tag.info{color:var(--accent-text)}
.xr-drawer{position:absolute;inset:44px 0 0;z-index:340;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}
.xr-drawer[hidden]{display:none}
.xr-top{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border)}
.xr-top h2{font-size:18px;margin:0}.xr-top button{border:0;background:var(--soft);border-radius:50%;color:var(--text);width:32px;height:32px}
.xr-tabs{display:flex;gap:8px;padding:12px 20px 4px}.xr-tabs button{border:1px solid var(--border);border-radius:20px;padding:7px 14px;background:var(--card);color:var(--muted);font-size:12px}.xr-tabs button[aria-pressed=true]{color:var(--accent-text);background:var(--selected)}
.xr-body{flex:1;overflow:auto;padding:12px 18px 28px;overscroll-behavior:contain}
.xr-notice{font-size:11px;line-height:1.7;color:var(--muted);padding:0 0 12px}
.xr-event{border:1px solid var(--border);border-radius:16px;background:var(--card);padding:16px;margin-bottom:12px}
.xr-event h3{font-size:15px;line-height:1.5;margin:0 0 8px}.xr-event p{font-size:13px;line-height:1.8;margin:8px 0;color:var(--text-secondary);white-space:pre-line;overflow-wrap:anywhere}
.xr-event small{font-size:11px;color:var(--muted);display:block;line-height:1.6}
.xr-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.xr-actions button{border:1px solid var(--border);padding:7px 11px;border-radius:20px;background:var(--soft);color:var(--text-secondary);font-size:12px}.xr-actions button:first-child{background:var(--selected);color:var(--accent-text)}
.xr-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.xr-metrics div{border-radius:10px;background:var(--soft);padding:10px;font-size:15px;font-weight:600;overflow-wrap:anywhere}.xr-metrics span{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:4px}
:root[data-theme=light] .xr-heading>span{color:#526e92}:root[data-theme=light] .xr-tag.warning{color:#97651d}:root[data-theme=light] .xr-tag.urgent{color:#bf3c3c}
.xr-report-file{display:block;white-space:normal;margin-top:16px;padding:12px 14px;border:1px solid #f3cdd1;border-radius:12px;background:#fff0f1;color:#a6424d;text-decoration:none;box-shadow:0 2px 8px rgba(166,66,77,.05)}.xr-report-file:hover{background:#ffe5e8}.xr-report-file strong{display:block;font-size:14px;line-height:1.5;color:#a6424d}.xr-report-file span{display:block;font-size:11px;line-height:1.7;margin-top:5px;color:#925b63}.xr-report-file:focus-visible{outline:2px solid #d88d98;outline-offset:3px}
.xr-system-query .xr-query-label{display:block;font-size:11px;line-height:1.6;opacity:.75;margin-bottom:5px;white-space:normal}.xr-system-query .xr-query-text{display:block;font-size:14px;line-height:1.7;white-space:normal}

.xr-risk-chart{margin:12px 0;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--soft);white-space:normal}.xr-risk-chart strong{font-size:13px;display:block}.xr-risk-chart svg{display:block;width:100%;height:auto;margin:8px 0}.xr-risk-chart small{display:block;font-size:11px;line-height:1.7;color:var(--muted);margin-top:6px}.xr-risk-current{font-size:13px;font-weight:600;color:var(--text)}

.xr-risk-advice{margin-top:12px}.xr-risk-advice summary{cursor:pointer;color:var(--accent-text);font-weight:600;padding:8px 0}.xr-risk-advice p{white-space:normal}.bubble>.xr-risk-chart{max-width:100%}.bubble>small{white-space:normal;font-size:11px;display:block;opacity:.75}
.xr-scene{margin:12px 0;padding:12px;background:var(--soft);border:1px solid var(--border);border-radius:14px;white-space:normal}.xr-scene>strong{font-size:13px}.xr-scene small{display:block;color:var(--muted);font-size:10px;line-height:1.7}.xr-scene-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.xr-scene-tile{background:var(--card);border-radius:10px;padding:10px;min-width:0}.xr-scene-tile:last-child{background:#e9f8ef;color:#21724d}.xr-scene-tile strong{font-size:11px;line-height:1.6;display:block}.xr-scene-symbol{font-size:28px;margin:8px 0;color:#3085dd}.xr-scene-tile p{font-size:11px;line-height:1.8;margin:3px 0}
.xr-product-layer{position:absolute;inset:0;z-index:600;background:rgba(20,38,60,.36);display:flex;align-items:flex-end;border-radius:54px;overflow:hidden}.xr-product-panel{width:100%;max-height:calc(100% - 65px);display:flex;flex-direction:column;border-radius:24px 24px 0 0;background:var(--panel);color:var(--text);box-shadow:0 -8px 30px rgba(22,50,85,.12)}.xr-product-panel .xr-top{padding:16px 20px;flex-shrink:0}.xr-product-panel h2{font-size:18px}.xr-product-panel button{cursor:pointer}.xr-product-content{padding:12px 20px;overflow:auto;min-height:0;font-size:13px;line-height:1.75}.xr-product-visual{height:188px;display:flex;justify-content:center;background:linear-gradient(145deg,#eef6ff,#eaf6ee);border-radius:16px;margin-bottom:14px}.xr-product-visual svg{height:100%;max-width:100%}.xr-product-tag{font-size:11px;color:#268455}.xr-product-content h3{font-size:20px;margin:4px 0}.xr-product-content p{margin:6px 0}.xr-product-footer{padding:12px 20px 24px;flex-shrink:0;border-top:1px solid var(--border)}.xr-product-consent{display:block;width:100%;border:0;border-radius:24px;padding:13px 8px;background:#1677ff;color:#fff;font:inherit;font-size:15px;font-weight:600}.xr-product-consent:disabled{background:#e0f2e8;color:#238653;cursor:default}.xr-product-note{display:block;font-size:11px;line-height:1.65;color:var(--muted);margin:8px 0 0}
.xr-context-ball{z-index:661}
.xr-context-bubble{z-index:662}
.xy-ball-fab.xr-has-attention::after{content:'1';position:absolute;right:-1px;top:-2px;width:18px;height:18px;display:grid;place-items:center;background:#ed7040;color:#fff;border:2px solid var(--page);border-radius:50%;font-size:10px;font-weight:600;pointer-events:none}

.xr-strategy-card {
  display:grid; grid-template-columns:32px minmax(0,1fr) 8px; gap:12px; align-items:center;
  box-sizing:border-box; width:100%; margin-top:12px; padding:12px 14px;
  background:var(--card); color:var(--text); border:1px solid var(--border); border-radius:14px;
  font:inherit; line-height:1.45; text-align:left; cursor:pointer;
}
.xr-strategy-card:hover,.xr-strategy-card:active { background:var(--raised); }
.xr-strategy-card:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

.xs-card{margin:10px 0;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--card);color:var(--text);white-space:normal;box-sizing:border-box;max-width:100%}
.msg.ai .bubble:has(.xs-card){max-width:100%;width:100%;background:transparent;padding:0}.msg.ai:has(.xs-card){width:100%}.msg.ai .bubble:has(.xs-card)>p{padding:0 4px}
.xs-card-head{display:flex;align-items:center;gap:10px;padding-bottom:12px}.xs-card-head>div{flex:1;min-width:0}.xs-card-head strong{display:block;font-size:14px;line-height:1.5}.xs-card-head small{font-size:11px;color:var(--muted);display:block;margin-top:3px}.xs-card-icon{width:34px;height:34px;background:#e9f1ff;border-radius:10px;display:grid;place-items:center;color:#1677ff;font-size:24px;flex-shrink:0}.xs-demo-tag{font-size:10px;line-height:1.5;color:#2d75d6;background:#eaf2ff;padding:3px 6px;border-radius:6px;flex-shrink:0}
.xs-detail-row{display:grid;grid-template-columns:70px minmax(0,1fr) 8px;gap:7px;align-items:center;width:100%;padding:10px 0;border:0;border-top:1px solid var(--border);background:transparent;color:var(--text);font:inherit;text-align:left;font-size:12px}.xs-detail-row b{font-weight:400;text-align:right;overflow-wrap:anywhere;line-height:1.6}.xs-chevron{color:var(--muted)}button.xs-detail-row{cursor:pointer}
.xs-success{background:#e6f7eb;color:#238446;border-radius:9px;padding:9px 11px;font-size:12px;line-height:1.6;margin-top:10px}.xs-muted-state{background:var(--soft);color:var(--muted)}.xs-next,.xs-hint,.xs-foot{font-size:11px;color:var(--muted);line-height:1.7;margin:9px 0;white-space:normal}.xs-foot{display:block;margin-bottom:0}.xs-latched{font-size:11px;color:#ac7622;line-height:1.6}
.xs-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.xs-actions button,.xs-recipient>button{font:inherit;font-size:11px;border:1px solid var(--border);background:var(--soft);color:var(--text-secondary);border-radius:9px;padding:7px 9px;cursor:pointer}.xs-primary,.xs-actions .xs-primary{border:0;border-radius:10px;padding:10px 12px;background:#1677ff;color:#fff;font:inherit;font-size:12px;cursor:pointer}.xs-primary:disabled,.xs-actions button:disabled{opacity:.4;cursor:default}.xs-header-button{font-size:22px;color:#337dde}
.xs-form{display:flex;flex-direction:column;gap:9px}.xs-field{display:grid;grid-template-columns:108px minmax(0,1fr);align-items:center;gap:8px;font-size:12px;line-height:1.5}.xs-field>span{color:var(--text-secondary)}.xs-field input,.xs-field select{width:100%;min-width:0;box-sizing:border-box;font:inherit;font-size:12px;border:1px solid var(--border);border-radius:8px;padding:8px;background:var(--surface);color:var(--text)}.xs-recipient .xs-field{grid-template-columns:1fr;gap:6px}.xs-recipient>button{margin-top:7px}.xs-recipient[hidden]{display:none}.xs-form .xs-hint{margin:0}.xs-error{font-size:12px;line-height:1.7;color:#c44747;margin:0}.xs-error:empty{display:none}
.xs-layer{position:absolute;inset:44px 0 0;z-index:460;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}.xs-layer[hidden]{display:none}.xs-layer-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border)}.xs-layer-head h2{font-size:17px;flex:1;margin:0}.xs-icon-button{width:30px;height:30px;border:0;border-radius:50%;background:var(--soft);color:var(--text);font-size:20px;cursor:pointer}.xs-layer-body{overflow:auto;flex:1;padding:12px 16px 30px;overscroll-behavior:contain}.xs-layer-body h3{font-size:14px;margin:14px 0 10px}.xs-banner{font-size:11px;line-height:1.7;background:var(--soft);border-radius:10px;padding:10px;color:var(--muted);margin:0 0 12px}.xs-tabs{display:flex;gap:8px;margin:10px 0 14px}.xs-tabs button{font:inherit;font-size:12px;border:1px solid var(--border);background:var(--card);color:var(--muted);border-radius:18px;padding:7px 11px;cursor:pointer}.xs-tabs button[aria-pressed=true]{background:#e9f1ff;color:#1677ff;border-color:#d2e3fc}.xs-templates{display:grid;grid-template-columns:1fr 1fr;gap:8px}.xs-templates button{font:inherit;font-size:12px;line-height:1.6;text-align:left;border:1px solid var(--border);background:var(--card);color:var(--text);border-radius:10px;padding:11px;cursor:pointer}.xs-list-card{margin-top:14px}.xs-list-card .xs-card{margin-bottom:5px}.xs-unsubscribe{font:inherit;font-size:11px;border:0;background:transparent;color:var(--muted);padding:5px 0;cursor:pointer}.xs-empty{font-size:12px;color:var(--muted);line-height:1.8;margin:22px 0}.xs-log{display:block;width:100%;text-align:left;font:inherit;background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:12px;padding:13px;margin-bottom:10px;cursor:pointer}.xs-log strong{font-size:13px;display:block}.xs-log span,.xs-log small{display:block;font-size:11px;color:var(--muted);margin-top:6px;line-height:1.6}.xs-letter{background:var(--card);padding:14px;border:1px solid var(--border);border-radius:13px;margin:14px 0}.xs-letter h3{font-size:16px;line-height:1.6}.xs-letter p{font-size:12px;line-height:1.8;white-space:pre-line}.xs-letter-channel{font-size:11px;letter-spacing:1px;color:#1677ff}.xs-report-table{width:100%;border-collapse:collapse;font-size:11px;line-height:1.6;table-layout:fixed;margin:12px 0}.xs-report-table th,.xs-report-table td{border-bottom:1px solid var(--border);padding:9px 3px;text-align:right;overflow-wrap:anywhere}.xs-report-table th:first-child,.xs-report-table td:first-child{text-align:left}.xs-evidence{background:var(--soft);padding:7px 10px;border-radius:7px}.xs-layer button:focus-visible,.xs-card button:focus-visible{outline:2px solid #5e9eff;outline-offset:2px}

.so-card{max-width:100%;margin:12px 0;padding:13px;border:1px solid var(--border);border-radius:15px;background:var(--card);color:var(--text);white-space:normal;box-sizing:border-box}.msg.ai .bubble:has(.so-card){width:100%;max-width:100%;padding:0;background:transparent}.msg.ai:has(.so-card){width:100%}.msg.ai .bubble:has(.so-card)>p{padding:0 3px}.so-card-head{display:flex;gap:9px;align-items:center;margin-bottom:12px}.so-card-head>div{flex:1;min-width:0}.so-card-head strong{display:block;font-size:14px;line-height:1.5}.so-card-head small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.so-mode-icon{width:33px;height:33px;display:grid;place-items:center;background:#e8f1ff;color:#247ef7;border-radius:10px;font-size:24px}.so-life .so-mode-icon{background:#e5f8ed;color:#1cb472}.so-profit .so-mode-icon{background:#e5f8ed;color:#1cb472}.so-status{font-size:10px;border-radius:12px;background:#e8f8ee;color:#259259;padding:4px 7px;white-space:nowrap}.so-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}.so-metric{padding:10px 6px;border-radius:10px;background:var(--soft);min-width:0}.so-metric small,.so-metric span{display:block;font-size:10px;color:var(--muted);line-height:1.5}.so-metric b{display:block;font-size:15px;color:var(--text);margin:5px 0;overflow-wrap:anywhere;line-height:1.35}.so-metric span{font-size:9px}.so-chart{padding:10px 0 4px}.so-chart>strong{font-size:12px}.so-chart svg{width:100%;height:auto;display:block}.so-legend{font-size:9px;color:var(--muted);display:block;line-height:1.7;margin:5px 0}.so-takeaway{font-size:11px;line-height:1.8;border-radius:10px;background:var(--soft);padding:10px;margin:8px 0}.so-weights{font-size:10px;color:var(--muted);line-height:1.7;margin:8px 0}.so-confirm{background:linear-gradient(100deg,#edf5ff,#f5f8ff);padding:11px;border-radius:12px;margin:10px 0;color:#253b5e}.so-confirm>strong{display:block;font-size:12px}.so-confirm>small{display:block;font-size:10px;line-height:1.7;margin:5px 0;color:#71829b}.so-actions{display:flex;gap:8px;margin-top:11px}.so-actions button,.so-applied button{flex:1;border:1px solid var(--border);background:var(--card);color:var(--text-secondary);border-radius:18px;padding:9px 10px;cursor:pointer;font:inherit;font-size:12px}.so-primary,.so-actions .so-primary{border:0;background:#1677ff;color:#fff;border-radius:18px;padding:9px 12px;font:inherit;font-size:12px;cursor:pointer}.so-primary:disabled{opacity:.45;cursor:default}.so-error{color:#c64c3f;font-size:11px;line-height:1.7}.so-note{display:block;color:var(--muted);font-size:10px;line-height:1.8;margin:7px 0}.so-dismissed{opacity:.72}.so-controls,.so-assumptions{margin-top:10px;font-size:11px;line-height:1.8}.so-controls summary,.so-assumptions summary{cursor:pointer;color:var(--accent-text);font-weight:600;padding:6px 0}.so-form{display:flex;flex-direction:column;gap:8px;padding-top:8px}.so-form label{display:grid;grid-template-columns:115px minmax(0,1fr);gap:7px;align-items:center;font-size:11px}.so-form label:has(output){grid-template-columns:100px minmax(0,1fr) 25px}.so-form input,.so-form select{width:100%;min-width:0;box-sizing:border-box;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:7px;padding:7px;font:inherit;font-size:11px}.so-form input[type=range]{padding:0;accent-color:#4388f6}.so-table{width:100%;border-collapse:collapse;font-size:10px;margin:8px 0}.so-table th,.so-table td{padding:7px 3px;border-bottom:1px solid var(--border);text-align:left}.so-layer{position:absolute;inset:44px 0 0;z-index:480;display:flex;background:var(--page);color:var(--text);border-radius:0 0 38px 38px;overflow:hidden}.so-layer[hidden]{display:none}.so-panel{width:100%;display:flex;flex-direction:column;background:var(--page);overflow:hidden}.so-layer-head{display:flex;align-items:center;padding:16px;border-bottom:1px solid var(--border);gap:10px}.so-layer-head h2{font-size:16px;margin:0;flex:1;line-height:1.5}.so-close{border:0;background:var(--soft);color:var(--text);width:29px;height:29px;border-radius:50%;font-size:17px;cursor:pointer}.so-layer-body{overflow:auto;flex:1;padding:12px 16px 26px;overscroll-behavior:contain}.so-layer-body h3{font-size:14px;margin:20px 0 10px}.so-banner{background:var(--soft);color:var(--muted);font-size:11px;line-height:1.8;padding:11px;border-radius:10px;margin:0 0 14px}.so-templates{display:grid;grid-template-columns:1fr 1fr;gap:8px}.so-templates button,.so-workbench-row{font:inherit;font-size:12px;line-height:1.6;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text);text-align:left;cursor:pointer}.so-workbench-row{display:block;width:100%;margin:7px 0}.so-applied{padding:12px;border-radius:12px;background:var(--card);border:1px solid var(--border);margin:8px 0;font-size:12px}.so-applied p{font-size:11px;color:var(--muted);line-height:1.7}.so-applied button{font-size:11px;margin-right:6px;padding:7px}.so-layer.so-sheet{inset:0;background:#07142655;align-items:flex-end}.so-sheet .so-panel{max-height:85%;border-radius:22px 22px 0 0;box-shadow:0 -8px 30px #1c3b6522}.so-sheet .so-layer-head{border-bottom:0;padding-bottom:6px}.so-sheet .so-metrics{grid-template-columns:1fr 1fr}.so-sheet .so-chart{padding-top:0}.so-proactive-intro{font-size:12px;line-height:1.8;color:var(--text-secondary);margin:5px 0 12px}.so-home{display:flex;gap:6px;align-items:center;border-radius:11px;background:#e8f1ff;margin:6px 0 12px;padding:7px 9px}.so-home[hidden]{display:none}.so-home>button:first-child{flex:1;text-align:left;border:0;background:transparent;color:#2b70d1;line-height:1.7;font:inherit;font-size:11px;cursor:pointer}.so-home-close{background:transparent;border:0;color:#6f88a6;font-size:13px;cursor:pointer}.so-header-button{font-size:25px;color:#2c7ce8}.xy-top:has(.so-header-button) .ti{margin-right:0;font-size:17px}.so-layer button:focus-visible,.so-card button:focus-visible{outline:2px solid #6a9ff2;outline-offset:3px}

.mm-card{margin:10px 0;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--card);color:var(--text);white-space:normal;max-width:100%;box-sizing:border-box}.mm-card-head{display:flex;gap:9px;align-items:center;font-size:15px}.mm-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#e5f1ff;color:#1677ff;font-size:23px}.mm-source,.mm-note{display:block;color:var(--muted);font-size:11px;line-height:1.75;white-space:normal;margin:8px 0}.mm-card p{font-size:12px;line-height:1.8;margin:9px 0}.mm-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:11px;line-height:1.6;margin:12px 0}.mm-table th,.mm-table td{padding:8px 5px;border-bottom:1px solid var(--border);text-align:left;overflow-wrap:anywhere}.mm-table th{background:var(--soft)}.mm-lamp:before{content:'● ';color:#8595a5}.mm-lamp.green:before{color:#20b66d}.mm-lamp.red:before{color:#ef5757}.mm-lamp.off:before{color:#adb8c2}.mm-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.mm-actions button,.mm-primary,.mm-secondary{font:inherit;font-size:12px;padding:10px 12px;border-radius:20px;border:1px solid #bdd6f3;background:#edf5ff;color:#246bb4;cursor:pointer}.mm-primary,.mm-actions .mm-primary{background:#1677ff;border-color:#1677ff;color:white}.mm-actions button:disabled{opacity:.5;cursor:default}.mm-section{margin:12px 0;padding:12px;background:var(--soft);border-radius:12px;font-size:12px;line-height:1.8;white-space:normal}.mm-list{padding-left:18px;font-size:12px;line-height:1.9;white-space:normal;margin:9px 0}.mm-verdict{font-size:18px;font-weight:700;padding:12px;background:#fff5df;color:#9b6818;border-radius:12px;margin:12px 0}.mm-verdict.positive{background:#e8f8ed;color:#228749}.mm-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.mm-metrics>div{padding:10px 5px;background:var(--soft);border-radius:10px;text-align:center}.mm-metrics strong{font-size:14px;display:block}.mm-metrics small{font-size:10px;display:block;color:var(--muted);margin-top:4px}.mm-layer{position:absolute;inset:44px 0 0;z-index:610;display:flex;flex-direction:column;overflow:hidden;background:var(--page);color:var(--text);border-radius:0 0 38px 38px}.mm-head{display:flex;align-items:center;gap:10px;padding:16px;border-bottom:1px solid var(--border)}.mm-head h2{font-size:18px;flex:1;margin:0}.mm-head button{border:0;background:var(--soft);color:var(--text);width:30px;height:30px;border-radius:50%;cursor:pointer}.mm-body{padding:12px 16px 28px;overflow:auto;flex:1;font-size:13px;line-height:1.8}.mm-body input,.mm-body select{border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--text);font:inherit;min-width:0;padding:8px;box-sizing:border-box}.mm-body>input{width:100%}.mm-field{display:grid;grid-template-columns:1fr 130px;gap:8px;align-items:center;margin:10px 0;font-size:12px}.mm-check{display:flex;gap:9px;align-items:flex-start;font-size:12px;line-height:1.7;margin:12px 0}.mm-check input{margin-top:4px}.mm-tabs{display:flex;gap:8px;margin:10px 0}.mm-tabs button{font:inherit;border:1px solid var(--border);border-radius:20px;padding:6px 15px;background:var(--card);color:var(--muted);cursor:pointer}.mm-tabs button[aria-pressed=true]{background:#1677ff;color:#fff;border-color:#1677ff}.mm-drawing svg{width:100%;display:block;border-radius:12px}.mm-pending{font-size:12px;color:var(--muted);padding:14px}.msg.ai .bubble:has(.mm-card){max-width:100%;width:100%;background:transparent;padding:0}.msg.ai:has(.mm-card){width:100%}
.mm-alarm-guide{padding:12px 14px;margin:12px 0;border:1px solid #f2b8ba;border-radius:12px;background:#fff2f1;color:#823b3e;white-space:normal}.mm-alarm-guide>strong{display:block;font-size:15px;color:#b5343a}.mm-alarm-guide .mm-path-title{font-size:12px;margin-top:10px;color:#67434a}.mm-alarm-guide p{font-size:12px;line-height:1.75;margin:6px 0}.mm-manual-link{color:#1677cf;font-size:12px;text-decoration:none;display:block;margin-top:9px}.mm-alarm-guide .mm-note{color:#795b62}
.mm-user-media{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:6px}.mm-user-media>img{width:112px;max-height:180px;object-fit:cover;border-radius:10px}.mm-video-card{width:220px;max-width:100%;overflow:hidden;border-radius:12px;background:#15202d}.mm-video-card video{display:block;width:100%;max-height:260px;background:#111;object-fit:contain}.mm-video-caption{display:block;padding:7px 9px;color:#fff;font-size:11px}.mm-media-thumb video{width:56px;height:56px;object-fit:cover;display:block;border-radius:8px}.mm-thumb-duration{position:absolute;bottom:2px;left:2px;border-radius:4px;background:rgba(0,0,0,.65);color:#fff;font-size:9px;padding:1px 3px;pointer-events:none}.mm-thumb-remove{position:absolute;top:-5px;right:-5px;width:18px;height:18px;border:0;border-radius:50%;background:#52657b;color:#fff;font-size:13px;line-height:18px;padding:0;cursor:pointer}
.mm-doorway-preview{margin:12px 0}.mm-doorway-preview img{display:block;width:100%;max-height:340px;object-fit:contain;border-radius:12px;background:#eee5d9}.mm-doorway-preview figcaption{font-size:10px;color:var(--muted);line-height:1.7;text-align:center;margin-top:5px}.mm-doorway-sheet{position:relative;overflow:hidden;border-radius:14px;margin:10px 0;background:#eee5d9}.mm-doorway-sheet>img{display:block;width:100%;height:auto}.mm-doorway-sheet>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.mm-doorway-sheet+ .mm-section{margin-top:14px}

.hs-card{padding:15px;margin:12px 0 0;background:var(--card);border:1px solid var(--border);border-radius:16px;white-space:normal}.hs-card-title{font-size:17px;font-weight:700;color:var(--text)}.hs-subtitle{font-size:12px;color:var(--muted);line-height:1.7;margin:5px 0 8px}.hs-demo{display:inline-block;color:#2878bd;background:#e8f2ff;font-size:10px;border-radius:6px;padding:3px 7px}.hs-info{font-size:12px;line-height:1.9;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:10px 0;margin:12px 0}.hs-info small{display:block;color:var(--muted);font-size:10px}.hs-primary{border:0;border-radius:22px;background:#1677ff;color:#fff;font:inherit;font-size:13px;padding:11px 14px;cursor:pointer;width:100%}.hs-primary:disabled{opacity:.45;cursor:default}.hs-note{display:block;font-size:10px;line-height:1.7;color:var(--muted);margin-top:8px}.hs-choices{display:flex;gap:6px;margin:10px 0;flex-wrap:wrap}.hs-choices button,.hs-actions button{font:inherit;font-size:11px;border:1px solid var(--border);border-radius:16px;background:var(--soft);color:var(--text-secondary);padding:7px 10px;cursor:pointer}.hs-choices button[aria-pressed=true]{background:#e9f3ff;color:#1478dc;border-color:#add0f5}.hs-summary{font-size:11px;line-height:1.75;margin:10px 0;color:var(--muted)}.hs-summary summary{cursor:pointer}.hs-summary p{white-space:pre-line;background:var(--soft);padding:10px;border-radius:10px}.hs-queue{border:1px solid var(--border);border-radius:14px;padding:15px;background:var(--card);white-space:normal;font-size:13px;line-height:1.8}.hs-queue p{font-size:11px;color:var(--muted);margin:6px 0}.hs-queue button{font:inherit;border:0;background:var(--soft);color:var(--muted);border-radius:16px;padding:6px 12px;cursor:pointer}.hs-spinner{display:inline-block;width:18px;height:18px;vertical-align:middle;margin-right:9px;border:3px solid #e1eeff;border-top-color:#1677ff;border-radius:50%;animation:hs-spin 1s linear infinite}@keyframes hs-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.hs-spinner{animation:none}}.hs-human .bubble{border-left:3px solid #7bb9ed}.hs-agent{font-size:11px;color:#398bc7;margin-bottom:7px;font-weight:600}.hs-bar{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-shrink:0;padding:8px 12px;margin:0 16px 5px;background:#e9f4ff;border:1px solid #bbdaf5;border-radius:10px;color:#356c9b;font-size:11px}.hs-bar[hidden]{display:none}.hs-bar button{font:inherit;font-size:11px;padding:4px 7px;border:0;border-radius:12px;background:#fff;color:#4179aa;cursor:pointer;white-space:nowrap}.hs-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}.hs-resolution{padding:12px;margin-top:12px;border:1px solid #c2e7cf;border-radius:12px;background:#ecf9f0;color:#277244;white-space:normal}.hs-resolution p{font-size:11px;line-height:1.8;white-space:pre-line}.msg.ai:has(.hs-card){width:100%}.msg.ai .bubble:has(.hs-card){width:100%;max-width:100%;background:transparent;padding:0}

.hs-headset{display:inline-grid;place-items:center;flex-shrink:0;width:28px;height:28px;border-radius:9px;background:#e4f1ff;color:#1677ff}.hs-headset svg{width:20px;height:20px}.hs-card-title,.hs-agent{display:flex;align-items:center;gap:9px}.hs-card-title>.hs-headset{width:40px;height:40px;border-radius:12px}.hs-card-title>.hs-headset svg{width:28px;height:28px}.hs-agent .hs-headset{width:23px;height:23px;border-radius:50%}.hs-agent .hs-headset svg{width:16px;height:16px}

.hd-card{background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:17px;padding:15px;white-space:normal;width:100%}.msg.ai:has(.hd-card),.msg.ai .bubble:has(.hd-card){width:100%;max-width:100%}.msg.ai .bubble:has(.hd-card){padding:0;background:transparent}.hd-card h3,.hd-card h4{margin:8px 0;font-size:15px}.hd-note{font-size:11px;color:var(--muted);line-height:1.65;margin:5px 0}.hd-score{display:flex;align-items:center;gap:17px;padding:10px 0 13px;border-bottom:1px solid var(--border)}.hd-score small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.hd-ring{width:76px;height:76px;flex-shrink:0;border-radius:50%;background:conic-gradient(#52ce72 var(--score),var(--soft) 0);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;isolation:isolate}.hd-ring:before{content:'';position:absolute;inset:6px;border-radius:50%;background:var(--card);z-index:-1}.hd-ring strong{font-size:27px;line-height:1}.hd-card svg,.hd-body svg{display:block;width:100%;height:auto}.hd-item{width:100%;display:flex;align-items:center;gap:9px;text-align:left;border:1px solid var(--border);background:var(--soft);color:var(--text);border-radius:12px;padding:9px;margin:7px 0;font:inherit;cursor:pointer}.hd-item strong,.hd-item small{display:block;font-size:12px;line-height:1.55}.hd-item small{font-size:10px;color:var(--muted)}.hd-icon{width:29px;height:29px;display:grid;place-items:center;flex-shrink:0;border-radius:8px;background:#eaf3ff;color:#237cce}.hd-tag{margin-left:auto;white-space:nowrap;font-size:10px;color:var(--muted)}.hd-tag.warn,.hd-alert{color:#b96323}.hd-tag.ok{color:#24875b}.hd-primary{width:100%;padding:10px;border:0;border-radius:22px;background:#1677ff;color:white;font:inherit;font-size:12px;margin-top:7px;cursor:pointer}.hd-layer{position:absolute;inset:44px 0 0;z-index:625;border-radius:0 0 38px 38px;overflow:hidden;background:var(--page);color:var(--text);display:flex;flex-direction:column}.hd-layer header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--border)}.hd-layer header button{border:0;border-radius:14px;padding:6px 9px;background:var(--soft);color:var(--text);cursor:pointer}.hd-body{padding:16px;overflow:auto;font-size:13px;line-height:1.8}.hd-body p{margin:8px 0}

.co-layer{position:absolute;inset:44px 0 0;z-index:660;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}.co-layer[hidden],.co-footer[hidden]{display:none}.co-header{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--border)}.co-header h2{font-size:18px;margin:0;flex:1}.co-back{border:0;background:transparent;color:var(--text);font-size:30px;cursor:pointer;line-height:1}.co-badge,.co-good,.co-muted{font-size:11px;padding:4px 7px;border-radius:7px}.co-badge{background:#e2efff;color:#146dd2}.co-good{background:#e8f7ee;color:#218653}.co-muted{background:var(--soft);color:var(--muted)}.co-body{flex:1;overflow:auto;padding:12px 15px 20px;font-size:13px;line-height:1.65}.co-note{font-size:11px;color:var(--muted);line-height:1.65;margin:8px 0}.co-card,.co-prompt,.co-success{background:var(--card);border:1px solid var(--border);padding:13px;border-radius:15px;margin:11px 0}.co-device-head,.co-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.co-device-head{font-size:15px;margin-bottom:8px}.co-row{font-size:12px;margin:7px 0}.co-row span{color:var(--muted)}.co-field{display:block;border-top:1px solid var(--border);padding-top:9px;margin-top:10px}.co-field input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--border);border-radius:20px;background:var(--soft);color:var(--text);font:inherit;margin-top:5px}.co-prompt{background:#edf6ff;border-color:#bad8fc;color:#26496c}.co-prompt p,.co-success p,.co-card p{margin:7px 0}.co-actions{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.co-primary,.co-secondary,.co-remove{font:inherit;font-size:12px;border:0;border-radius:20px;padding:9px 12px;cursor:pointer}.co-primary{background:#1677ff;color:white}.co-secondary,.co-remove{background:var(--soft);color:var(--text)}.co-primary:disabled,.co-secondary:disabled{opacity:.45;cursor:default}.co-footer{padding:10px 16px 23px;border-top:1px solid var(--border)}.co-footer button{width:100%}.co-photos{display:grid;grid-template-columns:1fr 1fr;gap:8px}.co-photos img{display:block;width:100%;height:138px;object-fit:cover;border-radius:10px}.co-remove{font-size:10px;margin:5px 0}.co-warning{color:#ad5d26}.co-check{display:flex;gap:8px;border-top:1px solid var(--border);padding:8px 0;font-size:11px}.co-check span{color:#228a52}.co-password{background:#e7f1ff;color:#145ac4;border-radius:12px;padding:10px 13px;margin-top:8px}.co-password strong,.co-password small{display:block}.co-password strong{font-size:23px;letter-spacing:1px}.co-success{color:#1d854c}

.xy-ball-fab.co-context-ball{z-index:661}.xr-float.co-context-bubble{z-index:662}

.dp-layer{position:absolute;inset:44px 0 0;z-index:260;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}
.dp-layer[hidden]{display:none}
.dp-top{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--border);font-size:17px}
.dp-top>span{flex:1}.dp-top small{font-size:10px;color:var(--accent-text)}.dp-back{font-size:28px!important;border:0!important;background:none!important}
.dp-body{flex:1;overflow:auto;padding:14px 16px}
.dp-station{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0 18px}.dp-station>div{flex:1;font-size:15px}.dp-station small{font-size:10px;color:var(--text-secondary)}
.dp-station-icon{display:grid;place-items:center;background:var(--selected);color:var(--accent-text);width:44px;height:44px;border-radius:9px;font-size:27px}
.dp-tabs{display:flex;gap:7px;margin-bottom:16px}.dp-tabs button{flex:1}.dp-tabs [aria-pressed=true]{color:var(--accent-text);border-color:var(--accent)}
.dp-layer button{font:inherit;cursor:pointer;border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:12px;padding:8px 12px}
.dp-card{background:var(--panel);border-radius:16px;padding:15px}.dp-card h3{font-size:15px;font-weight:500;margin:0 0 12px}
.dp-soc,.dp-field{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 0;border-bottom:1px solid var(--border);font-size:13px}
.dp-soc strong{display:grid;place-items:center;width:50px;height:50px;border:4px solid #43b88e;border-radius:50%;font-weight:500;font-size:16px}
.dp-value{display:flex;align-items:center;gap:6px;color:var(--text-secondary)}.dp-field input{box-sizing:border-box;width:92px;border:1px solid var(--border);border-radius:8px;padding:9px;background:var(--page);color:var(--text);font:inherit;outline-offset:2px}
.dp-muted{font-size:11px;color:var(--text-secondary);line-height:1.65}.dp-hint{background:var(--selected);border-radius:12px;padding:12px 14px;font-size:12px;margin-top:14px}.dp-hint strong{font-weight:500;color:var(--accent-text)}.dp-hint p{margin:6px 0 0;line-height:1.65}
.dp-tools,.dp-actions{display:flex;gap:8px;margin-top:12px}.dp-tools button,.dp-actions button{flex:1;font-size:12px}
.dp-footer{padding:12px 16px 24px;border-top:1px solid var(--border)}.dp-footer button{width:100%}
.dp-primary{background:var(--accent)!important;color:#fff!important;border-color:transparent!important}
.dp-modal{position:absolute;inset:0;background:#08162766;display:flex;align-items:center;padding:16px;z-index:270}
.dp-diagnosis{background:var(--panel);padding:18px;border-radius:19px;width:100%;box-sizing:border-box;font-size:13px;line-height:1.65;max-height:95%;overflow:auto}
.dp-diagnosis header{display:flex;align-items:center;justify-content:space-between}.dp-diagnosis header button{border:0}
.dp-warning{color:#c46a19;font-weight:500}.dp-recommend{display:block;font-size:17px;font-weight:500;color:var(--accent-text);margin:9px 0}
.dp-description{display:flex;flex-direction:column;gap:5px}
.dp-range{display:block;font-size:10px;font-weight:400;color:var(--text-secondary)}
.dp-range-warning{color:#bd651b}
.dp-field input[aria-invalid=true]{border-color:#d27b31;background:color-mix(in srgb,#d27b31 7%,var(--page))}
.dp-result-heading{display:flex;flex-direction:column;gap:4px}
.dp-check-status{font-size:10px;color:var(--text-secondary);font-weight:400}
.dp-result{font-size:13px;line-height:1.7}
.dp-result p{margin:8px 0}
.dp-result .dp-warning{color:var(--text);font-weight:600;font-size:15px;margin-top:16px}
.dp-current{font-weight:500}
.dp-advice{margin:14px 0;padding:13px;border-radius:13px;background:var(--selected)}
.dp-advice>small{color:var(--accent-text);font-size:12px}
.dp-advice .dp-recommend{font-size:20px;line-height:1.5;margin:8px 0}
.dp-advice .dp-muted{margin:5px 0}
.dp-detail>summary{display:none}
.dp-detail:not([open]){display:none}
.dp-detail{border-top:1px solid var(--border);font-size:12px;color:var(--text-secondary)}
.dp-result .dp-actions button{padding:11px 7px}

.ess-soc-page{position:absolute;inset:54px 0 0;z-index:280;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}.ess-soc-page[hidden]{display:none}.ess-soc-top{display:flex;align-items:center;gap:14px;padding:12px 18px;font-size:20px}.ess-soc-top button{border:0;background:none;color:var(--text);font-size:27px;cursor:pointer}.ess-soc-body{padding:22px 18px;flex:1;overflow:auto}.ess-soc-body>p{font-size:12px;line-height:1.7;color:var(--text-secondary);margin-bottom:12px}.ess-soc-group{padding:0 17px;border-radius:20px;background:var(--card);border:1px solid var(--border)}.ess-soc-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px;border-bottom:1px solid var(--divider);font-size:15px}.ess-soc-row:last-child{border-bottom:0}.ess-soc-row input,.ess-soc-row select{max-width:112px;width:100%;padding:8px 4px;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;text-align:right}.ess-soc-row input:focus,.ess-soc-row select:focus{outline:2px solid var(--accent)}.ess-soc-row output,.ess-soc-row .ess-soc-static{color:var(--muted)}.ess-soc-row select option{background:var(--card);color:var(--text)}.ess-soc-foot{display:flex;gap:12px;padding:15px 20px 24px}.ess-soc-foot button,.ess-setting-card button{font:inherit;border-radius:24px;border:1px solid var(--border);padding:11px;cursor:pointer;background:var(--raised);color:var(--accent-text)}.ess-soc-foot button{flex:1}.ess-soc-foot .ess-confirm,.ess-setting-card .ess-confirm{background:#176aff;color:#fff;border-color:transparent}.ess-soc-foot button:disabled,.ess-setting-card button:disabled{opacity:.55;cursor:default}.ess-soc-status{margin-top:16px;font-size:12px;line-height:1.7;color:var(--text-secondary);white-space:pre-line}.ess-setting-card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:14px;margin-top:12px;font-size:13px;line-height:1.75}.ess-setting-card h3{font-size:15px;margin:0 0 8px}.ess-setting-card label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}.ess-setting-card input{width:76px;padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--page);color:var(--text);font:inherit;text-align:center}.ess-setting-card details{margin:10px 0;color:var(--text-secondary)}.ess-setting-card details p{margin:8px 0}.ess-setting-card small{display:block;color:var(--muted);font-size:11px;margin-top:8px}.ess-setting-card .ess-actions{display:flex;gap:8px;margin-top:12px}.ess-actions button{flex:1;font-size:12px}.ess-setting-card a{color:var(--accent-text)}

.tf-layer{position:absolute;inset:44px 0 0;z-index:280;background:var(--page);color:var(--text);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}.tf-layer[hidden]{display:none}
.tf-top{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border)}.tf-top h2{flex:1;font-size:17px;font-weight:500;margin:0}
.tf-top button{border:0!important;background:none!important;font-size:25px!important;padding:0 8px!important}
.tf-body{padding:14px 16px 24px;overflow:auto;flex:1}
.tf-layer button,.tf-card button{font:inherit;font-size:12px;border:1px solid var(--border);padding:9px 12px;background:var(--panel);color:var(--text);border-radius:10px;cursor:pointer}
.tf-primary{background:var(--accent)!important;color:#fff!important;border-color:transparent!important}
.tf-body>select{width:100%;padding:9px;border:1px solid var(--border);border-radius:9px;background:var(--panel);color:var(--text);font:inherit;font-size:11px;margin-bottom:12px}
.tf-card,.tf-section,.tf-success{background:var(--panel);border:1px solid var(--border);border-radius:15px;padding:14px;margin-bottom:12px;font-size:12px;line-height:1.6}
.tf-card h3,.tf-section h3,.tf-success h3{font-size:15px;font-weight:500;margin:8px 0}.tf-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.tf-card-head strong{font-weight:500;color:var(--accent-text)}
.tf-badge{font-size:10px;background:var(--selected);color:var(--text-secondary);padding:3px 6px;border-radius:6px;white-space:nowrap}
.tf-muted{font-size:11px;line-height:1.65;color:var(--text-secondary)}
.tf-timeline{padding:3px 0 0;margin:0;list-style:none}.tf-timeline li{display:flex;gap:10px;position:relative;min-height:45px;padding-bottom:13px;color:var(--muted)}.tf-timeline li:not(:last-child)::before{content:'';position:absolute;left:8px;top:19px;bottom:0;border-left:1px solid var(--border)}
.tf-step-icon{width:18px;flex:none;text-align:center;color:var(--muted)}.tf-timeline strong{font-size:12px;font-weight:500}.tf-timeline p{font-size:11px;margin:4px 0;color:var(--text-secondary)}
.tf-timeline .done .tf-step-icon{color:#24946b}.tf-timeline .active strong,.tf-timeline .active .tf-step-icon{color:var(--accent-text)}
.tf-actions{display:flex;gap:8px;margin-top:8px}.tf-actions button{width:100%}.tf-success{border-color:#6fba9b}.tf-success h3{color:#23815c}
.tf-chat-details{border-top:1px solid var(--border);padding-top:9px;margin-top:9px}
.tf-chat-details>summary{cursor:pointer;color:var(--accent-text);font-size:12px}
.tf-chat-details .tf-section{margin:9px 0 0;padding:10px}
.tf-chat-order{background:var(--selected);border-radius:10px;padding:10px;margin:10px 0}
.tf-chat-order strong{font-weight:500}.tf-chat-order p{margin:4px 0}
.tf-card>.tf-success{margin-top:10px}
.tf-card>small{display:block;margin-top:9px}
.tf-card .tf-primary:disabled{opacity:.6;cursor:default}

.pd-sec:has([data-operations-ui]){padding:15px!important;background:linear-gradient(145deg,var(--selected),var(--panel) 38%)!important;border:1px solid var(--border)}
.pd-sec:has([data-operations-ui])>header .t{font-size:12px;font-weight:400;color:var(--text-secondary)}
.pd-sec:has([data-operations-ui])>.pd-sankey-caption{display:none}
.oa-head{display:flex;justify-content:space-between;align-items:center;margin:10px 0}.oa-kicker{font-size:11px;letter-spacing:.4px;color:var(--accent-text)}
.oa-source{font-size:9px;color:var(--text-secondary);border:1px solid var(--border);border-radius:20px;padding:2px 6px}
.oa-title{font-size:19px;font-weight:500;letter-spacing:-.5px}.oa-sub{font-size:10px;color:var(--text-secondary);margin:4px 0 14px}
.oa-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.oa-kpis button{min-width:0;text-align:left;border:1px solid transparent;background:var(--soft);padding:11px 9px;border-radius:12px;color:var(--text);cursor:pointer}
.oa-kpis button[aria-pressed=true]{border-color:#499eaa;background:color-mix(in srgb,#56b8af 9%,var(--panel))}
.oa-kpis span{display:block;font-size:10px;color:var(--text-secondary)}.oa-kpis strong{display:block;font-weight:500;font-size:22px;letter-spacing:-.6px;margin:6px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.oa-kpis small{font-size:9px;color:var(--text-secondary)}
.oa-toolbar{display:flex;align-items:center;gap:5px;margin:17px 0 12px}.oa-toolbar>strong{flex:1;font-size:12px;font-weight:500}
.oa-switch{display:flex;background:var(--soft);padding:2px;border-radius:7px}
.oa-switch button{font:inherit;font-size:9px;padding:4px 6px;border:0;border-radius:5px;color:var(--text-secondary);background:none;cursor:pointer}
.oa-switch button[aria-pressed=true]{color:var(--text);background:var(--panel);box-shadow:0 1px 4px #0001}
.oa-selected{display:flex;justify-content:space-between;align-items:center;padding:9px 10px;border-radius:9px;background:var(--selected);font-size:11px}
.oa-selected strong{font-size:15px;font-weight:500;font-variant-numeric:tabular-nums}.oa-selected small{font-size:9px;color:var(--text-secondary)}
.oa-plot{display:block;width:100%;color:var(--text-secondary);margin-top:8px;touch-action:pan-y;outline-offset:2px}
.oa-grid{stroke:var(--border);stroke-dasharray:2 4}.oa-axis{fill:var(--text-secondary);font-size:9px}
.oa-cross{stroke:#32a4a0;stroke-width:1;stroke-dasharray:3 3}
.oa-line{stroke:#239c9c;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}.oa-area{fill:#38b5b5;opacity:.11}
.oa-point{fill:var(--panel);stroke:#239c9c;stroke-width:2}.oa-bar{fill:#239c9c;opacity:.5}.oa-bar.chosen{opacity:1}
.oa-date-nav{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px}.oa-date-nav span{font-size:9px;color:var(--muted)}
.oa-date-nav button{font-size:18px;color:var(--text);background:var(--soft);border:0;border-radius:6px;width:27px;cursor:pointer}.oa-date-nav button:disabled{opacity:.35}
.oa-day-detail{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;border:1px solid var(--border);padding:10px 7px;border-radius:10px;font-size:10px}
.oa-day-detail small{display:block;font-size:9px;color:var(--muted);margin-top:4px}
.oa-insights{margin-top:16px}.oa-insights>strong{font-size:12px;font-weight:500}.oa-insights>div{display:flex;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid var(--divider);font-size:10px}
.oa-insights span{color:var(--text-secondary)}.oa-insights b{font-weight:400}
.oa-table{margin-top:13px;font-size:11px}.oa-table summary{color:var(--accent-text);cursor:pointer}.oa-table>div{overflow:auto}
.oa-table table{width:100%;border-collapse:collapse;margin:7px 0;font-size:10px;font-variant-numeric:tabular-nums}.oa-table th,.oa-table td{padding:8px 4px;text-align:right;border-bottom:1px solid var(--divider)}.oa-table th:first-child,.oa-table td:first-child{text-align:left}
.oa-foot,.oa-empty{font-size:9px;color:var(--muted);line-height:1.6;margin-top:10px}

.om-header-button { border:0; background:transparent; color:var(--accent-text); font:inherit; font-size:12px; cursor:pointer; padding:8px 5px; }
.xiaoyuan .xy-top .ti { margin-right:0; }
.om-heading { display:flex; align-items:center; justify-content:space-between; font-size:15px; color:var(--text); }
.om-caption { margin:2px 0 13px; color:var(--muted); font-size:11px; line-height:1.6; }
.om-text-button { border:0; background:transparent; color:var(--accent-text); font:inherit; font-size:11px; padding:8px 6px; cursor:pointer; }
.om-pills { display:flex; flex-wrap:wrap; gap:9px; }
.om-pill { display:flex; align-items:center; gap:10px; width:100%; min-width:0; padding:12px; text-align:left; background:var(--card); color:var(--text); border:1px solid var(--border); border-radius:16px; font:inherit; font-size:13px; cursor:pointer; }
.om-pill:hover { background:var(--selected); border-color:var(--accent-text); }
.om-topic-icon { width:30px; height:30px; flex-shrink:0; border-radius:10px; display:grid; place-items:center; background:color-mix(in srgb, var(--accent-text) 12%, transparent); color:var(--accent-text); font-size:18px; }
.om-revenue { color:#b88223; background:rgba(205,158,60,.12); }
.om-generation { color:#219879; background:rgba(42,174,126,.12); }
.om-temperature { color:#df7e36; background:rgba(232,132,55,.12); }
.om-health { color:#6983ce; background:rgba(110,134,215,.12); }
.om-pill-copy { min-width:0; display:flex; flex-direction:column; gap:4px; line-height:1.5; }
.om-pill-copy small { font-size:10px; color:var(--muted); }
.om-entry { display:block; margin:10px auto 0; background:transparent; color:var(--accent-text); border:0; font:inherit; font-size:11px; padding:8px; cursor:pointer; }
.om-compact { display:flex; flex-direction:column; align-items:flex-start; gap:5px; padding:6px 0 10px; min-width:0; }
.om-compact-heading { display:flex; align-items:center; gap:8px; width:100%; }
.om-compact-heading > .om-text-button { margin-left:auto; padding:5px 0 5px 8px; }
.om-compact-label { display:inline-flex; align-items:center; gap:8px; flex-shrink:0; font:inherit; font-size:11px; color:var(--accent-text); border:1px solid var(--border); border-radius:20px; background:var(--card); padding:7px 11px; cursor:pointer; text-align:left; }
.om-chevron { font-size:15px; line-height:1; }
.om-panel { width:100%; display:flex; flex-direction:column; gap:4px; }
.om-panel[hidden] { display:none; }
.om-panel-tools { display:flex; align-items:center; justify-content:space-between; }
.om-panel-tools .om-text-button { padding:3px 0 4px; font-size:10px; }
.om-sample-label { color:var(--muted); font-size:10px; }
.om-strip { display:flex; gap:6px; width:100%; overflow-x:auto; scrollbar-width:none; min-width:0; }
.om-pill.om-small { width:auto; flex-shrink:0; gap:5px; padding:7px 10px; border-radius:30px; font-size:11px; }
.om-small .om-topic-icon { width:16px; height:16px; background:transparent; font-size:13px; }
.om-overlay[hidden] { display:none; }
.om-overlay { position:absolute; inset:0; z-index:20; display:flex; flex-direction:column; background:var(--page); color:var(--text); border-radius:0; }
.om-manager-header { display:flex; align-items:center; justify-content:space-between; padding:10px 20px; border-bottom:1px solid var(--divider); }
.om-manager-header h3 { font-size:17px; font-weight:500; margin:5px 0; }
.om-manager-body { padding:18px; overflow-y:auto; flex:1; min-height:0; }
.om-info { padding:15px; background:var(--selected); border-radius:16px; }
.om-info strong,.om-demo strong { font-size:14px; font-weight:500; }
.om-info p,.om-demo p { font-size:11px; color:var(--text-secondary); line-height:1.8; margin:7px 0 0; }
.om-toggle { font:inherit; font-size:12px; background:var(--card); color:var(--accent-text); border:1px solid var(--border); border-radius:12px; padding:10px 14px; margin-top:12px; cursor:pointer; width:100%; }
.om-tabs { display:flex; padding:4px; background:var(--raised); border-radius:12px; margin:18px 0 12px; gap:4px; }
.om-tabs button { flex:1; border:0; background:transparent; color:var(--muted); font:inherit; font-size:12px; padding:9px; border-radius:9px; cursor:pointer; }
.om-tabs button.on { background:var(--card); color:var(--text); }
.om-memory-row { border:1px solid var(--border); border-radius:14px; padding:12px; background:var(--card); margin-bottom:9px; }
.om-memory-query { background:transparent; border:0; color:var(--text); font:inherit; font-size:12px; line-height:1.6; text-align:left; padding:0; cursor:pointer; }
.om-memory-footer { display:flex; gap:4px; align-items:center; margin-top:4px; }
.om-memory-footer small { flex:1; color:var(--muted); font-size:10px; line-height:1.6; }
.om-demo { border-top:1px solid var(--divider); margin-top:18px; padding-top:18px; }
.om-action,.om-secondary { width:100%; border:0; border-radius:12px; padding:12px; font:inherit; font-size:12px; margin-top:10px; background:#1478ff; color:white; cursor:pointer; }
.om-secondary { background:var(--selected); color:var(--accent-text); }
.om-empty,.om-privacy { font-size:11px; line-height:1.8; color:var(--muted); }
.om-privacy { margin:18px 0 8px; font-size:10px; }
.om-clear { border:0; background:transparent; font:inherit; font-size:11px; color:var(--red); padding:10px 0; cursor:pointer; }
.xiaoyuan [class^="om-"] button:focus-visible,.xiaoyuan button[class^="om-"]:focus-visible { outline:2px solid var(--accent-text); outline-offset:2px; }

.om-compact-heading { flex-wrap:wrap; }
.sk-shortcut-count { min-width:15px; padding:1px 4px; border-radius:8px; background:var(--selected); font-size:10px; line-height:1.3; text-align:center; }
.sk-shortcut-panel { width:100%; padding-top:4px; }
.sk-shortcut-panel[hidden] { display:none; }
.sk-shortcut-tools { gap:8px; padding:2px 0 4px; }
.sk-shortcut-tools .sk-shortcut-create { padding:5px 11px; border-radius:16px; font-size:11px; font-weight:600; }
.sk-shortcut-items { display:flex; flex-wrap:wrap; gap:7px; max-height:165px; overflow-y:auto; padding:4px 2px; }
.sk-shortcut-item { display:inline-flex; align-items:center; gap:7px; max-width:100%; padding:8px 11px; border:1px solid var(--border); border-radius:18px; color:var(--text); background:var(--card); font:inherit; font-size:11px; text-align:left; cursor:pointer; }
.sk-shortcut-item > span { overflow-wrap:anywhere; }
.sk-shortcut-item:hover { background:var(--selected); border-color:var(--accent-text); }
.sk-shortcut-item.off { color:var(--muted); }.sk-shortcut-item small { font-size:9px; white-space:nowrap; }
.sk-shortcut-item:focus-visible { outline:2px solid var(--accent-text); outline-offset:1px; }
.xy-more-trigger { width:34px; height:36px; padding:0; border:0; border-radius:12px; background:transparent; color:var(--text-secondary); font-size:23px; cursor:pointer; }
.xy-more-menu[hidden] { display:none; }
.xy-more-menu { position:absolute; top:54px; right:14px; z-index:40; width:230px; padding:6px; border:1px solid var(--border); border-radius:16px; background:var(--card); box-shadow:0 10px 30px #17355418; }
.xy-more-menu button { width:100%; display:flex; gap:12px; align-items:center; padding:13px 10px; border:0; border-radius:11px; text-align:left; background:transparent; color:var(--text); font:inherit; font-size:13px; cursor:pointer; }
.xy-more-menu button:hover { background:var(--selected); }
.xy-more-menu button > span:last-child { display:flex; flex-direction:column; gap:5px; }
.xy-more-menu small { font-size:10px; color:var(--muted); }
.xy-more-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--selected); color:var(--accent-text); font-size:20px; }
.xy-more-menu button:focus-visible,.xy-more-trigger:focus-visible { outline:2px solid var(--accent-text); outline-offset:1px; }
.sk-answer { font-size:13px; line-height:1.8; margin:12px 0; }
.sk-scope-field h4 { margin:0 0 9px; }
.sk-layer[hidden] { display:none; }
.sk-layer { position:absolute; inset:0; z-index:30; background:var(--page); color:var(--text); display:flex; flex-direction:column; }
.sk-header { display:flex; align-items:center; gap:12px; padding:10px 16px; border-bottom:1px solid var(--divider); flex-shrink:0; }
.sk-header strong { font-size:16px; font-weight:500; flex:1; }
.sk-text { background:transparent; color:var(--accent-text); font:inherit; font-size:11px; border:0; padding:7px 3px; cursor:pointer; }
.sk-body { flex:1; overflow-y:auto; min-height:0; padding:16px; }
.sk-eyebrow { color:var(--accent-text); font-size:11px; }
.sk-help p { font-size:12px; color:var(--text-secondary); line-height:1.8; }
.sk-primary,.sk-secondary { border:0; border-radius:12px; padding:11px 13px; background:#1478ff; color:#fff; font:inherit; font-size:12px; cursor:pointer; }
.sk-secondary { background:var(--selected); color:var(--accent-text); }
.sk-library-card { padding:16px; border:1px solid var(--border); border-radius:18px; background:var(--card); margin:12px 0; }
.sk-row,.sk-actions { display:flex; align-items:center; gap:8px; }
.sk-row strong { flex:1; min-width:0; font-weight:500; font-size:14px; overflow-wrap:anywhere; }
.sk-icon { display:grid; place-items:center; width:32px; height:32px; color:#6a7be7; background:rgba(118,132,223,.13); border-radius:10px; font-size:21px; flex-shrink:0; }
.sk-status { flex-shrink:0; padding:4px 7px; border-radius:20px; background:rgba(44,172,114,.12); color:var(--green); font-size:10px; }
.sk-status.off { background:var(--raised); color:var(--muted); }
.sk-note,.sk-byline { font-size:11px; line-height:1.8; color:var(--muted); margin:7px 0; overflow-wrap:anywhere; }
.sk-byline { color:var(--accent-text); }
.sk-chips { background:var(--raised); border-radius:9px; padding:9px; color:var(--text-secondary); font-size:10px; line-height:1.9; margin:10px 0; }
.sk-actions { flex-wrap:wrap; }
.sk-actions .sk-primary,.sk-actions .sk-secondary { flex:1; padding:10px; white-space:nowrap; }
.sk-manage { border-top:1px solid var(--divider); margin-top:10px; justify-content:space-between; }
.sk-help { padding:12px 0; }.sk-help strong { font-size:13px; font-weight:500; }
.sk-form { display:flex; flex-direction:column; gap:12px; }
.sk-field { display:flex; flex-direction:column; gap:7px; color:var(--text-secondary); font-size:12px; }
.sk-field input,.sk-field select,.sk-field textarea { font:inherit; width:100%; box-sizing:border-box; border:1px solid var(--border); border-radius:11px; background:var(--card); color:var(--text); padding:11px; min-height:40px; }
.sk-form h4 { margin:8px 0 0; font-weight:500; font-size:13px; }
.sk-check { display:flex; gap:8px; align-items:center; padding:8px 0; font-size:12px; line-height:1.6; cursor:pointer; }
.sk-check input { accent-color:#1478ff; width:16px; height:16px; flex-shrink:0; }
.sk-options { border:1px solid var(--border); background:var(--card); border-radius:12px; padding:5px 12px; }
.sk-error { color:var(--red); font-size:12px; line-height:1.8; margin:0; }
.sk-result { white-space:normal; min-width:0; }
.sk-result-top { display:flex; align-items:center; justify-content:space-between; gap:5px; }
.sk-result h3 { font-size:17px; font-weight:500; margin:12px 0 5px; }
.sk-result h4 { font-size:13px; font-weight:500; margin:0 0 10px; }
.sk-metric-tabs { display:flex; overflow-x:auto; scrollbar-width:none; gap:5px; padding:7px 0; }
.sk-metric-tabs button { font:inherit; font-size:10px; background:var(--card); color:var(--muted); border:1px solid var(--border); border-radius:20px; padding:7px 9px; flex-shrink:0; cursor:pointer; }
.sk-metric-tabs button.on { color:var(--accent-text); background:var(--selected); border-color:var(--accent-text); }
.sk-plot { padding:4px 0 10px; }
.sk-bar-row { display:block; width:100%; background:transparent; color:var(--text); border:0; padding:10px 0; font:inherit; cursor:pointer; text-align:left; }
.sk-bar-label { display:flex; gap:8px; justify-content:space-between; font-size:11px; line-height:1.7; }
.sk-bar-label span:first-child { min-width:0; overflow-wrap:anywhere; }
.sk-bar-label span:last-child { flex-shrink:0; font-variant-numeric:tabular-nums; }
.sk-bar-track { height:8px; background:var(--raised); border-radius:10px; margin-top:7px; overflow:hidden; }
.sk-bar-track span { display:block; height:100%; border-radius:10px; background:linear-gradient(90deg,#72b7ff,#6483ef); }
.sk-bar-row[aria-pressed="true"] .sk-bar-track span { background:linear-gradient(90deg,#45c5be,#528bea); }
.sk-station-detail { background:var(--selected); border-radius:14px; padding:13px; margin:6px 0 15px; }
.sk-station-detail > strong { font-size:13px; font-weight:500; }
.sk-detail-line { display:flex; justify-content:space-between; gap:8px; font-size:11px; color:var(--text-secondary); padding:5px 0; }
.sk-insights > div { border-left:2px solid var(--accent-text); padding-left:10px; margin:13px 0; }
.sk-insights strong { font-size:12px; font-weight:500; }.sk-insights p { font-size:11px; line-height:1.9; color:var(--text-secondary); margin:5px 0; }
.sk-method { border-top:1px solid var(--divider); margin-top:12px; padding-top:12px; font-size:11px; }.sk-method summary { color:var(--accent-text); cursor:pointer; }
.sk-foot { font-size:10px; color:var(--muted); line-height:1.8; margin-top:12px; }
.sk-result > .sk-secondary { width:100%; }
.sk-layer button:focus-visible,.sk-result button:focus-visible,.sk-header-entry:focus-visible { outline:2px solid var(--accent-text); outline-offset:2px; }

.sd-overlay{position:absolute;inset:0;z-index:320;background:var(--page,#f2f6fc);color:var(--text,#183553);display:flex;flex-direction:column;border-radius:0 0 38px 38px;overflow:hidden}.sd-chat-card button{font:inherit;cursor:pointer;border:1px solid var(--border,#d8e5f2);border-radius:20px;background:var(--raised,#edf5ff);color:var(--text,#183553);padding:9px 12px;font-size:12px}.sd-scroll{flex:1;overflow:auto;overscroll-behavior:contain}.sd-report{font:14px/1.75 system-ui,'Microsoft Yahei',sans-serif;background:var(--page,#f2f6fc);color:var(--text,#183553);max-width:960px;margin:auto}.sd-report *{box-sizing:border-box}.sd-cover{padding:30px 20px 24px;background:linear-gradient(135deg,#123e67,#175c79);color:white}.sd-eyebrow{font-size:10px;letter-spacing:1.6px;opacity:.8}.sd-cover h1{font-size:26px;margin:12px 0 5px;line-height:1.5}.sd-cover p{margin:0 0 12px;opacity:.85}.sd-badge{display:inline-block;border:1px solid #73a9bd66;border-radius:8px;padding:3px 8px;font-size:11px;color:inherit}.sd-hero{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.sd-hero>div{padding:13px 10px;background:#ffffff10;border:1px solid #ffffff24;border-radius:12px}.sd-hero strong{display:block;font-size:23px;color:#a6f1d2;line-height:1.5}.sd-hero span{display:block;font-size:11px;opacity:.8}.sd-content{padding:16px}.sd-conclusion{font-size:13px;line-height:1.9;margin:0 0 18px;padding:15px;border-left:3px solid #30a78a;background:var(--card,#fff);border-radius:0 12px 12px 0}.sd-section{padding:18px 16px;margin:0 0 14px;border:1px solid var(--border,#e1e8f0);border-radius:16px;background:var(--card,#fff)}.sd-section h2{font-size:17px;margin:0 0 15px;display:flex;align-items:center;gap:10px}.sd-section h2 i{font-style:normal;font-size:11px;color:#1e9c82;border-radius:6px;background:#27a88c15;padding:3px 5px}.sd-rows>div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--divider,#e9eff5);font-size:12px}.sd-rows>div:last-child{border-bottom:0}.sd-rows span{color:var(--text-secondary,#62758b);flex:1}.sd-rows strong{font-weight:550;text-align:right;max-width:60%;overflow-wrap:anywhere}.sd-note{font-size:11px;line-height:1.8;color:var(--text-secondary,#6b7b8d);margin:12px 0 0}.sd-highlight{font-size:30px;font-weight:650;color:#15967a;background:#1d9f8210;padding:12px;border-radius:10px}.sd-highlight small{font-size:12px;font-weight:400}.sd-energy{height:9px;background:#dfebf7;border-radius:10px;overflow:hidden;margin-top:14px}.sd-energy span{display:block;height:100%;background:#24ae8a}.sd-section table{width:100%;font-size:11px;border-collapse:collapse;margin-top:12px}.sd-section td,.sd-section th{text-align:left;padding:10px 5px;border-bottom:1px solid var(--border,#e1e8f0)}.sd-section ol{padding-left:18px;font-size:12px}.sd-section li{margin:9px 0}.sd-section a{color:var(--accent-text,#286aab)}.sd-section summary{cursor:pointer;font-size:12px}.sd-content footer{padding:10px 5px 25px;font-size:10px;color:var(--text-secondary,#6b7b8d)}.sd-chat-card{margin:12px 0 0;padding:15px;border:1px solid var(--border,#d8e5f2);border-radius:16px;background:var(--card,#fff);color:var(--text,#183553)}.sd-chat-card h3{margin:6px 0 8px;font-size:16px}.sd-chat-card p{font-size:12px;line-height:1.8}.sd-card-metrics{font-weight:600;color:#16947a;background:#239e8110;border-radius:8px;padding:12px;margin:12px 0}.sd-chat-card button{display:block;width:100%;margin-top:9px}.sd-primary,.sd-chat-card .sd-primary{background:#2673ee;color:white;border:0;border-radius:20px;padding:11px 15px;cursor:pointer;font:inherit;font-size:12px}.sd-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 0}.sd-form label{font:11px/1.5 system-ui;color:var(--text-secondary,#62758b)}.sd-form input{box-sizing:border-box;display:block;width:100%;font:14px system-ui;margin:5px 0;padding:9px;border:1px solid var(--border,#d7e0eb);border-radius:8px;background:var(--page,#f2f6fc);color:var(--text,#183553)}.sd-form button,.sd-form .sd-error{grid-column:1/-1}.sd-error{color:#d45b4e;font-size:12px;margin:0}.sd-scroll>.sd-form,.sd-scroll>h3,.sd-scroll>.sd-note{margin:16px}.sd-standalone{margin:0;background:#eaf0f7;--page:#f2f6fc;--card:#fff;--text:#183553;--text-secondary:#62758b;--border:#e1e8f0;--divider:#e9eff5}.sd-standalone .sd-report{margin:24px auto;border-radius:20px;overflow:hidden;box-shadow:0 12px 60px #18355318}.sd-standalone .sd-cover{padding:40px}.sd-standalone .sd-hero{grid-template-columns:repeat(4,1fr)}.sd-standalone .sd-content{padding:24px 40px}.sd-print{display:block;margin:20px auto 0;border:0;border-radius:22px;padding:11px 20px;background:#1b638a;color:white;cursor:pointer}@media(max-width:600px){.sd-standalone .sd-report{margin:0;border-radius:0}.sd-standalone .sd-cover{padding:28px 20px}.sd-standalone .sd-content{padding:16px}.sd-standalone .sd-hero{grid-template-columns:1fr 1fr}}@page{size:A4;margin:14mm}@media print{.sd-print{display:none}.sd-standalone{background:white}.sd-standalone .sd-report{margin:0;box-shadow:none;max-width:none}.sd-standalone .sd-cover{print-color-adjust:exact;-webkit-print-color-adjust:exact}.sd-section{break-inside:avoid}.sd-cover{break-inside:avoid}.sd-content{padding:15px 0!important}details{display:block}details>*{display:block}}

.sd-inventory caption,.sd-figure figcaption {
  text-align:left;font-size:14px;font-weight:650;margin-bottom:8px;
}
.sd-section .sd-inventory td:last-child,.sd-section .sd-inventory thead th:last-child {
  text-align:right;white-space:nowrap;
}
.sd-inventory tbody th,.sd-figure tbody th { font-weight:500; }
.sd-figure { margin:0 0 20px; }
.sd-figure svg { display:block;width:100%;height:auto;margin:auto;color:var(--text,#183553); }
.sd-figure svg text { fill:currentColor;font:10px system-ui,'Microsoft Yahei',sans-serif; }
.sd-figure .sd-flow { max-width:540px; }
.sd-flow text { text-anchor:middle; }
.sd-flow .sd-node-name { font-size:13px;font-weight:650; }
.sd-flow .sd-edge-name { font-size:11px;font-weight:550; }
.sd-flow-key { display:grid;grid-template-columns:auto 1fr;gap:4px 12px;padding:10px 12px;border-radius:8px;
  background:var(--page,#f2f6fc);font-size:11px; }
.sd-flow-key b { font-weight:550;text-align:right; }
.sd-figure .sd-months { max-width:690px; }
.sd-chart-key { display:flex;gap:12px;flex-wrap:wrap;font-size:11px; }
.sd-chart-key span::before { content:'';display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px;background:#58ba96; }
.sd-chart-key span:nth-child(2)::before { background:#ecaa56; }
.sd-chart-key span:nth-child(3)::before { height:3px;vertical-align:middle;background:#147466; }
.sd-figure details { margin-top:10px; }
.sd-data-scroll { max-width:100%;overflow:auto; }
.sd-data-scroll td,.sd-data-scroll th { white-space:nowrap;font-variant-numeric:tabular-nums; }
@media print {
  .sd-figure,.sd-section .sd-inventory { break-inside:avoid;print-color-adjust:exact; }
  .sd-section:has(.sd-figure) { break-inside:auto; }
  .sd-section h2,.sd-figure figcaption { break-after:avoid; }
}

.sd-chat-inventory { margin-top:12px; }
.sd-chat-inventory .sd-inventory { table-layout:fixed;width:100%;border-collapse:collapse;font-size:12px; }
.sd-chat-inventory .sd-inventory caption { color:var(--text);font-weight:650; }
.sd-chat-inventory .sd-inventory :is(th,td) {
  min-width:0;padding:7px 5px;border:0;border-bottom:1px solid var(--divider);
  background:transparent;text-align:left;line-height:1.45;overflow-wrap:anywhere;
}
.sd-chat-inventory .sd-inventory thead th { background:var(--panel);font-size:11px;color:var(--text-secondary); }
.sd-chat-inventory .sd-inventory th:first-child { width:39%; }
.sd-chat-inventory .sd-inventory :is(th,td):last-child { width:23%;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums; }
.sd-chat-inventory .sd-inventory td:last-child { font-weight:650; }
.sd-estimate-card h3 { margin:0; }
.sd-estimate-card .sd-project-brief { margin:3px 0 10px;color:var(--text-secondary); }
.sd-estimate-metrics { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  margin:0 0 10px;padding:10px 12px;background:var(--panel);border-radius:10px; }
.sd-estimate-metrics dt { font-size:11px;color:var(--text-secondary); }
.sd-estimate-metrics dd { margin:2px 0 0;font-size:14px;font-weight:650;line-height:1.4;font-variant-numeric:tabular-nums; }
.sd-estimate-metrics > div:last-child { grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;
  gap:8px;border-top:1px solid var(--divider);padding-top:7px; }
.sd-estimate-metrics > div:last-child dd { color:var(--accent-text);margin:0; }

.sd-inventory small { display:block;color:var(--text-secondary,#62758b);font-size:11px;font-weight:400; }
.sd-inventory a { color:var(--accent-text,#286aab);overflow-wrap:anywhere;text-underline-offset:2px; }
.sd-chat-inventory .sd-inventory th:first-child { width:34%; }
.sd-chat-inventory .sd-inventory :is(th,td):last-child { width:20%; }

.sd-report {
  --sd-pv: #00a36a;
  --sd-load: #ff9023;
  --sd-grid: #3164eb;
  --sd-export: #a2dd30;
  --sd-self: #096451;
  --sd-node: #fff;
}
:root[data-theme="dark"] .sd-overlay .sd-report {
  --sd-pv: #16ce8c; --sd-load: #ffa532; --sd-grid: #638eff; --sd-self: #72f5d3; --sd-node: #172334;
}
.sd-cover {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 105% 0%,#087be9 0%,transparent 50%),
              linear-gradient(132deg,#10275e 0%,#173eac 58%,#4232ac);
}
.sd-cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(148deg,transparent 0 20px,#bbdcff24 21px,transparent 22px 39px);
  mask-image: linear-gradient(235deg,#000,transparent 44%);
}
.sd-cover h1 { font-size: 29px; letter-spacing: -.025em; }
.sd-cover .sd-badge { color: #fff; background: #0b184a70; border-color: #b2cbff75; }
.sd-hero { gap: 8px; }
.sd-hero > div { border: 0; border-radius: 11px; padding: 12px; background: #091e60a6; }
.sd-hero strong { color: #fff; font-size: 24px; font-variant-numeric: tabular-nums; }
.sd-hero > div:first-child { background: #0b8a69; }
.sd-hero > div:nth-child(2) strong { color: #baff87; }
.sd-hero span { opacity: 1; color: #edf4ff; }
.sd-section h2 i { color: #fff; background: #285fdb; padding: 3px 6px; }
.sd-section .sd-highlight { color: var(--sd-self); background: color-mix(in srgb,var(--sd-pv) 13%,var(--sd-node)); }
.sd-figure { padding: 12px 0 4px; border-top: 1px solid var(--border,#d7e1ec); }
.sd-figure figcaption { font-size: 15px; }
.sd-figure .sd-flow text { font-size: 11px; }
.sd-figure .sd-flow .sd-node-name { font-size: 13px; font-weight: 700; }
.sd-flow-key { background: color-mix(in srgb,var(--sd-grid) 10%,var(--sd-node)); }
.sd-chart-key span::before { background: var(--sd-pv); }
.sd-chart-key span:nth-child(2)::before { background: var(--sd-load); }
.sd-chart-key span:nth-child(3)::before { background: var(--sd-self); }
@media print { .sd-report { print-color-adjust: exact; } }

.sd-standalone.reading-drag, .sd-standalone.reading-drag * { user-select: none; cursor: grabbing; }

.xiaoyuan:has(> .sd-overlay) > :not(.sd-overlay) { visibility: hidden; }
.sd-reading { position: relative; display: flex; flex: 1; min-height: 0; flex-direction: column; }
.sd-reading .sd-scroll { scrollbar-width: none; }
.sd-reading .sd-scroll::-webkit-scrollbar { display: none; }
.sd-overlay .sd-scroll:focus { outline: none; }
.sd-scroll-indicator {
  position: absolute;
  inset: 6px 5px 6px auto;
  width: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease-out;
}
.sd-scroll-indicator.is-scrolling { opacity: .55; transition: none; }
.sd-scroll-indicator span { display: block; border-radius: 4px; background: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .sd-scroll-indicator { transition: none; }
}

.xs-layer:has(> .sd-overlay)>:not(.sd-overlay){visibility:hidden}
.report-month-frame{display:block;width:100%;height:100%;border:0}
.hr-report{max-width:760px;margin:auto;padding:14px;color:var(--text);line-height:1.55}
.hr-cover,.hr-section{padding:16px;border-radius:16px;margin:0 0 12px;background:var(--card);border:1px solid var(--border)}
.hr-cover{background:#163f59;color:white}.hr-cover h2,.hr-section h3{margin:0 0 10px}
.hr-cover small{display:block;color:#c5dce7}.hr-cover strong{display:block;font-size:32px;color:#a6f0d4}
.hr-report p{margin:8px 0;font-size:14px}.hr-section strong{font-size:15px}.hr-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hr-grid>div{background:var(--panel);padding:10px;border-radius:10px}.hr-grid small,.hr-grid strong{display:block}.hr-grid small{color:var(--text-secondary);margin-bottom:4px}
.hr-report svg{width:100%;height:auto}

.as-card{margin:2px 0;background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:14px;font:13px/1.65 system-ui,'Microsoft Yahei',sans-serif;overflow:hidden}.as-card *{box-sizing:border-box}.as-card h3{font-size:16px;margin:0 0 7px}.as-card h4{font-size:13px;margin:16px 0 8px}.as-note,.as-source{color:var(--text-secondary);font-size:11px;line-height:1.7}.as-card p{margin:8px 0}.as-form label{display:block;font-size:12px;font-weight:550}.as-form input{margin:6px 0;width:100%;border:1px solid var(--border);padding:11px;border-radius:10px;background:var(--page);color:var(--text);font:13px system-ui}.as-actions{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0}.as-card button{font:12px/1.5 system-ui;cursor:pointer;border-radius:18px;padding:9px 12px;min-height:36px;white-space:normal}.as-primary{border:0;background:#2375ef;color:white;flex:1}.as-secondary{border:1px solid var(--border);background:var(--raised);color:var(--accent-text)}.as-card button:disabled{opacity:.5;cursor:wait}.as-error{color:#d25b4c;font-size:12px}.as-examples,.as-details,.as-source{border-top:1px solid var(--divider);padding-top:10px;margin-top:12px}.as-card summary{cursor:pointer;font-size:12px;color:var(--accent-text)}.as-example-list{display:grid;gap:7px;margin-top:10px}.as-card .as-example{white-space:pre-line;text-align:left;border:1px solid var(--border);border-radius:10px;background:var(--page);color:var(--text);padding:9px 11px}.as-result:not(:empty){margin-top:16px;padding-top:16px;border-top:1px solid var(--divider)}.as-result-top{display:flex;align-items:center;gap:7px}.as-result-top h3{font-size:15px;flex:1;margin:0}.as-icon{color:#23a488}.as-status{white-space:nowrap;border-radius:6px;font-size:11px;padding:3px 8px;background:#8d9eaf18;color:var(--text)}.as-active{background:#20a98518;color:#16866d}.as-expiring{background:#e4a12c18;color:#ae7618}.as-expired{background:#d7675518;color:#b75243}.as-sn{font-size:11px;color:var(--text-secondary);overflow-wrap:anywhere}.as-rows{display:grid;grid-template-columns:minmax(70px,.8fr) minmax(0,1.4fr);gap:0;margin:8px 0}.as-rows dt,.as-rows dd{margin:0;padding:9px 0;border-bottom:1px solid var(--divider);font-size:11px;overflow-wrap:anywhere}.as-rows dt{color:var(--text-secondary);padding-right:12px}.as-rows dd{text-align:right;color:var(--text)}.as-callout{background:#238eaa0b;border-left:3px solid #6da9ce;padding:10px 11px;font-size:12px;border-radius:0 9px 9px 0}.as-callout.as-warning{border-left-color:#d3a443;background:#e6ae3510}.as-order-list{display:grid;gap:8px;margin:12px 0 18px}.as-card .as-order{display:flex;flex-direction:column;text-align:left;gap:3px;background:var(--page);border:1px solid var(--border);border-radius:12px;color:var(--text)}.as-order[aria-pressed=true]{outline:1px solid #4b8ed6;background:#338de010}.as-order strong{font-size:12px}.as-order span,.as-order small{font-size:10px;color:var(--text-secondary);overflow-wrap:anywhere}.as-steps{display:flex;list-style:none;padding:0;margin:18px -4px 12px;gap:0}.as-steps li{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:9px;color:var(--muted);z-index:0;white-space:nowrap}.as-steps li:before{position:absolute;content:'';height:2px;background:var(--border);left:-50%;right:50%;top:10px;z-index:-1}.as-steps li:first-child:before{display:none}.as-step-dot{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--page);border:1px solid var(--border);font-size:10px}.as-steps .complete .as-step-dot{background:#2e7edd;border-color:#2e7edd;color:#fff}.as-steps .complete:before,.as-steps .current:before{background:#2e7edd}.as-steps .current{color:var(--text);font-weight:600}.as-steps .current .as-step-dot{background:#1da98c;border-color:#1da98c;color:white;box-shadow:0 0 0 3px #1da98c15}.as-timeline{padding:0 0 0 16px;list-style:none;border-left:2px solid var(--border);margin:12px 0 12px 5px}.as-timeline li{position:relative;margin:0 0 15px}.as-timeline li:before{content:'';position:absolute;left:-21px;top:5px;width:8px;height:8px;background:#98b5cc;border-radius:50%}.as-timeline li:first-child:before{background:#1da98c}.as-timeline strong{display:block;font-size:11px;font-weight:500}.as-timeline small{display:block;font-size:10px;color:var(--text-secondary);margin-top:3px}

/* Shared by the assistant, its inline tools and the adjacent status bar. */
.screen:has(.xiaoyuan.open) {
  --xy-canvas: #0c1323;
  --xy-action: #235aeb;
  --xy-shadow: 0 5px 18px #03091335;
}
:root[data-theme="light"] .screen:has(.xiaoyuan.open) {
  --xy-canvas: #f4f7fc;
  --xy-shadow: 0 4px 16px #1536750b;
}
.xiaoyuan {
  --page: var(--xy-canvas);
  --card: #151f33;
  --panel: #101a2d;
  --raised: #1c2a43;
  --text: #f4f7ff;
  --text-body: #dde6f5;
  --text-secondary: #b1bfd6;
  --muted: #a2b2cc;
  --subtle: #94a6c4;
  --accent: #5488ff;
  --accent-text: #91b5ff;
  --selected: #20375c;
  --composer: var(--card);
  --border: #abc7ff26;
  --divider: #abc7ff18;
  --xy-mint: #5de1b7;
  --xy-amber: #ffb760;
  --xy-violet: #bca5ff;
}
:root[data-theme="light"] .xiaoyuan {
  --card: #fff;
  --panel: #f6f8fc;
  --raised: #eef3fb;
  --text: #122441;
  --text-body: #283953;
  --text-secondary: #50627c;
  --muted: #586b86;
  --subtle: #5e7088;
  --accent: var(--xy-action);
  --accent-text: #2358ca;
  --selected: #e8efff;
  --border: #183d7326;
  --divider: #183d7314;
  --xy-mint: #087f65;
  --xy-amber: #a3510b;
  --xy-violet: #7145c4;
}
.screen:has(#xiaoyuan.open) .statusbar { background: var(--xy-canvas); }
.xy-top { padding: 5px 14px 8px; gap: 2px; }
.xiaoyuan .xy-top .ti { text-align: left; font-size: 17px; margin-left: 3px; }
.xy-top .bk { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--text); background: transparent; }
.xy-top button:hover { background: var(--raised); }
.xiaoyuan :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* The orbital lines follow the same center as the original animated orb. */
.xy-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 9px 16px 22px;
  padding: 28px 22px;
  border: 1px solid #708bff45;
  border-radius: 22px;
  text-align: left;
  background: radial-gradient(ellipse at 89% 40%, #2959e7 0%, transparent 57%),
              linear-gradient(112deg, #14254f 8%, #183e9a 68%, #442b9c);
}
.xy-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -80% -20%;
  pointer-events: none;
  background: repeating-radial-gradient(ellipse at 73% 50%, transparent 0 22px, #bdceff2b 23px, transparent 24px 37px);
  transform: rotate(-19deg);
  mask-image: linear-gradient(100deg, transparent 22%, #000 78%);
}
.xy-hero .orb {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 102px;
  height: 102px;
  margin: 0;
  transform: translateY(-50%);
  filter: drop-shadow(0 10px 14px #0d164777);
}
.xy-hero .hi { position: relative; color: #fff; font-size: 25px; letter-spacing: -.025em; line-height: 1.35; }
.xy-hero .sub { position: relative; color: #dce7ff; font-size: 14px; line-height: 1.65; margin-top: 9px; }

.xy-welcome-switch { padding: 0; gap: 18px; background: transparent; }
.xy-welcome-switch button { position: relative; padding: 8px 0 11px; font-size: 15px; }
.xy-welcome-switch button[aria-pressed="true"] { color: var(--text); background: transparent; }
.xy-welcome-switch button[aria-pressed="true"]::after {
  content: ""; position: absolute; bottom: 2px; left: 0; width: 22px; height: 3px; border-radius: 2px; background: var(--accent);
}
.xy-welcome-controls { margin: 0 3px 10px; }
.xy-welcome .xy-refresh { font-size: 13px; }
.xy-sugs { gap: 0; padding: 3px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; }
.xy-welcome .xy-sug {
  position: relative; min-height: 67px; grid-template-columns: 36px minmax(0,1fr) 10px;
  gap: 12px; border: 0; border-radius: 13px; background: transparent;
}
.xy-sug + .xy-sug::before { content: ""; position: absolute; top: 0; left: 60px; right: 14px; border-top: 1px solid var(--divider); }
.xy-sug-icon { width: 36px; height: 36px; border-radius: 11px; color: var(--icon-ink,var(--accent-text)); background: color-mix(in srgb, currentColor 13%, var(--card)); }
.xy-sug-icon[data-tone="mint"] { --icon-ink: var(--xy-mint); }
.xy-sug-icon[data-tone="amber"] { --icon-ink: var(--xy-amber); }
.xy-sug-icon[data-tone="violet"] { --icon-ink: var(--xy-violet); }
.xy-sug-copy { gap: 3px; }
.xy-sug-copy strong { font-size: 15px; }
.xy-sug-copy > span { font-size: 13px; }

.xy-chat { padding: 14px 17px 6px; overscroll-behavior-y: contain; }
.xy-chat .msg { margin-bottom: 23px; }
.xiaoyuan .msg.user .bubble,
:root[data-theme="light"] .xiaoyuan .msg.user .bubble {
  color: #fff; background: var(--xy-action); max-width: 86%; border-radius: 17px 17px 5px 17px;
}
.xy-chat .bubble.markdown-body {
  background: transparent; padding: 1px 2px;
  font-size: 16px; line-height: 1.75; font-variant-numeric: tabular-nums;
}
.markdown-body > p:first-child { color: var(--text); }
.markdown-body strong { color: var(--text); }
.markdown-body > p:first-child strong { color: var(--accent-text); }
.markdown-body :is(h1,h2,h3,h4,h5,h6) { color: var(--text); line-height: 1.4; margin: 20px 0 7px; }
.markdown-body :is(h1,h2) { font-size: 18px; }
.markdown-body li::marker { color: var(--accent-text); font-weight: 600; }
.markdown-body li > p { margin: 0; }
.markdown-body blockquote { background: var(--selected); padding: 10px 13px; border-radius: 0 9px 9px 0; }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.markdown-table-scroll { border-color: var(--border); border-radius: 11px; background: var(--card); }
.markdown-body th { background: var(--selected); color: var(--accent-text); }
.markdown-body th, .markdown-body td { border-right: 0; }
.markdown-body .xy-query-source { font-size: 12px; line-height: 1.5; }
.xy-answer-status { color: var(--muted); }
.xy-answer-status summary { min-height: 30px; }
.xy-answer-status summary svg { width: 15px; height: 15px; }
.xy-chat .typing { background: var(--selected); }
.xy-chat .typing i { background: var(--accent-text); }
.xy-chat button.retry { background: transparent; border: 0; color: var(--accent-text); padding: 5px 0; font: inherit; font-size: 14px; text-decoration: underline; }

.xy-bottom { padding-top: 4px; background: var(--page); }
.xy-input-wrap { background: var(--composer); border-radius: 19px; box-shadow: var(--xy-shadow); }
.xy-input-wrap:focus-within { border-color: var(--accent); }
.xy-input-wrap input { font-size: 16px; }
.xy-input-wrap input:focus-visible { outline: none; }
.xy-intro:not(.hide) ~ .xy-bottom .om-compact-heading { scrollbar-width: none; }
.xy-chat .bubble:has(> .as-card), .xy-chat .bubble:has(> .sd-chat-card) { padding: 0; background: transparent; }
.xy-chat .as-rows :is(dt,dd) { font-size: 13px; }
.xy-chat .as-active { color: var(--xy-mint); }
.xy-chat .as-expiring { color: var(--xy-amber); }
.xiaoyuan .xy-tool.send,
:root[data-theme="light"] .xiaoyuan .xy-tool.send { background: var(--xy-action); color: #fff; }
.xy-rec-t { color: var(--text-secondary); }
.xiaoyuan .om-compact-label { color: var(--text-secondary); }
.xiaoyuan .xy-bottom .om-compact-heading {
  flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px; scrollbar-width: none;
}
.xy-bottom .om-compact-label { min-height: 32px; white-space: nowrap; }
.xy-bottom .xy-welcome-skill { display: inline-flex; }

/* Keep Markdown prose on one ink and typeface; tables keep their own hierarchy. */
.xiaoyuan { --xy-prose: #f5f5f5; }
:root[data-theme="light"] .xiaoyuan { --xy-prose: #101010; }
.xy-chat .markdown-body > :is(p,h1,h2,h3,h4,h5,h6,ul,ol,blockquote,pre),
.xy-chat .markdown-body > :is(p,h1,h2,h3,h4,h5,h6,ul,ol,blockquote,pre) :is(strong,em,a,li,p,code,del),
.xy-chat .markdown-body li::marker { font-family: inherit; color: var(--xy-prose); }
.xy-chat .markdown-body > blockquote { background: transparent; border-color: var(--border); }
.xy-chat .markdown-body a { text-decoration: underline; text-underline-offset: 3px; }

.skill-shade[hidden], .skill-fields [hidden] { display: none; }
.skill-shade {
  position: absolute; inset: 0; z-index: 80; display: flex; align-items: flex-end;
  background: #05112d70;
}
.skill-sheet {
  display: flex; flex-direction: column; width: 100%; max-height: 70%; min-height: 42%;
  border-radius: 24px 24px 0 0; overflow-y: auto; overscroll-behavior: contain; color: var(--text); background: var(--card);
  box-shadow: 0 -8px 30px #08163026;
}
.skill-sheet header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 9px; }
.skill-sheet h2 { font-size: 19px; }
.skill-sheet button { cursor: pointer; font: inherit; }
.skill-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--raised); color: var(--text-secondary); }
.skill-sheet > * { flex-shrink: 0; }
.skill-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 8px 20px 14px; }
.skill-fields label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 13px; }
.skill-fields label:has(select), .skill-goals { grid-column: 1 / -1; }
.skill-fields :is(input,select) {
  width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 15px;
}
.skill-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.skill-goals button { padding: 10px 4px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); background: transparent; font-size: 13px; }
.skill-goals button[aria-pressed=true] { color: #fff; border-color: var(--xy-action); background: var(--xy-action); font-weight: 600; }
.skill-sheet footer { margin-top: auto; padding: 10px 20px 23px; border-top: 1px solid var(--divider); }
.skill-query { color: var(--text-body); font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.skill-send { width: 100%; padding: 11px; border: 0; border-radius: 12px; background: var(--xy-action); color: #fff; }
.skill-send:disabled { opacity: .5; }
.xy-chat,.xy-intro { min-height: 0; }
.reading-drag,.reading-drag * { user-select: none !important; cursor: grabbing !important; }
@media (prefers-reduced-motion: reduce) {
  .xy-chat .msg, .xy-chat .typing i { animation: none; }
}

#xy-history-open {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 5px;
  height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); color: var(--text-secondary); font: inherit;
  font-size: 13px; white-space: nowrap; cursor: pointer;
}
#xy-history-open:hover, #xy-history-open[aria-expanded=true] { background: var(--raised); }
#xy-history-open:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
#xy-history:not([hidden]) {
  position: absolute; inset: 0; z-index: 500; display: flex; justify-content: flex-end;
  overflow: hidden; background: rgb(5 13 27 / 45%);
}
.xy-history-drawer {
  box-sizing: border-box; width: 81%; min-height: 0; padding: 16px 14px;
  display: flex; flex-direction: column; background: var(--page); color: var(--text);
  border-radius: 18px 0 0 18px; box-shadow: -6px 0 24px #0002;
  animation: xy-history-slide .18s ease-out;
}
@keyframes xy-history-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .xy-history-drawer { animation: none; } }
#xy-history-query {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 12px; background: var(--card); color: var(--text); font: inherit;
}
#xy-history button { text-align: left; cursor: pointer; background: transparent; color: inherit; font: inherit; }
#xy-history-new { border: 0; border-bottom: 1px solid var(--border); padding: 16px 4px; }
#xy-history-new span { color: var(--accent-text); margin-right: 5px; }
#xy-history-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
#xy-history-body h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 15px 6px 4px; }
#xy-history-body button { border: 0; border-radius: 8px; width: 100%; padding: 10px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#xy-history-body button:hover, #xy-history-body button[aria-current=true] { background: var(--selected); }

body { padding-top: 80px; }
.view-toolbar {
  position: absolute; inset: 0 0 auto; height: 54px; padding: 0 clamp(12px, 3vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); color: var(--text); border-bottom: 1px solid var(--border);
}
.view-toolbar strong { font-size: 17px; letter-spacing: -.04em; }
.view-options { display: flex; background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.view-options button, .desktop-assistant {
  border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; font: inherit;
}
.view-options button { padding: 5px 12px; border-radius: 7px; font-size: 13px; }
.view-options button[aria-pressed=true] { background: var(--selected); color: var(--accent-text); font-weight: 600; }
.desktop-assistant { display: none; }
.xy-workspace-link,.xy-rail-brand,.xy-rail-caption,.xy-rail-exit { display: none; }
body[data-handset] { padding-top: 20px; }
[data-handset] .view-toolbar { display: none; }
[data-view=desktop] .screen:has(.xiaoyuan.open) .tabbar,
[data-view=desktop] #xiaoyuan > .xy-top > .bk { display: none; }
.sd-back-label { display: none; }
.sd-estimate-card .sd-actions > button { min-height: 44px; }
[data-view=desktop] .sd-overlay .bk {
  display: inline-flex; align-items: center; gap: 5px; width: auto; min-height: 36px;
  padding-inline: 10px; border-radius: 8px; font: inherit; font-size: 14px;
}
[data-view=desktop] .sd-back-label { display: inline; }
[data-view=desktop] .xy-workspace-link {
  display: block; background: transparent; color: var(--text-secondary); font: inherit;
  font-size: 13px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; margin-right: 10px;
}
.sw-del { border: 0; background: transparent; }
.sw-acts:focus-within { z-index: 3; }
body[data-view=desktop] { padding: 54px 0 0; height: 100dvh; min-height: 0; }
[data-view=desktop] .phone-slot { width: 100%; height: 100%; }
[data-view=desktop] .phone { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
[data-view=desktop] .screen { border-radius: 0; }
[data-view=desktop] :is(.dynamic-island,.statusbar) { display: none; }
[data-view=desktop] :is(.page,.xiaoyuan,.picker,.pdetail) { top: 0; }
[data-view=desktop] .xy-history-drawer { max-width: 360px; }
[data-view=desktop] .xy-ball-fab { left: calc(100% - 76px); top: max(58px, calc(100% - 158px)); }
[data-view=desktop] .xy-more-menu { max-height: calc(100% - 64px); overflow-y: auto; }
[data-view=desktop] :is(.sheet,.pick-sheet,.skill-sheet,.cf-box,.app-control-dialog) { max-width: 560px; margin-inline: auto; }
[data-view=desktop] :is(.xy-intro,.xy-chat,.page) { scrollbar-width: thin; }
[data-view=desktop] :is(.xy-intro,.xy-chat,.page)::-webkit-scrollbar { display: block; width: 7px; }
[data-view=desktop] :is(button,[onclick]):hover { cursor: pointer; }
[data-view=desktop] :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Size replies by their content, independently of the conversation and composer width. */
[data-view=desktop] #xy-chat {
  --reply-card-width: 440px;
  --reply-data-width: 608px;
}
[data-view=desktop] #xy-chat .msg.ai > .bubble:where(:not(.typing)) {
  max-inline-size: min(100%, var(--reply-card-width));
  overflow-wrap: anywhere;
}
[data-view=desktop] #xy-chat .msg.ai > .markdown-body,
[data-view=desktop] #xy-chat .msg.ai > .bubble:has(table, .pw-plot, .so-chart, .oa-plot, .sk-plot, .xr-risk-chart) {
  max-inline-size: min(100%, var(--reply-data-width));
}
/* Markdown prose and embedded tool results can share the same reply. */
[data-view=desktop] #xy-chat .markdown-body > :is(article, section, form, div, details, figure) {
  max-inline-size: min(100%, var(--reply-card-width));
}
[data-view=desktop] #xy-chat .markdown-body > :is(.markdown-table-scroll, :has(table, .pw-plot, .so-chart, .oa-plot, .sk-plot, .xr-risk-chart)) {
  max-inline-size: min(100%, var(--reply-data-width));
}
[data-view=desktop] #xy-chat .msg.user > .bubble { max-inline-size: min(86%, 480px); overflow-wrap: anywhere; }
[data-view=desktop] #xy-chat .bubble :is(img, video, canvas, input, select, textarea, button) { max-inline-size: 100%; }
[data-view=desktop] #xy-chat .bubble :is(pre, .markdown-table-scroll) { overflow-x: auto; overscroll-behavior-x: contain; }
/* Restored Markdown may contain a bare table instead of a scroll wrapper. */
[data-view=desktop] #xy-chat .markdown-body > table { display: block; max-width: 100%; overflow-x: auto; }
[data-view=desktop] #xy-chat .bubble :is(button[class$="-primary"], button[class*="-primary "],
  [class$="-actions"] > button, .sd-chat-card > button) {
  width: fit-content; flex: 0 1 auto; min-height: 36px; padding-inline: 15px; white-space: normal;
}
[data-view=desktop] #xy-chat [class$="-actions"] { flex-wrap: wrap; }
/* Peer actions share a grid track size, including when labels wrap onto a second line. */
[data-view=desktop] #xy-chat [class$="-actions"]:has(> button ~ button) {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr));
  grid-auto-rows: 1fr; align-items: stretch; gap: 8px;
}
[data-view=desktop] #xy-chat .bubble [class$="-actions"]:has(> button ~ button) > button {
  width: 100%; height: 100%; min-height: 38px; margin: 0; box-sizing: border-box;
}
[data-view=desktop] .sd-estimate-card .sd-actions { margin-top: 10px; }

[data-view=desktop] .xy-hero {
  margin: 24px auto 16px; padding: 0; border: 0; background: transparent; text-align: center;
}
[data-view=desktop] .xy-hero::before,[data-view=desktop] .xy-hero .sub { display: none; }
[data-view=desktop] .xy-hero .orb {
  position: static; transform: none; width: 46px; height: 46px; margin: 0 auto 10px;
}
[data-view=desktop] .xy-hero .hi { color: var(--text); font-size: clamp(23px, 2.4vw, 34px); }

@media (min-width: 760px) {
  [data-view=desktop] .screen { --rail: clamp(142px, 14vw, 208px); }
  [data-view=desktop] .tabbar {
    inset: 0 auto 0 0; width: var(--rail); height: auto; border: 0; border-right: 1px solid var(--border);
    flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 24px 12px; gap: 6px;
  }
  [data-view=desktop] .desktop-assistant {
    display: block; padding: 13px 16px; margin-bottom: 14px; text-align: left; border-radius: 12px;
    background: var(--selected); color: var(--accent-text); font-weight: 650;
  }
  [data-view=desktop] .tab { width: auto; padding: 12px 16px; flex-direction: row; gap: 12px; border-radius: 10px; }
  [data-view=desktop] .tab .tlabel { font-size: 15px; }
  [data-view=desktop] .tab svg { width: 21px; height: 21px; }
  [data-view=desktop] .tab .dot { top: 12px; right: 16px; }
  [data-view=desktop] .tab:hover, [data-view=desktop] .tab.active { background: var(--soft); }
  [data-view=desktop] .page { left: var(--rail); bottom: 0; padding: 20px max(12px, calc((100% - var(--rail) - 1160px) / 2)) 40px; }
  [data-view=desktop] .xiaoyuan { left: 0; --history-width: clamp(185px, 20vw, 264px); padding-left: var(--history-width); }
  [data-view=desktop] :is(.xy-workspace-link,#xy-history-open) { display: none; }
  [data-view=desktop] #xy-history:not([hidden]) {
    inset: 0 auto 0 0; width: var(--history-width); z-index: 1; background: var(--panel);
    border-right: 1px solid var(--border);
  }
  [data-view=desktop] .xy-history-drawer {
    width: 100%; background: transparent; padding: 20px 14px 12px; border-radius: 0; box-shadow: none; animation: none;
  }
  [data-view=desktop] .xy-rail-brand { display: block; padding: 2px 8px 20px; color: var(--text); }
  [data-view=desktop] #xy-history-new {
    order: -1; margin: 0 0 10px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--selected); color: var(--accent-text); padding: 10px 12px;
  }
  [data-view=desktop] .xy-rail-brand { order: -2; }
  [data-view=desktop] .xy-rail-caption { display: block; margin: 22px 6px 6px; color: var(--muted); font-size: 12px; }
  [data-view=desktop] #xy-history-body { font-size: 13px; color: var(--text-secondary); }
  [data-view=desktop] #xy-history .xy-rail-exit { display: block; border: 0; border-top: 1px solid var(--border); padding: 16px 6px 4px; }
  [data-view=desktop] .xy-top { padding: 10px 24px; border-bottom: 1px solid var(--border); }
  [data-view=desktop] :is(.xy-intro,.xy-chat,.xy-bottom) {
    width: min(100%, 960px); margin-inline: auto; padding-inline: clamp(16px, 3vw, 44px);
  }
  [data-view=desktop] .xy-welcome { padding-inline: 0; }
  [data-view=desktop] .xy-sugs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 8px; }
  [data-view=desktop] .xy-bottom { padding-bottom: 16px; }
  [data-view=desktop] .xy-input-wrap { padding: 10px; }
  [data-view=desktop] .xy-chat { padding-top: 24px; }
  [data-view=desktop] :is(#station-list,#dev-list) {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); align-items: start;
  }
  [data-view=desktop] .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-view=desktop] :is(.picker,.pdetail) { padding-inline: max(16px, calc((100% - 1024px) / 2)); }
  [data-view=desktop] .skill-shade { align-items: center; }
  [data-view=desktop] .skill-sheet { max-height: 88%; border-radius: 18px; }
  [data-view=desktop] :is(.om-manager-body,.sk-body,.so-layer-body) {
    width: min(100%, 920px); margin-inline: auto; padding: 24px;
  }
  [data-view=desktop] .so-sheet .so-panel { max-width: 600px; margin-inline: auto; }
  [data-view=desktop] .sw-row { padding-right: 52px; background: var(--card); }
  [data-view=desktop] .sw-row .sw-acts { width: 52px; background: var(--soft); }
  [data-view=desktop] .sw-del { color: var(--muted); padding: 8px; }
  [data-view=desktop] .sw-del svg { stroke: currentColor; }
  [data-view=desktop] .sw-del:hover { color: var(--red); }
  [data-view=desktop] .sw-row .card.station { transform: none !important; cursor: pointer; }
}

@media (min-width: 480px) and (min-height: 640px) {
  [data-view=desktop] .xy-intro:not(.hide) { display: contents; }
  [data-view=desktop] .xy-intro:not(.hide) .xy-hero { order: 1; margin-top: auto; flex-shrink: 0; }
  [data-view=desktop] .xy-intro:not(.hide) ~ .xy-bottom {
    order: 2; margin-top: 0; padding-bottom: 10px; max-height: 36%; overflow-y: auto;
  }
  [data-view=desktop] .xy-intro:not(.hide) .xy-welcome {
    order: 3; width: min(100%, 960px); margin: 0 auto auto; min-height: 0; overflow-y: auto;
    padding: 4px clamp(16px, 3vw, 44px) 16px;
  }
  [data-view=desktop] .xy-sugs { background: transparent; border: 0; padding: 0; gap: 8px; }
  [data-view=desktop] .xy-welcome .xy-sug { border: 1px solid var(--border); background: var(--card); }
  [data-view=desktop] .xy-sug + .xy-sug::before { display: none; }
}
