:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --text: #14161a;
  --muted: #6b7280;
  --faint: #9ca3af;
  --brand: #1f6feb;
  --brand-soft: #eaf1fe;
  --ok: #0f7b4f;
  --ok-soft: #e8f6ef;
  --warn: #8a5a00;
  --warn-soft: #fff6e0;
  --err: #b42318;
  --err-soft: #fdeceb;
  --r: 12px;
}

* { box-sizing: border-box; }

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

a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { font-weight: 500; margin: 0; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; }

header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 247, 248, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.brand span { color: var(--faint); font-weight: 400; margin-left: 8px; font-size: 13px; }
nav.top-nav { margin-left: auto; display: flex; gap: 6px; }
nav.top-nav a {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
nav.top-nav a:hover { background: rgba(0, 0, 0, 0.04); color: var(--text); }
nav.top-nav a.on { background: var(--text); color: #fff; }

.hero { padding: 36px 0 20px; }
.hero h1 { font-size: 26px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); font-size: 14px; margin: 8px 0 0; max-width: 620px; }

.searchbar { display: flex; gap: 10px; margin: 22px 0 16px; }
.searchbar input {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.searchbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.chip b { font-weight: 500; opacity: 0.55; margin-left: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  gap: 14px;
  transition: border-color 0.16s, transform 0.16s;
}
.card:hover { border-color: var(--line-strong); }
.icon {
  width: 56px; height: 56px; flex: none;
  border-radius: 13px;
  background: #eceef1;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* 图标占位：图片没下完之前显示统一的「下载」标，加载完才淡入真图标 */
.ph {
  position: relative;
  display: inline-block;
  flex: none;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid var(--line);
  background-color: #f2f3f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 13v13' stroke='%23bfc5cf' stroke-width='3.6' stroke-linecap='round'/%3E%3Cpath d='M18.5 22.5 24 28l5.5-5.5' stroke='%23bfc5cf' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M15 33h18' stroke='%23bfc5cf' stroke-width='3.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 56%;
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.ph img.ok { opacity: 1; }
.ph.s36 { width: 36px; height: 36px; border-radius: 9px; background-size: 60%; }
.ph.s56 { width: 56px; height: 56px; border-radius: 13px; }
.ph.s72 { width: 72px; height: 72px; border-radius: 16px; }
.ph.s96 { width: 96px; height: 96px; border-radius: 22px; }
.card .meta { min-width: 0; flex: 1; }
.card .name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.card .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px;
  border-radius: 6px;
  padding: 1px 7px;
  background: rgba(0, 0, 0, 0.045);
  color: var(--muted);
}
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #fafafa; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.wide { width: 100%; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
}
.panel > h2 { font-size: 15px; margin-bottom: 4px; }
.panel > .hint { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

label.field { display: block; margin-bottom: 14px; }
label.field > span.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1); }

.filebox {
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
  background: #fcfcfd;
  transition: border-color 0.16s, background 0.16s;
}
.filebox:hover, .filebox.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.filebox.has { border-style: solid; border-color: var(--line-strong); background: #fff; color: var(--text); text-align: left; }
.filebox small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; }

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.check { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; cursor: pointer; }
.check input { margin: 4px 0 0; accent-color: var(--brand); }
.check small { display: block; color: var(--faint); font-size: 12px; line-height: 1.45; }

.note {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.note.info { background: var(--brand-soft); color: #16407e; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.err { background: var(--err-soft); color: var(--err); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note code { background: rgba(0, 0, 0, 0.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.steps { display: flex; flex-direction: column; gap: 0; margin: 6px 0 0; }
.step { display: flex; gap: 12px; padding: 9px 0; font-size: 13.5px; color: var(--faint); align-items: flex-start; }
.step .dot {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 10px; margin-top: 2px;
}
.step.doing { color: var(--brand); }
.step.doing .dot { border-color: var(--brand); animation: pulse 1.1s infinite; }
.step.done { color: var(--ok); }
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.err { color: var(--err); }
@keyframes pulse { 50% { opacity: 0.35; } }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt16 { margin-top: 16px; }
.hidden { display: none !important; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }

.install-card { max-width: 420px; margin: 40px auto; text-align: center; }
.install-card .big-icon {
  width: 96px; height: 96px; border-radius: 22px; object-fit: cover;
  border: 1px solid var(--line); background: #eceef1;
}
.install-card h1 { font-size: 20px; margin-top: 16px; }
.install-card .v { color: var(--muted); font-size: 13px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.install-card .qr { width: 168px; height: 168px; margin: 18px auto 0; display: block; border-radius: 10px; border: 1px solid var(--line); }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }

@media (max-width: 560px) {
  .wrap { padding: 0 14px 60px; }
  .hero h1 { font-size: 22px; }
  .top-inner { padding: 10px 14px; }
  .brand span { display: none; }
}
