/* 扫码验收台。不联网，不引外部资源 —— 与 recorder-lab 共用同一套设计变量，
   但各自带一份：接入方通常只拷走其中一页，缺了样式就不成页面。 */

:root {
  color-scheme: dark light;
  --bg: #0e1116;
  --surface: #171b22;
  --surface-2: #1e232c;
  --line: #2a313c;
  --text: #e6eaf0;
  --muted: #8b95a5;
  --accent: #4da3ff;
  --ok: #4ad38a;
  --danger: #ff6b6b;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef1f6;
    --line: #dde2ea;
    --text: #131722;
    --muted: #5d6879;
    --accent: #0a6cd8;
    --ok: #128a4f;
    --danger: #c9342f;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* 中文字族列全一些：本页最终要跑在五个端上，而各端能拿到的中文字体不同。 */
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Heiti SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
        "Source Han Sans SC", "Helvetica Neue", sans-serif;
  padding-bottom: calc(24px + var(--safe-bottom));
  -webkit-text-size-adjust: 100%;
}

h1 { font-size: 17px; margin: 0; font-weight: 600; }
h2 { font-size: 13px; margin: 0 0 10px; font-weight: 600; letter-spacing: .04em;
     text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 8px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ok { color: var(--ok); }
.bad { color: var(--danger); }

/* ── 顶栏 ── */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: calc(12px + var(--safe-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-main { flex: 1; min-width: 0; }
.bar-main p { margin: 2px 0 0; font-size: 12.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--danger); }

main { padding: 16px; display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin: 0 auto; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

/* ── 按钮 ── */
.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
button {
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  min-height: 42px;
}
button:active { transform: scale(.97); }
button:disabled { opacity: .4; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 输入 ── */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
input {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 10px; min-height: 40px; width: 100%;
}

/* ── 格式选择 ──
   不用 :has()：老 WebView（二手平板上常见）不支持，靠 input:checked + span 就够 */
.choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.choice label { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0;
}
.choice span {
  display: inline-flex; align-items: center; min-height: 38px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 13.5px;
}
.choice input:checked + span {
  border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input:disabled + span { opacity: .4; cursor: default; }
