/* AI 同事（赛博人类）在壳里的头像与入口：样式（ADR-006 §7；11/5 改版见 ADR-009）。全部限定 html.sh-on / .sh-*，壳关不命中（tests/test_ai_dock_css_scoping.py 守着）。
   头像=点阵地球（11/5 重做，canvas，色卡 §3B）+ 橙色状态点；桌面：图标栏顶部；手机：顶栏右侧。点开后是右侧滑出的侧栏，样式在 ai_panel.css。 */
/* 头像 */
html.sh-on .sh-aibtn{display:flex;flex-direction:column;align-items:center;gap:4px;width:64px;padding:8px 0 6px;border:0;border-radius:12px;background:none;color:#475467;font:inherit;font-size:13px;line-height:16px;font-weight:600;cursor:pointer;position:relative}
html.sh-on .sh-aibtn:hover,html.sh-on .sh-aibtn[aria-expanded="true"]{background:#eef3fa;color:#101828}
html.sh-on .sh-aibtn .sh-aiface{width:32px;height:32px}
html.sh-on .sh-aitop .sh-aiface{width:28px;height:28px}
/* 头像（11/5 重做，chad 选定「点阵地球 × 虹彩液体」A 款并要求按色卡规范配色）：canvas 画的点阵球，轮廓是不断变形的不规则团块。
   画布比头像框大 60%（四周各出 30%），让不规则的外缘和淡雾有地方伸展、不被裁成方框；不加圆角、边框、阴影圈（外缘不许是规则形态）。
   配色与动画全在 ai_dock.js 里（设计总纲 §3B：品牌蓝→海青 + 少量暖橙点睛），这里只管位置。 */
html.sh-on .sh-aiface{position:relative;display:block;flex:none;transition:transform .25s cubic-bezier(.2,.8,.2,1)}
html.sh-on .sh-aiface canvas{position:absolute;left:-30%;top:-30%;width:160%;height:160%;display:block;pointer-events:none}
html.sh-on .sh-aibtn:hover .sh-aiface,html.sh-on .sh-aibtn[aria-expanded="true"] .sh-aiface{transform:scale(1.08)}
/* 画布用不了（getContext 为 null / 画坏了）：头像退成一个静态的品牌蓝→海青圆，点击入口照常可用；画布本身藏起来 */
html.sh-on .sh-aiface.aif-off{border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff 0,#a8d5ff 22%,#0265c2 62%,#0a8f9c 100%)}
html.sh-on .sh-aiface.aif-off canvas{display:none}
html.sh-on .sh-aidot{position:absolute;right:16px;top:8px;width:8px;height:8px;border-radius:50%;background:#ff7a1a;box-shadow:0 0 0 2px #fff}
html.sh-on .sh-aitop .sh-aidot{right:8px;top:8px;box-shadow:0 0 0 2px #1b4a8d}
html.sh-on .sh-aitop{margin-left:auto;position:relative}
html.sh-on .sh-aitop{display:none}
@media (max-width:900px){
  html.sh-on .sh-aibtn{display:none}
  html.sh-on .sh-aitop{display:inline-flex}                          /* 手机：没有图标栏（导航在底栏与「全部功能」里，ADR-011），AI 同事的入口在顶栏右侧 */
}
/* 常驻：橙点缓慢呼吸（约 3.6 秒一次，克制）；处理中会换成更快的那套（下面） */
@keyframes sh-ai-idle{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.8)}}
html.sh-on .sh-aidot{animation:sh-ai-idle 3.6s ease-in-out infinite}
/* 处理中（等答案）：橙点呼吸；头像上的扫描带由 ai_dock.js 画（只在等待的几秒里动） */
@keyframes sh-ai-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.5)}}
html.sh-on body.sh-ai-busy .sh-aidot{animation:sh-ai-breathe 1.2s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){
  html.sh-on .sh-aibtn{transition:none}
  html.sh-on .sh-aiface{transition:none}
  html.sh-on .sh-aidot{animation:none}
  html.sh-on body.sh-ai-busy .sh-aidot{animation:none;transform:scale(1.4)}   /* 减少动画：不呼吸，静态放大示意「在处理」 */
}
