/* 财小云 AI 官网伴随栏（V25.85：全幅背景贯穿 + 通高 24px 晴空毛玻璃圆角） */
:root {
  --cxy-ask-w: 392px;
  --cxy-ask-gap: 14px;
  --cxy-copilot-offset: 0px;
  --cxy-ask-lift: 0px;
}
.cxy-ask {
  --cxy-ask-edge:24px;
  position:fixed; right:max(16px,env(safe-area-inset-right));
  bottom:calc(max(var(--cxy-ask-edge),env(safe-area-inset-bottom)) + var(--cxy-ask-lift,0px));
  z-index:100; font-family:var(--ztc-sans); visibility:hidden;
}
.cxy-ask.is-ready { visibility:visible; }
.cxy-ask > .cxy-ask-launcher {
  display:inline-flex; align-items:center; justify-content:center; vertical-align:bottom;
  box-sizing:border-box; width:54px; min-width:54px; height:54px; min-height:54px; padding:0; border-radius:50%; font:inherit; cursor:pointer;
}
.cxy-ask-name { display:none; }
.cxy-ask.is-open { z-index:105; }
.cxy-ask.is-open > .cxy-ask-launcher { display:none; }
.cxy-ask-launcher .cxy-ai-entry-mark { width:28px; }

.cxy-ask-panel {
  position:fixed; display:flex; flex-direction:column; box-sizing:border-box;
  top:calc(var(--ztc-shell-header-inset-top,10px) + 78px);
  right:max(var(--cxy-ask-gap),env(safe-area-inset-right));
  bottom:max(var(--cxy-ask-gap),env(safe-area-inset-bottom));
  width:var(--cxy-ask-w); max-width:calc(100vw - 24px); height:auto;
  overflow:hidden; border-radius:24px;
  border:1px solid rgba(27,110,243,.16);
  background:linear-gradient(180deg,rgba(236,246,255,.78) 0%,rgba(248,251,255,.90) 26%,rgba(255,255,255,.96) 100%);
  -webkit-backdrop-filter:blur(26px) saturate(1.45); backdrop-filter:blur(26px) saturate(1.45);
  box-shadow:0 20px 48px rgba(15,35,66,.14), inset 0 1px 0 rgba(255,255,255,.82);
}
.cxy-ask-panel > * { position:relative; z-index:1; }
.cxy-ask-panel[hidden], .cxy-ask-actions [hidden], .cxy-ask-status[hidden] { display:none; }
.cxy-ask-panel.is-connected > .cxy-ask-bar { display:none; }
.cxy-ask-bar {
  display:flex; flex:none; align-items:center; justify-content:space-between; min-height:56px;
  padding:6px 10px 6px 16px; border-bottom:1px solid rgba(27,110,243,.10);
  background:rgba(255,255,255,.36);
}
.cxy-ask-identity,.cxy-ask-actions { display:flex; align-items:center; }
.cxy-ask-identity { gap:8px; }
.cxy-ask-identity .cxy-ai-entry-mark { width:26px; }
.cxy-ask-identity strong { font-size:15px; font-weight:700; color:#0B1F3A; }
#cxy-ask-title:focus { outline:none; }
.cxy-ask-actions :is(a,button) {
  display:inline-grid; place-items:center; min-width:44px; height:44px; padding:0 6px;
  border:0; border-radius:10px; background:transparent; color:#415776; cursor:pointer;
  font:600 13px/1 var(--ztc-sans);
}
.cxy-ask-actions :is(a,button):is(:hover,[aria-pressed="true"]) { background:rgba(238,245,255,.85); color:#1B6EF3; }
.cxy-ask-actions :is(a,button):focus-visible { outline:2px solid #1B6EF3; outline-offset:-2px; }
.cxy-ask-actions svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.cxy-ask-actions .cxy-ask-expand-local {
  position:relative; width:44px; overflow:hidden; font-size:0;
}
.cxy-ask-expand-local::before,.cxy-ask-expand-local::after {
  content:""; position:absolute; width:7px; height:7px; border:solid currentColor;
}
.cxy-ask-expand-local::before { top:13px; left:13px; border-width:2px 0 0 2px; }
.cxy-ask-expand-local::after { bottom:13px; right:13px; border-width:0 2px 2px 0; }
.cxy-ask-expand-local[aria-expanded="true"]::before { border-width:0 2px 2px 0; }
.cxy-ask-expand-local[aria-expanded="true"]::after { border-width:2px 0 0 2px; }
.cxy-ask-panel iframe { display:block; flex:1; min-height:0; width:100%; border:0; background:transparent; }
.cxy-ask-panel:has(> .cxy-ask-status:not([hidden])) iframe { visibility:hidden; }
.cxy-ask-status {
  position:absolute; inset:57px 0 0; z-index:2; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:18px; margin:0; padding:32px; color:#415776; text-align:center; font-size:14px; line-height:1.7;
  background:transparent;
}
.cxy-ask-status::before { content:''; width:30px; height:30px; border:2px solid #D6E8FD; border-top-color:#1B6EF3; border-radius:50%; }
@media (min-width:1180px) {
  .cxy-ask.is-wide .cxy-ask-panel {
    top:calc(var(--ztc-shell-header-inset-top,10px) + 78px);
    width:min(700px,calc(100vw - 48px));
    box-shadow:0 28px 72px rgba(11,31,58,.28), inset 0 1px 0 rgba(255,255,255,.84);
  }
}
@media (max-width:1179px) { .cxy-ask-actions .cxy-ask-wide { display:none; } }
@media (min-width:1440px) {
  :root { --cxy-ask-w:360px; }
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) {
    --cxy-copilot-offset:calc(var(--cxy-ask-w) + var(--cxy-ask-gap) * 2);
  }
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) .cxy-ask-panel {
    top:var(--ztc-shell-header-inset-top,10px);
    right:var(--cxy-ask-gap);
    bottom:var(--cxy-ask-gap);
    height:auto;
    border-radius:24px;
  }
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) .ztc-header--overlay {
    right:var(--cxy-copilot-offset);
  }
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) .ztc-header--solid {
    width:calc(100% - var(--cxy-copilot-offset));
  }
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) .ztc-header-inner {
    width:calc(100% - 28px);
    max-width:1320px;
  }
  /* 全幅横幅与分节直接置于 #ztc-main 下；区块内部右留白，让背景贯穿至伴随栏背后。 */
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) :is(
    #ztc-main > header,
    #ztc-main > section:not(.ztc-container),
    #ztc-main > article,
    #ztc-main > nav,
    #ztc-main > div:not(.cxy-reader-shell):not(.ztc-container),
    .ztc-subscribe,
    #site-footer
  ) {
    box-sizing:border-box;
    padding-right:var(--cxy-copilot-offset);
  }
  /* 居中定宽阅读壳 / 专题容器同步居中在左侧内容区 */
  :is(html.cxy-ask-dock-push,body.cxy-ask-dock-push) #ztc-main > :is(.cxy-reader-shell,.ztc-container) {
    box-sizing:border-box;
    width:min(1120px,calc(100% - var(--cxy-copilot-offset) - 48px));
    margin-left:max(24px,calc((100% - var(--cxy-copilot-offset) - min(1120px,100% - var(--cxy-copilot-offset) - 48px)) / 2));
    margin-right:auto;
  }
}
@media (min-width:1680px) {
  :root { --cxy-ask-w:392px; }
}
@media (prefers-reduced-motion:no-preference) {
  .cxy-ask-panel { transition:width .22s ease, top .22s ease; }
  .cxy-ask.is-open .cxy-ask-panel { animation:cxy-ask-appear .16s ease-out; }
  .cxy-ask-status::before { animation:cxy-window-loading 1s linear infinite; }
  @keyframes cxy-ask-appear { from {opacity:.45; transform:translateY(7px);} }
  @keyframes cxy-window-loading { to {transform:rotate(360deg);} }
}
@media (min-width:1440px) and (prefers-reduced-motion:no-preference) {
  .ztc-header--overlay { transition:transform .24s cubic-bezier(.2,.7,.2,1), right .22s ease; }
  .ztc-header--solid { transition:transform .24s cubic-bezier(.2,.7,.2,1), width .22s ease; }
  :is(
    #ztc-main > header,
    #ztc-main > section:not(.ztc-container),
    #ztc-main > article,
    #ztc-main > nav,
    #ztc-main > div:not(.cxy-reader-shell):not(.ztc-container),
    .ztc-subscribe,
    #site-footer
  ) { transition:padding-right .22s ease; }
}
@media (max-width:767px), (hover:none) and (pointer:coarse) and (max-width:1180px) {
  .cxy-ask { --cxy-ask-edge:18px; right:14px; bottom:calc(max(18px,env(safe-area-inset-bottom)) + var(--cxy-ask-lift,0px)); }
  body.cxy-ask-full { overflow:hidden; }
  .cxy-ask.is-open { z-index:10000; }
  .cxy-ask .cxy-ask-panel:not([hidden]) { inset:0; width:100%; height:100vh; height:100dvh; max-width:none; border:0; border-radius:0; padding-bottom:env(safe-area-inset-bottom); }
  .cxy-ask-bar { padding-top:max(6px,env(safe-area-inset-top)); }
  .cxy-ask-actions .cxy-ask-wide { display:none; }
}
html.cxy-ask-returning { scroll-behavior:auto!important; }
body.cxy-ask-expanded { overflow:hidden; }
.cxy-ask.is-expanded { z-index:10000; }
.cxy-ask.is-expanded .cxy-ask-panel:not([hidden]) {
  inset:0; width:100%; height:100vh; height:100dvh; max-width:none; border:0; border-radius:0; padding:0 0 env(safe-area-inset-bottom);
}
.cxy-ask.is-expanded .cxy-ask-bar { padding-top:max(6px,env(safe-area-inset-top)); }
.cxy-ask.is-expanded .cxy-ask-wide { display:none; }
@media print { .cxy-ask { display:none!important; } }
