* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f6f7f9; color: #1c2430; }
#topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: #166534; color: #fff; position: sticky; top: 0; z-index: 10; }
.brand { font-size: 19px; font-weight: 700; cursor: pointer; }
.top-actions { display: flex; gap: 8px; align-items: center; }
#whoami { font-size: 13px; opacity: .9; }
main { max-width: 880px; margin: 0 auto; padding: 20px 16px 60px; }
.hidden { display: none !important; }
.btn { background: #166534; color: #fff; border: none; border-radius: 8px; padding: 9px 18px; font-size: 15px; cursor: pointer; }
.btn:hover { background: #14532d; }
.btn.small { padding: 5px 12px; font-size: 13px; background: rgba(255,255,255,.18); }
.btn.small:hover { background: rgba(255,255,255,.3); }
.btn.ghost { background: #fff; color: #166534; border: 1px solid #166534; }
.btn.danger { background: #b91c1c; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.card.clickable { cursor: pointer; }
.card.clickable:hover { box-shadow: 0 3px 12px rgba(0,0,0,.13); }
h1 { font-size: 24px; margin: 6px 0 14px; }
h2 { font-size: 19px; margin: 4px 0 10px; }
h3 { font-size: 16px; margin: 12px 0 8px; }
.muted { color: #6b7280; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
input[type=text], input[type=password] { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.err { color: #b91c1c; font-size: 14px; min-height: 18px; }
.qstem { font-size: 17px; line-height: 1.65; white-space: pre-wrap; }
.qfig { max-width: 100%; margin: 10px 0; border: 1px solid #e5e7eb; border-radius: 8px; background:#fff; }
.opt { display: block; width: 100%; text-align: left; padding: 11px 14px; margin: 7px 0; border: 1.5px solid #d1d5db; border-radius: 9px; background: #fff; font-size: 15.5px; cursor: pointer; }
.opt:hover { border-color: #166534; }
.opt.selected { border-color: #166534; background: #f0fdf4; }
.opt.correct { border-color: #16a34a; background: #dcfce7; }
.opt.wrong { border-color: #dc2626; background: #fee2e2; }
.feedback { border-radius: 10px; padding: 14px 16px; margin-top: 14px; line-height: 1.7; white-space: pre-wrap; }
.feedback.ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.feedback.bad { background: #fef2f2; border: 1px solid #fecaca; }
.feedback h4 { margin: 8px 0 3px; font-size: 14px; color: #166534; }
.feedback.bad h4 { color: #b91c1c; }
.progressline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; flex: 1; margin: 0 12px; }
.bar > div { height: 100%; background: #16a34a; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; border-bottom: 1px solid #eef0f2; text-align: left; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f9fafb; }
.tag { display: inline-block; background: #ecfdf5; color: #166534; border-radius: 20px; padding: 2px 10px; font-size: 12.5px; margin: 2px 3px 2px 0; }
.timer { font-size: 20px; font-weight: 700; color: #b91c1c; font-variant-numeric: tabular-nums; }
.navnums { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.navnums button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; font-size: 13.5px; }
.navnums button.done { background: #dcfce7; border-color: #16a34a; }
.navnums button.cur { border-color: #166534; border-width: 2px; font-weight: 700; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #f9fafb; border-radius: 10px; padding: 12px; text-align: center; }
.stat b { font-size: 22px; display: block; color: #166534; }
.btn.small2 { padding: 5px 12px; font-size: 13px; }
.tag-coming { background: #fef3c7; color: #92400e; }
.coming-card { opacity: .75; }
.footlink { text-align: center; margin-top: 26px; }
.footlink a { color: #6b7280; font-size: 13px; }
