/* 国内站模板 · AI 导购接入：复用站点通用的 web-ai.js / web-ai.css，这里只做配色映射、图标和避让底栏。 */
:root {
  --primary: var(--nx-fill);
  --on-primary: var(--nx-on-fill);
  --primary-dark: var(--nx-fill-press);
  --card: var(--nx-canvas);
  --line: var(--nx-line);
  --bg: var(--nx-page);
  --soft: var(--nx-halo);
  --ink: var(--nx-ink);
  --muted: var(--nx-muted);
  --danger: var(--nx-error);
  --footer-bg: #1b2230;
  --footer-ink: #ffffff;
  --footer-muted: rgba(255, 255, 255, .6);
}
/* 模板不加载图标字体，用同形的线条图标代替 fa-compass。 */
.ai-float i.fas {
  display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M8.5 12h.01M12 12h.01M15.5 12h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M8.5 12h.01M12 12h.01M15.5 12h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ai-float { z-index: 50; font-family: var(--nx-font); }
.ai-panel { z-index: 51; border-radius: 12px; font-family: var(--nx-font); }
.ai-form textarea, .ai-form button, .ai-quick button { font-family: var(--nx-font); }

/* 手机：底部是快捷导航（商品页是购买栏），助手按钮与面板停在它上方。 */
@media (max-width: 743px) {
  .ai-float { right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 8px 12px; font-size: 12px; }
  .ai-panel { right: 8px; bottom: calc(122px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); height: min(520px, calc(100dvh - 150px)); }
  body[data-page="item"] .ai-float { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body[data-page="item"] .ai-panel { bottom: calc(134px + env(safe-area-inset-bottom)); height: min(520px, calc(100dvh - 162px)); }
  .has-digital-human .ai-float { bottom: calc(254px + env(safe-area-inset-bottom)); }
  .has-digital-human .ai-panel { bottom: calc(308px + env(safe-area-inset-bottom)); height: min(520px, calc(100dvh - 328px)); }
}
