* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green: #19D686;
  --green-d: #12B370;
  --green-l: #E6FAF1;
  --bg: #F5F7FA;
  --text: #1F2329;
  --sub: #646A73;
  --muted: #9AA0A6;
  --line: #E8EBEF;
  --warn: #FF8A00;
  --warn-l: #FFF4E5;
  --err: #F5483B;
  --err-l: #FEECEB;
  --blue: #2F7CF6;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #E9EDF2;
  color: var(--text);
  min-height: 100vh;
}
.page { display: flex; gap: 32px; justify-content: center; align-items: flex-start; padding: 28px 24px; }

/* ---------- 控制面板 ---------- */
.panel { width: 400px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 28px; }
.card { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.card h2 { font-size: 15px; margin-bottom: 10px; }
.card h3 { font-size: 13px; margin: 12px 0 6px; color: var(--sub); font-weight: 600; }
.seg { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px 0; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--sub); }
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.scen label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; cursor: pointer; line-height: 1.4; }
.scen input { margin-top: 3px; accent-color: var(--green); }
.scen small { color: var(--muted); display: block; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-s { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 0; font-size: 13px; cursor: pointer; }
.btn-s:hover { border-color: var(--green); color: var(--green-d); }
.steps-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.steps-nav span { font-size: 12px; padding: 4px 9px; border-radius: 12px; background: var(--bg); color: var(--muted); }
.steps-nav span.on { background: var(--green-l); color: var(--green-d); font-weight: 600; }
.steps-nav span.done { color: var(--sub); }
.note ul { padding-left: 18px; font-size: 13px; line-height: 1.65; color: var(--text); }
.note li { margin-bottom: 2px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; }
.tag.new { background: var(--green-l); color: var(--green-d); }
.tag.now { background: #EEF0F3; color: var(--sub); }
.tag.ask { background: var(--warn-l); color: var(--warn); }
.legend { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 手机外框 ---------- */
.phone { width: 390px; height: 820px; background: #111; border-radius: 52px; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.18); flex-shrink: 0; }
.screen { width: 100%; height: 100%; background: var(--bg); border-radius: 42px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.statusbar { height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 28px; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.statusbar .net { font-size: 12px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.statusbar .net .ssid { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusbar .net .ssid.dev { color: var(--blue); }
.nav { height: 44px; display: flex; align-items: center; padding: 0 16px; flex-shrink: 0; position: relative; }
.nav .back { font-size: 22px; cursor: pointer; width: 30px; color: var(--text); }
.nav .title { position: absolute; left: 0; right: 0; text-align: center; font-size: 17px; font-weight: 600; pointer-events: none; }
.nav .stepno { margin-left: auto; font-size: 12px; color: var(--muted); }
.progress-line { height: 3px; background: var(--line); margin: 0 20px; border-radius: 2px; flex-shrink: 0; }
.progress-line i { display: block; height: 100%; background: var(--green); border-radius: 2px; transition: width .4s; }
.body { flex: 1; overflow-y: auto; padding: 18px 20px 12px; }
.footer { padding: 12px 20px 28px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.h1 { font-size: 21px; font-weight: 700; line-height: 1.35; }
.p { font-size: 14px; color: var(--sub); line-height: 1.6; margin-top: 6px; }
.btn { border: 0; border-radius: 25px; height: 50px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:disabled { background: #BDEFD8; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--sub); height: 40px; font-weight: 500; font-size: 14px; }
.btn.line { background: #fff; color: var(--text); border: 1px solid var(--line); }

/* 设备示意 */
.device-box { background: #fff; border-radius: 20px; height: 220px; margin-top: 18px; display: flex; align-items: center; justify-content: center; position: relative; }
.device { width: 120px; height: 160px; background: linear-gradient(180deg,#FAFBFC,#E9ECEF); border-radius: 26px 26px 18px 18px; position: relative; box-shadow: inset 0 -6px 0 rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.08); }
.device .panel-face { position: absolute; top: 20px; left: 16px; right: 16px; height: 44px; background: #23272E; border-radius: 10px; display: flex; align-items: center; justify-content: space-around; padding: 0 8px; }
.device .wifi-ic { width: 18px; height: 18px; animation: blink 1s infinite; }
.device .key { width: 16px; height: 16px; border-radius: 50%; background: #3A3F47; border: 1px solid #555; }
.device .key.press { animation: press 2.4s infinite; }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: .15; } }
@keyframes press { 0%,15% { transform: scale(1); background:#3A3F47; } 20%,70% { transform: scale(.85); background: var(--green);} 75%,100% { transform: scale(1); background:#3A3F47; } }
.device-tip { position: absolute; bottom: 10px; font-size: 11px; color: var(--muted); }
.guide-list { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.guide-list .it { display: flex; gap: 10px; font-size: 14px; line-height: 1.55; }
.guide-list .no { width: 22px; height: 22px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }

/* 表单 */
.field { background: #fff; border-radius: 14px; padding: 4px 16px; margin-top: 16px; }
.field .row { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.field .row + .row { border-top: 1px solid var(--line); }
.field .lab { font-size: 14px; width: 56px; color: var(--sub); flex-shrink: 0; }
.field input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; min-width: 0; }
.field .act { font-size: 13px; color: var(--green-d); cursor: pointer; flex-shrink: 0; }
.field .eye { cursor: pointer; font-size: 13px; color: var(--muted); flex-shrink: 0; user-select: none; }
.badge { font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; flex-shrink: 0; }
.badge.ok { background: var(--green-l); color: var(--green-d); }
.badge.bad { background: var(--err-l); color: var(--err); }
.badge.mix { background: var(--warn-l); color: var(--warn); }
.inline-tip { margin-top: 10px; font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 10px; display: flex; gap: 8px; }
.inline-tip.warn { background: var(--warn-l); color: #A65A00; }
.inline-tip.err { background: var(--err-l); color: #B3261E; }
.inline-tip.info { background: #EEF4FF; color: #2456B3; }
.inline-tip.ok { background: var(--green-l); color: #0E7A4C; }
.inline-tip b { font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-top: 14px; cursor: pointer; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }
.pre-ok { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.pre-ok i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
.pre-ok i.loading { background: var(--warn); animation: blink .8s infinite; }

/* 热点连接 */
.radar { width: 180px; height: 180px; margin: 30px auto 10px; position: relative; display: flex; align-items: center; justify-content: center; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ripple 2s infinite; }
.radar::after { animation-delay: 1s; }
.radar .core { width: 84px; height: 84px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; z-index: 1; }
@keyframes ripple { 0% { transform: scale(.45); opacity: .7; } 100% { transform: scale(1); opacity: 0; } }
.center { text-align: center; }
.ssid-chip { display: inline-flex; gap: 6px; align-items: center; background: #fff; border-radius: 18px; padding: 6px 14px; font-size: 14px; font-weight: 600; margin-top: 12px; }
.manual-steps { background: #fff; border-radius: 14px; padding: 16px; margin-top: 16px; }
.manual-steps .it { display: flex; gap: 10px; font-size: 14px; line-height: 1.55; padding: 6px 0; }
.guide-no { width: 22px; height: 22px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.manual-steps .it > span:last-child { flex: 1; }
.mock-wifi { margin-top: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.mock-wifi div { display: flex; justify-content: space-between; padding: 3px 0; }
.mock-wifi .hl { color: var(--blue); font-weight: 600; }

/* 进度 */
.stage-list { margin-top: 20px; background: #fff; border-radius: 16px; padding: 6px 16px; }
.stage { display: flex; gap: 12px; padding: 13px 0; align-items: flex-start; }
.stage + .stage { border-top: 1px solid var(--line); }
.stage .ic { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: #D9DDE2; margin-top: 1px; }
.stage.run .ic { background: transparent; border: 2.5px solid var(--green-l); border-top-color: var(--green); animation: spin .9s linear infinite; }
.stage.ok .ic { background: var(--green); }
.stage.fail .ic { background: var(--err); }
@keyframes spin { to { transform: rotate(360deg); } }
.stage .tt { font-size: 15px; font-weight: 600; }
.stage.wait .tt { color: var(--muted); font-weight: 500; }
.stage .ds { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.stage.run .ds { color: var(--green-d); }
.stage.fail .ds { color: var(--err); }
.elapsed { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 14px; }
.big-ring { width: 150px; height: 150px; margin: 18px auto 0; position: relative; }
.big-ring svg { transform: rotate(-90deg); }
.big-ring .pct { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.big-ring .pct small { font-size: 12px; color: var(--muted); font-weight: 500; }

/* 结果 */
.result-ic { width: 76px; height: 76px; border-radius: 50%; margin: 30px auto 14px; display: flex; align-items: center; justify-content: center; font-size: 38px; color: #fff; }
.result-ic.ok { background: var(--green); }
.result-ic.fail { background: var(--err); }
.reason { background: #fff; border-radius: 14px; padding: 14px 16px; margin-top: 18px; font-size: 14px; line-height: 1.6; }
.reason h4 { font-size: 14px; margin-bottom: 6px; }
.reason ul { padding-left: 18px; color: var(--sub); }
.room-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.room-chips span { font-size: 13px; padding: 6px 14px; background: #fff; border-radius: 16px; cursor: pointer; border: 1px solid transparent; }
.room-chips span.on { border-color: var(--green); color: var(--green-d); background: var(--green-l); }

/* 系统设置模拟 */
.sys { position: absolute; inset: 0; background: #F2F2F7; z-index: 30; display: flex; flex-direction: column; }
.sys.android { background: #fff; }
.sys .sys-head { padding: 8px 18px 10px; font-size: 28px; font-weight: 700; }
.sys.android .sys-head { font-size: 22px; font-weight: 500; padding-top: 14px; }
.sys .grp { background: #fff; margin: 10px 16px; border-radius: 12px; }
.sys.android .grp { margin: 6px 0; border-radius: 0; }
.sys .grp .r { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; font-size: 15px; cursor: pointer; }
.sys .grp .r + .r { border-top: 1px solid #E5E5EA; }
.sys .grp .r .s { font-size: 12px; color: #8E8E93; }
.sys .grp .r.cur { color: var(--blue); }
.sys .grp-t { font-size: 12px; color: #8E8E93; padding: 12px 32px 0; }
.sys .back-app { display: inline-block; padding: 2px 16px 0; font-size: 13px; color: var(--blue); cursor: pointer; }
.sys .sys-hint { position: absolute; bottom: 30px; left: 16px; right: 16px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; padding: 10px 12px; border-radius: 10px; line-height: 1.5; }

/* 弹层 */
.mask { position: absolute; inset: 0; background: rgba(0,0,0,.42); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.mask.center-m { align-items: center; }
.sheet { background: #fff; width: 100%; border-radius: 20px 20px 0 0; padding: 20px 20px 30px; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 17px; margin-bottom: 10px; }
.sheet ol { padding-left: 20px; font-size: 14px; line-height: 1.75; color: var(--sub); margin-bottom: 16px; }
.sysdlg { background: #fff; width: 290px; border-radius: 14px; overflow: hidden; text-align: center; animation: up .2s ease-out; }
.sysdlg.ios { background: rgba(250,250,250,.97); }
.sysdlg .c { padding: 20px 16px 16px; font-size: 15px; line-height: 1.45; }
.sysdlg .c b { display: block; font-size: 16px; margin-bottom: 6px; }
.sysdlg .c small { font-size: 13px; color: var(--sub); }
.sysdlg .bt { display: flex; border-top: 1px solid #DDD; }
.sysdlg .bt button { flex: 1; border: 0; background: transparent; padding: 12px 0; font-size: 16px; color: var(--blue); cursor: pointer; }
.sysdlg .bt button + button { border-left: 1px solid #DDD; font-weight: 600; }
.sysdlg.android { text-align: left; border-radius: 22px; width: 310px; }
.sysdlg.android .c { padding: 22px 22px 8px; }
.sysdlg.android .net-item { margin: 10px 0 0; padding: 10px 12px; background: #F1F3F4; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; }
.sysdlg.android .bt { border: 0; justify-content: flex-end; padding: 8px 14px 14px; gap: 6px; }
.sysdlg.android .bt button { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; border: 0 !important; color: #1A73E8; font-weight: 600; }
.toast { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 18px; z-index: 60; white-space: nowrap; animation: up .2s; }
.hidden { display: none !important; }

/* ---------- v2：2.4G 过滤列表 ---------- */
.wifi-sheet { max-height: 86%; overflow-y: auto; }
.sheet-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sheet-hd h3 { margin: 0; }
.lnk { color: var(--green-d); cursor: pointer; font-size: 13px; font-weight: 500; }
.scan-ing { color: var(--muted); font-size: 13px; }
.grp-label { font-size: 12px; color: var(--muted); margin: 12px 2px 6px; }
.grp-label.fold { cursor: pointer; user-select: none; }
.field.wifi-list { margin-top: 0; background: #F5F7FA; }
.wifi-row { cursor: pointer; gap: 10px; }
.wifi-row .nm { flex: 1; font-size: 15px; display: flex; flex-direction: column; }
.wifi-row .nm em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.wifi-row .tick { width: 16px; color: var(--green); font-weight: 700; }
.wifi-row.off { cursor: not-allowed; opacity: .45; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; width: 22px; height: 15px; flex-shrink: 0; }
.bars i { display: block; width: 3px; background: #D0D4D9; border-radius: 1px; }
.bars i.on { background: var(--text); }
.row-manual { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #F5F7FA; font-size: 14px; color: var(--green-d); cursor: pointer; display: flex; flex-direction: column; }
.row-manual small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.p.small { font-size: 12px; margin-top: 8px; }
