* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: #f0f4f8;
  color: #1f2937;
  min-height: 100vh;
  padding-bottom: 48px;
}
.container { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header.top {
  background: linear-gradient(135deg, #4f6ef7, #6a5cf5);
  color: #fff;
  padding: 28px 16px 24px;
  text-align: center;
  margin-bottom: 20px;
}
header.top h1 { font-size: 22px; font-weight: 700; }
header.top p { margin-top: 6px; font-size: 13px; opacity: .85; }
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(31,41,55,.08);
}
.card h2 { font-size: 16px; margin-bottom: 12px; color: #1f2937; }
.card h2 .tag { font-size: 12px; color: #6a5cf5; background: #eef0ff; padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
label { display: block; font-size: 13px; color: #555; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=tel], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: #6a5cf5; }
textarea { resize: vertical; min-height: 70px; }
button, .btn {
  display: inline-block;
  background: #4f6ef7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  margin-top: 14px;
  text-decoration: none;
  text-align: center;
}
button.full { width: 100%; }
button.ghost { background: #fff; color: #4f6ef7; border: 1px solid #4f6ef7; }
button.small { padding: 5px 12px; font-size: 13px; margin-top: 0; }
button.danger { background: #fff; color: #e04848; border: 1px solid #e04848; }
button:disabled { opacity: .5; cursor: not-allowed; }
.msg-error { background: #fdeaea; color: #c0392b; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-top: 10px; }
.msg-ok { background: #e8f7ee; color: #1e7e46; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 8px; text-align: left; border-bottom: 1px solid #eef1f5; }
th { color: #666; font-weight: 600; font-size: 13px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; }
.badge.ok { background: #e8f7ee; color: #1e7e46; }
.badge.no { background: #fdeaea; color: #c0392b; }
.badge.warn { background: #fff4e0; color: #b9770e; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs .tab {
  flex: 1; min-width: 100px; text-align: center; padding: 10px 8px;
  background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px; color: #555;
  border: 1px solid #e3e8ef; box-shadow: 0 1px 3px rgba(31,41,55,.06);
}
.tabs .tab.active { background: #4f6ef7; color: #fff; border-color: #4f6ef7; }
.q-item { border: 1px solid #eef1f5; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.q-item .q-topic { font-size: 12px; color: #6a5cf5; background: #eef0ff; padding: 2px 8px; border-radius: 20px; margin-right: 6px; }
.q-item .q-diff { font-size: 12px; color: #b9770e; background: #fff4e0; padding: 2px 8px; border-radius: 20px; }
.q-item .q-content { font-size: 16px; margin: 10px 0; line-height: 1.6; white-space: pre-wrap; }
.opt-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #e3e8ef; border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-size: 15px; }
.opt-row.sel { border-color: #4f6ef7; background: #eef0ff; }
.opt-row input { width: auto; }
.analysis-box { background: #f7f9fc; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #555; margin-top: 8px; line-height: 1.6; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-grid .stat { background: #fff; border-radius: 10px; padding: 14px; text-align: center; box-shadow: 0 1px 4px rgba(31,41,55,.08); }
.stat-grid .stat .num { font-size: 22px; font-weight: 700; color: #4f6ef7; }
.stat-grid .stat .lab { font-size: 12px; color: #888; margin-top: 4px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.bar-row .bar-name { width: 90px; color: #555; flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 10px; background: #edf0f5; border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: #4f6ef7; border-radius: 6px; }
.bar-row .bar-num { width: 64px; text-align: right; color: #666; flex-shrink: 0; font-size: 12px; }
.answer-ok { color: #1e7e46; font-weight: 600; }
.answer-no { color: #c0392b; font-weight: 600; }
.link-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #4f6ef7; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
.hidden { display: none !important; }
/* 图片查看器：flex 布局仅在未隐藏时生效，避免内联 display:flex 覆盖 .hidden */
#paperView, #imgView { display: flex; align-items: center; justify-content: center; }
#paperView.hidden, #imgView.hidden { display: none !important; }
.footer-tip { text-align: center; font-size: 12px; color: #999; margin-top: 20px; }
