/* 梵华境界客服聊天窗样式（深红+鎏金+暖米，与商城首页同色系） */
#fh-chat-btn {
  position: fixed; right: 16px; bottom: 90px; z-index: 9998;
  display: flex; align-items: center; gap: 8px;
  background: #8B1A1A; color: #fff; border-radius: 999px;
  padding: 6px 16px 6px 6px; font-size: 15px; line-height: 1;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  user-select: none;
}
#fh-chat-btn:hover { background: #a02222; }
#fh-chat-btn .fh-chat-btn-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #C9A227; flex: none; }

#fh-chat-panel {
  position: fixed; right: 0; bottom: 0; z-index: 9999;
  width: 100vw; height: 100vh; max-height: 100vh;
  display: flex; flex-direction: column;
  background: #FAF6EF; border: none; border-radius: 0;
  box-shadow: none; overflow: hidden;
  font-size: 15px; color: #333;
}
.fh-chat-header {
  background: #8B1A1A; color: #fff; padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 600; flex: none;
}
.fh-chat-header .fh-chat-title { display: flex; align-items: center; gap: 10px; }
.fh-chat-header .fh-chat-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #C9A227; flex: none; }
.fh-chat-header .fh-chat-close { cursor: pointer; font-size: 22px; line-height: 1; padding: 0 4px; }
.fh-chat-body {
  flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px;
  background: #FAF6EF;
}
.fh-msg { max-width: 86%; display: flex; flex-direction: column; gap: 6px; }
.fh-msg-user { align-self: flex-end; align-items: flex-end; }
.fh-msg-assistant { align-self: flex-start; align-items: flex-start; flex-direction: row; }
.fh-msg-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid #C9A227; flex: none; margin-top: 2px; }
.fh-msg-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fh-msg-text {
  padding: 9px 12px; border-radius: 12px; line-height: 1.6; word-break: break-word;
  white-space: normal;
}
.fh-msg-user .fh-msg-text { background: #8B1A1A; color: #fff; border-bottom-right-radius: 4px; }
.fh-msg-assistant .fh-msg-text { background: #fff; border: 1px solid #e5dcc8; border-bottom-left-radius: 4px; }
.fh-msg-text a { color: #8B1A1A; text-decoration: underline; }
.fh-msg-user .fh-msg-text a { color: #ffe9a8; }
.fh-msg-img {
  max-width: 180px; max-height: 180px; border-radius: 8px; display: block;
  border: 1px solid #e5dcc8; object-fit: cover; cursor: pointer;
}
.fh-msg-user .fh-msg-img { border-color: rgba(255,255,255,.4); }
.fh-typing .fh-msg-text { color: #999; font-size: 14px; }
.fh-chat-preview {
  flex: none; padding: 8px 10px 0; display: flex; gap: 8px; flex-wrap: wrap; background: #FAF6EF;
}
.fh-preview-item { position: relative; display: inline-block; }
.fh-preview-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #e5dcc8; }
.fh-preview-item i {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px;
  background: #8B1A1A; color: #fff; border-radius: 50%; font-style: normal;
  font-size: 13px; line-height: 18px; text-align: center; cursor: pointer;
}
.fh-chat-input {
  flex: none; display: flex; gap: 8px; padding: 10px; background: #fff;
  border-top: 1px solid #e5dcc8; align-items: center;
}
.fh-chat-photo {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e5dcc8;
  background: #FAF6EF; font-size: 18px; cursor: pointer; line-height: 1;
}
.fh-chat-input input[type="text"] {
  flex: 1; height: 38px; border: 1px solid #e5dcc8; border-radius: 999px;
  padding: 0 14px; font-size: 15px; outline: none; min-width: 0; background: #FAF6EF;
}
.fh-chat-input input[type="text"]:focus { border-color: #C9A227; }
.fh-chat-send {
  flex: none; height: 38px; padding: 0 16px; border: none; border-radius: 999px;
  background: #C9A227; color: #fff; font-size: 15px; cursor: pointer;
}
.fh-chat-send:hover { background: #b8941f; }
.fh-chat-tip {
  flex: none; text-align: center; font-size: 12px; color: #999; padding: 6px 0 8px; background: #fff;
}
@media (max-width: 480px) {
  #fh-chat-btn { bottom: 76px; }
  #fh-chat-panel { right: 0; bottom: 0; width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}
