/* 访客浮窗设计稿 · 对标国内在线客服弹窗形态（自研，非抄素材） */
:root {
  --hc-blue: #3b82f6;
  --hc-blue-deep: #2563eb;
  --hc-header: #2f6bff;
  --hc-pink: #ef4444;
  --hc-pink-btn: #ff4d6d;
  --hc-bg: #f3f4f6;
  --hc-text: #111827;
  --hc-muted: #6b7280;
  --hc-link: #2563eb;
  --hc-line: #e5e7eb;
  --panel-w: 380px;
  --panel-h: 560px;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #fff; color: var(--hc-text); }

/* —— 演示落地页（衬托浮窗，像官网） —— */
.site-header {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; border-bottom: 1px solid #f0f0f0;
}
.site-logo {
  font-weight: 700; font-size: 18px; color: var(--hc-blue-deep);
  display: flex; align-items: center; gap: 8px;
}
.site-logo .mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--hc-blue);
  color: #fff; display: grid; place-items: center; font-size: 12px;
}
.site-nav { display: flex; gap: 28px; font-size: 14px; color: #374151; }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav a:hover { color: var(--hc-blue); }

.hero {
  max-width: 1100px; margin: 0 auto; padding: 72px 40px 120px;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center;
  min-height: calc(100vh - 56px);
}
.hero h1 {
  font-size: 40px; line-height: 1.25; margin: 0 0 18px; font-weight: 800; letter-spacing: -0.02em;
}
.hero p { font-size: 15px; color: var(--hc-muted); line-height: 1.75; margin: 0 0 28px; max-width: 420px; }
.cta {
  display: inline-block; background: var(--hc-blue); color: #fff; border: 0;
  border-radius: 999px; padding: 12px 28px; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.cta:hover { background: var(--hc-blue-deep); }
.hero-art {
  height: 420px; border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(59,111,245,.08), rgba(255,255,255,.9)),
    repeating-linear-gradient(90deg, #eef2ff 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, #eef2ff 0 1px, transparent 1px 48px),
    #f8fafc;
  border: 1px solid #e8ecf4;
  position: relative; overflow: hidden;
}
.hero-art::after {
  content: "坐席台示意（后台以后接）";
  position: absolute; left: 24px; top: 24px; font-size: 13px; color: #94a3b8;
}
.links-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  font-size: 12px; background: #fff; border: 1px solid var(--hc-line);
  border-radius: 10px; padding: 8px 12px; box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.links-bar a { color: var(--hc-link); margin-right: 10px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px 140px; }
  .hero h1 { font-size: 28px; }
  .hero-art { height: 220px; }
  .site-header { padding: 0 16px; }
  .site-nav { gap: 14px; font-size: 13px; }
}

/* —— 右下角「在线咨询」按钮 —— */
.kefu-fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 10000;
  height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px;
  background: var(--hc-pink-btn); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.4);
  transition: transform .15s ease, background .15s;
}
.kefu-fab:hover { transform: translateY(-1px); }
.kefu-fab .ico {
  width: 22px; height: 22px; display: grid; place-items: center; font-size: 16px;
}
.kefu-fab.is-open { background: var(--hc-pink-btn); }

/* —— 聊天面板 —— */
.kefu-panel {
  position: fixed; right: 28px; bottom: 90px; z-index: 10000;
  width: var(--panel-w); height: var(--panel-h);
  background: #fff; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}
.kefu-panel.open { display: flex; }

.kefu-hd {
  background: var(--hc-header); color: #fff;
  padding: 14px 14px 14px 16px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.kefu-hd .avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #93c5fd, #1d4ed8);
  border: 2px solid rgba(255,255,255,.35);
  display: grid; place-items: center; font-size: 18px;
}
.kefu-hd .meta { flex: 1; min-width: 0; }
.kefu-hd .name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.kefu-hd .desc { font-size: 11px; opacity: .88; margin-top: 3px; line-height: 1.35; }
.kefu-hd .hd-actions { display: flex; gap: 4px; }
.kefu-hd .hd-actions button {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer; font-size: 16px; opacity: .9;
}
.kefu-hd .hd-actions button:hover { background: rgba(255,255,255,.15); }

.kefu-bd {
  flex: 1; overflow: auto; background: var(--hc-bg);
  padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 10px;
}
.kefu-time {
  align-self: center; font-size: 11px; color: #9ca3af; margin: 4px 0;
}
.kefu-row {
  display: flex; gap: 8px; align-items: flex-start; max-width: 100%;
}
.kefu-row .av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #bfdbfe, #3b82f6);
  display: grid; place-items: center; font-size: 16px;
  border: 1px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.kefu-bubble {
  background: #fff; border-radius: 4px 12px 12px 12px;
  padding: 12px 14px; font-size: 13px; line-height: 1.55; color: #1f2937;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); max-width: calc(100% - 48px);
}
.kefu-bubble .hi { margin-bottom: 8px; }
.kefu-faq {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
}
.kefu-faq button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--hc-link); font-size: 13px; padding: 0; cursor: pointer; line-height: 1.45;
}
.kefu-faq button:hover { text-decoration: underline; }

.kefu-row.me { flex-direction: row-reverse; }
.kefu-row.me .kefu-bubble {
  background: var(--hc-blue); color: #fff; border-radius: 12px 4px 12px 12px;
}

.kefu-chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px 6px;
  background: #fff; border-top: 1px solid #f0f0f0; flex-shrink: 0;
}
.kefu-chips button {
  border: 1px solid #e5e7eb; background: #fff; color: #4b5563;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.kefu-chips button:hover { border-color: #93c5fd; color: var(--hc-blue); }

.kefu-ft {
  background: #fff; border-top: 1px solid var(--hc-line);
  padding: 8px 12px 10px; flex-shrink: 0;
}
.kefu-ft textarea {
  width: 100%; border: 0; outline: none; resize: none;
  min-height: 44px; max-height: 96px; font-size: 14px; font-family: inherit;
  color: var(--hc-text); padding: 4px 2px;
}
.kefu-ft textarea::placeholder { color: #9ca3af; }
.kefu-ft .bar {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.kefu-ft .tools { display: flex; gap: 2px; }
.kefu-ft .tools button {
  width: 32px; height: 32px; border: 0; background: transparent;
  color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 16px;
}
.kefu-ft .tools button:hover { background: #f3f4f6; color: #6b7280; }
.kefu-send {
  border: 0; background: var(--hc-blue); color: #fff;
  border-radius: 8px; padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.kefu-send:hover { background: var(--hc-blue-deep); }

@media (max-width: 480px) {
  .kefu-panel {
    right: 0; left: 0; bottom: 0; width: 100%; height: min(85vh, 640px);
    border-radius: 16px 16px 0 0;
  }
  .kefu-fab { right: 16px; bottom: 16px; }
  :root { --panel-w: 100%; }
}
