:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --ink:#1f2a37;
  --muted:#6b7785;
  --line:#e6eaef;
  --brand:#0f766e;        /* 群智 teal */
  --brand-d:#0b5a54;
  --brand-soft:#e6f4f2;
  --tiger:#e8703a;
  --dolphin:#2f9bd6;
  --owl:#7c5cc4;
  --other:#9aa6b2;
  --warn:#c2410c;
  --good:#0f766e;
  --radius:16px;
  --shadow:0 6px 24px rgba(16,40,60,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",Arial,"Microsoft YaHei",sans-serif;
  background:var(--bg); color:var(--ink);
  font-size:16px; line-height:1.6;
  -webkit-text-size-adjust:100%; -webkit-font-smoothing:antialiased;
}
#app{max-width:560px; margin:0 auto; padding:0 16px 48px; min-height:100vh}

.topbar{display:flex; justify-content:center; padding:18px 0 6px}
.logo{height:34px; width:auto; object-fit:contain; opacity:.95}

.view{display:none; animation:fade .25s ease}
.view.active{display:block}
@keyframes fade{from{opacity:0; transform:translateY(6px)}to{opacity:1; transform:none}}

.card{
  background:var(--card); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:22px 18px; margin-top:12px;
}
.card.center{text-align:center}

h1{font-size:24px; margin:6px 0 4px; letter-spacing:.5px}
h2{font-size:20px; margin:0 0 10px}
h3.sec{font-size:16px; margin:22px 0 8px; color:var(--brand-d);
  padding-left:10px; border-left:3px solid var(--brand)}
.lead{color:var(--ink); margin:10px 0}
.muted{color:var(--muted); font-size:14px}
.req{color:#e11d48}

/* 表单 */
.form{display:flex; flex-direction:column; gap:14px; margin-top:18px}
.form label{display:flex; flex-direction:column; gap:6px; font-size:14px; color:var(--muted)}
.form input,.form textarea{
  font-size:16px; color:var(--ink); background:#fff;
  border:1px solid var(--line); border-radius:12px; padding:12px 14px; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.form input:focus,.form textarea:focus{border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft)}
.tip{margin:4px 0 0; text-align:center}
.err{color:#dc2626; font-size:14px; margin:0}

/* 按钮 */
.btn{
  -webkit-appearance:none; appearance:none; border:none; cursor:pointer;
  font-size:16px; font-weight:600; border-radius:12px; padding:14px 18px;
  transition:transform .05s, background .15s, opacity .15s;
}
.btn:active{transform:scale(.985)}
.btn.primary{background:var(--brand); color:#fff}
.btn.primary:disabled{background:#c2ccc9; cursor:not-allowed}
.btn.ghost{background:#fff; color:var(--brand); border:1px solid var(--line)}
.btn.ghost.small{font-size:14px; padding:14px 12px; color:var(--muted)}

/* 说明 */
.rules{margin:14px 0; padding-left:20px}
.rules li{margin:8px 0}
.example{background:var(--brand-soft); border-radius:12px; padding:14px 16px; margin:18px 0 22px}
.example-title{font-size:14px; color:var(--brand-d); font-weight:600; margin-bottom:10px}
.ex-row{display:flex; justify-content:space-between; align-items:center; padding:5px 0; font-size:14px; color:var(--ink)}
.ex-row b{color:var(--brand); font-size:16px}

/* 答题 */
.quiz-head{position:sticky; top:0; z-index:5; background:var(--bg); padding:10px 0 6px}
.progress{height:6px; background:#e3e8ec; border-radius:99px; overflow:hidden}
.progress-bar{height:100%; width:0; background:linear-gradient(90deg,var(--brand),#22a89c); border-radius:99px; transition:width .3s}
.progress-meta{display:flex; justify-content:space-between; margin-top:8px; font-size:13px}
.module{color:var(--brand-d); font-weight:600}
.counter{color:var(--muted)}

.stem{font-size:18px; font-weight:600; line-height:1.5; margin:4px 0 18px}

.options{display:flex; flex-direction:column; gap:18px}
.opt{}
.opt-top{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:8px}
.opt-text{font-size:15px; line-height:1.45}
.opt-val{
  flex:none; min-width:42px; height:34px; padding:0 8px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:18px; color:#fff; border-radius:10px; background:var(--brand);
  transition:background .15s, transform .1s;
}
.opt-val.zero{background:#cdd5da}
.opt input[type=range]{
  -webkit-appearance:none; appearance:none; width:100%; height:30px; background:transparent; margin:0;
}
.opt input[type=range]:focus{outline:none}
/* track */
.opt input[type=range]::-webkit-slider-runnable-track{height:8px; border-radius:99px; background:var(--track,#e3e8ec)}
.opt input[type=range]::-moz-range-track{height:8px; border-radius:99px; background:#e3e8ec}
.opt input[type=range]::-moz-range-progress{height:8px; border-radius:99px; background:var(--brand)}
/* thumb */
.opt input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:26px; height:26px; border-radius:50%;
  background:#fff; border:2px solid var(--brand); box-shadow:0 2px 6px rgba(0,0,0,.18);
  margin-top:-9px; cursor:pointer;
}
.opt input[type=range]::-moz-range-thumb{
  width:24px; height:24px; border-radius:50%; background:#fff; border:2px solid var(--brand);
  box-shadow:0 2px 6px rgba(0,0,0,.18); cursor:pointer;
}

.remaining{
  display:flex; align-items:baseline; justify-content:center; gap:6px;
  margin:22px 0 6px; padding:12px; border-radius:12px; background:#fff7ed; color:var(--warn);
  font-size:14px; font-weight:600; transition:background .2s, color .2s;
}
.remaining.done{background:var(--brand-soft); color:var(--brand-d)}
.rem-num{font-size:26px; font-weight:800}
.remaining.done .rem-num::after{content:" ✓"; font-size:16px}

.quiz-actions{display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:10px; margin-top:18px}
.quiz-actions .btn{padding:13px 6px}

/* 报告 */
.report-badge{display:inline-block; background:var(--brand-soft); color:var(--brand-d);
  font-size:13px; font-weight:600; padding:4px 12px; border-radius:99px; margin-bottom:8px}
#r-type{font-size:24px; color:var(--brand-d)}
.scores{display:flex; flex-direction:column; gap:10px; margin:16px 0 6px}
.score-row{display:flex; align-items:center; gap:10px}
.score-name{flex:none; width:64px; font-size:14px; font-weight:600}
.score-track{flex:1; height:14px; background:#eef1f4; border-radius:99px; overflow:hidden}
.score-fill{display:block; height:100%; min-width:6px; border-radius:99px; transition:width .6s ease}
.score-num{flex:none; width:34px; text-align:right; font-weight:700; font-size:14px}
.s-tiger .score-fill{background:var(--tiger)} .s-tiger .score-name{color:var(--tiger)}
.s-dolphin .score-fill{background:var(--dolphin)} .s-dolphin .score-name{color:var(--dolphin)}
.s-owl .score-fill{background:var(--owl)} .s-owl .score-name{color:var(--owl)}
.s-other .score-fill{background:var(--other)} .s-other .score-name{color:var(--other)}

.bullets{margin:8px 0; padding-left:4px; list-style:none}
.bullets li{position:relative; padding:6px 0 6px 22px}
.bullets li::before{content:""; position:absolute; left:4px; top:14px; width:7px; height:7px; border-radius:50%; background:var(--brand)}
.bullets.good li::before{background:var(--good)}
.bullets.warn li::before{background:var(--warn)}
.trybox{background:var(--brand-soft); border-radius:12px; padding:14px 16px; margin:6px 0}
.course{margin-top:24px; border-top:1px dashed var(--line); padding-top:8px}
.qr-wrap{text-align:center; margin-top:16px}
.qr{width:180px; height:180px; object-fit:contain; border-radius:12px; border:1px solid var(--line); background:#fff; padding:6px}
.cta{font-weight:600; color:var(--brand-d); margin-top:10px}

.check{width:64px; height:64px; line-height:64px; border-radius:50%; background:var(--brand-soft);
  color:var(--brand); font-size:34px; font-weight:800; margin:6px auto 12px}

/* 遮罩 */
.overlay{position:fixed; inset:0; background:rgba(255,255,255,.82); backdrop-filter:blur(2px);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; z-index:50; color:var(--muted)}
.overlay[hidden]{display:none}   /* 作者样式会盖过 UA 的 [hidden]，需显式隐藏 */
.spinner{width:38px; height:38px; border:4px solid var(--brand-soft); border-top-color:var(--brand); border-radius:50%; animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
