/* AI 同事侧栏（ADR-009）：点图标栏上的头像，从右边滑出的可拖宽侧栏，输入框在最底下。
   取代 ADR-006 §7 的「每页底部指令条」。全部限定 html.sh-on / .sh-*，壳关不命中（tests/test_ai_dock_css_scoping.py 守着）。
   字阶只用 13/16/20/24，字重只用 400/600（工作台新区域的约定）。颜色走壳的 --sh-*。
   版面：面板绝对定位在 .sh-deck 的右缘（和内容页同款的白色圆角卡），宽度 = --aiw（ai_panel.js 拖动时写在 .sh-deck 上）；打开时内容页 .sh-stage 右边让出同样宽度。 */
html.sh-on .sh-aipanel{--aip-line:var(--sh-line,#e4e7ec);--aip-ink:var(--sh-ink,#101828);--aip-ink2:var(--sh-ink2,#475467);--aip-blue:var(--sh-blue,#0265c2);--aip-soft:var(--sh-blue-soft,#e8f1fb);--aip-bad:#b42318;--aip-ok:#067647;
  position:absolute;top:var(--sh-pad,8px);right:var(--sh-pad,8px);bottom:var(--sh-pad,8px);width:var(--aiw,420px);z-index:8;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;
  background:#fff;color:var(--aip-ink);border-radius:var(--sh-r3,16px);box-shadow:var(--sh-shadow-raise,-14px 10px 36px rgba(2,10,25,.42));font-size:16px;line-height:24px;
  transform:translateX(calc(100% + 40px));visibility:hidden;transition:transform .3s var(--sh-ease,cubic-bezier(.2,0,0,1)),visibility 0s .3s}
html.sh-on body.sh-ai-open .sh-aipanel{transform:none;visibility:visible;transition:transform .3s var(--sh-ease,cubic-bezier(.2,0,0,1))}
/* 收起时面板被推到右边视口外：只靠 visibility 藏不住它撑出来的横向滚动区，所以底板把越界的部分裁掉（底板本来就是圆角裁切的容器，没有向外的阴影） */
html.sh-on body.sh-ai-on .sh-deck{overflow:clip}
/* 打开时内容页让出右边这一列（margin 过渡，内容页宽度平滑变化）；拖动时不要过渡，跟手 */
html.sh-on body.sh-ai-on .sh-stage{transition:margin-right .3s var(--sh-ease,cubic-bezier(.2,0,0,1))}
html.sh-on body.sh-ai-open .sh-stage{margin-right:calc(var(--aiw,420px) + var(--sh-gap,8px))}
html.sh-on body.sh-ai-drag .sh-stage,html.sh-on body.sh-ai-drag .sh-aipanel{transition:none!important}
html.sh-on body.sh-ai-drag{cursor:col-resize;-webkit-user-select:none;user-select:none}
html.sh-on .sh-aipanel [hidden]{display:none!important}   /* 带 display 的类（flex/grid）会盖过 hidden 属性：麦克风、录音条、菜单项都靠 hidden 开关 */
/* 拖宽把手：面板左缘 8px 宽的热区，中间一根细线，悬停/聚焦/拖动时变蓝 */
html.sh-on .aip-grip{border-radius:0;position:absolute;left:0;top:0;bottom:0;width:10px;z-index:3;cursor:col-resize;touch-action:none;background:none;border:0;padding:0}
html.sh-on .aip-grip::after{content:"";position:absolute;left:3px;top:50%;width:4px;height:48px;margin-top:-24px;border-radius:999px;background:#cdd5df;transition:background-color .15s,height .15s,margin-top .15s}
html.sh-on .aip-grip:hover::after,html.sh-on .aip-grip:focus-visible::after,html.sh-on body.sh-ai-drag .aip-grip::after{background:var(--aip-blue);height:72px;margin-top:-36px}
/* 头部 */
html.sh-on .aip-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex:none;padding:12px 12px 12px 20px;border-bottom:1px solid var(--aip-line)}
html.sh-on .aip-head .sh-aiface{width:32px;height:32px}
html.sh-on .aip-head .sh-aidot{display:none}   /* 头像后面跟的橙点是给图标栏按钮用的（绝对定位），侧栏里的头像不要 */
html.sh-on .aip-who{flex:1 1 120px;min-width:120px}
html.sh-on .aip-hbtns{display:contents}   /* 桌面：按钮和头像同一行（放不下自动折到第二行）；手机见下面 */
html.sh-on .aip-tbtn[hidden]{display:none}
html.sh-on .aip-who b{display:block;font-weight:600}
html.sh-on .aip-who small{display:-webkit-box;font-size:13px;line-height:20px;color:var(--aip-ink2);overflow:hidden;overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical}   /* 窄屏（手机/拖到最窄）放不下一行就折成两行，别截断：多公司账号要靠它认出问的是哪家 */
html.sh-on .aip-ibtn{display:inline-grid;place-items:center;width:40px;height:40px;border:0;border-radius:8px;background:none;color:var(--aip-ink2);cursor:pointer;transition:background-color .15s,color .15s}
html.sh-on .aip-tbtn{flex:none;height:32px;padding:0 12px;border:0;border-radius:8px;background:none;color:var(--aip-ink2);font:inherit;font-size:13px;line-height:20px;font-weight:600;cursor:pointer;transition:background-color .15s,color .15s}
html.sh-on .aip-tbtn:hover{background:#eef3fa;color:var(--aip-ink)}
html.sh-on .aip-ibtn:hover{background:#eef3fa;color:var(--aip-ink)}
html.sh-on .aip-ibtn[disabled]{opacity:.4;cursor:default}
html.sh-on .aip-ico{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* 消息区 */
html.sh-on .aip-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:16px 20px 8px;scrollbar-width:thin;scrollbar-color:#cdd5df transparent;overscroll-behavior:contain}
html.sh-on .aip-hello{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding-top:8px}
html.sh-on .aip-hello p{margin:0;color:var(--aip-ink2)}
html.sh-on .aip-more{align-self:flex-start;min-height:32px;margin:0 0 0 4px}
html.sh-on .aip-chips{display:flex;flex-direction:column;gap:8px;width:100%;margin-top:4px}
html.sh-on .aip-chips button{display:block;width:100%;padding:8px 16px;border:1px solid var(--aip-line);border-radius:12px;background:#fff;color:var(--aip-ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background-color .15s}
html.sh-on .aip-chips button:hover{border-color:#9bbfe8;background:#f6faff}
html.sh-on .aip-msg{display:flex;flex-direction:column;gap:4px;margin:0 0 20px}
html.sh-on .aip-msg.u{align-items:flex-end}
html.sh-on .aip-bub{max-width:100%;padding:8px 16px;border-radius:16px;overflow-wrap:anywhere}
html.sh-on .aip-msg.u .aip-bub{background:var(--aip-blue);color:#fff;border-bottom-right-radius:8px;white-space:pre-wrap;max-width:92%}
html.sh-on .aip-msg.a .aip-bub{padding:0;background:none;width:100%}
html.sh-on .aip-msg.a.agent .aip-bub{border-radius:0}   /* 动手模式的回答没有气泡底，圆角没意义；留着会让里面 12 圆角的卡片被闸判成「嵌套对不上」 */
html.sh-on .aip-attrow{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:92%}
html.sh-on .aip-att{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:0 12px;border:1px solid var(--aip-line);border-radius:999px;background:#fff;color:var(--aip-ink2);font-size:13px;line-height:20px}
html.sh-on .aip-att img{width:28px;height:28px;object-fit:cover;border-radius:8px;margin-left:-8px}
html.sh-on .aip-att .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}
html.sh-on .aip-att[data-st="parsing"] .nm::after{content:"…"}
html.sh-on .aip-att[data-st="err"]{border-color:#f4b4ad;color:var(--aip-bad);background:#fff6f5}
html.sh-on .aip-att button{display:inline-grid;place-items:center;width:32px;height:32px;margin-right:-12px;padding:0;border:0;border-radius:999px;background:none;color:inherit;cursor:pointer;font:inherit}
html.sh-on .aip-att button:hover{background:rgba(16,24,40,.08)}
html.sh-on .aip-again{border:0;background:none;padding:0;color:var(--aip-blue);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
html.sh-on .aip-steps{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
html.sh-on .aip-step{padding:0 12px;border-radius:999px;background:var(--aip-soft);color:var(--aip-blue);font-size:13px;line-height:24px}
html.sh-on .aip-step.no{background:#fef3f2;color:var(--aip-bad)}
html.sh-on .aip-think{display:inline-flex;gap:4px;align-items:center;height:24px;color:var(--aip-ink2);font-size:13px}
html.sh-on .aip-think i{width:6px;height:6px;border-radius:999px;background:#98a2b3;animation:aip-dot 1.1s ease-in-out infinite}
html.sh-on .aip-think i:nth-child(2){animation-delay:.15s}html.sh-on .aip-think i:nth-child(3){animation-delay:.3s}
@keyframes aip-dot{0%,80%,100%{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}
html.sh-on .aip-err{color:var(--aip-bad)}
/* Markdown */
html.sh-on .aip-md>:first-child{margin-top:0}html.sh-on .aip-md>:last-child{margin-bottom:0}
html.sh-on .aip-md p{margin:0 0 12px}
html.sh-on .aip-md ul,html.sh-on .aip-md ol{margin:0 0 12px;padding-left:24px}
html.sh-on .aip-md li{margin:4px 0}
html.sh-on .aip-md h1,html.sh-on .aip-md h2,html.sh-on .aip-md h3,html.sh-on .aip-md h4{margin:16px 0 8px;font-size:16px;line-height:24px;font-weight:600}
html.sh-on .aip-md h1{font-size:20px;line-height:28px}
html.sh-on .aip-md a{color:var(--aip-blue);text-decoration:underline}
html.sh-on .aip-md blockquote{margin:0 0 12px;padding:4px 12px;border-left:3px solid #cdd5df;color:var(--aip-ink2)}
html.sh-on .aip-md hr{border:0;border-top:1px solid var(--aip-line);margin:12px 0}
html.sh-on .aip-md code{padding:0 8px;border-radius:8px;background:#f2f4f7;font:13px/20px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
html.sh-on .aip-code{margin:0 0 12px;border:1px solid var(--aip-line);border-radius:12px;overflow:hidden;background:#f8f9fb}
html.sh-on .aip-code>header{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 4px 12px;border-bottom:1px solid var(--aip-line);font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-code pre{margin:0;padding:12px;overflow-x:auto}
html.sh-on .aip-code pre code{padding:0;background:none}
html.sh-on .aip-tw{margin:0 0 12px;overflow-x:auto;border:1px solid var(--aip-line);border-radius:12px}
html.sh-on .aip-md table{border-collapse:collapse;width:100%;font-size:13px;line-height:20px}
html.sh-on .aip-md th,html.sh-on .aip-md td{padding:8px 12px;border-bottom:1px solid var(--aip-line);text-align:left;white-space:nowrap}
html.sh-on .aip-md th{font-weight:600;background:#f8f9fb}
html.sh-on .aip-md tr:last-child td{border-bottom:0}
html.sh-on .aip-md img{max-width:100%;border-radius:12px}
html.sh-on .aip-chart{width:100%;height:260px;margin:0 0 12px;border:1px solid var(--aip-line);border-radius:12px}
html.sh-on .aip-cur::after{content:"";display:inline-block;width:8px;height:16px;margin-left:4px;vertical-align:-2px;border-radius:0;background:var(--aip-blue);animation:aip-blink 1s steps(2) infinite}
@keyframes aip-blink{50%{opacity:0}}
/* 消息底下的小工具条 */
html.sh-on .aip-acts{display:flex;align-items:center;gap:4px;margin-top:4px;margin-left:-8px}
html.sh-on .aip-act{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--aip-ink2);font:inherit;font-size:13px;line-height:20px;cursor:pointer;transition:background-color .15s,color .15s}
html.sh-on .aip-act:hover{background:#eef3fa;color:var(--aip-ink)}
html.sh-on .aip-act[aria-pressed="true"]{color:var(--aip-blue);background:var(--aip-soft)}
html.sh-on .aip-act.done{color:var(--aip-ok)}
html.sh-on .aip-act .aip-ico{width:16px;height:16px}
html.sh-on .aip-why{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 0}
html.sh-on .aip-why button{min-height:32px;padding:0 12px;border:1px solid var(--aip-line);border-radius:999px;background:#fff;color:var(--aip-ink);font:inherit;font-size:13px;line-height:24px;cursor:pointer}
html.sh-on .aip-why button:hover{border-color:#9bbfe8;background:#f6faff}
html.sh-on .aip-note2{margin:4px 0 0;font-size:13px;line-height:20px;color:var(--aip-ink2)}
/* 底部：附件 + 输入 + 说明 */
html.sh-on .aip-foot{flex:none;padding:8px 16px 12px;background:#fff}
html.sh-on .aip-atts{display:flex;flex-wrap:wrap;gap:8px;margin:0 4px 8px}
html.sh-on .aip-atts:empty{display:none}
/* 岗位说明选择器（P2）：输入条上方独立一行，全宽下拉；没清单／没选中时不出（hidden）；390 下也不挡输入框。 */
html.sh-on .aip-brief{padding:0 0 8px}
html.sh-on .aip-brief[hidden]{display:none}
html.sh-on .aip-brief select{box-sizing:border-box;width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--aip-line);border-radius:12px;background:#fff;color:var(--aip-ink);font:inherit;font-size:16px;cursor:pointer}
/* 输入条：一行（[＋] [输入框] [麦克风] [发送]），空着时只有一行高；字多了输入框往上长（autosize，最高 168）。 */
html.sh-on .aip-bar{position:relative;display:flex;align-items:flex-end;padding:4px;border:1px solid #cdd5df;border-radius:16px;background:#fff;transition:border-color .15s,box-shadow .15s}
html.sh-on .aip-bar:focus-within{border-color:var(--aip-blue);box-shadow:0 0 0 3px rgba(2,101,194,.14)}
html.sh-on .aip-drop .aip-bar{border-color:var(--aip-blue);background:#f6faff}
html.sh-on .aip-ta{display:block;order:2;flex:1 1 auto;min-width:0;width:auto;min-height:40px;max-height:168px;padding:8px;border:0;border-radius:12px;background:none;color:var(--aip-ink);font:inherit;resize:none;outline:0;overflow-y:auto}
html.sh-on .aip-ta::placeholder{color:#98a2b3;font-size:13px}          /* 设计总纲 §3 字阶只有 13/16/20/24：占位字用最小的 13，手机上才放得进一行（11/14 chad：折行看着敷衍） */
html.sh-on .aip-tools{display:contents}   /* 按钮并进 .aip-bar 的同一行，用 order 排：＋ 输入框 麦克风 发送 */
html.sh-on .aip-tools .sp{display:none}
html.sh-on .aip-tools [data-act="attach"]{order:1}
html.sh-on .aip-tools [data-act="mic"]{order:3}
html.sh-on .aip-tools .aip-send{order:4}
html.sh-on .aip-send{display:inline-grid;place-items:center;width:40px;height:40px;border:0;border-radius:12px;background:var(--aip-blue);color:#fff;cursor:pointer;transition:background-color .15s,opacity .15s}
html.sh-on .aip-send[disabled]{background:#cdd5df;cursor:default}
html.sh-on .aip-send.stop{background:#344054}
html.sh-on .aip-rec{display:flex;order:2;flex:1 1 auto;min-width:0;align-items:center;gap:8px;min-height:40px;padding:0 8px;color:var(--aip-bad)}
html.sh-on .aip-rec i{width:10px;height:10px;border-radius:999px;background:var(--aip-bad);animation:aip-dot 1s ease-in-out infinite}
html.sh-on .aip-menu{position:absolute;left:4px;bottom:calc(100% + 8px);z-index:5;min-width:192px;padding:4px;border:1px solid var(--aip-line);border-radius:12px;background:#fff;box-shadow:var(--sh-shadow-pop,0 8px 24px rgba(10,45,85,.24))}
html.sh-on .aip-menu button{display:flex;align-items:center;gap:12px;width:100%;height:40px;padding:0 12px;border:0;border-radius:8px;background:none;color:var(--aip-ink);font:inherit;text-align:left;cursor:pointer}
html.sh-on .aip-menu button:hover{background:#eef3fa}
html.sh-on .aip-fine{font-size:13px;line-height:20px;color:var(--aip-ink2)}   /* 首页里的小字说明（原来常驻在输入条下面，占 1–3 行；chad 11/5 觉得没必要常驻） */
html.sh-on .aip-menu-note{margin:4px 0 0;padding:8px 12px 4px;border-top:1px solid var(--aip-line);font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* ── 让 AI 动手做（ADR-017）：页签 / 开关 / 步骤时间线 / 提示卡 / 产出文件 / 工作区。字阶 13/16/20/24、字重 400/600、颜色走壳令牌；AI 海青色只用在「AI 正在做」的呼吸点上 ── */
html.sh-on .sh-aipanel{--aip-ai:#0a8f9c;--aip-warn:#b54708}
/* 页签 = 台账里已有的「分段开关」（同 meeting.css 的 .mt-seg：灰底 4px 内边距 12 圆角、选中白底、32 高、计数 400 字重） */
html.sh-on .aip-tabs{display:flex;flex:none;align-self:flex-start;margin:12px 20px 0;padding:4px;border-radius:12px;background:#eceff3}
html.sh-on .aip-tabs button{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--aip-ink2);font:inherit;font-weight:600;cursor:pointer;transition:background-color .2s,color .2s}
html.sh-on .aip-tabs button[aria-selected="true"]{background:#fff;color:var(--aip-ink)}
html.sh-on .aip-tabs em{margin-left:4px;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums}
html.sh-on .aip-mode{display:flex;align-items:center;gap:12px;margin:0 4px 8px;min-height:32px}
html.sh-on .aip-mode span{flex:1;min-width:0}
html.sh-on .aip-mode b{display:block;font-weight:600}
html.sh-on .aip-mode .sub{display:block;font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-sw{position:relative;flex:none;width:48px;height:32px;padding:0;border:0;background:none;cursor:pointer}
html.sh-on .aip-sw::before{content:"";position:absolute;left:4px;top:4px;width:40px;height:24px;border-radius:999px;background:#cdd5df;transition:background-color .2s}
html.sh-on .aip-sw::after{content:"";position:absolute;left:6px;top:6px;width:20px;height:20px;border-radius:999px;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.3);transition:transform .2s var(--sh-ease,cubic-bezier(.2,0,0,1))}
html.sh-on .aip-sw[aria-checked="true"]::before{background:var(--aip-blue)}
html.sh-on .aip-sw[aria-checked="true"]::after{transform:translateX(16px)}
html.sh-on .aip-sw:focus-visible{outline:2px solid var(--aip-blue);outline-offset:2px;border-radius:12px}
html.sh-on .aip-sw[disabled]{opacity:.5;cursor:default}
html.sh-on .aip-run{display:flex;align-items:center;gap:8px;margin:0 0 8px;min-height:32px}
html.sh-on .aip-run b{flex:1;min-width:0;font-weight:400;font-size:13px;line-height:20px;color:var(--aip-blue)}   /* 小字用品牌蓝（对白底 5.76）；海青 #0a8f9c 对白底只有 3.87，只给呼吸点这个圆点用 */
html.sh-on .aip-pulse{flex:none;width:8px;height:8px;border-radius:999px;background:var(--aip-ai);animation:aip-pulse 2s ease-in-out infinite}
@keyframes aip-pulse{0%,100%{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}
html.sh-on .aip-stopb{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 12px;border:1px solid var(--aip-line);border-radius:8px;background:#fff;color:var(--aip-ink);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
html.sh-on .aip-stopb .aip-ico{width:16px;height:16px}
html.sh-on .aip-tl{margin:0 0 12px;border:1px solid var(--aip-line);border-radius:12px;overflow:hidden}
html.sh-on .aip-st{display:flex;align-items:flex-start;gap:8px;width:100%;padding:8px 12px;border:0;border-bottom:1px solid var(--aip-line);background:none;color:var(--aip-ink);font:inherit;font-size:13px;line-height:20px;text-align:left}
html.sh-on .aip-st:last-child{border-bottom:0}
html.sh-on button.aip-st{cursor:pointer;min-height:32px}
html.sh-on button.aip-st:hover{background:#f6faff}
html.sh-on .aip-st .k{flex:none;color:var(--aip-ink2)}
html.sh-on .aip-st .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.sh-on .aip-st .r{flex:none;display:grid;place-items:center;width:16px;height:20px}
html.sh-on .aip-st .aip-ico{width:16px;height:16px}
html.sh-on .aip-okc{color:var(--aip-ok);display:grid}
html.sh-on .aip-no{color:var(--aip-bad);display:grid}
html.sh-on .aip-st.more{color:var(--aip-blue);background:#fafbfc;cursor:pointer}
html.sh-on .aip-st.wait,html.sh-on .aip-st.wait .t{color:var(--aip-ink2)}
html.sh-on .aip-stdet{margin:0;padding:8px 12px;border-bottom:1px solid var(--aip-line);background:#f8f9fb;font:13px/20px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
html.sh-on .aip-card{margin:0 0 12px;padding:12px 16px;border:1px solid var(--aip-line);border-radius:12px;background:#fff}
html.sh-on .aip-card h4{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:13px;line-height:20px;font-weight:600;color:var(--aip-ink2)}
html.sh-on .aip-card h4 .aip-ico{width:16px;height:16px}
html.sh-on .aip-card p{margin:0;font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-card .aip-stdet{margin:0 0 8px;border:1px solid var(--aip-line);border-radius:12px}
html.sh-on .aip-card.warn{background:#fffaeb;border-color:#fedf89}
html.sh-on .aip-card.warn h4,html.sh-on .aip-card.warn p{color:var(--aip-warn)}
html.sh-on .aip-card.bad{background:#fef3f2;border-color:#f4b4ad}
html.sh-on .aip-card.bad h4,html.sh-on .aip-card.bad p{color:var(--aip-bad)}
html.sh-on .aip-card.mute{background:#f8f9fb}
html.sh-on .aip-btns{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
/* 按钮：次要 = 白底细线 32 高 13 号；主动作 = 蓝 40 高 16 号（一屏一个），同台账其它页 */
html.sh-on .aip-btn{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;border:1px solid #cdd5df;border-radius:8px;background:#fff;color:var(--aip-ink);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
html.sh-on .aip-btn.p{height:40px;padding:0 16px;border-color:var(--aip-blue);border-radius:12px;background:var(--aip-blue);color:#fff;font-size:16px;line-height:24px;font-weight:600}
html.sh-on .aip-btn[disabled]{opacity:.5;cursor:default}
html.sh-on .aip-lnk{min-height:32px;padding:0 4px;border:0;background:none;color:var(--aip-blue);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
html.sh-on .aip-reason{display:block;width:100%;height:40px;margin-top:8px;padding:0 12px;border:1px solid #cdd5df;border-radius:8px;font:inherit;color:var(--aip-ink)}
html.sh-on .aip-card.files h4{margin-bottom:4px}
html.sh-on .aip-file{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--aip-line)}
html.sh-on .aip-card.files .aip-file:first-of-type{border-top:0}
html.sh-on .aip-file .fi{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:8px;background:#f2f4f7;color:var(--aip-ink2)}
html.sh-on .aip-file .fn{flex:1;min-width:0}
html.sh-on .aip-file .fn b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
html.sh-on .aip-file .fn small{font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-fbt{display:flex;flex:none;gap:8px}
html.sh-on .aip-dl,html.sh-on .aip-vw{display:inline-flex;align-items:center;gap:8px;flex:none;height:32px;padding:0 12px;border:1px solid #cdd5df;border-radius:8px;background:#fff;color:var(--aip-ink);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
html.sh-on .aip-dl .aip-ico{width:16px;height:16px}
html.sh-on .aip-vw:hover,html.sh-on .aip-dl:hover{border-color:#9bbfe8;background:#f6faff}
html.sh-on .aip-dl.done{color:var(--aip-ok)}
html.sh-on .aip-dl.no{color:var(--aip-bad)}
html.sh-on .aip-dl[disabled]{opacity:.5;cursor:default}
html.sh-on .aip-wh{margin:0 0 4px}
html.sh-on .aip-wh b{font-weight:600}
html.sh-on .aip-wsub{margin:0 0 12px;font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-skel{height:56px;margin:0 0 8px;border-radius:12px;background:linear-gradient(90deg,#f2f4f7,#e9edf3,#f2f4f7)}
html.sh-on .aip-empty{padding:40px 8px;text-align:center;color:var(--aip-ink2)}
html.sh-on .aip-empty b{display:block;margin-bottom:4px;font-weight:600;color:var(--aip-ink)}
/* 在页面里查看文件（ADR-017 §2.12）：整个替换掉页签/对话/输入条那一块，顶上留 AI 同事标题；返回回到刚才的列表 */
html.sh-on .sh-aipanel.aip-viewing #aipTabs,html.sh-on .sh-aipanel.aip-viewing .aip-body,html.sh-on .sh-aipanel.aip-viewing .aip-foot,html.sh-on .sh-aipanel.aip-viewing .aip-head [data-act="new"],html.sh-on .sh-aipanel.aip-viewing .aip-head [data-act="export"]{display:none}
html.sh-on .aip-viewer{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:12px;padding:12px 16px 16px}
html.sh-on .aip-viewer[hidden]{display:none}
html.sh-on .aip-vh{display:flex;align-items:center;gap:12px;flex:none}
html.sh-on .aip-vh .fn{flex:1;min-width:0}
html.sh-on .aip-vh .fn b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
html.sh-on .aip-vh .fn small{font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-viewer .aip-vseg{align-self:flex-start;flex:none;margin:0}
html.sh-on .aip-vseg button[aria-pressed="true"]{background:#fff;color:var(--aip-ink)}
html.sh-on .aip-viewer .aip-fine{flex:none;margin:0}
html.sh-on .aip-vtxt{flex:0 1 auto;min-height:0;margin:0;padding:12px;overflow:auto;border:1px solid var(--aip-line);border-radius:12px;background:#f8f9fb;color:var(--aip-ink);font:13px/20px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
html.sh-on .aip-vframe{flex:1 1 auto;min-height:0;overflow:hidden;border:1px solid var(--aip-line);border-radius:12px;background:#fff}
html.sh-on .aip-vfr{display:block;width:100%;height:100%;border:0;background:#fff}
/* 历史对话（面板内就地的列表/只读查看）：整个替换掉页签/对话/输入条那一块，顶上留 AI 同事标题 */
html.sh-on .sh-aipanel.aip-histing #aipTabs,html.sh-on .sh-aipanel.aip-histing .aip-body,html.sh-on .sh-aipanel.aip-histing .aip-foot,html.sh-on .sh-aipanel.aip-histing .aip-head .aip-hbtns{display:none}
html.sh-on .aip-hist{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:12px;padding:12px 20px 16px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
html.sh-on .aip-hist[hidden]{display:none}
html.sh-on .aip-hist>*{flex:none}
html.sh-on .aip-hist .aip-skel{margin:0}
html.sh-on .aip-hist .aip-fine{margin:0}
html.sh-on .aip-hrow{display:block;width:100%;padding:8px 16px;border:1px solid var(--aip-line);border-radius:12px;background:#fff;color:var(--aip-ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background-color .15s}
html.sh-on .aip-hrow:hover{border-color:#9bbfe8;background:#f6faff}
html.sh-on .aip-hrow .t{display:block;font-weight:600;overflow-wrap:anywhere}
html.sh-on .aip-hrow .s{display:block;font-size:13px;line-height:20px;color:var(--aip-ink2)}
html.sh-on .aip-hbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 0 12px;border-bottom:1px solid var(--aip-line)}
html.sh-on .aip-hbar span{flex:1 1 100%;font-weight:600}
html.sh-on .aip-hmsgs{padding-top:4px}
/* 手机：整屏盖上来（从右滑入），不加第三列 */
@media (max-width:900px){
  html.sh-on .aip-grip{display:none}
  html.sh-on .sh-aipanel{position:fixed;left:0;right:0;top:0;bottom:0;width:auto;z-index:60;border-radius:0;box-shadow:none;transform:translateX(100%);padding-top:env(safe-area-inset-top)}
  html.sh-on body.sh-ai-open .sh-stage{margin-right:0}
  html.sh-on .aip-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  html.sh-on .aip-bar .aip-ibtn,html.sh-on .aip-send{width:44px;height:44px}   /* 手机：输入条里的按钮 44，输入框一行也 44 */
  html.sh-on .aip-ta,html.sh-on .aip-rec{min-height:44px}
  html.sh-on .aip-tabs{align-self:stretch}
  /* 页签条在手机上压矮压小（chad 11/5）：字 13、按钮 28、整条 36（原 16 号/44/52）；点击区仍有 44——用伪元素把按钮上下各扩 8px（例外：设计闸按钮自身短边 <44，实际点击区 ≥44，在检查里用 elementFromPoint 验） */
  html.sh-on .aip-tabs{margin:8px 20px 0}
  html.sh-on .aip-tabs button{position:relative;flex:1 1 0;justify-content:center;min-width:0;height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:20px}
  html.sh-on .aip-tabs button::after{content:"";position:absolute;left:0;right:0;top:-8px;bottom:-8px}
  html.sh-on .aip-file .fn b,html.sh-on .aip-vh .fn b{display:-webkit-box;overflow:hidden;white-space:normal;overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  html.sh-on .aip-viewer .aip-vseg{align-self:stretch}
  html.sh-on .aip-viewer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  html.sh-on .aip-head .aip-ibtn{width:44px;order:2}
  html.sh-on .aip-hbtns{display:flex;flex:0 0 100%;order:3;gap:8px}   /* 手机头部放不下四个字按钮：「新对话/导出/历史」单独占第二行，不挤叠字 */
  html.sh-on .aip-hrow,html.sh-on .aip-hist .aip-btn{min-height:44px}
  html.sh-on .aip-act{min-width:44px;min-height:44px;justify-content:center}
  html.sh-on .aip-sw,html.sh-on .aip-tbtn,html.sh-on .aip-more,html.sh-on .aip-stopb,html.sh-on .aip-dl,html.sh-on .aip-vw,html.sh-on .aip-lnk,html.sh-on .aip-btn,html.sh-on button.aip-st{min-height:44px}
  html.sh-on .aip-btn.p{min-height:44px}
  html.sh-on .aip-sw{height:44px}
  html.sh-on .aip-sw::before{top:10px}
  html.sh-on .aip-sw::after{top:12px}
  html.sh-on .aip-mode{min-height:44px}
}
@media (prefers-reduced-motion:reduce){
  html.sh-on .sh-aipanel,html.sh-on body.sh-ai-on .sh-stage,html.sh-on .aip-grip::after,html.sh-on .aip-bar{transition:none}
  html.sh-on .aip-think i,html.sh-on .aip-rec i,html.sh-on .aip-cur::after,html.sh-on .aip-pulse{animation:none}
  html.sh-on .aip-sw::before,html.sh-on .aip-sw::after{transition:none}
}

/* 任务进行中切公司的确认（只用壳令牌；字号 13/16；按钮 ≥44 高） */
html.sh-on .aip-ask{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:16px;background:rgba(16,24,40,.45)}
html.sh-on .aip-ask-card{width:min(360px,100%);padding:24px;border-radius:16px;background:#fff;color:var(--sh-ink,#101828);box-shadow:var(--sh-shadow-pop,0 8px 24px rgba(16,24,40,.24))}
html.sh-on .aip-ask-card h3{margin:0 0 8px;font-size:16px;line-height:24px;font-weight:600}
html.sh-on .aip-ask-card p{margin:0 0 24px;font-size:13px;line-height:20px;color:var(--sh-ink2,#475467)}
html.sh-on .aip-ask-btns{display:flex;gap:8px;justify-content:flex-end}
html.sh-on .aip-ask-btns .aip-btn{height:44px;min-height:44px;min-width:96px;padding:0 16px;border-radius:12px;font-size:16px;line-height:24px}
html.sh-on .aip-ask-btns .aip-btn.pri{background:var(--sh-blue,#0265c2);border-color:var(--sh-blue,#0265c2);color:#fff}
