/* ===== FOSO AI 客服悬浮窗（2026-10-13 改版：对齐「开始一个项目」快捷询盘弹窗风格） ===== */
@font-face{font-family:'Rajdhani';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/rajdhani-500.ttf') format('truetype');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Rajdhani';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/rajdhani-500.ttf') format('truetype');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Rajdhani';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/rajdhani-600.ttf') format('truetype');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Rajdhani';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/rajdhani-700.ttf') format('truetype');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
#fchat-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: 'Rajdhani', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}
#fchat-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #F2CA6B;
  color: #231815;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(35, 24, 21, 0.25);
  transition: transform 0.15s ease;
}
#fchat-btn:hover { transform: scale(1.06); }
#fchat-btn.open { background: #231815; color: #F2CA6B; }
#fchat-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #B4453C;
  border: 2px solid #fff;
}

#fchat-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 460px;
  max-width: calc(100vw - 30px);
  height: 580px;
  max-height: calc(100vh - 110px);
  background: #F2CA6B;
  color: #231815;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(21, 16, 12, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: 100% 100%;
}
#fchat-panel:not([hidden]) { animation: fchatIn 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.18); }
@keyframes fchatIn {
  from { transform: translateY(34px) scale(0.94); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

#fchat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 12px;
  background: transparent;
  color: #231815;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(35, 24, 21, 0.25);
}
#fchat-logo {
  display: block;
  height: 34px;
  width: auto;
}
.fchat-sep {
  width: 1px;
  height: 26px;
  background: rgba(35, 24, 21, 0.7);
  flex: 0 0 auto;
}
.fchat-ai {
  color: #231815;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1;
}
#fchat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(35, 24, 21, 0.7);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  transition: opacity 0.2s;
}
#fchat-close:hover { opacity: 1; color: #231815; }

#fchat-msgs {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 16px 10px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fchat-msg { display: flex; }
.fchat-user { justify-content: flex-end; }
.fchat-bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}
.fchat-bot .fchat-bubble {
  background: #231815;
  color: #F2CA6B;
  border: none;
  border-top-left-radius: 4px;
}
.fchat-user .fchat-bubble {
  background: #231815;
  color: #F2CA6B;
  border-top-right-radius: 4px;
}
.fchat-hint .fchat-bubble {
  background: transparent;
  border: none;
  color: rgba(35, 24, 21, 0.6);
  font-size: 12px;
  text-align: center;
  max-width: 100%;
}

.fchat-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.fchat-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(242, 202, 107, 0.9);
  animation: fchatBlink 1.2s infinite ease-in-out;
}
.fchat-dots i:nth-child(2) { animation-delay: 0.2s; }
.fchat-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes fchatBlink {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}
.fchat-caret {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: #F2CA6B;
  margin-left: 2px;
  vertical-align: -2px;
  animation: fchatBlink 0.9s infinite;
}

#fchat-chips {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 6px 14px 8px;
  overflow-x: auto;
  background: transparent;
}
.fchat-chip {
  flex: 0 0 auto;
  border: 1.5px solid #231815;
  background: transparent;
  color: #231815;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.fchat-chip:hover { background: #231815; color: #F2CA6B; }

#fchat-inputbar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  background: transparent;
  border-top: 1px solid rgba(35, 24, 21, 0.25);
}
#fchat-input {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(35, 24, 21, 0.55);
  border-radius: 0;
  padding: 10px 2px 8px;
  margin-bottom: 0;
  font-size: 14px;
  outline: none;
  color: #231815;
  min-width: 0;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}
#fchat-input::placeholder { color: rgba(35, 24, 21, 0.62); }
#fchat-input:focus { border-bottom-color: #231815; }
#fchat-send {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #231815;
  color: #F2CA6B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
#fchat-send:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(21, 16, 12, 0.35); }
#fchat-send:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

@media (max-width: 480px) {
  #fchat-root { right: 14px; bottom: 14px; }
  #fchat-panel { width: calc(100vw - 24px); right: -8px; height: calc(100vh - 96px); }
}

@media (prefers-reduced-motion: reduce) {
  #fchat-btn, #fchat-dots i, #fchat-caret, #fchat-panel { animation: none; transition: none; }
}
