/* 仿问卷星手机端答题 —— 红色政务风 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #fff; color: #333; font-size: 15px; line-height: 1.6;
  max-width: 750px; margin: 0 auto;
}
.hidden { display: none !important; }
b { font-weight: 600; }

/* ---------- 说明页 ---------- */
.banner {
  background: linear-gradient(180deg, #e8544f 0%, #d02622 55%, #ffffff 100%);
  padding: 34px 20px 8px; text-align: center;
}
.banner-kicker { color: rgba(255,255,255,.92); font-size: 14px; letter-spacing: 2px; margin-bottom: 10px; }
.banner-title {
  color: #fff; font-size: 21px; font-weight: 700; line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.sheet { padding: 4px 16px 30px; background: #fff; }

.notice-card {
  background: #fdeeee; border-radius: 10px; padding: 16px 16px 12px; margin-top: 14px;
}
.notice-title {
  color: #d02622; font-weight: 700; font-size: 15px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.notice-title::before { content: ""; width: 4px; height: 14px; background: #d02622; border-radius: 2px; display: inline-block; }
.rules { list-style: none; }
.rules li { position: relative; padding-left: 14px; color: #7a4a44; font-size: 13px; margin-bottom: 4px; }
.rules li::before { content: "·"; position: absolute; left: 2px; font-weight: 700; }
.rules b { color: #d02622; }
.notice-meta { border-top: 1px dashed #f3c9c5; margin-top: 10px; padding-top: 10px; }
.notice-meta div { display: flex; font-size: 12.5px; line-height: 1.9; }
.notice-meta span { color: #a06b64; flex: 0 0 62px; }
.notice-meta b { color: #7a4a44; font-weight: 500; }

.prize-card { background: #fffaf0; border-radius: 10px; padding: 16px; margin-top: 12px; }
.prize-card .notice-title { color: #b8860b; }
.prize-card .notice-title::before { background: #e8b83a; }
.prizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.prize-item { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; border: 1px solid #f4e3bd; }
.prize-item b { color: #b8860b; display: block; font-size: 13px; }
.prize-item span { color: #8a6d3b; }
.prize-tip { color: #a9834e; font-size: 11.5px; margin-top: 10px; line-height: 1.7; }

.join-info { text-align: center; color: #999; font-size: 13px; margin: 16px 0 4px; }
.join-info b { color: #d02622; }

.btn-primary {
  display: block; width: 100%; border: none; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #e8544f, #d02622); color: #fff;
  font-size: 17px; font-weight: 600; letter-spacing: 2px;
  padding: 13px 0; border-radius: 24px; margin-top: 14px;
  box-shadow: 0 4px 12px rgba(208,38,34,.28);
}
.btn-primary:active { opacity: .85; }
.btn-primary.blue { background: #1487f8; box-shadow: 0 4px 10px rgba(20,135,248,.25); }
.btn-primary:disabled { background: #ccc; box-shadow: none; }
.btn-ghost {
  display: block; width: 100%; background: #fff; color: #666; cursor: pointer;
  border: 1px solid #ddd; font-size: 15px; padding: 11px 0; border-radius: 24px; margin-top: 12px;
}
.btn-ghost:active { background: #f7f7f7; }
.footer-note { text-align: center; color: #bbb; font-size: 11.5px; margin-top: 22px; line-height: 1.8; }

/* ---------- 答题页 ---------- */
.exam-topbar {
  position: sticky; top: 0; z-index: 20; background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 10px 16px 0;
}
.topbar-row { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.q-progress { font-size: 14px; color: #333; }
.q-progress b { color: #d02622; font-size: 17px; }
.answered-count { flex: 1; font-size: 12px; color: #999; }
.answered-count b { color: #1487f8; }
.total-timer {
  font-size: 17px; font-weight: 700; color: #d02622; font-variant-numeric: tabular-nums;
  background: #fdeeee; border-radius: 6px; padding: 2px 10px;
}
.total-timer.urgent { color: #fff; background: #d02622; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .55; } }
.total-bar { height: 3px; background: #f2f2f2; border-radius: 2px; overflow: hidden; margin-bottom: -1px; }
.total-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#e8544f,#d02622); transition: width .3s linear; }

.q-card { padding: 14px 16px 20px; }
.q-timer-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.q-timer-label { font-size: 12px; color: #999; flex: 0 0 auto; }
.q-timer-bar { flex: 1; height: 5px; background: #f2f2f2; border-radius: 3px; overflow: hidden; }
.q-timer-bar i { display: block; height: 100%; width: 100%; background: #1487f8; border-radius: 3px; }
.q-timer-num { font-size: 12.5px; color: #1487f8; font-variant-numeric: tabular-nums; flex: 0 0 30px; text-align: right; font-weight: 600; }
.q-timer-row.urgent .q-timer-num { color: #d02622; }
.q-timer-row.urgent .q-timer-bar i { background: #d02622; }

.q-title { font-size: 16px; font-weight: 600; line-height: 1.65; margin-bottom: 6px; }
.q-no { color: #d02622; font-weight: 700; }
.q-type { color: #d02622; font-weight: 400; font-size: 14px; }

.opts { margin-top: 4px; }
.opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 13px 10px; border-bottom: 1px solid #f2f2f2;
  cursor: pointer; transition: background .15s; border-radius: 6px; margin: 0 -10px;
}
.opt:last-child { border-bottom: none; }
.opt:active { background: #fafafa; }
.opt .opt-letter {
  flex: 0 0 22px; height: 22px; border: 1.5px solid #ccc; border-radius: 50%;
  color: #666; font-size: 12.5px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.opt .opt-text { flex: 1; font-size: 15px; color: #333; word-break: break-all; }
.opt.selected { background: #fdeeee; }
.opt.selected .opt-letter { background: #d02622; border-color: #d02622; color: #fff; }
.opt.selected .opt-text { color: #d02622; }
.exam-tip { text-align: center; color: #bbb; font-size: 12px; padding: 10px 0 30px; }

/* ---------- 成绩页 ---------- */
.score-wrap { text-align: center; padding: 34px 0 10px; }
.score-circle {
  width: 132px; height: 132px; margin: 0 auto; border-radius: 50%;
  background: conic-gradient(#d02622 var(--p, 0%), #fdeeee 0);
  display: flex; align-items: center; justify-content: center;
}
.score-circle > div, .score-inner {
  width: 112px; height: 112px; background: #fff; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#score-num { font-size: 44px; font-weight: 700; color: #d02622; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-circle em { font-style: normal; color: #d02622; font-size: 14px; }
.score-sub { color: #666; font-size: 14px; margin-top: 12px; }
.score-meta { color: #999; font-size: 12.5px; margin-top: 4px; }
.score-tags { margin-top: 10px; }
.tag { display: inline-block; font-size: 11.5px; border-radius: 4px; padding: 2px 8px; margin: 0 3px; }
.tag.warn { color: #b8860b; background: #fff7e6; }
.tag.bad { color: #d02622; background: #fdeeee; }
.tag.ok { color: #1487f8; background: #e8f3fe; }

.lottery-form { background: #fffaf0; border-radius: 10px; padding: 18px 16px; margin-top: 18px; }
.lottery-title { color: #b8860b; font-weight: 700; font-size: 16px; text-align: center; }
.lottery-desc { color: #a9834e; font-size: 12px; text-align: center; margin: 4px 0 12px; }
.form-row { display: flex; align-items: center; background: #fff; border: 1px solid #f4e3bd; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.form-row label { flex: 0 0 56px; color: #8a6d3b; font-size: 14px; }
.form-row input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; }
.form-err { color: #d02622; font-size: 12.5px; text-align: center; min-height: 18px; margin-top: 6px; }
.lottery-done { background: #e8f7ee; border-radius: 10px; padding: 18px 16px; margin-top: 18px; text-align: center; }
.lottery-done .lottery-title { color: #1a9c54; }
.lottery-done .lottery-desc { color: #4c8a68; }

/* ---------- 九宫格转盘 ---------- */
.lottery-wheel { background: #fff7f0; border: 1px solid #ffe0c2; border-radius: 12px; padding: 18px 14px; margin-top: 18px; }
.wheel-title { color: #d02622; font-weight: 700; font-size: 16.5px; text-align: center; }
.wheel-sub { color: #b08368; font-size: 12px; text-align: center; margin: 3px 0 14px; }
.grid9 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.g-cell {
  background: #fff; border-radius: 10px; border: 2px solid transparent;
  min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 6px 4px; transition: none;
}
.g-cell .g-icon { font-size: 26px; line-height: 1.2; }
.g-cell .g-icon svg { width: 26px; height: 26px; display: block; }
.g-cell .g-label { font-size: 13px; font-weight: 700; color: #d02622; }
.g-cell.none .g-label { color: #b3b3b3; }
.g-cell .g-gift { font-size: 10.5px; color: #c99b7e; transform: scale(.92); white-space: nowrap; }
.g-cell.on { border-color: #d02622; background: #fdeeee; box-shadow: 0 0 0 2px rgba(208,38,34,.15), 0 4px 10px rgba(208,38,34,.18); transform: scale(1.03); }
.g-center {
  background: linear-gradient(160deg, #e8544f, #d02622); color: #fff; cursor: pointer;
  border: none; outline: none; font-size: 17px; font-weight: 700; letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(208,38,34,.35);
}
.g-center:active { transform: scale(.97); }
.g-center:disabled { filter: grayscale(.4); opacity: .75; }
.wheel-tip { text-align: center; color: #c99b7e; font-size: 12px; margin-top: 12px; }
.wheel-tip.win { color: #d02622; font-weight: 600; }

.prize-modal { max-width: 320px; }
.prize-emoji { font-size: 52px; text-align: center; margin-bottom: 4px; }
.prize-modal .modal-title { font-size: 19px; }
.prize-modal .modal-body { color: #666; font-size: 13.5px; line-height: 1.8; text-align: left; }

.review { margin-top: 20px; }
.review-title { text-align: center; color: #1487f8; font-size: 14px; padding: 10px 0; cursor: pointer; }
.review-list .r-item { border-top: 1px solid #f2f2f2; padding: 12px 0; }
.r-q { font-size: 14px; line-height: 1.6; }
.r-q .q-no { margin-right: 2px; }
.r-ans { font-size: 13px; margin-top: 6px; }
.r-ans .mine { display: inline-block; padding: 1px 8px; border-radius: 4px; margin-right: 6px; }
.r-ans .right { display: inline-block; padding: 1px 8px; border-radius: 4px; margin-right: 6px; color: #1a9c54; background: #e8f7ee; }
.r-ans.wrong .mine { color: #d02622; background: #fdeeee; }
.r-ans.right-all .mine { color: #1a9c54; background: #e8f7ee; }
.r-ans .noans { color: #999; background: #f5f5f5; }

/* ---------- 记录页 ---------- */
.records-head {
  display: flex; align-items: center; padding: 14px 16px; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid #f2f2f2; position: sticky; top: 0; background: #fff;
}
.link-back { border: none; background: none; color: #1487f8; font-size: 15px; cursor: pointer; margin-right: 8px; }
.records-tip { padding: 10px 16px 0; color: #999; font-size: 12.5px; }
.rec-item { margin: 10px 16px; border: 1px solid #f2f2f2; border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; }
.rec-score { flex: 0 0 64px; text-align: center; border-right: 1px solid #f2f2f2; margin-right: 12px; }
.rec-score b { font-size: 22px; color: #d02622; }
.rec-score span { display: block; font-size: 11px; color: #999; }
.rec-info { flex: 1; font-size: 12.5px; color: #666; line-height: 1.8; }
.rec-info .t { color: #999; font-size: 11.5px; }
.rec-empty { text-align: center; color: #bbb; padding: 60px 0; font-size: 14px; }

/* ---------- 弹层 ---------- */
.toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; z-index: 99; max-width: 80vw; text-align: center;
}
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 30px; }
.modal { background: #fff; border-radius: 12px; padding: 22px 18px 18px; width: 100%; max-width: 320px; text-align: center; }
.modal-title { font-size: 16px; font-weight: 700; color: #d02622; margin-bottom: 8px; }
.modal-body { color: #666; font-size: 14px; margin-bottom: 14px; }
