:root{
  --brand:#2B7FFF; --brand-deep:#1D6BE8; --teal:#21B6AD;
  --grad:linear-gradient(135deg,#5B9CFF 0%,#2B7FFF 100%);
  --ink:#0F1B33; --text:#17223A; --body:#3A4763; --sub:#8B95AC;
  --line:#E6EEF9; --bg:#F6FAFE; --card:#fff;
  --ok:#16A34A; --err:#DC2626; --warn:#D97706;
  --r-xl:26px; --r-lg:20px; --r-md:14px;
  --shadow:0 18px 44px rgba(31,86,170,.10);
  --shadow-sm:0 8px 22px rgba(31,86,170,.07);
  /* 内容区上限：低于它随窗口自适应，高于它居中，避免超宽屏把两栏拉散 */
  --page-max:1440px;
}
*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none !important}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  color:var(--text);line-height:1.65;min-height:100vh;
  background:
    radial-gradient(1100px 520px at 82% -8%,rgba(43,127,255,.16),transparent 62%),
    radial-gradient(820px 460px at -6% 18%,rgba(33,182,173,.11),transparent 60%),
    var(--bg);
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
button,input{font:inherit}

/* ===== 顶栏 ===== */
.top{
  position:sticky;top:0;z-index:20;height:66px;
  background:rgba(255,255,255,.76);border-bottom:1px solid rgba(230,238,249,.9);
  -webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px);
}
.top-in{
  width:100%;max-width:var(--page-max);margin:0 auto;height:100%;
  padding:0 clamp(18px,3.4vw,64px);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.brand{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:600;letter-spacing:-.2px}
.mark{width:30px;height:30px;border-radius:9px;background:var(--grad);position:relative;flex:0 0 auto;box-shadow:0 6px 14px rgba(43,127,255,.28)}
.mark::after{content:'';position:absolute;inset:9px;border:2.5px solid #fff;border-radius:50%}
.top-right{display:flex;align-items:center;gap:12px}
.badge-soft{font-size:12px;font-weight:500;color:var(--brand);background:#EAF2FF;border-radius:999px;padding:4px 12px}
.top-note{font-size:12px;color:var(--sub)}

/* ===== 布局 ===== */
/* 随窗口自适应：中小屏铺满，超宽屏居中（上限见 --page-max） */
.wrap{
  width:100%;max-width:var(--page-max);margin:0 auto;
  padding:clamp(26px,2.6vw,46px) clamp(18px,3.4vw,64px) 56px;
}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-xl);
  box-shadow:var(--shadow);
}

/* ===== 首屏 ===== */
.hero{
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:clamp(24px,3vw,56px);align-items:center;
  /* 首屏单独收窄并居中：标题和示意图不被超宽屏拉开 */
  width:100%;max-width:1140px;margin:0 auto;
  padding:clamp(4px,1vw,16px) 0 clamp(26px,2.4vw,40px);
}
.eyebrow{
  display:inline-block;font-size:12px;font-weight:600;letter-spacing:1.4px;color:var(--brand);
  background:#EAF2FF;border-radius:999px;padding:4px 12px;margin-bottom:14px;
}
.hero h1{font-size:clamp(32px,3.6vw,54px);line-height:1.18;letter-spacing:-1.2px;color:var(--ink)}
.grad-text{
  background:linear-gradient(120deg,#2B7FFF 10%,#21B6AD 90%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.lede{font-size:clamp(14px,1.25vw,17px);color:var(--body);margin-top:14px;max-width:56ch}
.hero-meta{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap}
.pill{
  display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--body);
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 13px;box-shadow:var(--shadow-sm);
}
.pdot{width:6px;height:6px;border-radius:50%;background:var(--ok)}

.hero-visual{position:relative;display:flex;align-items:center;justify-content:center;min-height:240px}
/* 秤体示意图：与小程序 scale-icon 同一套结构与比例
   顶板(悬空) → 机身 82%、宽高 2.6:1 → 屏 42%×55% + 键1/键2(31%) + 空白板 17%×45% → PCB 86% → 底座 92% */
.scale-art{width:min(320px,100%);}
.sa-plate{
  height:12px;margin-bottom:9px;border-radius:6px 6px 2px 2px;
  background:linear-gradient(180deg,#EFE9F7,#D8CDE7);
  box-shadow:0 8px 10px -4px rgba(23,34,58,.22);
}
.sa-body{
  width:82%;height:101px;margin:0 auto;padding:0 10px;box-sizing:border-box;
  display:flex;align-items:center;
  background:linear-gradient(180deg,#F8F4FC,#EEE7F5);
  border:1px solid #E2D8EE;border-radius:5px;
}
.sa-lcd{
  flex:0 0 42%;height:56px;padding:0 8px;box-sizing:border-box;
  display:flex;flex-direction:column;justify-content:center;
  background:#17223A;border:1px solid #0F1729;border-radius:3px;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}
.sa-lcd b{font-size:15px;font-weight:600;line-height:1.15;color:#5BE1A5}
.sa-lcd span{font-size:8px;line-height:1.2;color:#8FA0C4}
.sa-keys{
  height:71px;margin-left:12px;
  display:flex;flex-direction:column;justify-content:space-between;
}
.sa-keys i{
  width:31px;height:31px;border-radius:50%;
  background:radial-gradient(circle at 36% 28%,#A6EE72,#5FBE18);
  color:#fff;font-size:9px;font-weight:600;font-style:normal;line-height:31px;text-align:center;
}
.sa-blank{
  width:45px;height:45px;margin-left:auto;
  background:#EFE8F6;border:1px solid #E2D8EE;border-radius:3px;
}
.sa-pcb{
  width:86%;height:8px;margin:6px auto 0;border-radius:2px;
  background:repeating-linear-gradient(90deg,#2C8A50 0,#2C8A50 7px,#46AE6C 7px,#46AE6C 9px,#123B27 9px,#123B27 14px);
}
.sa-base{width:92%;height:8px;margin:5px auto 0;border-radius:4px;background:#E3EAF6;}
.float-tag{
  position:absolute;font-size:11px;font-weight:600;color:var(--brand);
  background:#fff;border:1px solid var(--line);border-radius:10px;padding:5px 10px;
  box-shadow:var(--shadow-sm);
}
.float-tag.t1{top:16px;right:2px}
.float-tag.t2{bottom:22px;left:6px;color:var(--teal)}

/* ===== 解锁 ===== */
.gate{
  max-width:660px;
  /* 与首屏拉开距离，让取码卡片落在视线中心偏下，而不是紧贴标题 */
  margin:clamp(28px,7vh,88px) auto 0;
  padding:28px 30px;
}
.gate-head{display:flex;gap:14px;align-items:flex-start}
.gate-ic{
  width:44px;height:44px;border-radius:14px;background:var(--grad);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
  box-shadow:0 10px 20px rgba(43,127,255,.28);
}
.gate-ic svg{width:22px;height:22px}
.gate h2{font-size:19px;letter-spacing:-.3px}
.gate p{font-size:13px;color:var(--sub);margin-top:3px}
.unlock{display:flex;gap:10px;margin-top:20px}
.code-input{
  flex:1 1 auto;min-width:0;height:54px;padding:0 18px;border:1px solid var(--line);border-radius:var(--r-md);
  font-size:22px;font-weight:600;letter-spacing:4px;text-transform:uppercase;color:var(--ink);
  background:#FBFDFF;outline:none;transition:border-color .15s,box-shadow .15s;
}
.code-input:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(43,127,255,.12);background:#fff}
.code-input::placeholder{font-weight:400;letter-spacing:3px;color:#C4CCDA}
.msg{font-size:13px;margin-top:12px;min-height:20px}
.msg.err{color:var(--err)}
.msg.ok{color:var(--ok)}
.gate-foot{
  display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin-top:16px;padding-top:14px;border-top:1px dashed var(--line);
  font-size:12px;color:var(--sub);
}

/* ===== 按钮 ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:50px;padding:0 24px;border-radius:var(--r-md);border:1px solid var(--line);
  background:#fff;color:var(--body);font-size:15px;font-weight:500;cursor:pointer;
  transition:transform .15s,box-shadow .15s,background .15s,opacity .15s;
  white-space:nowrap;
}
.btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 10px 22px rgba(43,127,255,.16)}
.btn.primary{background:var(--grad);border-color:transparent;color:#fff;box-shadow:0 10px 22px rgba(43,127,255,.24)}
.btn.primary:hover:not(:disabled){box-shadow:0 14px 28px rgba(43,127,255,.32)}
.btn.block{display:flex;width:100%}
.btn.lg{height:56px;font-size:16px;border-radius:16px}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}

/* ===== 解锁后状态条 ===== */
.statusbar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding:clamp(14px,1.4vw,20px) clamp(18px,1.8vw,28px);
  margin:4px 0 18px;border-radius:var(--r-lg);
}
.sb-main{display:flex;align-items:center;gap:12px;min-width:0}
.sb-ic{
  width:38px;height:38px;border-radius:12px;flex:0 0 auto;position:relative;
  background:linear-gradient(135deg,#EAF2FF,#D7E7FF);
}
.sb-ic::before,.sb-ic::after{content:'';position:absolute;left:50%;transform:translateX(-50%)}
.sb-ic::before{top:11px;width:16px;height:11px;border-radius:3px;border:2px solid var(--brand)}
.sb-ic::after{bottom:11px;width:20px;height:2px;border-radius:2px;background:var(--brand)}
.sb-text{min-width:0;flex:1 1 auto}
.sb-title{font-size:14px;color:var(--body)}
.sb-title b{color:var(--brand);font-size:15px}
.sb-sub{font-size:12px;color:var(--sub);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ttl{
  font-size:12px;font-weight:500;color:var(--brand);background:#EAF2FF;
  border-radius:999px;padding:6px 14px;white-space:nowrap;
}

/* ===== 工作区 ===== */
.workspace{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);
  gap:clamp(16px,1.8vw,28px);align-items:start;
}
.col{display:flex;flex-direction:column;gap:18px;min-width:0}

.card-h{display:flex;align-items:center;justify-content:space-between;gap:12px}
.fw-card{padding:clamp(20px,1.6vw,30px) clamp(20px,1.8vw,34px)}
.fw-card h2{font-size:17px;letter-spacing:-.2px}
.card-sub{font-size:12px;color:var(--sub);margin-top:4px}
.chip{
  font-size:11px;font-weight:600;letter-spacing:.4px;color:var(--teal);
  background:#E7F8F6;border-radius:999px;padding:4px 10px;
}
.imgs{list-style:none;margin-top:16px;display:grid;gap:8px}
.imgs li{
  display:flex;align-items:center;gap:12px;padding:11px 13px;
  background:#F8FBFF;border:1px solid #EDF3FC;border-radius:13px;
  transition:background .15s,border-color .15s;
}
.imgs li.ok{background:#F2FCF6;border-color:#D4F5E1}
.img-ic{
  width:26px;height:26px;border-radius:8px;flex:0 0 auto;background:#E5EEFC;position:relative;
}
.img-ic::after{
  content:'';position:absolute;inset:7px;border-radius:2px;
  border:1.8px solid var(--brand);border-top-color:transparent;
}
.img-main{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.nm{font-size:13px;font-weight:600;color:var(--text);line-height:1.4}
.addr{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;color:var(--sub)}
.sz{font-size:12px;color:var(--sub);white-space:nowrap}
.img-ok{
  width:18px;height:18px;border-radius:50%;background:var(--ok);color:#fff;
  font-size:11px;display:flex;align-items:center;justify-content:center;
  opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s;flex:0 0 auto;
}
.imgs li.ok .img-ok{opacity:1;transform:scale(1)}
.safe-note{
  display:flex;gap:8px;align-items:flex-start;margin-top:14px;padding:11px 13px;
  background:#F0FDF4;border:1px solid #DCFCE7;border-radius:12px;
  font-size:12px;color:#15803D;line-height:1.55;
}
.safe-note span{font-weight:700}

/* ===== 接线入口 ===== */
.wire-entry{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  margin:18px 0 22px;padding:20px clamp(20px,2vw,28px);
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
}
.wire-entry-tag{
  display:inline-block;margin-bottom:6px;padding:2px 9px;border-radius:999px;
  background:#EEF3FB;color:#4A6FA5;font-size:11.5px;font-weight:600;letter-spacing:.3px;
}
.wire-entry h2{font-size:16px;letter-spacing:-.2px}
.wire-entry p{font-size:13px;color:var(--sub);margin-top:4px;line-height:1.6}
.wire-entry-btn{flex:0 0 auto;text-decoration:none}
@media (max-width:700px){
  .wire-entry{flex-direction:column;align-items:flex-start;gap:14px}
  .wire-entry-btn{width:100%;justify-content:center}
}

/* ===== 须知 ===== */
.tips-card{padding:clamp(18px,1.4vw,26px) clamp(20px,1.8vw,34px)}
.tips-card h3{font-size:14px;margin-bottom:10px}
.ticks{list-style:none;display:grid;gap:8px}
.ticks li{position:relative;padding-left:22px;font-size:13px;color:var(--body)}
.ticks li::before{
  content:'✓';position:absolute;left:0;top:1px;width:15px;height:15px;border-radius:50%;
  background:#E7F8F6;color:var(--teal);font-size:10px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}

/* ===== 操作步骤 ===== */
.action-card{padding:14px}
.step{padding:16px;border-radius:18px;border:1px solid transparent;transition:background .2s,border-color .2s,opacity .2s}
.step + .step{margin-top:2px}
.step-h{display:flex;gap:12px;align-items:flex-start}
.step-n{
  width:30px;height:30px;border-radius:10px;flex:0 0 auto;
  background:#EEF3FB;color:#8B95AC;font-size:14px;font-weight:600;
  display:flex;align-items:center;justify-content:center;transition:background .2s,color .2s;
}
.step-h h3{font-size:14px;line-height:1.5}
.step-h p{font-size:12px;color:var(--sub);margin-top:2px}
.step-body{margin-top:12px;padding-left:42px;display:flex;flex-direction:column;gap:10px}
.step:not(.is-active):not(.is-done):not(.is-error){opacity:.62}
.step.is-active{background:#F7FAFF;border-color:#DCE9FF}
.step.is-active .step-n{background:var(--grad);color:#fff;box-shadow:0 6px 14px rgba(43,127,255,.28)}
.step.is-done .step-n{background:#DCFCE7;color:var(--ok);font-size:0}
.step.is-done .step-n::after{content:'✓';font-size:14px;font-weight:700}
.step.is-error{background:#FFF7F7;border-color:#FEE2E2}
.step.is-error .step-n{background:#FEE2E2;color:var(--err)}
.step.is-error .step-h h3{color:#B91C1C}

.status-line{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--sub);line-height:1.5}
.status-line::before{content:'';width:7px;height:7px;border-radius:50%;background:#C4CCDA;flex:0 0 auto}
.status-line.ok::before{background:var(--ok);box-shadow:0 0 0 3px rgba(22,163,74,.12)}
.status-line.err::before{background:var(--err);box-shadow:0 0 0 3px rgba(220,38,38,.10)}
.status-line.busy::before{background:var(--brand);animation:pulse 1.2s ease-in-out infinite}
.state.ok{color:var(--ok)}
.state.err{color:var(--err)}
.state.busy{color:var(--brand)}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.8)}}

.hint{
  font-size:12px;line-height:1.6;color:var(--warn);
  background:#FFFBEB;border:1px solid #FDE68A;border-radius:11px;padding:10px 12px;
}

.progress{display:flex;align-items:center;gap:10px}
.bar{flex:1 1 auto;height:9px;background:#EDF3FC;border-radius:999px;overflow:hidden}
.bar i{display:block;height:100%;width:0;border-radius:999px;background:var(--grad);transition:width .2s}
#bar-pct{font-size:12px;font-weight:600;color:var(--sub);min-width:42px;text-align:right}

.log-box{margin:8px 12px 4px;padding-top:12px;border-top:1px dashed var(--line)}
.log-box summary{
  list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;
  font-size:12px;color:var(--sub);user-select:none;
}
.log-box summary::-webkit-details-marker{display:none}
.log-box summary::before{content:'›';font-size:14px;transition:transform .15s}
.log-box[open] summary::before{transform:rotate(90deg)}
.log-box pre{
  margin-top:10px;padding:12px;background:var(--ink);color:#C7D2E4;border-radius:12px;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1.65;
  max-height:210px;overflow:auto;white-space:pre-wrap;word-break:break-all;
}

/* ===== 完成 ===== */
.done{
  display:flex;gap:14px;align-items:flex-start;padding:20px 22px;
  border-color:#BBF7D0;background:linear-gradient(135deg,#F0FDF4,#F7FFF9);
  box-shadow:0 14px 32px rgba(22,163,74,.10);
}
.done-ic{
  width:40px;height:40px;border-radius:50%;background:var(--ok);color:#fff;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 18px rgba(22,163,74,.28);
}
.done-ic svg{width:20px;height:20px}
.done h2{font-size:16px;color:#15803D}
.done p{font-size:13px;color:#166534;margin-top:3px}

/* ===== 页脚 ===== */
.foot{
  margin-top:26px;text-align:center;font-size:12px;color:var(--sub);
  padding:0 10px;
}

/* ===== 响应式 ===== */
@media (max-width:920px){
  .hero{grid-template-columns:1fr;gap:8px;padding-bottom:26px}
  .hero-visual{display:none}
  .hero h1{font-size:36px}
  .workspace{grid-template-columns:1fr}
}
@media (max-width:600px){
  .top{height:58px}
  .top-in{padding:0 16px}
  .top-note{display:none}
  .wrap{padding:22px 14px 40px}
  .hero h1{font-size:30px;letter-spacing:-.8px}
  .lede{font-size:14px}
  .gate{padding:22px 18px}
  .unlock{flex-direction:column}
  .code-input{height:52px;font-size:20px}
  .gate-foot{flex-direction:column;gap:4px}
  .statusbar{padding:14px 16px}
  .sb-sub{max-width:230px}
  .fw-card,.tips-card{padding:18px}
  .step{padding:14px 12px}
  .step-body{padding-left:0}
  .action-card{padding:10px}
}
