/* 丹佛斯变频器助手 —— 移动优先样式 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eceef2;
  --text: #14171c;
  --text-2: #454b55;
  --muted: #7a828e;
  --line: #e3e6eb;
  --brand: #c8102e;
  --brand-2: #e2374f;
  --brand-soft: #fdecef;
  --brand-ink: #ffffff;
  --warn: #a35a06;
  --warn-soft: #fdf1dc;
  --ok: #067a5b;
  --ok-soft: #e3f5ee;
  --shadow: 0 1px 2px rgba(16, 20, 28, .04), 0 8px 24px -12px rgba(16, 20, 28, .18);
  --radius: 18px;
  --tab-h: 62px;
  --br-rgb: 200,16,46;
  --warn-rgb: 163,90,6;
  --bg-rgb: 242,243,245;
  --surface-rgb: 255,255,255;
}

html[data-theme="dark"] {
  --bg: #0b0d11;
  --surface: #141821;
  --surface-2: #191e28;
  --surface-3: #212734;
  --text: #e9ecf1;
  --text-2: #c2c8d2;
  --muted: #8d95a3;
  --line: #242b37;
  --brand: #ff4d61;
  --brand-2: #ff7081;
  --brand-soft: #2b1319;
  --brand-ink: #1a0a0d;
  --warn: #f2b357;
  --warn-soft: #2a2113;
  --ok: #4ad2a6;
  --ok-soft: #10251f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .8);
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

.app {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
}

.view { padding: 0 16px 8px; animation: fade .22s ease; }
/* 有悬浮客服按钮时，给页面底部多留一点空间，避免遮住最后一行文字 */
body.has-fab .app { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 76px); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  margin: 0 -16px 6px;
  background: var(--bg);
  background: rgba(var(--bg-rgb), 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.solid { border-bottom-color: var(--line); }
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: transform .12s, background .2s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 通用 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card.flush { padding: 6px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--muted);
  text-transform: uppercase;
}
.section-title a { font-size: 12px; font-weight: 600; letter-spacing: 0; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }

/* ---------- 首页 hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--br-rgb), 0.26) 0%, transparent 58%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.hero h2 { margin: 10px 0 4px; font-size: 23px; line-height: 1.25; letter-spacing: -.4px; }
.hero p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 6px 6px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.searchbox:focus-within {
  border-color: var(--brand);
  border-color: rgba(var(--br-rgb), .55);
  box-shadow: 0 0 0 4px rgba(var(--br-rgb), 0.12);
}
.searchbox svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 10px 0;
  -webkit-appearance: none;
  appearance: none;
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox .go {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 650;
  color: var(--brand-ink);
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  cursor: pointer;
}
.searchbox .go:active { transform: scale(.97); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px 2px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:active { transform: scale(.96); }
.chip b { color: var(--brand); font-weight: 700; }

/* ---------- 列表行 ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  color: inherit;
  transition: background .15s;
}
.row:active { background: var(--surface-2); }
.row + .row { border-top: 1px solid var(--line); border-radius: 0; }
.card.flush .row:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.card.flush .row:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

.code-badge {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-soft);
  border: 1px solid rgba(var(--br-rgb), 0.18);
}
.code-badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-soft); }
.code-badge.warn { border-color: rgba(var(--warn-rgb), 0.22); }
.code-badge.sm { width: 40px; height: 40px; border-radius: 11px; font-size: 13px; }

.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 620; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .d { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .chev { flex: 0 0 auto; color: var(--muted); opacity: .7; display: inline-flex; }
.row .chev svg { width: 17px; height: 17px; }

.chev { color: var(--muted); display: inline-flex; }
.doc-row .chev svg { width: 17px; height: 17px; }
details.acc summary .plus svg { width: 17px; height: 17px; display: block; }
.hero .eyebrow svg { width: 13px; height: 13px; }
.block-title svg, .feature .fi svg, .chapter-card .ci svg, .doc-row .ico svg { display: block; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  vertical-align: 1px;
}

/* ---------- 快捷功能卡 ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.feature .fi {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature .fi svg { width: 18px; height: 18px; }
.feature .ft { font-weight: 650; font-size: 14.5px; }
.feature .fd { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.feature:active { transform: scale(.985); }

/* ---------- 故障列表 ---------- */
.toolbar {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top));
  z-index: 15;
  padding: 6px 0 10px;
  background: linear-gradient(var(--bg) 78%, transparent);
}
.segmented {
  display: flex;
  gap: 4px;
  background: var(--surface-3);
  border-radius: 12px;
  padding: 4px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 0;
  border-radius: 9px;
  cursor: pointer;
}
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.filtered-empty { padding: 36px 10px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 详情 ---------- */
.detail-head { padding: 6px 2px 14px; }
.detail-top { display: flex; align-items: flex-start; gap: 14px; }
.detail-code {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 19px;
  letter-spacing: -1px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-soft);
  border: 1px solid rgba(var(--br-rgb), 0.20);
}
.detail-code.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-soft);
  border-color: rgba(var(--warn-rgb), 0.22);
}
.detail-head h2 { margin: 2px 0 2px; font-size: 21px; letter-spacing: -.3px; }
.detail-head .en { color: var(--muted); font-size: 12.5px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-right: 6px;
}
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }

.block-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 750; margin: 0 0 10px; }
.block-title svg { width: 16px; height: 16px; color: var(--brand); }

ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 12px 34px;
  font-size: 14px;
  color: var(--text-2);
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
}
ol.steps li:last-child { padding-bottom: 0; }

ul.bullets { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
ul.bullets li { margin-bottom: 7px; }
ul.bullets li::marker { color: var(--brand); }

.params { display: flex; flex-wrap: wrap; gap: 7px; }
.params span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; padding: 12px 0; }
.meta + .meta { border-top: 1px dashed var(--line); }
.meta .k { color: var(--muted); }
.meta .v { font-weight: 600; text-align: right; }

.pager-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pager-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pager-nav a .k { font-size: 11px; color: var(--muted); }
.pager-nav a .v { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-nav a.next { text-align: right; align-items: flex-end; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--surface-2); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td:first-child { white-space: nowrap; font-weight: 600; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }

.note {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--warn-soft);
  border: 1px solid rgba(var(--warn-rgb), 0.16);
}
.note b { color: var(--warn); }

/* ---------- 手册章节 ---------- */
.chapter-card { display: flex; gap: 13px; align-items: center; padding: 14px; }
.chapter-card .ci {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.chapter-card .ci svg { width: 20px; height: 20px; }
.chapter-card .t { font-weight: 640; font-size: 15px; }
.chapter-card .d { font-size: 12px; color: var(--muted); }

.article h3 { font-size: 16px; margin: 22px 0 8px; letter-spacing: -.2px; }
.article h3:first-child { margin-top: 2px; }
.article p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.article .kv { display: grid; grid-template-columns: 132px 1fr; gap: 0; font-size: 13.5px; }
.article .kv > div { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.article .kv > div:nth-child(odd) { color: var(--muted); font-weight: 600; padding-right: 10px; }
.article ul.bullets, .article ol.steps { margin-bottom: 12px; }

/* ---------- 手风琴 ---------- */
details.acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}
details.acc + details.acc { margin-top: 10px; }
details.acc summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
  font-size: 14.5px;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .plus { margin-left: auto; color: var(--muted); transition: transform .2s; }
details.acc[open] summary .plus { transform: rotate(45deg); }
details.acc summary .n {
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700;
}
.acc-body { padding: 12px 16px 16px; font-size: 13.5px; color: var(--text-2); border-top: 1px solid var(--line); }
.acc-body .codes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.acc-body .codes a {
  font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand);
}
.acc-body ol { margin: 0; padding-left: 18px; }
.acc-body ol li { margin-bottom: 6px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; display: inline-block; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 820px;
  margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  background: rgba(var(--surface-rgb), 0.88);
  backdrop-filter: saturate(1.5) blur(18px);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: 12px;
}
.tab-ico { display: block; }
.tab-ico svg { width: 22px; height: 22px; }
.tab.on { color: var(--brand); }
.tab.on .tab-ico svg { stroke-width: 2.3; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px);
  transform: translate(-50%, 12px);
  z-index: 60;
  padding: 9px 16px;
  border-radius: 999px;
  background: #1c2128;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: .96; transform: translate(-50%, 0); }

/* ---------- 我的 ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(var(--br-rgb), 0.20), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.profile .avatar {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--brand-2), var(--brand));
  color: #fff; font-weight: 800; font-size: 18px;
}
.profile .t { font-weight: 700; font-size: 16px; }
.profile .d { font-size: 12px; color: var(--muted); }

.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.doc-row + .doc-row { border-top: 1px solid var(--line); }
.doc-row .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.doc-row .ico svg { width: 18px; height: 18px; }
.doc-row .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row .d { font-size: 11.5px; color: var(--muted); }
.doc-row .x { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; }
.doc-row .x:active { background: var(--surface-2); }
.doc-row .x svg { width: 17px; height: 17px; }

.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 12px; color: var(--text); }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row .t { font-size: 14px; }
.settings-row .d { font-size: 11.5px; color: var(--muted); }

.switch { position: relative; width: 46px; height: 27px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3);
  transition: background .18s; pointer-events: none;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .18s;
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(19px); }

.foot { text-align: center; font-size: 11.5px; color: var(--muted); padding: 22px 10px 6px; line-height: 1.7; }

/* ---------- 桌面 ---------- */
@media (min-width: 720px) {
  :root { --tab-h: 66px; }
  .view { padding: 0 24px 8px; }
  .hero { padding: 26px 24px 22px; }
  .hero h2 { font-size: 28px; }
  .feature-grid { gap: 14px; }
  .detail-code { width: 84px; height: 84px; font-size: 22px; }
  .row { padding: 14px; }
}

/* ---------------- 技术咨询 ---------------- */
.sup-strip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.sup-strip > svg { width: 22px; height: 22px; color: var(--brand); flex: 0 0 auto; }
.sup-strip .main { flex: 1; min-width: 0; }
.sup-strip .t { font-weight: 650; font-size: 14.5px; }
.sup-strip .d { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.sup-strip .chev { color: var(--muted); display: inline-flex; }
.sup-actions { display: grid; gap: 10px; }
.sup-btn { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 14.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.45; }
.sup-btn > svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--brand); }
.sup-btn .st { display: block; }
.sup-btn .sd { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.sup-btn.primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.sup-btn.primary > svg { color: var(--brand-ink); }
.sup-btn.primary .sd { color: var(--brand-ink); opacity: .88; }
.sup-btn:active { transform: scale(.99); }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 2px 0 14px; }
.qr-img { width: 184px; height: 184px; border-radius: 12px; background: #fff; object-fit: contain; padding: 6px; border: 1px solid var(--line); }
.ask-tpl { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; word-break: break-word; font-family: inherit; }
code { font-size: 11.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

/* ---- 多系列 ---- */
.s-bar { display:flex; gap:8px; overflow-x:auto; padding:2px 16px 10px; scrollbar-width:none; }
.s-bar::-webkit-scrollbar { display:none; }
.s-chip { flex:0 0 auto; border:1px solid var(--line); background:var(--surface); color:var(--text-2); font-size:13px; font-weight:600; padding:8px 14px; border-radius:999px; cursor:pointer; }
.s-chip.on { background:var(--brand); border-color:var(--brand); color:#fff; }
.doc-row.cur { background:var(--brand-soft); }

/* ---- 型号下拉框 ---- */
.picker { padding: 4px 16px 12px; }
.picker-l { display:flex; align-items:center; gap:6px; font-size:12px; white-space:nowrap; font-weight:600; color:var(--text-2); margin-bottom:6px; }
.picker-l svg { width:14px; height:14px; }
.sel-wrap { position:relative; }
.sel-wrap select { width:100%; appearance:none; -webkit-appearance:none; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:12px; padding:12px 40px 12px 14px; font-size:15px; font-weight:600; font-family:inherit; }
.sel-chev { position:absolute; right:12px; top:50%; margin-top:-9px; transform:rotate(90deg); color:var(--text-2); pointer-events:none; display:flex; }
.sel-chev svg { width:18px; height:18px; }

/* ---- 应用内 PDF 阅读器 ---- */
.pdfv { position:fixed; inset:0; z-index:70; background:var(--bg); display:flex; flex-direction:column; }
.pdfv-bar { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--line); background:var(--surface); }
.pdfv-t { flex:1; min-width:0; font-size:14px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pdfv-pg { font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.pdfv-body { flex:1; overflow:auto; -webkit-overflow-scrolling:touch; padding:12px; text-align:center; }
.pdfv-tip { font-size:13px; color:var(--text-2); padding:18px 8px; }
.pdfv-body canvas { max-width:100%; box-shadow:0 6px 24px rgba(0,0,0,.18); border-radius:6px; background:#fff; }
.pdfv-nav { display:flex; gap:10px; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--surface); }
.pdfv-btn { flex:1; border:1px solid var(--line); background:var(--surface-2); color:var(--text); font-size:15px; font-weight:600; padding:12px; border-radius:12px; font-family:inherit; }
.pdfv-btn.primary { background:var(--brand); border-color:var(--brand); color:#fff; }

/* PDF 阅读器：页码滑块 */
.pdfv-nav { gap: 10px; }
.pdfv-range {
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  accent-color: var(--brand);
  background: transparent;
  cursor: pointer;
}
.pdfv-range:disabled { opacity: .45; cursor: default; }
.pdfv-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-3);
}
.pdfv-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.pdfv-range::-moz-range-track {
  height: 6px; border-radius: 99px; background: var(--surface-3);
}
.pdfv-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff;
}
/* 长标题（如首页全称）允许两行，避免被省略号截断 */
.topbar h1.long {
  font-size: 15.5px;
  line-height: 1.28;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: clip;
}

/* 操作视频 */
.vid-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-top: 12px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.vid-strip .vs-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--br-rgb), 0.12);
  color: var(--brand);
}
.vid-strip .vs-ico svg { width: 20px; height: 20px; }
.vid-strip .main { flex: 1; min-width: 0; }
.vid-strip .t { font-weight: 700; font-size: 14.5px; }
.vid-strip .d { font-size: 12px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vid-list { overflow: hidden; }
.vid-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.vid-row:last-child { border-bottom: 0; }
.vid-row:active { background: var(--surface-2); }
.vid-thumb {
  position: relative; width: 64px; height: 48px; flex: 0 0 64px;
  border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #a30d24 0%, var(--brand) 100%);
  display: flex; align-items: center; justify-content: center;
}
.vid-thumb .vid-play {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.vid-thumb .vid-play svg { width: 12px; height: 12px; margin-left: 1px; }
.vid-no {
  position: absolute; top: 3px; left: 5px;
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,.85);
  font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.vid-row .main { flex: 1; min-width: 0; }
.vid-row .t { font-weight: 650; font-size: 14.5px; }
.vid-row .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dy-card { margin-top: 14px; padding: 16px; }
.dy-head { display: flex; align-items: center; gap: 12px; }
.dy-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--br-rgb), 0.14); color: var(--brand);
}
.dy-ico svg { width: 20px; height: 20px; }
.dy-head .t { font-weight: 700; font-size: 14.5px; }
.dy-head .d {
  font-size: 13px; color: var(--brand); font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 1px;
}


/* 首页品牌标语 */
.slogan {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  border-radius: 4px 12px 12px 4px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.62;
  letter-spacing: .2px;
}

/* ---------- 悬浮客服入口（每页常驻） ---------- */
.fab-chat {
  position: fixed;
  right: max(14px, calc(50% - 410px + 14px));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px);
  z-index: 46;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--br-rgb), 0.34), 0 2px 6px rgba(0, 0, 0, .16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fab-chat svg { width: 22px; height: 22px; stroke-width: 1.9; }
.fab-chat-t { font-size: 9px; letter-spacing: .5px; line-height: 1; opacity: .96; }
.fab-chat:active { transform: scale(.94); }
/* 可拖动：拖走之后改用 left/top 定位，松手贴边 */
.fab-chat { touch-action: none; user-select: none; -webkit-user-select: none; }
.fab-chat.moved { right: auto; bottom: auto; }
.fab-chat.dragging { transform: scale(1.06); box-shadow: 0 16px 32px rgba(0, 0, 0, .28); }
.fab-chat.snapping { transition: left .2s ease, top .2s ease, transform .12s ease; }
.fab-chat.dragging .fab-chat-t { opacity: .6; }
@media (prefers-reduced-motion: no-preference) { .fab-chat { transition: transform .12s ease; } }

/* ---- 在线升级（新安装包下载 + 安装） ---- */
.upd{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.35);padding:0 0 env(safe-area-inset-bottom)}
.upd-card{width:100%;max-width:520px;background:var(--surface);border-radius:18px 18px 0 0;padding:18px 18px 20px;box-shadow:0 -10px 30px rgba(0,0,0,.22)}
.upd-head{display:flex;gap:12px;align-items:center;margin-bottom:10px}
.upd-ico{width:40px;height:40px;flex:none;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand)}
.upd-ico svg{width:20px;height:20px}
.upd-head .t{font-size:16px;font-weight:700;line-height:1.3}
.upd-head .d{font-size:12px;color:var(--text-2);margin-top:2px}
.upd-notes{max-height:120px;overflow:auto;color:var(--text-2);margin:0 0 10px;white-space:pre-wrap;line-height:1.6}
.upd-bar{height:6px;border-radius:6px;background:var(--surface-3);overflow:hidden;margin:8px 0}
.upd-bar i{display:block;height:100%;width:0;background:var(--brand);transition:width .2s ease}
.upd-pct{font-size:12px;color:var(--text-2);margin-bottom:12px}

/* ---- 分享给同行（扫码安装） ---- */
.share-card { text-align: center; }
.share-qr {
  display: block; width: 220px; height: 220px; margin: 4px auto 12px;
  background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  image-rendering: pixelated;
}
.share-t { font-size: 16px; font-weight: 700; }
.share-d { font-size: 13px; line-height: 1.7; color: var(--text-2); margin-top: 6px; }
.share-url {
  font-size: 12.5px; line-height: 1.6; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.share-steps { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; color: var(--text-2); }
.share-steps b { color: var(--text); }
.share-entry { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.share-entry-qr {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 10px;
  background: #fff; padding: 3px; border: 1px solid var(--line);
}
.se-main { flex: 1; min-width: 0; }
.se-main .t { font-size: 15px; font-weight: 600; }
.se-main .d { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* ---- 顶栏右侧：分享安装二维码 ---- */
.tb-qr {
  color: var(--brand);
  border-color: rgba(var(--br-rgb), .28);
  background: rgba(var(--br-rgb), .06);
}
.tb-qr:hover { background: rgba(var(--br-rgb), .12); }
.tb-qr:active { transform: scale(.94); }
.tb-qr svg { width: 19px; height: 19px; }

/* ---------- 微信小程序 web-view 环境 ---------- */
/* 小程序不允许引导下载安装包、也不允许外跳抖音，这些入口在 is-mp 下隐藏 */
body.is-mp .tabbar { grid-template-columns: repeat(4, 1fr); }
body.is-mp .tabbar [data-tab="videos"] { display: none; }
body.is-mp .tb-qr { display: none; }

