/* 资料检索站 — 极简样式，移动端优先 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1a73e8;
  --text: #202124;
  --text-2: #4d5156;
  --text-3: #70757a;
  --border: #dfe1e5;
  --bg: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 首页 ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  margin-top: -60px; /* 视口垂直居中补偿 */
}
.logo {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 28px;
  color: var(--text);
}
.search-form {
  display: flex;
  width: 100%;
  max-width: 584px;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.search-form:focus-within {
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
  border-color: transparent;
}
.search-input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 20px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.search-btn {
  border: 0;
  background: transparent;
  padding: 0 18px;
  font-size: 15px;
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
}
.search-btn:hover { text-decoration: underline; }
.hint { margin-top: 22px; font-size: 13px; color: var(--text-3); }
.hint a { color: var(--blue); text-decoration: none; }
.hint a:hover { text-decoration: underline; }

/* ---------- 顶部栏（结果页/阅读页） ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.topbar-logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-form {
  display: flex;
  flex: 0 1 584px;
  width: 100%;
  max-width: 584px;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
}
.topbar-form .search-input { padding: 9px 16px; font-size: 15px; }
.back-link { color: var(--blue); text-decoration: none; font-size: 14px; white-space: nowrap; }

/* ---------- 搜索结果 ---------- */
.results {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
}
.loading, .empty, .count { color: var(--text-3); font-size: 14px; padding: 12px 0; }
.result { padding: 16px 0; border-bottom: 1px solid #eee; }
.result:last-child { border-bottom: 0; }
.result-title { font-size: 17px; line-height: 1.4; margin-bottom: 3px; }
.result-title a { color: var(--blue); text-decoration: none; }
.result-title a:hover { text-decoration: underline; }
.result-section { font-size: 13px; color: var(--text-3); margin-bottom: 5px; }
.result-snippet { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.result-snippet mark {
  background: transparent;
  color: #d93025;
  font-weight: 600;
}

/* ---------- 阅读页 ---------- */
.doc-view { max-width: 900px; margin: 0 auto; padding: 12px; }
.doc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 12px;
}
.doc-nav-btn {
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
}
.doc-nav-btn:hover { background: #f1f3f4; }
.doc-pageinfo { font-size: 13px; color: var(--text-3); text-align: center; flex: 1; min-width: 0; }
.doc-img-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}
.doc-img { width: 100%; height: auto; display: block; }
.doc-text { margin-top: 14px; }
.doc-text summary { color: var(--blue); font-size: 14px; cursor: pointer; padding: 6px 0; }
.doc-text pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  font-family: inherit;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
}

/* ---------- 知识卡片（型号解读 / 报警代码） ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(32, 33, 36, .08);
}
.card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.badge {
  font-size: 12px;
  font-weight: 600;
  color: #1967d2;
  background: #e8f0fe;
  border-radius: 999px;
  padding: 3px 10px;
}
.badge-alarm { color: #b31412; background: #fce8e6; }
.card-title { font-size: 19px; font-weight: 700; color: var(--text); word-break: break-all; }
.card-title-sub { font-size: 15px; color: var(--text-2); }
.tag { font-size: 12px; color: var(--text-3); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.tag-ok { color: #137333; border-color: #ceead6; background: #e6f4ea; }
.card-sub { font-size: 13px; color: var(--text-3); margin: 4px 0 10px; }
/* 接线图卡针脚要点：summary「标签|内容」，内容=针脚号（说明）/ 针脚号（说明） */
.wiring-sum { margin: 6px 0 10px; font-size: 13px; color: var(--text-2); }
.ws-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
  line-height: 1.8;
}
.ws-tag {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: #1967d2;
  background: #e8f0fe;
  border-radius: 4px;
  padding: 1px 7px;
}
.ws-body { flex: 1; min-width: 0; }
/* 可选针脚行：下拉选针 / CN1-47，说明随选中变化；
   下拉弱化为虚线下划线内联文本，整行与其它标签行平级不抢眼 */
.ws-sel-row { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ws-sel-pick { flex: none; font-weight: 400; color: var(--text-2); }
.ws-pin-select {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed #bdc1c6;
  border-radius: 0;
  padding: 0 1px;
  cursor: pointer;
}
.ws-pin-select:hover { color: #1a73e8; border-bottom-color: #1a73e8; }
.ws-slash { margin: 0 6px; color: var(--text-3); font-weight: 400; }
/* CN1-47 固定说明（贴在 CN1-47针脚 后同行） */
.ws-47-desc { font-weight: 400; color: var(--text-2); }
.ws-pin-desc { color: var(--text-2); }
/* 起动条件分区块：灰底圆角与上方针脚行隔离，子行小号灰标签缩进 */
.ws-boot {
  margin-top: 8px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 8px 12px 9px;
}
.ws-boot-head { padding-bottom: 1px; }
.ws-boot-head .ws-body { font-weight: 600; color: var(--text); }
.ws-boot-grid { display: flex; flex-direction: column; gap: 3px; }
.ws-boot-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  line-height: 1.75;
  font-size: 13px;
  color: var(--text-2);
}
.ws-boot-tag {
  flex: none;
  min-width: 4.5em;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  background: #e8eaed;
  border-radius: 4px;
  padding: 1px 7px;
}
.ws-boot-body { flex: 1; min-width: 0; }
/* 编码器电缆针脚对照表（仿手册接线规格样式：灰底表头、两侧分区） */
.ws-tbl-wrap { margin: 5px 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ws-tbl { border-collapse: collapse; font-size: 13px; }
.ws-tbl th {
  background: #e8eaed;
  color: #5f6368;
  font-weight: 600;
  font-size: 12px;
  padding: 3px 12px;
  border: 1px solid #dadce0;
  text-align: center;
  white-space: nowrap;
}
.ws-tbl td {
  padding: 3px 12px;
  border: 1px solid #e8eaed;
  text-align: center;
  color: var(--text-2);
  white-space: nowrap;
}
.ws-tbl-sig { font-weight: 600; color: var(--text); }
/* T: 通用表格（型号/规格等长文本）左对齐；编码器针脚表保持居中 */
.ws-tbl-left th, .ws-tbl-left td { text-align: left; }
/* 摘要里的「手册 x.x」定位链接 */
.wiring-sum a { color: var(--blue); text-decoration: none; }
.wiring-sum a:hover { text-decoration: underline; }
.card-links { margin-top: 12px; font-size: 13px; color: var(--text-3); line-height: 2; }
.card-links a { color: var(--blue); text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
/* 功能选择型参数：开关位设定值含义对照表（按面板数字位并排） */
.opt-title { margin: 14px 0 8px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.opt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 固定一行两列 */
  gap: 14px 16px;
}
.opt-cell { min-width: 0; }
.opt-mask { display: flex; gap: 3px; margin: 5px 0 6px; }
.opt-mask b, .opt-mask i {
  width: 20px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 700; font-size: 13px;
  border-radius: 4px;
}
.opt-mask b { background: #202124; color: #fff; }              /* 当前位 X */
.opt-mask i { background: #f1f3f4; color: #bdc1c6; font-weight: 400; }
.opt-name { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; line-height: 1.45; }
.opt-ref { font-weight: 400; color: var(--text-3); }
.opt-empty { font-size: 13px; color: var(--text-3); padding: 4px 0 2px; }
.opt-cell .spec-table { font-size: 13px; }
.opt-cell .spec-table td { padding: 5px 8px 5px 0; }

/* 操作步骤（图文，手册 13.2.2）：文字左、面板显示右 */
.opt-steps {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8f9fa;
  padding: 11px 13px;
}
.opt-steps-title { font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.opt-steps-title a { font-weight: 500; color: var(--blue); text-decoration: none; }
.opt-steps-title a:hover { text-decoration: underline; }
.opt-steps-list { list-style: none; margin: 0; padding: 0; }
.opt-steps-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px dashed #e2e4e7;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.opt-steps-list li:last-child { border-bottom: 0; }
.opt-steps-list li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0; top: 8px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #1a73e8; color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.opt-steps-list { counter-reset: step; }
.opt-steps-list b { color: var(--text); font-weight: 700; }
.opt-steps-list .seg-panel { margin: 0; transform: scale(.78); transform-origin: right center; }
/* 演示屏轮播容器（Pn/Fn/Un 轮流显示，内容由 JS 换帧） */
.seg-slot { display: inline-flex; }

/* Fn 辅助功能操作步骤（手册 13.4）：面板裁图 + 操作文字 */
.fn-steps {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8f9fa;
  padding: 11px 13px;
}
.fn-steps-title { font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.fn-steps-title a { font-weight: 500; color: var(--blue); text-decoration: none; }
.fn-steps-title a:hover { text-decoration: underline; }
.fn-steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.fn-steps-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px dashed #e2e4e7;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.fn-steps-list li span { flex: 1; }
/* 步骤文字里的 Fn/Pn 互引代码链接 */
.fn-steps-list li a { color: var(--blue); font-weight: 600; text-decoration: none; }
.fn-steps-list li a:hover { text-decoration: underline; }
.fn-steps-list li:last-child { border-bottom: 0; }
.fn-steps-list li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0; top: 8px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #1a73e8; color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* 手册矢量七段码裁图（600dpi），白底描边与卡面区分 */
.fn-step-img {
  height: 42px;
  max-width: 45%;
  object-fit: contain;
  object-position: left center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  flex: none;
}

/* Un 接线图（回路构成 + 信号分配表，手册 13.3 整块裁图） */
.un-wiring { margin: 14px 0 4px; }
.un-wiring-item { margin-bottom: 12px; }
.un-wiring-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  line-height: 1.45;
}
.un-wiring-title a { font-weight: 500; color: var(--blue); text-decoration: none; }
.un-wiring-title a:hover { text-decoration: underline; }
/* 型号解读卡原文页链接 → 结果页最底部区块（2026-10-26） */
.page-src {
  margin: 16px 0 4px;
  padding: 10px 14px;
  background: #f5f7fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.9;
}
.page-src a { color: var(--blue); text-decoration: none; }
.page-src a:hover { text-decoration: underline; }

/* 接线图卡图注条（图上方说明，2026-10-26） */
.ws-img-cap {
  font-size: 13px;
  color: var(--text-2);
  background: #f5f7fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  margin: 10px 0 4px;
}
.un-wiring-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

/* 面板操作器七段数码管示例（报警/参数卡） */
.seg-panel {
  display: inline-flex;
  border: 1.5px solid #5f6368;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  margin: 1px 0 8px;
}
.seg-row .seg-panel { margin: 0; }
.seg-digit {
  position: relative;
  width: 26px;
  height: 40px;
  border-right: 1px solid #e8eaed;
}
.seg-digit:last-child { border-right: 0; }
/* 操作步骤里被选中的闪烁位（手册「闪烁显示的数位」） */
@keyframes segblink { 50% { opacity: .12; } }
.seg-digit.blink { animation: segblink 1s step-end infinite; }
.seg { position: absolute; background: #e8eaed; border-radius: 1px; }
.seg.on { background: #202124; }
.seg-a { top: 3px;  left: 6px;  width: 14px; height: 3px; }
.seg-g { top: 18px; left: 6px;  width: 14px; height: 3px; }
.seg-d { bottom: 3px; left: 6px; width: 14px; height: 3px; }
.seg-f { top: 5px;    left: 4px;  width: 3px; height: 13px; }
.seg-b { top: 5px;    right: 4px; width: 3px; height: 13px; }
.seg-e { bottom: 5px; left: 4px;  width: 3px; height: 13px; }
.seg-c { bottom: 5px; right: 4px; width: 3px; height: 13px; }
.seg-dot {
  position: absolute; right: 2px; bottom: 2px;
  width: 3px; height: 3px; border-radius: 50%; background: #e8eaed;
}
.seg-dot.on { background: #202124; }
.nomatch { color: #b31412; }

/* 面板操作器（手册 13.1.1）：数码管窗 + 四圆钮同一外框，卡头统一组件 */
.op-panel {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #5f6368;
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px 5px;
  margin: 1px 0 8px;
}
.seg-row .op-panel { margin: 0; }
.op-display { line-height: 0; }
.op-panel .seg-panel { margin: 0; }
.key-row {
  display: flex;
  gap: 10px;
}
.key-item { text-align: center; min-width: 0; }
/* 圆钮：实物是带心的圆形轻触键 */
.key-dot {
  width: 15px;
  height: 15px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1.5px solid #5f6368;
  background: radial-gradient(circle at 35% 30%, #fff, #e8eaed 72%);
  position: relative;
}
.key-dot::after {
  content: '';
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: #bdc1c6;
}
/* 钮下丝印名称（实物面板印在按键下方） */
.key-name {
  font-size: 9px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
}

.model-list { margin: 6px 0 12px; }
.model-list-title { font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.model-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: #eef3fe;
  border: 1px solid #d6e2fb;
  border-radius: 8px;
  padding: 5px 12px;
  text-decoration: none;
  font-family: ui-monospace, Consolas, monospace;
}
.model-chip:hover { background: #dfe9fd; text-decoration: none; }

.table-wrap { overflow-x: auto; margin: 8px 0 4px; -webkit-overflow-scrolling: touch; }
.decode, .spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.decode th, .spec-table .k {
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
}
.decode th { border-bottom: 1px solid var(--border); padding: 6px 10px 6px 0; }
.decode td { border-bottom: 1px solid #f1f3f4; padding: 7px 10px 7px 0; vertical-align: top; }
.decode .k { width: 90px; }
.decode .v { font-weight: 700; color: var(--blue); font-family: ui-monospace, Consolas, monospace; }
.decode tr.bad .v { color: #b31412; }
.decode tr.alts td { border-bottom: 1px solid #f1f3f4; padding-top: 0; }
.decode details summary { font-size: 12px; color: var(--text-3); cursor: pointer; list-style: none; }
.decode details summary::-webkit-details-marker { display: none; }
.decode details summary::before { content: "▸ "; }
.decode details[open] summary::before { content: "▾ "; }
.alt-list { font-size: 12.5px; color: var(--text-2); line-height: 1.9; padding: 4px 0 6px; word-break: break-all; }

/* 精确功率不存在：相近功率档提示（功率选型卡降级形态） */
.pw-near { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 8px; }
.pw-near-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  background: #eef3fe;
  border: 1px solid #d6e2fb;
  border-radius: 8px;
  padding: 5px 12px;
  text-decoration: none;
}
.pw-near-link:hover { background: #dfe9fd; text-decoration: none; }
.pw-near-cnt { font-size: 12px; font-weight: 400; color: var(--text-3); }

.spec { margin-top: 14px; }
.spec-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.spec-head a { color: var(--blue); text-decoration: none; font-weight: 500; }
.spec-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  padding: 6px 10px 6px 0;
}
.spec-table td { border-bottom: 1px solid #f1f3f4; padding: 7px 10px 7px 0; vertical-align: top; }
.spec-table a { color: var(--blue); text-decoration: none; font-weight: 600; }
.spec-table a:hover { text-decoration: underline; }
.spec-table .v { font-weight: 600; color: var(--text); word-break: break-all; }
.spec-table .unit { color: var(--text-3); font-weight: 400; font-size: 12.5px; }

/* 型号列表页：电机×驱动器组合表（每功率一行，左电机右驱动器） */
.pair-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pair-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  padding: 6px 10px 6px 0;
}
.pair-table td { border-bottom: 1px solid #f1f3f4; padding: 7px 10px 7px 0; vertical-align: top; }
.pair-table tr:last-child td { border-bottom: 0; }
.pair-table a { color: var(--blue); text-decoration: none; font-weight: 600; }
.pair-table a:hover { text-decoration: underline; }
.pair-table .watt { white-space: nowrap; color: var(--text-2); }
.pair-table .watt a { font-weight: 400; font-size: 12.5px; }
.pair-table .drv-w {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 2px;
}
.pair-table .drv-w a { font-weight: 500; }

.alarm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
/* 类别标签 + 数码管横排（标签在左、显示屏在右，标签沉底对齐） */
.seg-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px; }
.seg-row .alarm-meta { margin: 0; }
.chip {
  font-size: 12.5px;
  color: var(--text-2);
  background: #f1f3f4;
  border-radius: 999px;
  padding: 3px 10px;
}
/* 系列徽标（2026-10-27 Σ-X 入库）：共有=蓝底、专属=绿底 */
.series-badge {
  display: inline-block;
  font-size: 12px;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 8px;
  vertical-align: baseline;
}
.series-badge.series-both { color: #1a56a8; background: #e3eefc; }
.series-badge.series-solo { color: #1c6b3c; background: #e2f5e9; }
.alarm-desc { font-size: 14.5px; line-height: 1.7; color: var(--text-2); margin: 6px 0 10px; }
.causes-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin: 8px 0 6px; }
.causes ol { margin: 0; padding-left: 20px; }
.causes li { margin-bottom: 10px; }
.cause { font-size: 14px; line-height: 1.7; color: var(--text); }
.fix { font-size: 13.5px; line-height: 1.7; color: #137333; background: #e6f4ea; border-radius: 8px; padding: 7px 10px; margin-top: 5px; }
.count { font-size: 13px; color: var(--text-3); margin: 4px 0 10px; }
.empty.subtle { color: var(--text-3); font-size: 13.5px; margin-top: 10px; }

/* ---------- 搜索建议框 ---------- */
.sg-panel {
  position: fixed;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(32, 33, 36, .14);
  overflow: hidden;
  padding: 6px 0 2px;
  font-size: 15px;
}
.sg-panel ul { list-style: none; margin: 0; padding: 0; }
.sg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  line-height: 1.4;
}
.sg-item:hover, .sg-item.on { background: #f1f3f4; }
.sg-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.sg-sub { color: var(--text-3); font-size: 13px; margin-left: 2px; }
.sg-ic {
  flex: none;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa0a6' d='M7 1a6 6 0 1 0 3.6 10.8l3.3 3.3 1.2-1.2-3.3-3.3A6 6 0 0 0 7 1zm0 1.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sg-ic-h {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa0a6' d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 1.3a5.7 5.7 0 1 1 0 11.4A5.7 5.7 0 0 1 8 2.3zM8.7 4H7.3v4.6l3.4 2 .7-1.2-2.7-1.6V4z'/%3E%3C/svg%3E");
}
.sg-foot {
  border-top: 1px solid #f1f3f4;
  margin-top: 4px;
  padding: 8px 16px;
  text-align: right;
}
.sg-clear { color: var(--blue); font-size: 13px; cursor: pointer; }
.sg-clear:hover { text-decoration: underline; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .logo { font-size: 34px; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar-form { order: 3; flex-basis: 100%; max-width: none; }
  .results { padding: 12px; }
  .result-title { font-size: 16px; }
  .card { padding: 13px; border-radius: 10px; }
  .card-title { font-size: 17px; }
  .opt-grid { grid-template-columns: 1fr; gap: 12px; } /* 窄屏单列竖排 */
}

/* ---------- 二维码取景裁剪框（panel.html 即时预览，2026-10-28） ---------- */
.qr-crop { margin: 12px 0; }
.qr-crop-box {
  width: 260px; height: 260px;
  border: 1px dashed #dadce0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  cursor: grab;
}
.qr-crop-box:active { cursor: grabbing; }
.qr-crop-box canvas { display: block; touch-action: none; }
.qr-crop-ctrls { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.qr-zoom { width: 140px; accent-color: #1a73e8; }

/* ---------- 联系人悬浮窗（2026-10-28） ---------- */
.contact-float {
  position: fixed;
  /* 贴搜索结果容器（.results 680 居中，右缘=中线+340）右侧 32px 空挡，
     宽屏下与内容联动、空隙恒定 */
  left: calc(50% + 372px);
  top: 50%;
  transform: translateY(-50%);
  width: 172px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(32, 33, 36, .14);
  padding: 16px 14px 14px;
  z-index: 90;
  font-size: 13px;
}
.cf-head {
  font-weight: 700;
  font-size: 14px;
  color: var(--blue);
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f4;
}
.cf-item { margin: 8px 0; line-height: 1.5; word-break: break-all; }
.cf-k { display: block; font-size: 12px; color: var(--text-3); }
.cf-v { color: var(--text); }
/* 电话 tel: 链接——手机端点击直接拉起拨号界面 */
.cf-v a { color: var(--blue); text-decoration: underline; }
.cf-qr { margin-top: 10px; text-align: center; }
.cf-qr img {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
}

/* ---------- 管理后台 ---------- */
.admin-login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 2px 14px rgba(32, 33, 36, .08);
}
.admin-card-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.admin-card label {
  display: block;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-2);
}
.admin-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.admin-card input:focus { border-color: var(--blue); }
.admin-card button[type="submit"] {
  width: 100%;
  margin-top: 20px;
  padding: 10px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.admin-card button[type="submit"]:hover { background: #1765cc; }
.admin-sub { margin-top: 14px; text-align: center; font-size: 13px; }
.admin-sub a { color: var(--blue); text-decoration: none; }
.admin-sub a:hover { text-decoration: underline; }

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.admin-me { font-size: 13px; color: var(--text-3); }
.admin-logout { margin-left: auto; }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 22px 16px 70px; }
.admin-sec {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.admin-sec h2 { font-size: 16px; margin-bottom: 14px; }
.admin-ok, .admin-err {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}
.admin-ok { background: #e6f4ea; color: #1c6b3c; border: 1px solid #ceebd8; }
.admin-err { background: #fce8e6; color: #b31412; border: 1px solid #f6cbc6; }
.admin-warn {
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: 10px;
  background: #fef7e0; color: #8a6d1a; border: 1px solid #fde293;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.admin-grid label { font-size: 13px; color: var(--text-2); }
.admin-grid input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.admin-grid input:focus { border-color: var(--blue); }
.admin-qr-row { display: block; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.admin-qr-row input { display: block; margin-top: 6px; font-size: 13px; }
.admin-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.admin-qr-preview { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.admin-qr-preview img {
  display: block;
  width: 96px;
  height: 96px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
}
.admin-save { margin-top: 16px; }
.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  word-break: break-all;
}
.admin-create { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-create input {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  min-width: 150px;
}
.admin-create input:focus { border-color: var(--blue); }
table.admin-users { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-users th, .admin-users td {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}
.admin-users th { color: var(--text-3); font-weight: 500; }
.admin-td-link { word-break: break-all; }
.admin-link-min { color: var(--text-2); margin-right: 6px; }
.admin-inline { display: flex; gap: 6px; align-items: center; }
.admin-inline input {
  width: 118px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}
.btn-sm {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1765cc; }
.btn-red { background: #d93025; color: #fff; }
.btn-red:hover { background: #b82c22; }
.btn-gray { background: #f1f3f4; color: var(--text-2); }
.btn-gray:hover { background: #e8eaed; }

/* 窄屏：悬浮窗挡结果内容，隐藏 */
@media (max-width: 1100px) {
  /* 窄屏下 calc 定位会让窗右缘出屏，回退贴右缘 */
  .contact-float { left: auto; right: 16px; }
}
@media (max-width: 760px) {
  .contact-float { display: none; }
}
