/* ============================================================
   Fix Lens - 主样式（橙色主题，对标原型图）
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #FF6B2B;
  --primary-dark:  #e85a1a;
  --primary-soft:  rgba(255,107,43,.10);
  --primary-light: rgba(255,107,43,.06);
  --bg:            #F5F0EB;
  --card:          #FFFFFF;
  --text:          #1A1A2E;
  --muted:         #888888;
  --border:        #E8E8E8;
  --success:       #16a34a;
  --danger:        #dc2626;
  --radius:        20px;
  --shadow:        0 4px 24px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── 顶栏 ── */
.topbar {
  background: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--text);
  cursor: pointer; text-decoration: none; background: none; border: none;
  padding: 6px 0;
}
.topbar-link:hover { color: var(--primary); }
.topbar-link svg { opacity: .6; }
.topbar-cart-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-left: 2px;
  font-weight: 700;
}

/* ── 步骤条 ── */
.steps {
  display: flex; align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; gap: 0;
}
.step { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  border: 2px solid var(--border); color: var(--muted); background: #fff;
  transition: .2s;
}
.step-label { font-size: 13px; color: var(--muted); transition: .2s; }
.step.active .step-num  { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active .step-label{ color: var(--primary); font-weight: 600; }
.step.done   .step-num  { background: var(--success); border-color: var(--success); color: #fff; }
.step.done   .step-label{ color: var(--success); }
.step-divider { flex: 1; height: 2px; background: var(--border); min-width: 20px; margin: 0 6px; }
.step-divider.done { background: var(--success); }

/* ── 主内容 ── */
.main { max-width: 680px; margin: 0 auto; padding: 32px 16px; }
.main:has(.home-wrapper) { padding: 32px 16px; }
/* 诊断对话页面去掉 padding，让全屏布局生效 */
.main:has(.diag-chat-layout) { padding: 0; max-width: 100%; }

/* ── 首页 ── */
.home-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 32px;
}
.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}
.home-badge-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.home-hero {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  padding: 48px 40px 40px;
  text-align: center;
  width: 100%;
  max-width: 480px;
  margin-bottom: 20px;
}
.home-hero-icon {
  width: 72px; height: 72px;
  background: var(--primary);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.home-hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}
.home-hero-title span { color: var(--primary); display: block; }
.home-hero-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 300px;
  margin: 0 auto 28px;
}
.home-start-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 15px 36px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .15s;
  box-shadow: 0 4px 20px rgba(255,107,43,.40);
}
.home-start-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.home-start-hint { font-size: 12px; color: var(--muted); margin-top: 12px; }

.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}
.home-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.home-feature-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  color: var(--primary);
}
.home-feature-label { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ── 通用卡片 ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

/* ── 上传区 ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px; padding: 32px;
  text-align: center; cursor: pointer;
  transition: .2s; background: #fafafa;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-text { font-size: 14px; color: var(--muted); }
.preview-wrap { position: relative; display: inline-block; }
.preview-img { max-width: 100%; max-height: 260px; border-radius: 10px; object-fit: contain; border: 1px solid var(--border); }
.preview-remove {
  position: absolute; top: -8px; right: -8px;
  background: var(--danger); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* ── 多槽上传 ── */
.upload-slot {
  border: 2px dashed var(--border);
  border-radius: 10px; padding: 12px 8px;
  text-align: center; cursor: pointer;
  transition: .2s; background: #fafafa;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.upload-slot:hover { border-color: var(--primary); background: var(--primary-light); }
.slot-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slot-preview { position: relative; width: 100%; }
.slot-img { width: 100%; max-height: 100px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 50px;
  border: none; cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #f1f1f1; color: var(--text); border-radius: 50px; }
.btn-secondary:hover { background: #e4e4e4; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ── 结果列表 ── */
.result-list { display: flex; flex-direction: column; gap: 12px; }
.result-item {
  border: 2px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: .15s; background: #fff;
}
.result-item:hover  { border-color: var(--primary); background: var(--primary-light); }
.result-item.selected { border-color: var(--primary); background: var(--primary-light); }
.result-img {
  width: 64px; height: 64px; border-radius: 8px;
  background: #f5f5f5; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.result-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.result-info { flex: 1; min-width: 0; }
.result-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.result-sub  { font-size: 13px; color: var(--muted); }
.result-score{ font-size: 12px; color: var(--primary); font-weight: 600; flex-shrink: 0; }
.result-price{ font-size: 16px; font-weight: 700; color: var(--danger); flex-shrink: 0; }

/* ── 部位网格 ── */
.part-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 12px; }
.part-card {
  border: 2px solid var(--border);
  border-radius: 12px; padding: 16px;
  text-align: center; cursor: pointer;
  transition: .15s; background: #fff;
}
.part-card:hover   { border-color: var(--primary); background: var(--primary-light); }
.part-card.selected{ border-color: var(--primary); background: var(--primary-light); }
.part-card-img  { font-size: 32px; margin-bottom: 8px; }
.part-card-name { font-size: 13px; font-weight: 600; }

/* ── 购物车浮动按钮 ── */
.cart-fab {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 50px;
  padding: 12px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,107,43,.4);
  display: flex; align-items: center; gap: 8px;
  z-index: 100; transition: .15s;
}
.cart-fab:hover { background: var(--primary-dark); }
.cart-badge {
  background: #fff; color: var(--primary);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── 购物车抽屉 ── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(420px,100vw); background: #fff;
  z-index: 201; box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: .25s;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 17px; font-weight: 700; }
.drawer-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-foot { padding: 16px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; }
.cart-total-amount { font-size: 20px; font-weight: 700; color: var(--primary); }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: none; }
.cart-line-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name  { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cart-line-price { font-size: 13px; color: var(--primary); }
.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: #f8f8f8; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.qty-num { font-size: 14px; font-weight: 600; min-width: 24px; text-align: center; }
.cart-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px; }

/* ── 表单 ── */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: block; }
.form-input { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 14px; outline: none; transition: .15s; background: #fafafa; }
.form-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.form-input { resize: vertical; min-height: 72px; }

/* ── 空状态/提示 ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon  { font-size: 48px; margin-bottom: 12px; }
.empty-text  { font-size: 15px; margin-bottom: 8px; }
.empty-sub   { font-size: 13px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-warn    { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-blue  { background: var(--primary-soft); color: var(--primary); }
.tag-green { background: #f0fdf4; color: #166534; }

/* ── 成功页 ── */
.success-page { text-align: center; padding: 48px 24px; }
.success-icon  { font-size: 64px; margin-bottom: 16px; }
.success-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-sub   { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.order-no-box  { background: var(--primary-soft); border-radius: 10px; padding: 12px 20px; display: inline-block; font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 24px; }

/* ── 详情弹窗 ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-head { padding: 20px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.modal-body { padding: 16px 24px 24px; }
.detail-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-row:last-of-type { border-bottom: none; }
.detail-label { color: var(--muted); flex-shrink: 0; width: 90px; }
.detail-value { font-weight: 500; flex: 1; }
.modal-foot { padding: 0 24px 24px; display: flex; gap: 10px; }

/* ── 订单页 ── */
.order-card { background: #fff; border-radius: 14px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); overflow: hidden; border: 1.5px solid var(--border); }
.order-card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; cursor: pointer; }
.order-card-head:hover { background: var(--primary-light); }
.order-card-body { padding: 0 16px 14px; }

/* ── 工具 ── */
.hidden { display: none !important; }

/* ---- 图片预览网格 ---- */
#preview-grid { gap: 10px; }
#preview-grid > div { border-radius: 12px; overflow: hidden; }

/* ---- 购物车专属页面 ---- */
.cart-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
}
.cart-page-back {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-page-back:hover { background: var(--bg); }
.cart-page-title { font-size: 17px; font-weight: 700; flex: 1; }
.cart-page-count { font-size: 14px; font-weight: 600; color: var(--primary); }
.cart-page-checkout-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 16px;
}

/* ---- 结果页部位横向滚动条隐藏 ---- */
#section-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   移动端 / iPad 适配
   ============================================================ */

/* 防止 iOS 点击高亮 */
* { -webkit-tap-highlight-color: transparent; }

/* 安全区适配（iPhone 刘海/底部横条） */
body { padding-bottom: env(safe-area-inset-bottom); }

/* 顶栏安全区 */
.topbar {
  padding-top: env(safe-area-inset-top);
  height: calc(56px + env(safe-area-inset-top));
}

/* 手机端 */
@media (max-width: 480px) {
  .main { padding: 16px 12px; }
  .home-hero { padding: 32px 20px 24px; }
  .home-hero-title { font-size: 24px; }
  .home-start-btn { padding: 14px 24px; font-size: 15px; width: 100%; justify-content: center; }
  .home-features { gap: 8px; }
  .home-feature-card { padding: 14px 6px; }
  .home-feature-label { font-size: 11px; }
  .form-input { font-size: 16px; }
  .drawer { width: 100vw; }
  .modal { border-radius: 16px 16px 0 0; max-height: 85vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .btn { min-height: 44px; }
  #order-layout { flex-direction: column !important; }
  #payment-layout { flex-direction: column !important; }
  #section-scroll > div { width: 120px !important; }
  .cart-page-header { top: 0; }
  #result-header { flex-direction: column; align-items: flex-start !important; gap: 12px; }
  #result-header > button { width: 100%; justify-content: center; }
  #search-header { align-items: stretch !important; }
  #search-header > button { width: 100%; justify-content: center; }
  #browse-accessories-count, #accessories-count, #search-results-count { display: inline-block; }
}

/* iPad */
@media (min-width: 481px) and (max-width: 1024px) {
  .main { max-width: 100%; padding: 24px 20px; }
}

/* ── 首页诊断入口卡片 ─────────────────────────────────────── */
.home-diag-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px;
  padding: 18px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1.5px solid var(--border);
  transition: box-shadow .2s, border-color .2s;
}
.home-diag-card:hover, .home-diag-card:active { border-color: var(--primary); box-shadow: 0 4px 20px rgba(255,107,43,.12); }
.home-diag-icon {
  width: 52px; height: 52px;
  background: var(--primary-soft);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.home-diag-text { flex: 1; }
.home-diag-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.home-diag-sub   { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── 诊断页面通用 ────────────────────────────────────────── */
.diag-wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 44px; }
.diag-step-bar {
  display: flex; align-items: center; gap: 0;
  padding: 6px 4px 18px; margin-bottom: 10px;
}
.diag-step { display: flex; align-items: center; gap: 8px; }
.diag-step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border: 2px solid #e7dfd7; color: #8b8b95; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.diag-step.active .diag-step-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(255,107,43,.22); }
.diag-step.done   .diag-step-dot { background: var(--success); border-color: var(--success); color: #fff; box-shadow: 0 8px 18px rgba(22,163,74,.18); }
.diag-step-label { font-size: 13px; color: #7f8089; font-weight: 500; }
.diag-step.active .diag-step-label { color: var(--primary); font-weight: 700; }
.diag-step.done .diag-step-label { color: #4b5563; font-weight: 600; }
.diag-step-divider { flex: 1; height: 2px; background: #e7dfd7; margin: 0 8px; min-width: 12px; }
.diag-step-divider.done { background: #cfead8; }

.diag-page-hero {
  background: linear-gradient(135deg, rgba(255,107,43,.12) 0%, rgba(255,255,255,.94) 100%);
  border: 1px solid rgba(255,107,43,.08);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.diag-page-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.8); color: var(--primary);
  font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.diag-page-title { font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--text); margin-bottom: 8px; }
.diag-page-sub { font-size: 14px; line-height: 1.7; color: #6f7280; }
.diag-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.04);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  padding: 22px;
  margin-bottom: 16px;
}
.diag-panel-soft {
  background: linear-gradient(135deg, rgba(255,107,43,.10) 0%, rgba(255,255,255,.96) 100%);
  border: 1px solid rgba(255,107,43,.08);
}
.diag-section-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.diag-section-sub { font-size: 13px; line-height: 1.65; color: #7b7e88; margin-bottom: 14px; }
.diag-upload-box {
  border: 2px dashed #eadcd2; border-radius: 20px; padding: 34px 20px;
  text-align: center; cursor: pointer; transition: .18s;
  background: rgba(255,107,43,.04);
}
.diag-upload-box:hover { border-color: var(--primary); background: rgba(255,107,43,.08); }
.diag-action-row { display: flex; gap: 12px; margin-top: 14px; }
.diag-btn-primary {
  background: var(--primary); color: #fff; border: none; border-radius: 16px;
  padding: 14px 20px; font-size: 15px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 22px rgba(255,107,43,.2);
}
.diag-btn-primary:hover { background: var(--primary-dark); }
.diag-btn-secondary {
  background: #f3f1ef; color: var(--text); border: none; border-radius: 16px;
  padding: 14px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.diag-btn-secondary:hover { background: #ece8e4; }
.diag-summary-chip {
  background: rgba(255,107,43,.10); border-radius: 18px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.diag-summary-icon {
  width: 46px; height: 46px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

/* 诊断候选原因卡 */
.cause-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.cause-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.cause-prob { font-size: 15px; font-weight: 800; min-width: 44px; flex-shrink: 0; }
.prob-high { color: #dc2626; } .prob-mid { color: #d97706; } .prob-low { color: #16a34a; }
.cause-desc { font-size: 14px; color: var(--text); font-weight: 600; line-height: 1.5; }
.cause-bar-wrap { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.cause-bar { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--primary), #ffb347); transition: width .6s; }
.cause-tip { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 诊断气泡 */
.bubble-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.bubble-row.user { justify-content: flex-end; }
.bubble-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.bubble-avatar.ai   { background: var(--primary-soft); }
.bubble-avatar.user { background: #f0fdf4; }
.bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.65; word-break: break-word;
}
.bubble.ai   { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.bubble.user { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }

/* 快捷选项 */
.quick-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.quick-opt {
  background: #fff; border: 1.5px solid var(--primary); color: var(--primary);
  border-radius: 50px; padding: 7px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
  transition: all .15s;
}
.quick-opt:active, .quick-opt.selected { background: var(--primary); color: #fff; }

/* 进度轮数点 */
.round-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.round-dots { display: flex; gap: 5px; }
.round-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all .3s; }
.round-dot.done    { background: var(--primary); }
.round-dot.current { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); transform: scale(1.2); }

/* 结论卡 */
.conclusion-card {
  background: linear-gradient(135deg, #fff5f0 0%, #fff 100%);
  border: 1.5px solid var(--primary);
  border-radius: 20px; padding: 24px;
}
.conclusion-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.repair-steps {
  background: #fff; border-radius: 12px; padding: 16px;
  font-size: 14px; line-height: 1.8; white-space: pre-wrap; color: var(--text);
}
