* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #000;
  background: #f5f5f5;
}
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* 封面 */
.cover-inner {
  max-width: 720px; margin: 0 auto; padding: 24px 18px 40px;
  text-align: center; color: #000;
}
.cover-title {
  font-size: 22px; line-height: 1.5; font-weight: 700; text-align: center;
  margin: 18px 0 14px; color: #000;
}
.health { font-size: 14px; color: #000; margin: 6px 0 18px; }
.health.ok::before { content: "● "; color: #1a7f37; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 18px; }
#qrImg { width: 200px; height: 200px; border: 1px solid #ccc; background: #fff; }
.site-url { font-size: 13px; color: #000; word-break: break-all; margin: 0; }
.cover-actions { display: flex; gap: 14px; justify-content: center; margin: 10px 0 18px; flex-wrap: wrap; }

.btn-primary, .btn-secondary, .btn-link {
  border: none; cursor: pointer; font-size: 15px; border-radius: 8px; padding: 12px 22px;
}
.btn-primary { background: #1f6feb; color: #fff; }
.btn-secondary { background: #fff; color: #000; border: 1px solid #1f6feb; }
.btn-link { background: transparent; color: #1f6feb; text-decoration: underline; padding: 8px 10px; }

.notice {
  text-align: left; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px;
  padding: 14px 16px; margin: 12px auto; max-width: 600px; color: #000; font-size: 14px; line-height: 1.7;
}
.notice-title { font-weight: 700; margin: 0 0 6px; }
.notice p { margin: 0; }

.footer-lines { margin-top: 30px; text-align: center; color: #000; font-size: 13px; line-height: 1.9; }
.footer-lines p { margin: 0; }
.footer-lines p:last-child { white-space: nowrap; }
@media (max-width: 480px) {
  .footer-lines p:last-child { font-size: 11px; }
}

/* 卡片通用 */
.card {
  max-width: 600px; margin: 30px auto; background: #fff; border-radius: 12px;
  padding: 22px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.card.center { text-align: center; }
.card h2 { text-align: center; margin-top: 0; }
.card label { display: block; margin: 14px 0; font-size: 15px; }
.card input[type=text], .card input[type=number] {
  width: 100%; padding: 10px; margin-top: 6px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px;
}
.unit { margin-left: 6px; }
.field { margin: 14px 0; font-size: 15px; }
.gender-btn {
  border: 1px solid #ccc; background: #fff; border-radius: 8px; padding: 8px 20px; margin-left: 8px; cursor: pointer; font-size: 15px;
}
.gender-btn.active { background: #1f6feb; color: #fff; border-color: #1f6feb; }

/* 答题 */
.quiz-wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; }
.progress { height: 8px; background: #e0e0e0; border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: #1f6feb; transition: width .2s; }
.nav-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; justify-content: center; }
.nav-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #ccc; background: #fff;
  font-size: 13px; cursor: pointer; color: #000;
}
.nav-dot.active { background: #1f6feb; color: #fff; border-color: #1f6feb; }
.nav-dot.answered { border-color: #1a7f37; color: #1a7f37; }
.q-card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.q-index { font-size: 13px; color: #666; margin-bottom: 8px; }
.q-text { font-size: 17px; line-height: 1.6; margin: 0 0 16px; color: #000; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  border: 1px solid #ccc; border-radius: 8px; padding: 14px; font-size: 15px; cursor: pointer; text-align: left; background: #fff; color: #000;
}
.option.active { border-color: #1f6feb; background: #eaf2ff; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 20px; }

/* 报告 */
.report-wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.report-head { display: flex; justify-content: space-between; align-items: center; }
.report-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.name-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.name-list.hidden { display: none; }
.name-chip {
  border: 1px solid #1f6feb; color: #1f6feb; background: #fff; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 14px;
}
.name-chip.active { background: #1f6feb; color: #fff; }
.report-view { background: #fff; border-radius: 12px; padding: 18px; margin-top: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.report-view h3 { text-align: center; }
.stat-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.stat-table th, .stat-table td { border: 1px solid #ccc; padding: 6px 4px; text-align: center; }
.report-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-mask.hidden { display: none; }
.modal { background: #fff; border-radius: 12px; padding: 22px; width: 300px; text-align: center; color: #000; }
.modal p { margin: 0 0 12px; font-weight: 700; }
.modal input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
.pwd-err { color: #c00; font-size: 13px; min-height: 16px; font-weight: 400; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }

@media (max-width: 480px) {
  .cover-title { font-size: 19px; }
  .btn-primary, .btn-secondary { padding: 11px 18px; font-size: 14px; }
}

/* 报告页：个人 / 学校两块 */
.report-block { margin-top: 18px; }
.report-block h3 { margin: 0 0 10px; }
.report-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.report-row select {
  padding: 9px 10px; font-size: 15px; border: 1px solid #000;
  border-radius: 8px; background: #fff; color: #000; max-width: 240px;
}
.btn-danger {
  padding: 10px 18px; font-size: 15px; border-radius: 10px; cursor: pointer;
  background: #000; color: #fff; border: 1px solid #000;
}
