/* ============================================================
   右侧中间浮动组件：客服 + 切换体系
   - 位置与旧版 .contact-float 一致：right 边缘、垂直居中
   - 鼠标悬停即展开面板（CSS），移开自动收起；触屏仍可点击展开
   - 被门厅页 / AI 子站 / 沙雕子站 / 教程页 / Animate 工具页共用
   ============================================================ */
.side-float {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 1000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.side-item { position: relative; }
.side-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  width: 54px; min-height: 54px; padding: 13px 0; border: 1px solid #dfe6ef; border-radius: 16px;
  background: rgba(255,255,255,.96); color: #4c6078; font-size: 12px; font-weight: 800;
  letter-spacing: .16em; writing-mode: vertical-rl; text-decoration: none;
  cursor: pointer; list-style: none; font-family: inherit; text-align: center;
  box-shadow: 0 12px 26px rgba(20,34,56,.14);
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.side-btn::-webkit-details-marker { display: none; }
.side-ico { width: 19px; height: 19px; writing-mode: horizontal-tb; flex: 0 0 auto; }
.side-item:hover > .side-btn,
.side-item.is-open > .side-btn { color: #2369e8; border-color: #a7bad4; transform: translateX(-4px); box-shadow: 0 16px 32px rgba(20,34,56,.2); }
.side-btn:focus-visible { outline: 2px solid #2369e8; outline-offset: 3px; }

/* 面板：默认隐藏，悬停 / 展开时出现 */
.side-panel {
  position: absolute; right: calc(100% + 12px); top: 50%; z-index: 10;
  display: flex; gap: 14px; padding: 14px; border: 1px solid #e3e9f1; border-radius: 18px;
  background: #fff; box-shadow: 0 26px 58px rgba(20,34,56,.18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-50%) translateX(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.side-item:hover > .side-panel,
.side-item.is-open > .side-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%) translateX(0); }
.side-panel .brand-qr { display: grid; justify-items: center; gap: 9px; }
.side-panel .brand-qr img { width: 126px; height: 126px; object-fit: contain;
  border: 1px solid #e3e9f1; border-radius: 14px; background: #fff; }
.side-panel .brand-qr span { color: #66758a; font-size: 11.5px; font-weight: 700; white-space: nowrap; }

/* 切换体系面板：列出两套体系 */
.side-panel-list { display: grid; gap: 6px; min-width: 232px; padding: 10px; }
.side-panel-list a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #33445c; }
.side-panel-list a b { display: block; font-size: 13.5px; font-weight: 800; }
.side-panel-list a small { display: block; margin-top: 3px; color: #8b98a9; font-size: 11.5px; }
.side-panel-list a:hover { background: #f4f7fc; }
.side-panel-list a.is-current, .side-panel-list a.is-current-link { background: #edf4ff; color: #1f61d8; }
.side-panel-list a.is-current small { color: #6b8dc4; }

/* 深色沙雕页 */
.shadiao-page .side-btn { background: rgba(20,22,31,.96); border-color: rgba(255,255,255,.14); color: #c9ced8; }
.shadiao-page .side-item:hover > .side-btn,
.shadiao-page .side-item.is-open > .side-btn { color: #f6a51a; border-color: rgba(246,165,26,.55); }
.shadiao-page .side-panel { background: #14161f; border-color: rgba(255,255,255,.12); box-shadow: 0 26px 58px rgba(0,0,0,.6); }
.shadiao-page .side-panel .brand-qr img { border-color: rgba(255,255,255,.14); }
.shadiao-page .side-panel .brand-qr span { color: #9aa0aa; }
.shadiao-page .side-panel-list a { color: #d6d9e2; }
.shadiao-page .side-panel-list a small { color: #8b93a3; }
.shadiao-page .side-panel-list a:hover { background: rgba(255,255,255,.07); }
.shadiao-page .side-panel-list a.is-current, .side-panel-list a.is-current-link { background: rgba(246,165,26,.14); color: #f6a51a; }

/* 页脚二维码 */
.footer-cs { display: flex; gap: 16px; margin-top: 16px; }
.footer-cs .brand-qr { display: grid; justify-items: center; gap: 7px; }
.footer-cs .brand-qr img { width: 92px; height: 92px; object-fit: contain;
  border: 1px solid #e3e9f1; border-radius: 12px; background: #fff; }
.footer-cs .brand-qr span { color: #66758a; font-size: 11px; font-weight: 700; }
.shadiao-page .footer-cs .brand-qr img { border-color: rgba(255,255,255,.14); }
.shadiao-page .footer-cs .brand-qr span { color: #9aa0aa; }

@media (max-width: 720px) {
  .side-float { right: 10px; gap: 8px; }
  .side-btn { width: 44px; min-height: 44px; padding: 10px 0; font-size: 11px; border-radius: 14px; }
  .side-ico { width: 16px; height: 16px; }
  .side-panel { gap: 10px; padding: 12px; }
  .side-panel .brand-qr img { width: 100px; height: 100px; }
  .side-panel-list { min-width: 196px; }
  .footer-cs { gap: 12px; }
  .footer-cs .brand-qr img { width: 80px; height: 80px; }
}
@media print { .side-float { display: none; } }
