/* 体育成绩通 · AI 客服浮窗（移动优先，自适应深/浅背景） */
#cw-root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;font-size:14px;color:#1A1F24;line-height:1.5}
#cw-root *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
#cw-btn{position:fixed;right:18px;bottom:18px;width:56px;height:56px;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(160deg,rgba(255,83,71,.92),rgba(200,50,43,.92));color:#fff;box-shadow:0 8px 24px rgba(200,50,43,.4),0 0 0 2.5px rgba(255,255,255,.92);
  display:flex;align-items:center;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,background .2s ease;z-index:99998}
#cw-btn:hover{transform:translateY(-2px);background:linear-gradient(160deg,#FF5347,#C8322B);box-shadow:0 12px 30px rgba(200,50,43,.5)}
#cw-btn:active{transform:scale(.94)}
#cw-btn svg{width:27px;height:27px}
#cw-badge{position:fixed;right:12px;bottom:80px;background:#E8423A;color:#fff;font-size:11px;font-weight:700;
  padding:3px 9px;border-radius:999px;box-shadow:0 3px 8px rgba(0,0,0,.25);animation:cwPop .4s ease;z-index:99998}
@keyframes cwPop{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}
#cw-panel{position:fixed;right:18px;bottom:84px;width:366px;max-width:calc(100vw - 24px);height:520px;max-height:calc(100vh - 110px);
  background:#fff;border-radius:18px;box-shadow:0 18px 60px rgba(26,31,36,.28);overflow:hidden;display:none;
  flex-direction:column;border:1px solid #F0ECE5;z-index:99999}
@keyframes cwIn{from{opacity:0;transform:scale(.92) translateY(8px)}to{opacity:1;transform:scale(1)}}
#cw-head{background:linear-gradient(160deg,#FF5347,#C8322B);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;flex-shrink:0}
#cw-head .av{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;flex-shrink:0}
#cw-head .tt{font-size:15px;font-weight:700;line-height:1.25}
#cw-head .st{font-size:11.5px;opacity:.88;margin-top:1px}
#cw-head .x{margin-left:auto;width:30px;height:30px;border-radius:8px;background:rgba(255,255,255,.18);border:none;color:#fff;font-size:19px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
#cw-head .x:hover{background:rgba(255,255,255,.32)}
#cw-msgs{flex:1;overflow-y:auto;padding:14px 14px 6px;display:flex;flex-direction:column;gap:10px;background:#F7F5F1}
.cw-msg{max-width:82%;padding:9px 12px;border-radius:14px;line-height:1.55;white-space:pre-wrap;word-break:break-word;font-size:13.5px}
.cw-msg.bot{background:#fff;border:1px solid #ECE6DD;color:#1A1F24;border-bottom-left-radius:4px;align-self:flex-start;box-shadow:0 1px 2px rgba(26,31,36,.04)}
.cw-msg.me{background:linear-gradient(180deg,#FF5347,#E8423A);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
#cw-typing{display:flex;gap:4px;padding:12px 14px;background:#fff;border:1px solid #ECE6DD;border-radius:14px;align-self:flex-start;width:fit-content;border-bottom-left-radius:4px}
#cw-typing i{width:7px;height:7px;border-radius:50%;background:#C9C2B8;animation:cwBlink 1.2s infinite}
#cw-typing i:nth-child(2){animation-delay:.2s}#cw-typing i:nth-child(3){animation-delay:.4s}
@keyframes cwBlink{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
#cw-foot{flex-shrink:0;border-top:1px solid #EFEAE2;padding:10px 12px 12px;background:#fff}
#cw-input{width:100%;border:1px solid #E2DCD2;border-radius:12px;padding:9px 11px;font-size:13.5px;resize:none;height:42px;max-height:96px;outline:none;font-family:inherit;color:#1A1F24;line-height:1.4;background:#fff;background-color:#fff!important}
#cw-input::placeholder{color:#9a958c}
#cw-input:focus{border-color:#E8423A;box-shadow:0 0 0 3px rgba(232,66,58,.12)}
#cw-actions{display:flex;align-items:center;gap:8px;margin-top:8px}
#cw-send{flex:1;min-height:40px;border-radius:11px;border:none;cursor:pointer;
  background:linear-gradient(180deg,#FF5347,#E8423A);color:#fff;font-weight:700;font-size:14px}
#cw-send:disabled{opacity:.5;cursor:default}
#cw-human{flex:0 0 auto;min-height:40px;padding:0 14px;border-radius:11px;border:1px solid #E8423A;background:#fff;color:#E8423A;font-weight:700;font-size:13px;cursor:pointer}
#cw-human:hover{background:#FFF1EF}
@media (max-width:480px){
  #cw-panel{right:10px;bottom:78px;width:calc(100vw - 20px);height:min(520px,calc(100vh - 96px))}
  #cw-btn{right:14px;bottom:14px}
  #cw-badge{right:9px;bottom:74px}
}

/* 全站隐藏悬浮客服按钮与引导气泡（客服入口改为页面内按钮，如购买页「在线咨询客服」） */
#cw-btn,#cw-badge{display:none!important}
