:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1f2937;
  --sub: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: 30px;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px;
}
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--sub); font-size: 13px; }
.btn {
  display: block; width: 100%; padding: 13px; border: 0; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; margin-top: 10px;
}
.btn:active { background: var(--primary-dark); }
.btn.ghost { background: #eef2ff; color: var(--primary); }
.btn.gray { background: #f3f4f6; color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; color: var(--sub); margin: 12px 0 5px; }
input, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: var(--primary); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #f8fafc; border-radius: 12px; padding: 12px; text-align: center; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat .l { font-size: 12px; color: var(--sub); margin-top: 2px; }
.code-box {
  background: #eff6ff; border: 1px dashed #93c5fd; border-radius: 12px;
  padding: 14px; text-align: center; margin-top: 6px;
}
.code-box .code { font-size: 30px; font-weight: 800; letter-spacing: 5px; color: var(--primary); }
.item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.item:last-child { border-bottom: 0; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.tag.ok { background: #ecfdf5; color: var(--green); }
.tag.no { background: #fef2f2; color: var(--red); }
.tag.wait { background: #fffbeb; color: var(--amber); }
.q-stem { font-size: 17px; font-weight: 600; line-height: 1.55; margin-bottom: 14px; }
.opt {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px;
  margin-bottom: 9px; cursor: pointer; background: #fff; font-size: 15px;
}
.opt.on { border-color: var(--primary); background: #eff6ff; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.progress > i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.center { text-align: center; }
.big-score { font-size: 56px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.photo { width: 100%; border-radius: 12px; margin-top: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(17,24,39,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }
.hidden { display: none !important; }
