* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #222;
  font-size: 16px; /* ≥16 防 iOS 输入聚焦自动放大 */
  -webkit-text-size-adjust: 100%;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: #00a1d6; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.brand { font-weight: 700; font-size: 18px; }
.container {
  max-width: 640px; margin: 0 auto; padding: 12px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
.card {
  background: #fff; border-radius: 12px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card h2 {
  margin: 0 0 12px; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center;
}
label { display: block; margin: 8px 0; font-size: 14px; color: #555; }
input, select {
  display: block; width: 100%; padding: 10px 12px; margin-top: 4px;
  border: 1px solid #ddd; border-radius: 8px; font-size: 16px; background: #fff;
}
input:disabled { background: #f2f3f5; color: #aaa; }
button {
  min-height: 44px; padding: 0 16px; border: none; border-radius: 8px;
  font-size: 15px; cursor: pointer; background: #eef0f2; color: #333;
}
button.primary { background: #00a1d6; color: #fff; }
button.ghost { background: #fff; color: #00a1d6; border: 1px solid #00a1d6; }
button.link-btn { background: transparent; color: #fff; min-height: auto; padding: 4px 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row button { flex: 1; min-width: 90px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.inline-form input { width: auto; flex: 1; min-width: 120px; margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 8px; }
.grid2 > div { font-size: 14px; }
.grid2 .k { color: #888; display: block; font-size: 12px; }
.grid2 .v { font-weight: 600; word-break: break-all; }
.field { margin-bottom: 14px; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row input { flex: 1; margin-top: 0; }
.hint { color: #999; font-weight: normal; font-size: 12px; }
.help { margin-top: 6px; font-size: 13px; color: #888; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.checkbox {
  display: flex; align-items: center; gap: 6px; margin: 0;
  padding: 8px 12px; background: #f4f5f7; border-radius: 8px; font-size: 14px;
}
.checkbox input { width: auto; margin: 0; }
.uid-list { list-style: none; padding: 0; margin: 0 0 12px; }
.uid-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-weight: 600;
}
.uid-list .muted { color: #999; justify-content: center; border: none; font-weight: normal; }
.logs {
  background: #1e1e1e; color: #d4d4d4; padding: 12px; border-radius: 8px;
  font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.5;
  max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0;
}
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 20px; border-radius: 24px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; font-size: 14px;
  max-width: 90vw;
}
.toast.show { opacity: 1; }
.toast.err { background: #e74c3c; }
.toast.ok { background: #27ae60; }
