/* ==========================================================================
   颂博士写字机 · 简约重设计  —  ink & paper design system
   ========================================================================== */

:root {
  --paper: #f6f7fd;
  --surface: #ffffff;
  --ink: #121a2e;
  --ink-2: #55607d;
  --ink-3: #8892a8;
  --line: #e8eaf6;
  --line-soft: #f1f2fa;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #ecebfd;
  --danger: #e5484d;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-soft: 0 6px 24px rgba(76, 86, 180, 0.08);
  --shadow-pop: 0 18px 50px rgba(60, 70, 160, 0.18);
  --head-h: 66px;
}

* { box-sizing: border-box; }

/* 守卫：类选择器里的 display 会盖掉浏览器默认的 [hidden] { display: none }，
   导致带 hidden 的弹窗/面板一直可见且关不掉。 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1180px 520px at 26% -10%, rgba(124, 122, 255, 0.20), transparent 62%),
    linear-gradient(180deg, #edf0fd 0%, #f5f6fd 42%, #ffffff 100%);
  background-attachment: fixed;
  background-color: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
ul, ol, dl, dd, dt, figure { margin: 0; padding: 0; }
li { list-style: none; }
button { font: inherit; color: inherit; }

/* 手机端：去掉 300ms 点击延迟与点击高亮，改用 :active 反馈 */
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.kb-links a:active, .kb-group-head:active, .ai-chip:active { color: var(--accent); }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 28px; }

.sec, #top, .split-col { scroll-margin-top: 80px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shared atoms ---------- */
.eyebrow {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 11px; margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(76, 86, 180, 0.07);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease,
    transform .18s ease, box-shadow .18s ease;
  background: transparent;
}
.btn svg { width: 15px; height: 15px; transition: transform .18s ease; }
.btn-sm { height: 38px; padding: 0 15px; font-size: 13.5px; }

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.26); }
.btn-primary:hover { box-shadow: 0 11px 26px rgba(79, 70, 229, 0.34); transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-outline {
  border-color: var(--line); color: var(--ink); background: var(--surface);
  box-shadow: 0 2px 10px rgba(76, 86, 180, 0.07);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--accent); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-family: var(--mono); letter-spacing: .04em;
}
.tag-accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246, 247, 253, 0.74);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line); }

.head-inner { display: flex; align-items: center; gap: 28px; height: var(--head-h); }

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); letter-spacing: .02em; }

.head-nav { display: flex; gap: 26px; margin-left: auto; }
.head-nav a { font-size: 13.5px; color: var(--ink-2); position: relative; transition: color .18s; }
.head-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transition: transform .22s ease;
}
.head-nav a:hover { color: var(--ink); }
.head-nav a:hover::after { transform: scaleX(1); }

.head-act { display: flex; align-items: center; gap: 10px; }
.head-burger { display: none; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; position: relative; }
.head-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .2s ease; }
.head-burger span:first-child { top: 14px; }
.head-burger span:last-child { top: 21px; }
.head-burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.head-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: 74px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 0.86fr; gap: 64px; align-items: start; }
.hero h1 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.035em; }

/* 客服服务时间（首屏右栏）。margin-top 用于和大标题的第一行做视觉对齐 */
.svc { width: 100%; margin-top: 12px; }
.svc-label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 15px; font-size: 18px; font-weight: 700; color: var(--ink);
}
.svc-label i { width: 4px; height: 21px; border-radius: 2px; background: var(--grad); flex-shrink: 0; }
/* 标题末尾的心跳小点，暗示这是实时状态 */
.svc-label::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #15a06e; box-shadow: 0 0 0 4px rgba(21, 160, 110, 0.18);
  animation: svcDot 2.6s ease-in-out infinite;
}

/* ---------- 客服服务时间：独立的深色实时状态卡 ---------- */
.svc-card {
  position: relative; overflow: hidden;
  padding: 34px 36px;
  background: linear-gradient(155deg, #262d58 0%, #141a38 100%);
  border: 0; border-radius: var(--r-lg); color: #fff;
  box-shadow: 0 22px 46px rgba(27, 33, 73, 0.30);
}
/* 顶部渐变高光条 */
.svc-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, #6d5ef0, #35c6b4);
}
/* 右上角柔光，避免整块深色太死 */
.svc-card::after {
  content: ""; position: absolute; top: -70px; right: -60px;
  width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 94, 240, 0.55), transparent 70%);
  pointer-events: none;
}
.svc-card > * { position: relative; z-index: 1; }

.svc-hours { display: flex; align-items: baseline; gap: 14px; }
.svc-hours strong { font-size: 48px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; text-shadow: 0 0 26px rgba(120, 110, 240, 0.45); }
.svc-hours span { font-size: 17px; color: rgba(255, 255, 255, 0.62); }
.svc-clock { margin-top: 15px; font-family: var(--mono); font-size: 16px; color: rgba(255, 255, 255, 0.76); }
.svc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.svc-state {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.svc-state i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.svc-state.is-on { background: rgba(46, 190, 140, 0.16); border: 1px solid rgba(74, 222, 128, 0.42); color: #7ff0b8; }
.svc-state.is-on i { background: #4ade80; animation: svcRing 2.2s ease-out infinite; }
.svc-state.is-off { background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.66); }
.svc-state.is-off i { background: rgba(255, 255, 255, 0.55); }
.svc-note { font-size: 14.5px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }

/* 联系售后客服按钮（卡片内，与智能助手的「转人工客服」同一弹窗） */
.svc-contact { width: 100%; margin-top: 18px; }
.svc-card .svc-contact { background: #fff; color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20); }
.svc-card .svc-contact:hover { background: #eef0ff; transform: translateY(-2px); }

@keyframes svcDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.78); }
}
@keyframes svcRing {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}
.hero-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-meta li { font-family: var(--mono); font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* 首屏展示图（标题正下方，按左栏宽度缩放） */
.hero-showcase { margin: 26px 0 0; }
.hero-showcase img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft); background: var(--surface);
}

/* ---------- section frame ---------- */
.sec { padding: 88px 0; }
.sec-alt { background: rgba(255, 255, 255, 0.62); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: 46px; }
.sec-head h2 { display: flex; align-items: center; gap: 11px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.03em; }
.sec-head h2::before {
  content: ""; width: 3px; height: 22px; flex-shrink: 0; border-radius: 2px; background: var(--grad);
}
.sec-sub { margin-top: 14px; color: var(--ink-2); max-width: 64ch; }

/* ---------- 三块区域色彩区分：软件下载 / 新手上手 / 知识库 ---------- */
:root {
  --tone-down: #5b53e8;
  --tone-guide: #c2691f;
  --tone-kb: #0d8a80;
}

/* 写字机软件下载：靛紫淡染 + 上下发丝线，独立成带 */
#downloads {
  background: linear-gradient(180deg, rgba(91, 83, 232, 0.085), rgba(91, 83, 232, 0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#downloads .sec-head h2::before { background: linear-gradient(180deg, var(--tone-down), #8f86f2); }
#downloads .eyebrow { color: var(--tone-down); border-color: rgba(91, 83, 232, 0.28); }

/* 新手上手：暖橙面板 */
#starter {
  background: linear-gradient(180deg, rgba(194, 105, 31, 0.11), rgba(255, 255, 255, 0.72));
  border-color: rgba(194, 105, 31, 0.30);
}
#starter .sec-head h2::before { background: linear-gradient(180deg, var(--tone-guide), #e3a06a); }
#starter .eyebrow { color: var(--tone-guide); border-color: rgba(194, 105, 31, 0.30); }
#starter .step-num { color: var(--tone-guide); }

/* 知识库：青绿面板 */
#knowledge {
  background: linear-gradient(180deg, rgba(13, 138, 128, 0.11), rgba(255, 255, 255, 0.72));
  border-color: rgba(13, 138, 128, 0.28);
}
#knowledge .sec-head h2::before { background: linear-gradient(180deg, var(--tone-kb), #58bfb2); }
#knowledge .eyebrow { color: var(--tone-kb); border-color: rgba(13, 138, 128, 0.28); }
#knowledge .kb-group { border-color: rgba(13, 138, 128, 0.22); }
#knowledge .kb-group-head h3,
#knowledge .kb-group-head:hover h3,
#knowledge .kb-links a:hover { color: var(--tone-kb); }
#knowledge .kb-tag { color: var(--tone-kb); border-color: rgba(13, 138, 128, 0.28); }

/* ---------- downloads ---------- */
.dl-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
.dl-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dl-card:hover { border-color: #ccd3f0; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(76, 86, 180, 0.13); }
.dl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-head h3 { font-size: 15.5px; font-weight: 600; }
/* 下载卡片图标：统一圆角底 + 每张不同的线性图标，用于快速区分 */
.dl-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(91, 83, 232, 0.10); color: var(--accent-ink);
}
.dl-icon svg { display: block; width: 19px; height: 19px; }
.dl-desc { font-size: 13.5px; color: var(--ink-2); }
.dl-spec {
  display: grid; gap: 6px 18px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
}
.dl-spec dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.dl-spec dd { font-size: 13px; color: var(--ink); }
.dl-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- steps ---------- */
.step-list { border-top: 1px solid var(--line); counter-reset: step; }
.step {
  display: grid; grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center; gap: 28px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .06em; }
.step-body h3 { font-size: 16.5px; font-weight: 600; }
.step-body p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); max-width: 62ch; }
.step-act { display: flex; flex-direction: column; gap: 8px; justify-self: start; }

/* ---------- 上下堆叠：新手上手 在上 + 知识库 在下 ---------- */
.split-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.split-col {
  min-width: 0;
  padding: 30px 32px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

/* ---------- knowledge ---------- */
.kb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kb-group {
  margin: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-soft); overflow: hidden;
}
.kb-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; background: var(--paper); border-bottom: 1px solid var(--line-soft);
}
.kb-group-head h3 { font-size: 15px; font-weight: 700; transition: color .16s; }
.kb-group-head:hover h3 { color: var(--accent); }
.kb-arrow { margin-left: auto; font-size: 13px; color: var(--ink-3); transition: transform .16s, color .16s; }
.kb-group-head:hover .kb-arrow { transform: translateX(3px); color: var(--accent); }
.kb-tag {
  flex-shrink: 0; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
}
.kb-links { display: flex; flex-direction: column; padding: 6px 20px 14px; }
.kb-links li { border-bottom: 1px solid var(--line-soft); }
.kb-links li:last-child { border-bottom: 0; }
.kb-links a { display: block; padding: 9px 0; font-size: 13.5px; color: var(--ink-2); transition: color .16s; }
.kb-links a:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; background: var(--surface); }
.foot-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; gap: 2px; }
.foot-brand strong { font-size: 14px; font-weight: 600; }
.foot-brand span { font-size: 12.5px; color: var(--ink-3); }
.foot-icp { margin-top: 8px; font-size: 12px; color: var(--ink-3); transition: color .16s; }
.foot-icp:hover { color: var(--accent); }
.foot-nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.foot-nav a { font-size: 13px; color: var(--ink-2); transition: color .18s; }
.foot-nav a:hover { color: var(--ink); }

/* ==========================================================================
   AI 客服
   ========================================================================== */
.ai {
  position: fixed; z-index: 90;
  right: 24px; bottom: 24px;
  right: calc(24px + env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
}

/* FAB */
.ai-fab {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 20px 0 16px;
  background: var(--grad); color: #fff; border: 0; border-radius: 999px;
  cursor: pointer; box-shadow: 0 12px 30px rgba(79, 70, 229, 0.34);
  transition: transform .22s ease, box-shadow .22s ease, opacity .2s ease, visibility .2s;
  font-size: 14px; font-weight: 600;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(79, 70, 229, 0.42); }
.ai-fab-dot {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); color: #fff; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .02em;
}
.ai-fab-dot::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(124, 58, 237, 0.5); animation: pulse 2.6s ease-out infinite;
}
.ai-fab.is-hidden { opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96); }

@keyframes pulse {
  0% { transform: scale(1); opacity: .6; }
  70% { transform: scale(1.75); opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}

/* panel */
.ai-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(384px, calc(100vw - 32px));
  max-height: min(580px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); overflow: hidden;
  animation: aiIn .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes aiIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; border-bottom: 1px solid var(--line); }
.ai-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ai-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px; background: var(--grad); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.ai-id > div { min-width: 0; }
.ai-id strong { display: block; font-size: 14px; font-weight: 600; }
.ai-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-status i { width: 6px; height: 6px; border-radius: 50%; background: #24b47e; flex-shrink: 0; }
.ai-head .ai-close { margin-left: auto; flex-shrink: 0; }
.ai-ico {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: var(--r-sm); color: var(--ink-3); cursor: pointer;
  transition: background .16s, color .16s;
}
.ai-ico svg { width: 15px; height: 15px; }
.ai-ico:hover { background: var(--line-soft); color: var(--ink); }

/* body / 视图切换 */
.ai-body { overflow-y: auto; }
.ai-body::-webkit-scrollbar { width: 8px; }
.ai-body::-webkit-scrollbar-thumb { background: #dbe0f2; border-radius: 4px; border: 2px solid var(--surface); }
.ai-view { animation: msgIn .24s ease; }

/* 快捷语列表 */
.ai-quick { display: flex; flex-direction: column; gap: 7px; padding: 16px 16px 18px; }
.ai-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink); font-size: 13.5px; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.ai-chip::after { content: "→"; font-size: 12px; color: var(--ink-3); flex-shrink: 0; transition: transform .16s, color .16s; }
.ai-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.ai-chip:hover::after { transform: translateX(3px); color: var(--ink); }

/* 回复视图 */
.ai-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 16px 16px 0; padding: 0; border: 0; background: transparent;
  color: var(--ink-3); font-size: 12.5px; cursor: pointer; transition: color .16s;
}
.ai-back svg { width: 14px; height: 14px; }
.ai-back:hover { color: var(--ink); }
.ai-answer { padding: 12px 20px 22px; }
.ai-empty { padding: 22px 20px 26px; font-size: 13px; color: var(--ink-3); line-height: 1.75; }

/* 回复正文渲染 */
.rich { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); word-break: break-word; }
.rich strong { color: var(--ink); font-weight: 600; }
.rich a { color: var(--accent); }
.rich ul { margin: 8px 0 0; }
.rich li { position: relative; padding-left: 14px; margin-top: 5px; }
.rich li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }

.ai-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--grad); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
  transition: box-shadow .18s, transform .18s;
}
.ai-link svg { width: 14px; height: 14px; transition: transform .18s; }
.ai-link:hover { box-shadow: 0 11px 26px rgba(79, 70, 229, 0.32); transform: translateY(-1px); }
.ai-link:hover svg { transform: translateX(3px); }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 24px;
  background: rgba(18, 26, 46, 0.34); backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative; width: min(420px, 100%);
  background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px;
  box-shadow: var(--shadow-pop); text-align: center;
  animation: aiIn .26s cubic-bezier(.2,.8,.3,1);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
}
/* 内容超过一屏时只滚动正文，右上角关闭按钮保持可见 */
.modal-scroll { min-height: 0; overflow-y: auto; }
@supports (height: 100dvh) {
  .modal-card { max-height: calc(100dvh - 48px); }
}
.modal-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-3);
  cursor: pointer; border-radius: var(--r-sm);
}
.modal-close:hover { background: var(--line-soft); color: var(--ink); }
.modal-card h3 { font-size: 19px; }
.modal-card > p { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.modal-card .eyebrow { margin-bottom: 10px; }
.qr-box { margin: 20px auto 4px; width: 190px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.qr-box img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.modal-list { margin-top: 14px; text-align: left; display: inline-block; }
.modal-list li { font-size: 13px; color: var(--ink-2); position: relative; padding-left: 16px; margin-top: 6px; }
.modal-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- 联系人工客服：两步引导 ---------- */
.modal-lead { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.modal-step { margin-top: 22px; }
.modal-step-title {
  display: flex; align-items: center; gap: 9px; text-align: left;
  font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.5;
}
.modal-step-no {
  display: grid; place-items: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.28);
}
.guide-shot { margin: 14px auto 0; width: 220px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.guide-shot img { width: 100%; display: block; border-radius: var(--r-sm); }
.modal-note { margin-top: 22px; font-size: 13px; color: var(--ink-2); }

/* ==========================================================================
   Reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .svc { margin-top: 0; }
  .kb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { grid-template-columns: 58px 1fr; }
  .step > .btn, .step-act { grid-column: 2; justify-self: start; margin-top: 12px; }
}

@media (max-width: 880px) {
  .head-nav {
    position: absolute; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 28px 18px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    margin-left: 0; display: none;
  }
  .head-nav.is-open { display: flex; }
  .head-nav a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
  .head-nav a::after { display: none; }
  .head-burger { display: block; margin-left: auto; }
  .head-act .btn-ghost { display: none; }
  /* iOS 对 background-attachment: fixed 支持差，改成只铺满首屏高度，其余留白 */
  body {
    background-attachment: scroll;
    background-size: 100% 100vh, 100% 100vh;
    background-repeat: no-repeat;
  }
  .kb-links a { display: flex; align-items: center; min-height: 46px; padding: 10px 0; }
  .kb-group-head { min-height: 56px; }
  .ai-back { min-height: 44px; margin-top: 8px; }
  .ai-ico { width: 36px; height: 36px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 46px 0 60px; }
  .sec { padding: 64px 0; }
  .svc-card { padding: 28px 24px; }
  .svc-hours strong { font-size: 38px; }
  .ai {
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .ai-panel { width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
  .hero-act .btn { width: 100%; }
  .kb-grid { grid-template-columns: 1fr; }
  .ai-chip { min-height: 46px; padding: 11px 14px; }
  .ai-quick { padding: 12px 14px 16px; }
  .head-burger { width: 44px; height: 44px; }
  .head-burger span { left: 13px; right: 13px; }
  .head-burger span:first-child { top: 18px; }
  .head-burger span:last-child { top: 25px; }
  .modal { padding: 16px; }
  .modal-card { padding: 26px 20px; }
  .hero-showcase { margin-top: 20px; }
}

/* 小屏手机（360-430px 一类） */
@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .sec { padding: 52px 0; }
  .hero { padding: 38px 0 52px; }
  .sec-head { margin-bottom: 32px; }
  .dl-card { padding: 18px 18px 16px; }
  .kb-group-head { padding: 12px 16px; }
  .kb-links { padding: 4px 16px 10px; }
  .split-col { padding: 22px 18px 26px; }
  .step { grid-template-columns: 34px 1fr; gap: 16px; }
  .svc-card { padding: 22px 18px; }
  .svc-hours strong { font-size: 34px; }
  .svc-foot { flex-wrap: wrap; row-gap: 8px; }
  .hero-meta { margin-top: 24px; padding-top: 18px; }
  .site-foot { padding: 30px 0; }
  .foot-inner { gap: 18px; }
}

/* 手机浏览器地址栏会伸缩，用 dvh 避免面板被顶出可视区 */
@supports (height: 100dvh) {
  .ai-panel { max-height: min(580px, calc(100dvh - 48px)); }
  @media (max-width: 640px) {
    .ai-panel { max-height: calc(100dvh - 32px); }
  }
}
