:root {
  --brand: #d4261f;
  --brand-dark: #a81a14;
  --brand-soft: #fdecea;
  --brand-glow: rgba(212, 38, 31, 0.28);
  --ink: #1b1f24;
  --ink-2: #3d444d;
  --muted: #737b86;
  --line: #ebedf0;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ok: #0f9960;
  --ok-soft: #e8f7f0;
  --warn: #b7791f;
  --warn-soft: #fdf6e7;
  --info: #1d6fd0;
  --info-soft: #eaf2fd;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ------------------------------- 外壳 ------------------------------- */
.shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 96px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar .logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: 0 0 auto;
}

.topbar .brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar .brand-text b { font-size: 15px; letter-spacing: 0.2px; }
.topbar .brand-text span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topbar .back {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f2f3f5; border: none; cursor: pointer; flex: 0 0 auto;
}
.topbar .back:active { background: #e6e8eb; }

.container { padding: 16px; }

/* ------------------------------- Hero ------------------------------- */
.hero {
  position: relative;
  margin: 0 0 14px;
  padding: 26px 20px 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 88% 6%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #e0352c 0%, #c11f19 55%, #a81a14 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--brand-glow);
}
.hero::after {
  content: "";
  position: absolute;
  right: -46px; top: -46px;
  width: 168px; height: 168px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.08);
}
.hero .kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px; border-radius: 999px;
}
.hero h1 { margin: 12px 0 6px; font-size: 23px; line-height: 1.3; letter-spacing: 0.3px; }
.hero p { margin: 0; font-size: 13px; opacity: 0.9; position: relative; }

/* ------------------------------ 搜索框 ------------------------------ */
.search-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-top: -34px;
  position: relative;
  z-index: 5;
}
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--brand); margin-left: 2px; }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fbfbfc;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.input.code { letter-spacing: 1.5px; font-weight: 600; text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 16px var(--brand-glow);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; box-shadow: none; cursor: not-allowed; }
.btn.ghost {
  background: #fff; color: var(--brand);
  border: 1px solid #f0c9c6; box-shadow: none;
}
.btn.gray { background: #f2f3f5; color: var(--ink-2); box-shadow: none; }
.btn.sm { width: auto; padding: 9px 14px; font-size: 14px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.hint a { color: var(--brand); font-weight: 500; }

/* ------------------------------ 区块 ------------------------------ */
.section { margin-top: 16px; }
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; margin: 0 0 10px;
}
.section-title::before {
  content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--brand);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }

/* --------------------------- 产品信息 --------------------------- */
.product-head { display: flex; gap: 14px; align-items: flex-start; }
.product-head .thumb {
  width: 84px; height: 84px; flex: 0 0 auto;
  border-radius: 12px; object-fit: cover;
  background: #f2f3f5; border: 1px solid var(--line);
}
.product-head h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; }
.product-head .model { font-size: 13px; color: var(--muted); }
.product-head .model b { color: var(--brand); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 500;
}
.tag.neutral { background: #f2f3f5; color: var(--ink-2); }

.summary { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }

.manual-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, #fafbfc);
}
.manual-card .icon {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  background: var(--brand-soft); display: grid; place-items: center;
  color: var(--brand); font-size: 12px; font-weight: 700;
}
.manual-card .meta { flex: 1; min-width: 0; }
.manual-card .meta b { display: block; font-size: 14px; }
.manual-card .meta span { font-size: 12px; color: var(--muted); }

.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.spec-list li:last-child { border-bottom: none; padding-bottom: 0; }
.spec-list li .k { flex: 0 0 84px; color: var(--muted); }
.spec-list li .v { flex: 1; color: var(--ink); }

.hl-list { margin: 0; padding: 0; list-style: none; }
.hl-list li {
  position: relative; padding: 7px 0 7px 22px; font-size: 13.5px; color: var(--ink-2);
}
.hl-list li::before {
  content: ""; position: absolute; left: 3px; top: 14px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 厂家信息 */
.brand-card { background: linear-gradient(180deg, #fff 0%, #fffaf9 100%); }
.brand-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line);
}
.brand-row:last-child { border-bottom: none; padding-bottom: 0; }
.brand-row .k { flex: 0 0 66px; color: var(--muted); }
.brand-row .v { flex: 1; color: var(--ink); word-break: break-all; }
.brand-row .v a { color: var(--brand); font-weight: 500; }

/* --------------------------- 时间线 --------------------------- */
.timeline { position: relative; margin: 4px 0 0; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.timeline .node { position: relative; padding: 0 0 16px; }
.timeline .node:last-child { padding-bottom: 0; }
.timeline .node::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
}
.timeline .node.done::before { border-color: var(--brand); background: var(--brand); }
.timeline .node .t { font-size: 13.5px; font-weight: 600; }
.timeline .node .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline .node .r { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; background: #f8f9fa; padding: 6px 9px; border-radius: 8px; }

/* --------------------------- 状态徽章 --------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.contacted { background: var(--info-soft); color: var(--info); }
.badge.shipping { background: #f1ecfd; color: #6941c6; }
.badge.shipped { background: var(--ok-soft); color: var(--ok); }
.badge.closed { background: #f2f3f5; color: var(--muted); }

/* --------------------------- 流程步骤 --------------------------- */
.flow { display: grid; gap: 10px; }
.flow .step { display: flex; gap: 12px; align-items: flex-start; }
.flow .step .n {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700;
}
.flow .step .txt b { display: block; font-size: 13.5px; }
.flow .step .txt span { font-size: 12.5px; color: var(--muted); }

/* --------------------------- 底部操作栏 --------------------------- */
.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px;
  max-width: 560px; margin: 0 auto;
}
.actionbar .btn { flex: 1; }

/* --------------------------- 提示 --------------------------- */
.alert {
  padding: 11px 13px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 12px;
}
.alert.error { background: #fdecec; color: #b42318; }
.alert.ok { background: var(--ok-soft); color: #067647; }
.alert.info { background: var(--info-soft); color: #175cd3; }

.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 12px);
  background: rgba(28, 32, 38, 0.94); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.22s;
  z-index: 100; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------- 成功页 --------------------------- */
.success-hero { text-align: center; padding: 26px 0 6px; }
.success-hero .ring {
  width: 68px; height: 68px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--ok-soft);
  display: grid; place-items: center;
}
.success-hero .ring svg { width: 34px; height: 34px; }
.success-hero h2 { margin: 0 0 6px; font-size: 19px; }
.success-hero p { margin: 0; font-size: 13.5px; color: var(--muted); }

.ticket-no {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 16px 0 0; padding: 14px;
  border: 1px dashed #f0c9c6; background: var(--brand-soft);
  border-radius: var(--radius-sm);
}
.ticket-no .lbl { font-size: 12px; color: var(--brand-dark); }
.ticket-no .val { font-size: 19px; font-weight: 700; letter-spacing: 1px; color: var(--brand-dark); }

/* --------------------------- 图片上传 --------------------------- */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-item {
  width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  position: relative; border: 1px solid var(--line);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .del {
  position: absolute; right: 2px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; border: none;
  font-size: 12px; line-height: 1; cursor: pointer;
}
.photo-add {
  width: 72px; height: 72px; border-radius: 10px;
  border: 1px dashed #cfd4da; background: #fafbfc;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 12px;
}

/* --------------------------- 加载 --------------------------- */
.skeleton {
  background: linear-gradient(90deg, #eef0f2 25%, #f6f7f9 37%, #eef0f2 63%);
  background-size: 400% 100%;
  animation: shine 1.3s ease infinite;
  border-radius: 8px;
}
@keyframes shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.empty { text-align: center; padding: 34px 12px; color: var(--muted); font-size: 13.5px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }

.footer {
  margin-top: 22px; padding: 18px 16px 8px;
  text-align: center; font-size: 11.5px; color: #9aa1ab; line-height: 1.9;
  border-top: 1px solid var(--line);
}
.footer a { color: var(--muted); }

.hidden { display: none !important; }

@media (min-width: 620px) {
  body { background: #eceef1; }
  .shell { box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.04), 0 20px 60px rgba(16, 24, 40, 0.09); }
}

/* ================= A 档新样式 ================= */

/* 系列页：紧凑头部 + 编号网格 */
.hero.compact { padding: 22px 18px 18px; }
.hero.compact h1 { font-size: 21px; margin: 6px 0 4px; }
.hero.compact p { font-size: 13px; margin: 0; }

.code-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; padding: 12px;
}
.code-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fcfcfd; transition: .18s;
}
.code-item:active { background: var(--brand-soft); border-color: var(--brand); }
.code-item .code { font-size: 15px; color: var(--brand); letter-spacing: .5px; font-weight: 700; }
.code-item .nm { font-size: 13px; color: var(--ink); line-height: 1.45; }
.code-item .sub { font-size: 11.5px; color: var(--muted); }
.code-item .more { margin-top: 6px; font-size: 11.5px; color: var(--brand); }

.sug-list { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.sug-item {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.sug-item b { color: var(--brand); font-size: 13.5px; white-space: nowrap; }
.sug-item span { font-size: 13px; color: var(--ink-2); }
.noresult { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* 系列产品入口提示 */
.series-tip {
  display: flex; flex-direction: column; gap: 2px; margin: 10px 0 0;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft); border: 1px solid #f7d5d2;
}
.series-tip b { font-size: 13px; color: var(--brand-dark); }
.series-tip span { font-size: 12px; color: #a81a14; }

/* FAQ 自助排查 */
.faq-lead { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.faq-card { padding: 14px; }
.faq-group + .faq-group { margin-top: 12px; }
.faq-group-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .6px; color: var(--brand);
  background: var(--brand-soft); display: inline-block; padding: 3px 10px;
  border-radius: 999px; margin-bottom: 6px;
}
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; background: #fff; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 12px 14px; display: flex;
  align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q { flex: 1; line-height: 1.55; }
.faq-item summary .chev {
  width: 8px; height: 8px; margin-top: 7px; flex: 0 0 auto;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary .chev { transform: rotate(-135deg); }
.faq-item[open] summary { color: var(--brand); }
.faq-item .a { padding: 0 14px 12px; border-top: 1px dashed var(--line); }
.faq-item .a p { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.faq-fb {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.faq-fb .ok { color: var(--ok); font-size: 12.5px; }
.faq-fb .ok a { color: var(--brand); text-decoration: underline; }
.btn.tiny { padding: 4px 10px; font-size: 11.5px; border-radius: 7px; width: auto; }
.faq-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 12px 14px; background: #fafbfc;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ink-2);
}
.faq-footer .btn { width: auto; padding: 8px 16px; }

/* 视频 */
.video-list { display: flex; gap: 10px; overflow-x: auto; padding: 12px 12px 4px; -webkit-overflow-scrolling: touch; }
.video-card {
  flex: 0 0 158px; text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); padding: 0; overflow: hidden; cursor: pointer;
}
.video-card .thumb {
  position: relative; display: block; height: 92px; background: linear-gradient(135deg, #2c3238, #4a545e);
}
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .play {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: rgba(0,0,0,.42); backdrop-filter: blur(2px);
}
.video-card .play::after {
  content: ''; position: absolute; left: 13px; top: 10px;
  border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.video-card .dur {
  position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 5px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 10.5px;
}
.video-card .v-title { display: block; padding: 9px 10px 0; font-size: 13px; color: var(--ink); line-height: 1.45; }
.video-card .v-sum { display: block; padding: 2px 10px 10px; font-size: 11.5px; color: var(--muted); }
.video-stage { margin: 10px 12px 12px; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-stage video { width: 100%; max-height: 62vh; display: block; }
