
:root {
  --bg: #f8f9fb;
  --bg2: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --rule: #e5e7eb;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --accent-bg: #eff6ff;
  --tag-bg: #f0fdf4;
  --tag-ink: #166534;
  --orange: #f59e0b;
  --orange-bg: #fffbeb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #0ea5e9 100%);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 20px rgba(37,99,235,0.2);
}

.header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.header .subtitle {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}

/* Search */
.search-wrap {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.15);
  color: white;
  outline: none;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.search-wrap input::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-wrap input:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.search-result-count {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.search-result-count.show {
  opacity: 0.85;
}

/* Stats bar */
.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg2);
  border-bottom: 1px solid var(--rule);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stat-num {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Category cards */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.cat-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(37,99,235,0.08);
  transform: translateY(-1px);
}

.cat-card.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.cat-count {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Section */
.faq-section {
  margin-bottom: 2rem;
  scroll-margin-top: 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--rule);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* 折叠分类面板：默认收起，点开才加载该分类内容（省手机流量） */
.section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0.5rem;
  margin: -0.25rem -0.5rem 0.4rem;
  border-radius: 10px;
  transition: background 0.15s;
}
.section-head:hover { background: var(--rule); }
.section-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.section-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.7rem;
  line-height: 1;
  color: var(--accent);
  background: var(--rule);
  border-radius: 6px;
  flex: 0 0 auto;
}
.faq-section.collapsed .section-body { display: none; }
.section-body { padding-top: 0.25rem; }
.cat-loading {
  padding: 0.85rem 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cat-loading::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: faqspin 0.7s linear infinite;
}
@keyframes faqspin { to { transform: rotate(360deg); } }

/* Tree list */
.tree-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tree-sublist {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0;
}

.tree-item {
  margin: 0;
  line-height: 1.6;
}

/* Branch (expandable item) */
.tree-branch-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: all 0.15s;
}

.tree-branch-text:hover {
  background: var(--bg);
  color: var(--accent);
}

.tree-branch-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.tree-branch-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.tree-branch-link::after {
  content: " ↗";
  font-size: 0.65rem;
  opacity: 0.4;
}

.tree-arrow {
  font-size: 0.6rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

.tree-branch-text.collapsed .tree-arrow {
  transform: rotate(-90deg);
}

.tree-branch-text.collapsed + .tree-sublist,
.tree-branch-text.collapsed ~ .tree-sublist {
  display: none;
}

/* Leaf (link item) */
.tree-link {
  display: block;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}

.tree-link:hover {
  background: var(--bg);
  color: var(--accent);
}

/* Slightly different background for deeper levels to show hierarchy */
.tree-level-1 .tree-link,
.tree-level-1 .tree-branch-text {
  padding-left: 0.5rem;
}

.tree-level-2 .tree-link,
.tree-level-2 .tree-branch-text {
  padding-left: 0.5rem;
  font-size: 0.85rem;
}

.tree-level-3 .tree-link,
.tree-level-3 .tree-branch-text {
  font-size: 0.83rem;
}

/* Hidden items */
.tree-item.hidden {
  display: none;
}

.tree-item.highlight .tree-link {
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  animation: flashHighlight 2s ease-out;
}

@keyframes flashHighlight {
  0% { background: #fde68a; }
  100% { background: transparent; }
}

.tree-item.highlight .tree-link mark {
  background: #fde68a;
  padding: 0 2px;
  border-radius: 2px;
}

/* Smart match panel */
.smart-match {
  display: none;
  margin-bottom: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(37,99,235,0.1);
}

.smart-match.show {
  display: block;
}

.smart-match-header {
  background: var(--accent-bg);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(37,99,235,0.1);
}

.smart-match-header .match-icon {
  font-size: 1.1rem;
}

.smart-match-list {
  padding: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.smart-match-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--ink);
}

.smart-match-item:hover {
  background: var(--bg);
}

.smart-match-item .score-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.smart-match-item .score-high { background: #10b981; }
.smart-match-item .score-mid { background: var(--accent); }
.smart-match-item .score-low { background: var(--muted); }

.smart-match-item .match-info {
  flex: 1;
  min-width: 0;
}

.smart-match-item .match-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

.smart-match-item .match-title mark {
  background: #fde68a;
  padding: 0 2px;
  border-radius: 2px;
  color: #92400e;
}

.smart-match-item .match-path {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-match-item .match-arrow {
  flex-shrink: 0;
  opacity: 0.3;
  font-size: 0.85rem;
  transition: opacity 0.15s;
}

.smart-match-item:hover .match-arrow {
  opacity: 0.7;
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  display: none;
}

.no-results.show {
  display: block;
}

.no-results svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--rule);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Back to top */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 99;
}

.back-top.show {
  display: flex;
}

.back-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* Responsive */
@media (max-width: 640px) {
  .header { padding: 1.5rem 1rem; }
  .header h1 { font-size: 1.3rem; }
  .categories { grid-template-columns: 1fr; }
  .container { padding: 1rem 0.5rem 2rem; }
  .stats { gap: 1rem; flex-wrap: wrap; }
  .faq-section { scroll-margin-top: 16px; }
}

/* AI 智能问答 */
.ai-assistant {
  margin: 1.25rem auto 0;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  color: #fff;
  backdrop-filter: blur(4px);
}
.ai-assistant-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
.ai-badge {
  background: #fff;
  color: #4f46e5;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: 0.5px;
}
.ai-input-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.ai-input-row textarea {
  flex: 1;
  resize: vertical;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
}
.ai-input-row textarea:focus { outline: 2px solid #fff; }
.ai-input-row button {
  flex: 0 0 auto;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #4f46e5;
  font-weight: 600;
  padding: 0 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.ai-input-row button:disabled { opacity: 0.6; cursor: default; }
.ai-reply {
  margin-top: 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: normal;
  max-height: 320px;
  overflow-y: auto;
  position: relative;
}
.ai-reply[hidden] { display: none; }
.ai-answer { white-space: pre-wrap; }
.ai-answer code {
  background: #eef2ff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
.ai-loading, .ai-error { color: #4b5563; }
.ai-error { color: #b91c1c; }
.ai-stream-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: #2563eb;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: ai-cursor-blink 1s step-end infinite;
  border-radius: 1px;
}
@keyframes ai-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.ai-stream-info {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.45rem;
}
.ai-lowconf {
  margin-top: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.ai-lowconf-human {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.32rem 0.8rem;
  background: #d97706;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.ai-lowconf-human:hover { background: #b45309; }
.ai-source {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.5rem;
}
.ai-references {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e5e7eb;
  font-size: 0.78rem;
  color: #6b7280;
}
.ai-ref-label {
  color: #4b5563;
  font-weight: 600;
}
.ai-references ul {
  margin: 0.3rem 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ai-references li {
  margin: 0;
}
.ai-ref-link {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.76rem;
  line-height: 1.4;
  transition: background 0.15s ease;
}
.ai-ref-link:hover {
  background: #dbeafe;
  text-decoration: none;
}
.ai-reply-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.ai-reply-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}
.ai-human-support {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ai-human-support-text {
  font-size: 0.8rem;
  color: #6b7280;
}
.ai-human-support-btn {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-human-support-btn:hover {
  background: #059669;
}
.ai-feedback {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.ai-feedback-q {
  color: #4b5563;
  font-weight: 600;
}
.ai-fb-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-fb-btn:hover { background: #f3f4f6; }
.ai-fb-yes { border-color: #10b981; color: #059669; }
.ai-fb-yes:hover { background: #ecfdf5; }
.ai-fb-no { border-color: #ef4444; color: #dc2626; }
.ai-fb-no:hover { background: #fef2f2; }
.ai-fb-btn:disabled { opacity: 0.5; cursor: default; }
.ai-feedback-msg {
  color: #6b7280;
  font-size: 0.82rem;
}
.ai-fb-reasons {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}
.ai-fb-reasons-label {
  font-size: 0.8rem;
  color: #64748b;
  width: 100%;
}
.ai-fb-reason {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-fb-reason:hover { border-color: #2563eb; color: #2563eb; }
.ai-fb-reason:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ai-hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

/* FAQ 正文弹窗 */
body.modal-open { overflow: hidden; }

.faq-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.faq-modal[hidden] { display: none; }

.faq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  animation: modalFade 0.18s ease-out;
}

.faq-modal-panel {
  position: relative;
  background: var(--bg2);
  color: var(--ink);
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.faq-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
}
.faq-modal-close:hover { background: #fee2e2; color: #b91c1c; }

.faq-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  padding-right: 3rem;
  line-height: 1.4;
}

.faq-modal-body {
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  white-space: normal;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #374151;
}

.faq-modal-iframe {
  width: 100%;
  height: 65vh;
  min-height: 400px;
  border: none;
  border-radius: 8px;
  background: #fff;
}

.faq-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0.75rem 0;
}

.faq-modal-body video {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  display: block;
  margin: 0.75rem 0;
}

.faq-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.faq-modal-body th,
.faq-modal-body td {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.faq-modal-body th {
  background: var(--bg);
  font-weight: 600;
}

.faq-modal-empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.faq-modal-foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--rule);
  text-align: right;
}

.faq-modal-origin {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: all 0.15s;
}
.faq-modal-origin:hover { background: #dbeafe; }

@media (max-width: 640px) {
  .faq-modal { padding: 0.75rem; }
  .faq-modal-panel { max-height: 90vh; }
}

/* =========================================================
   新版页面：产品介绍 + 帮助中心 + FAQ
   ========================================================= */
html { scroll-behavior: smooth; }

/* 顶部导航 */
.topnav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
}
.nav-logo {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-logo-mark { font-size: 1.2rem; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #374151;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.4rem 0.95rem;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover { background: #1d4ed8; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

/* 首屏 Hero */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 58%, #0ea5e9 100%);
  color: #fff;
  padding: 2.6rem 1.25rem 2.2rem;
  text-align: center;
}
.hero-inner { max-width: 840px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
}
.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.hero-sub {
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: 1.8rem;
}
.hero-btns {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: #fff;
  color: #1d4ed8;
  padding: 0.72rem 1.7rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.72rem 1.7rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.22); }
.hero-tags {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.9rem;
  font-size: 0.9rem;
}
.hero-tags span {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
}

/* 首屏直达提问（P1） */
.hero-ask {
  display: flex;
  gap: 0.6rem;
  max-width: 620px;
  margin: 1.4rem auto 0;
  background: #fff;
  border-radius: 14px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}
.hero-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 1rem;
  padding: 0.6rem 0.2rem;
  min-width: 0;
}
.hero-input::placeholder { color: #94a3b8; }
.hero-send {
  flex: 0 0 auto;
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.62rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-send:hover { background: #1d4ed8; }
.hero-send:active { transform: translateY(1px); }
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  max-width: 760px;
  margin: 1.1rem auto 0;
}
.hero-chip {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.86rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.hero-chip:hover { background: rgba(255, 255, 255, 0.26); border-color: #fff; }
.hero-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* AI 重试按钮（P1） */
.ai-retry-btn {
  margin-left: 0.6rem;
  border: 1px solid currentColor;
  background: transparent;
  color: #b91c1c;
  font-size: 0.82rem;
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.ai-retry-btn:hover { background: rgba(185, 28, 28, 0.1); }

/* 通用区块 */
.section {
  padding: 3.6rem 1.25rem;
  scroll-margin-top: 70px;
}
.section > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section-alt { background: #f1f5f9; }
.section-head { text-align: center; margin-bottom: 2.3rem; }
.section-title-main {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.section-desc { color: var(--muted); font-size: 0.98rem; }

/* 卡片栅格 */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.value-card,
.feature-card,
.scenario-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.6rem 1.3rem;
  transition: all 0.2s;
}
.value-card:hover,
.feature-card:hover,
.scenario-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.1);
  transform: translateY(-3px);
}
.value-icon,
.feature-icon,
.scenario-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}
.value-card h3,
.feature-card h3,
.scenario-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--ink); }
.value-card p,
.feature-card p,
.scenario-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* 使用流程 */
.steps-3 {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.step-item {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.7rem 1.3rem 1.4rem;
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  position: relative;
}
.step-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-item h3 { font-size: 1.05rem; margin: 0.4rem 0; }
.step-item p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.step-arrow { align-self: center; font-size: 1.6rem; color: var(--accent); font-weight: 700; }

/* 新手教程 */
.tutorial-steps {
  list-style: none;
  max-width: 720px;
  margin: 0 auto 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0;
}
.tutorial-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.tutorial-steps .tut-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.tutorial-steps h4 { font-size: 1rem; margin: 0 0 0.2rem; }
.tutorial-steps p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.tutorial-cta { text-align: center; }

/* FAQ 搜索与分类标签 */
.faq-search {
  position: relative;
  max-width: 640px;
  margin: 0 auto 1.2rem;
}
.faq-search input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border: 2px solid var(--rule);
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
}
.faq-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.faq-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.faq-search .search-result-count {
  position: static;
  text-align: left;
  margin: 0.45rem 0 0 0.2rem;
}
.faq-ai-top {
  max-width: 760px;
  margin: 0 auto 1.5rem;
}
.faq-ai-top .ai-reserved {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.2rem;
}
.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.faq-tab {
  border: 1px solid var(--rule);
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.faq-tab:hover { border-color: var(--accent); color: var(--accent); }
.faq-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.faq-tab-count {
  font-size: 0.75rem;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.06);
  padding: 0 0.4rem;
  border-radius: 999px;
}
.faq-tab.active .faq-tab-count { background: rgba(255, 255, 255, 0.25); }

.faq-cat-empty {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 2.2rem 1rem;
  font-size: 0.95rem;
  background: var(--bg2);
  border: 1px dashed var(--rule);
  border-radius: 12px;
}

/* 联系客服 */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-cta {
  background: var(--accent-bg);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
}
.contact-cta-icon { font-size: 2.2rem; }
.contact-cta h3 { font-size: 1.2rem; margin: 0.5rem 0; }
.contact-cta p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.2rem; }
.btn-online {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.8rem;
  border-radius: 10px;
  transition: all 0.2s;
}
.btn-online:hover { background: #1d4ed8; }
.ai-reserved {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.2rem;
}
.ai-reserved-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.8rem;
}
.ai-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ai-suggest-head-btn {
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  color: #2563eb;
  background: transparent;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
}
.ai-suggest-head-btn:hover { background: #eff6ff; border-color: #2563eb; }
.ai-suggest-head-btn:active { transform: scale(0.96); }
.ai-clear-btn {
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  color: #6b7280;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
}
.ai-head-actions .ai-clear-btn { margin-left: 0; }
.ai-clear-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #ef4444;
}
.ai-clear-btn:active { transform: scale(0.96); }
.contact-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 1.5rem;
}

/* AI 客服框在浅色区块中的样式覆盖 */
.ai-assistant {
  margin: 0;
  max-width: none;
  background: var(--accent-bg);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 240px;
  max-height: none;
  overflow: hidden;
  transition: height 0.35s ease;
}
.ai-assistant.ai-expanded {
  height: 88vh;
  height: 88dvh;
}
.ai-hint { color: var(--muted); font-size: 0.82rem; margin-top: 0.5rem; }

/* 提建议 弹窗 */
.ai-suggest-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60;
}
.ai-suggest-mask[hidden] { display: none; }
.ai-suggest-modal {
  background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
  width: 100%; max-width: 480px; padding: 22px 24px; color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ai-suggest-title { margin: 0 0 6px; font-size: 16px; }
.ai-suggest-sub { margin: 0 0 12px; color: var(--sub, #6b7280); font-size: 13px; }
.ai-suggest-field { margin-bottom: 12px; }
.ai-suggest-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.ai-suggest-field .req { color: #ef4444; }
.ai-suggest-field input,
.ai-suggest-field textarea {
  width: 100%; box-sizing: border-box; resize: vertical; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.7; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit;
}
.ai-suggest-field input:focus,
.ai-suggest-field textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ai-suggest-error { color: #ef4444; font-size: 12.5px; margin: -4px 0 12px; }
.ai-suggest-error[hidden] { display: none; }
.ai-suggest-modal textarea {
  width: 100%; box-sizing: border-box; resize: vertical; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.7; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit;
}
.ai-suggest-modal textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ai-suggest-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.ai-suggest-cancel { padding: 8px 16px; font-size: 14px; border: 1px solid #d1d5db; background: #fff; color: #6b7280; border-radius: 8px; cursor: pointer; }
.ai-suggest-submit { padding: 8px 16px; font-size: 14px; border: none; background: #2563eb; color: #fff; border-radius: 8px; cursor: pointer; }
.ai-suggest-submit:disabled { opacity: 0.6; cursor: default; }
.ai-confirm-list { margin: 4px 0 6px; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.ai-confirm-row { display: flex; gap: 10px; padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid #f1f5f9; }
.ai-confirm-row:last-child { border-bottom: none; }
.ai-confirm-key { flex: 0 0 64px; color: #6b7280; }
.ai-confirm-val { flex: 1 1 auto; color: #111827; word-break: break-word; white-space: pre-wrap; }
.ai-confirm-row-phone { background: #eff6ff; }
.ai-confirm-phone { font-weight: 600; color: #1d4ed8; letter-spacing: 0.5px; }

/* 多模态聊天窗口 */
.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1 1 0;
  min-height: 70px;
  max-height: 100px;
  overflow-y: auto;
  padding: 0.3rem 0.2rem;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  transition: max-height 0.35s ease;
}
.ai-assistant.ai-expanded .ai-messages {
  max-height: none;
}
.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-assistant { justify-content: flex-start; }
.ai-bubble { max-width: 90%; padding: 0.5rem 0.7rem; border-radius: 10px; line-height: 1.5; font-size: 0.9rem; white-space: normal; word-break: break-word; }
.ai-msg-user .ai-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-user .ai-bubble code { background: rgba(255,255,255,0.22); padding: 0 4px; border-radius: 4px; }
.ai-msg-assistant .ai-bubble { background: #f1f5f9; color: #111827; border-bottom-left-radius: 4px; }
.ai-msg-media { margin-bottom: 0.4rem; }
.ai-msg-media img { max-width: 200px; max-height: 200px; border-radius: 10px; display: block; }
.ai-msg-media .ai-video-tag { display: inline-block; background: rgba(0,0,0,0.06); padding: 0.35rem 0.7rem; border-radius: 8px; }
.ai-input-row .ai-upload-btn { flex: 0 0 auto; width: 42px; padding: 0; background: #eef2ff; color: #2563eb; font-size: 1.15rem; border-radius: 10px; cursor: pointer; border: none; }
.ai-input-row .ai-upload-btn:hover { background: #e0e7ff; }
.ai-pending { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.ai-pending img { max-width: 64px; max-height: 64px; border-radius: 6px; vertical-align: middle; margin-right: 6px; }

/* 页脚 */
.footer { background: #0f172a; color: #cbd5e1; padding: 2.5rem 1.25rem; }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logo { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.footer-logo img { height: 24px; width: auto; border-radius: 5px; }
.footer-brand p { font-size: 0.88rem; max-width: 360px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin: 1.5rem 0 0;
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
}

/* 响应式 */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .steps-3 { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1.25rem 0.9rem;
    gap: 0.1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.55rem 0.3rem; }
  .nav-cta { text-align: center; margin-top: 0.3rem; }
  .hero-title { font-size: 1.7rem; }
  .section-title-main { font-size: 1.35rem; }
}
@media (max-width: 520px) {
  .cards-3,
  .cards-4 { grid-template-columns: 1fr; }
  .hero { padding: 3.2rem 1rem 2.8rem; }
  .section { padding: 2.6rem 1rem; }
}

/* 简洁顶部导航（知识库风格，非官网营销） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
}
.brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brand-logo-img { height: 28px; width: auto; border-radius: 6px; vertical-align: middle; }
.brand-wordmark-img { height: 26px; width: auto; vertical-align: middle; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}
.header-nav a {
  color: #374151;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s;
}
.header-nav a:hover { color: var(--accent); }
.header-stat-link {
  background: var(--accent);
  color: #fff !important;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}
.header-stat-link:hover { background: #1d4ed8; color: #fff !important; }
@media (max-width: 640px) {
  .header-nav a:not(.header-stat-link) { display: none; }
  .brand { font-size: 0.95rem; }
}

/* =========================================================
   移动端增强：让手机浏览器打开时体验接近原生 App，
   不再是“缩小版电脑页面”，也不会出现横向滚动 / 输入框聚焦放大等问题
   ========================================================= */

/* 触摸设备（手机/平板）：输入框字号 ≥16px，避免 iOS 聚焦时整个页面被自动放大 */
@media (hover: none) and (pointer: coarse) {
  .ai-input-row textarea,
  .ai-suggest-field input,
  .ai-suggest-field textarea,
  .ai-suggest-modal textarea,
  .faq-search input {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  /* 手机上聊天框默认就占很大高度：进页面即像原生聊天界面，而不是一个缩在小角落的框 */
  .ai-assistant {
    height: 74vh;
    height: 74dvh;
    padding: 0.85rem 0.9rem;
  }
  .ai-assistant.ai-expanded {
    height: 90vh;
    height: 90dvh;
  }
  /* 未展开时也让消息区撑满，避免下方出现大块空白 */
  .ai-messages { max-height: none; }
  /* 输入行与气泡更贴合手机单手操作 */
  .ai-input-row { gap: 0.5rem; }
  .ai-input-row textarea { min-height: 48px; border-radius: 12px; }
  .ai-input-row button { padding: 0 1rem; font-size: 1rem; border-radius: 12px; }
  .ai-bubble { max-width: 92%; font-size: 0.95rem; }

  /* 建议 / 确认弹窗：手机上接近全屏，键盘弹出时不被遮挡 */
  .ai-suggest-mask { padding: 0; align-items: stretch; }
  .ai-suggest-modal {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 24px 18px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ai-suggest-title { font-size: 18px; }
  .ai-suggest-field label { font-size: 14px; }
  .ai-suggest-field input,
  .ai-suggest-field textarea,
  .ai-suggest-modal textarea { font-size: 16px; padding: 12px; }
  .ai-suggest-actions { margin-top: 18px; }
  .ai-suggest-cancel,
  .ai-suggest-submit { padding: 11px 18px; font-size: 15px; }
  .ai-confirm-list { font-size: 15px; }

  /* FAQ 详情弹窗：手机上贴边全屏 */
  .faq-modal { padding: 0; }
  .faq-modal-panel { max-width: none; max-height: 100%; height: 100%; border-radius: 0; }
  .faq-modal-title { font-size: 1.1rem; padding: 1.1rem 1rem 0.75rem; }
  .faq-modal-body { font-size: 1rem; }
  .faq-modal-iframe { height: 70vh; }

  /* 回到顶部按钮更靠边、更大，便于单手点 */
  .back-top { bottom: 1.2rem; right: 1.2rem; width: 48px; height: 48px; }

  /* 杜绝意外的横向滚动，体验更像 App */
  html, body { overflow-x: hidden; }
}

@media (max-width: 380px) {
  .ai-input-row button { padding: 0 0.8rem; }
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: 0.98rem; }
}

