* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { background: #e8ebf0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; display: flex; justify-content: center; }
#phone { width: 400px; max-width: 100vw; min-height: 100vh; background: #f7f8fa; display: flex; flex-direction: column; box-shadow: 0 0 24px rgba(0,0,0,.08); }

#topbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #eef0f3; position: sticky; top: 0; z-index: 10; }
#btn-home { border: none; background: none; font-size: 18px; cursor: pointer; }
#progress-wrap { flex: 1; height: 8px; background: #eceff3; border-radius: 4px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: linear-gradient(90deg,#4a7dff,#6fd08c); border-radius: 4px; transition: width .3s; }
#step-label { font-size: 12px; color: #9aa3af; min-width: 44px; text-align: right; }

#screen { flex: 1; padding: 16px 16px 40px; }
h1 { font-size: 22px; margin-bottom: 4px; }
.sub { color: #8a93a0; font-size: 13px; margin-bottom: 18px; }

/* ---- map ---- */
.brand { text-align: center; padding: 18px 0 6px; }
.brand .slogan { display: inline-block; background: #1f2733; color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 999px; letter-spacing: 1px; }
.module { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid #eef0f3; }
.module .ico { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #eef3ff; flex-shrink: 0; }
.module .info { flex: 1; }
.module .name { font-weight: 600; font-size: 15px; }
.module .desc { font-size: 12px; color: #9aa3af; margin-top: 2px; }
.module button { border: none; border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.module .go { background: #4a7dff; color: #fff; }
.module .lock { background: #f0f2f5; color: #a5adb8; }
.module.dim { opacity: .68; }
.free-tag { font-size: 11px; color: #12924f; background: #e5f7ec; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

/* ---- cards ---- */
.card { border-radius: 16px; padding: 20px 18px; margin-bottom: 14px; color: #23303f; position: relative; }
.card .ctype { font-size: 12px; font-weight: 700; letter-spacing: 2px; opacity: .75; margin-bottom: 8px; }
.card h2 { font-size: 19px; margin-bottom: 12px; }
.card p, .card li { font-size: 14.5px; line-height: 1.75; }
.card ul, .card ol { padding-left: 20px; margin: 8px 0; }
.card .formula { background: rgba(255,255,255,.75); border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 15px; margin: 10px 0; text-align: center; }
.card .warn { font-size: 13.5px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.6); }
.card .extitle { font-size: 12px; font-weight: 700; letter-spacing: 2px; opacity: .6; margin: 14px 0 6px; }
.card .exti { background: rgba(255,255,255,.85); border-left: 3px solid #4a7dff; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.8; }
.card-blue { background: linear-gradient(135deg,#e3edff,#d3e2ff); border: 1px solid #b9d0ff; }
.card-green { background: linear-gradient(135deg,#e2f6e9,#d0efdc); border: 1px solid #aee0c2; }
.card-gold { background: linear-gradient(135deg,#fdf3d7,#fbe9b8); border: 1px solid #edd489; }
.tree { background: rgba(255,255,255,.8); border-radius: 10px; padding: 12px; font-size: 13.5px; line-height: 1.9; }

/* ---- question ---- */
.qmeta { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #eef0f3; color: #6b7684; }
.tag.diff { background: #fff1e3; color: #d97a1f; }
.tag.boss { background: #ffe7e7; color: #d64545; }
.tag.rescue { background: #e5f7ec; color: #12924f; }
.stem { background: #fff; border-radius: 14px; padding: 16px; font-size: 15px; line-height: 1.8; border: 1px solid #eef0f3; margin-bottom: 14px; white-space: pre-line; }
.opt { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid #e6e9ee; border-radius: 12px; padding: 13px 14px; font-size: 15px; margin-bottom: 10px; cursor: pointer; transition: all .15s; }
.opt:not(:disabled):hover { border-color: #4a7dff; }
.opt.right { border-color: #2eaf68; background: #eafaf1; font-weight: 600; }
.opt.wrong { border-color: #e05656; background: #fdecec; }
.opt:disabled { cursor: default; }

.panel { border-radius: 14px; padding: 16px; margin: 6px 0 14px; font-size: 14.5px; line-height: 1.8; }
.panel.good { background: #eafaf1; border: 1px solid #bfe8d1; }
.panel.bad { background: #fdf0ef; border: 1px solid #f2cfcb; }
.panel .ptitle { font-weight: 700; margin-bottom: 6px; }
.panel .kaochang { background: #fff; border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 13.5px; }
.pos-line { color: #4a7dff; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.fline { background: #fffbea; border: 1px dashed #e0c56e; border-radius: 8px; padding: 9px 12px; margin: 8px 0; font-size: 14px; text-align: center; }

.btn { display: block; width: 100%; border: none; border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.btn.primary { background: #4a7dff; color: #fff; }
.btn.green { background: #2eaf68; color: #fff; }
.btn.ghost { background: #fff; color: #4a7dff; border: 1.5px solid #4a7dff; }

/* ---- report ---- */
.report { background: #fff; border-radius: 16px; padding: 24px 18px; text-align: center; border: 1px solid #eef0f3; }
.report .big { font-size: 34px; font-weight: 800; margin: 6px 0; }
.arrow-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; }
.score-box { background: #f5f7fa; border-radius: 12px; padding: 12px 18px; }
.score-box .lab { font-size: 12px; color: #9aa3af; }
.score-box .val { font-size: 26px; font-weight: 800; }
.score-box.post .val { color: #2eaf68; }
.report .tagline { color: #6b7684; font-size: 14px; margin: 10px 0 16px; }
#share-canvas { display: none; }

.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: rgba(31,39,51,.92); color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px; z-index: 99; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 16px; padding: 22px 18px; width: 300px; text-align: center; }
.modal input { width: 100%; border: 1.5px solid #e6e9ee; border-radius: 10px; padding: 12px; font-size: 15px; margin: 12px 0; text-align: center; }
.modal .hint { font-size: 12px; color: #9aa3af; margin-top: 8px; }
