:root{
  --brand:#0f9d6b;
  --brand-dark:#0a7a52;
  --bg:#f4f6f5;
  --card:#ffffff;
  --text:#1f2a26;
  --muted:#7a8a83;
  --line:#e6ebe8;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);color:var(--text);line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:560px;margin:0 auto;padding:0 0 40px;}

/* 顶部品牌区 */
.hero{
  background:linear-gradient(135deg,var(--brand),var(--brand-dark));
  color:#fff;padding:26px 20px 22px;text-align:center;
}
.hero .brand{font-size:18px;font-weight:700;letter-spacing:1px;}
.hero .brand-logo{
  max-width:220px;height:auto;margin-bottom:6px;
}
.hero .subtitle{font-size:13px;opacity:.92;margin-top:8px;letter-spacing:1px;}

/* 产品信息卡 */
.product-card{
  background:#fff;margin:14px;border-radius:16px;padding:18px 16px;
  border:1px solid var(--line);box-shadow:0 2px 10px rgba(0,0,0,.05);
}
.pc-name{font-size:20px;font-weight:700;color:#16201c;}
.pc-meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:8px;font-size:13px;color:var(--muted);}
.pc-badge{
  display:inline-block;margin-top:12px;font-size:12px;font-weight:600;color:var(--brand-dark);
  background:#eaf5f0;border:1px solid #cfe8dd;border-radius:999px;padding:5px 14px;
}

.intro{
  background:#fff;margin:14px;border-radius:12px;
  font-size:14px;color:#3a4842;border:1px solid var(--line);padding:14px 16px;
}

/* 溯源时间轴 */
.timeline{position:relative;padding:6px 14px 0;}
.node{display:flex;gap:12px;padding-bottom:18px;position:relative;}
.node::before{
  content:"";position:absolute;left:17px;top:38px;bottom:-2px;width:2px;background:var(--line);z-index:1;
}
.node:last-child::before{display:none;}
.node-dot{
  flex:0 0 36px;height:36px;border-radius:50%;background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:18px;
  z-index:2;box-shadow:0 0 0 4px var(--bg);
}
.node-card{
  flex:1;min-width:0;background:var(--card);border:1px solid var(--line);
  border-radius:14px;padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.node-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
.node-icon{font-size:18px;line-height:1;}
.node-title{font-size:15px;font-weight:700;color:#16201c;}
.node-content{font-size:14px;color:#3a4842;}

/* 节点内容：原料 */
.raw-item{
  padding:10px 0;border-top:1px dashed var(--line);
}
.raw-item:first-child{border-top:none;padding-top:0;}
.raw-name{font-weight:600;color:#1f2a26;}
.raw-sub{font-size:13px;color:var(--muted);margin-top:2px;}
.raw-note{font-size:12px;color:#9aa8a2;margin-top:2px;}

/* 节点内容：生产 */
.prod-row{display:flex;gap:10px;padding:7px 0;border-top:1px dashed var(--line);font-size:13px;}
.prod-row:first-child{border-top:none;}
.prod-label{flex:0 0 76px;color:var(--muted);}
.prod-val{flex:1;color:#1f2a26;}

/* 节点内容：说明书 */
.instr-section{padding:10px 0;border-top:1px dashed var(--line);}
.instr-section:first-child{border-top:none;padding-top:0;}
.instr-title{font-weight:600;color:#1f2a26;margin-bottom:6px;font-size:14px;}
.instr-content{font-size:13px;color:#3a4842;line-height:1.7;}
.instr-list{margin:6px 0 0;padding-left:18px;font-size:13px;color:#3a4842;line-height:1.7;}
.instr-list li{margin-bottom:4px;}

/* 节点内容：报告 / 资质文档（卡片） */
.report-list{display:flex;flex-direction:column;gap:10px;}
.card{
  display:flex;background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:12px;align-items:flex-start;gap:12px;
}
.card-index{
  flex:0 0 28px;height:28px;border-radius:50%;background:var(--brand);
  color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:13px;
}
.card-body{flex:1;min-width:0;}
.card-title{font-size:14px;font-weight:600;color:#1f2a26;}
.card-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:7px 16px;border-radius:9px;font-size:13px;font-weight:600;
  text-decoration:none;cursor:pointer;border:1px solid transparent;
}
.btn-primary{background:var(--brand);color:#fff;}
.btn-primary:active{background:var(--brand-dark);}
.btn-ghost{background:#eef4f1;color:var(--brand-dark);border-color:#d8e8e0;}

/* 节点内容：资质图片墙 */
.qual-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
.qual-item{background:#fafbfa;border:1px solid var(--line);border-radius:10px;overflow:hidden;}
.qual-item img{width:100%;display:block;background:#fff;}
.qual-cap{font-size:12px;color:#3a4842;padding:6px 8px;text-align:center;}

/* 节点内容：正品保障 */
.guarantee-text{font-size:14px;color:#3a4842;}

.empty{font-size:13px;color:#9aa8a2;padding:4px 0;}

.footer{text-align:center;color:var(--muted);font-size:12px;margin-top:24px;padding:0 20px;}
.loading{color:var(--muted);text-align:center;padding:30px 10px;font-size:14px;}

/* 全屏查看器 */
.viewer{
  position:fixed;inset:0;background:#525659;display:none;flex-direction:column;z-index:999;
}
.viewer.open{display:flex;}
.viewer-bar{
  display:flex;align-items:center;gap:8px;padding:10px 12px;background:#3d4043;color:#fff;
}
.viewer-bar .spacer{flex:1;}
.icon-btn{
  background:rgba(255,255,255,.12);color:#fff;border:none;border-radius:8px;
  padding:6px 12px;font-size:14px;cursor:pointer;
}
.icon-btn:active{background:rgba(255,255,255,.25);}
.viewer-body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;padding:12px;}
.pages{display:flex;flex-direction:column;gap:10px;align-items:center;}
.page{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.3);}
.page canvas{display:block;width:100%;height:auto;}

/* ===== 小程序入口 ===== */
.mp-entry{text-align:center;}
.mp-qr-row{display:flex;justify-content:center;align-items:flex-start;gap:26px;flex-wrap:wrap;}
.mp-qr-item{flex:0 1 190px;min-width:150px;}
.mp-wxacode{width:170px;height:170px;max-width:100%;border-radius:16px;box-shadow:0 2px 10px rgba(0,0,0,.08);}
.mp-qr-label{margin-top:9px;font-size:14.5px;font-weight:700;color:#1f3a2d;}
.mp-qr-sub{margin-top:3px;font-size:11.5px;color:#7c8a80;line-height:1.6;}
.mp-tip{margin-top:14px;font-size:13px;color:#5f7567;line-height:1.8;}

/* ===== 批号查询 ===== */
body{overflow-x:hidden;}
.batch-lookup{margin:14px 0 4px;background:#ffffff;border-radius:14px;padding:14px 14px 10px;box-shadow:0 1px 6px rgba(0,0,0,.05);}
.batch-lookup .bl-row{display:flex;gap:8px;max-width:100%;}
#batchInput{flex:1 1 0;min-width:0;width:100%;border:1.5px solid #d8e2da;border-radius:10px;padding:10px 12px;font-size:15px;outline:none;color:#2b3a30;background:#fbfdfb;}
#batchInput:focus{border-color:#2e6e4e;}
#batchGo{flex:0 0 auto;padding:10px 18px;border-radius:10px;font-size:15px;white-space:nowrap;}
#batchScan{
  display:flex;align-items:center;justify-content:center;width:100%;margin-top:9px;
  padding:10px 12px;border-radius:10px;font-size:14px;font-weight:600;
  background:#eef4f1;color:#0a7a52;border:1px dashed #b9d4c6;cursor:pointer;
}
#batchScan:active{background:#e2eee8;}
.bl-msg{margin-top:9px;font-size:12.5px;color:#7c8a80;line-height:1.7;}

/* ===== 批次信息卡 ===== */
.batch-result{margin-top:10px;}
.br-card{background:#fff;border:1px solid #e3e9e5;border-radius:14px;padding:14px 16px;box-shadow:0 1px 6px rgba(0,0,0,.05);}
.br-head{font-size:14px;font-weight:600;color:#1f3a2d;padding-bottom:8px;border-bottom:1px solid #eef2ef;margin-bottom:4px;}
.br-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed #eef2ef;font-size:14px;}
.br-row:last-child{border-bottom:0;}
.br-k{color:#7c8a80;flex:0 0 auto;}
.br-v{color:#22302a;font-weight:600;text-align:right;word-break:break-all;min-width:0;max-width:62%;}
