/* 申论智评 H5 — 移动端优先 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body { font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; background:#f7f8fa; color:#12263f; }
#app { max-width:520px; margin:0 auto; height:100vh; height:100dvh; background:#f7f8fa; position:relative; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 0 40px rgba(18,38,63,.08); }

.view { flex:1; display:flex; flex-direction:column; height:100%; overflow:hidden; }
.scroll { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* 组件 */
.navbar { background:#fff; border-bottom:1px solid #e8ecf1; padding:14px 16px; display:flex; align-items:center; gap:10px; position:sticky; top:0; z-index:20; }
.navbar .back { font-size:22px; color:#1d4ed8; cursor:pointer; padding:0 6px; user-select:none; }
.navbar .title { font-size:16px; font-weight:700; flex:1; }
.btn { display:block; width:100%; padding:14px; border:none; border-radius:12px; font-size:16px; font-weight:700; cursor:pointer; font-family:inherit; transition:opacity .15s; }
.btn:active { opacity:.85; }
.btn-primary { background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; }
.btn-ghost { background:#fff; color:#1d4ed8; border:1px solid #bfdbfe; }
.btn[disabled] { opacity:.5; pointer-events:none; }
.card { background:#fff; border-radius:14px; padding:16px; margin:12px 16px; box-shadow:0 2px 10px rgba(18,38,63,.05); }

/* 首页 */
.hero { background:linear-gradient(150deg,#1e3a8a,#2563eb 60%,#3b82f6); padding:30px 20px 32px; color:#fff; border-radius:0 0 28px 28px; }
.hero .logo { font-size:23px; font-weight:800; letter-spacing:1px; display:flex; align-items:center; gap:8px; }
.hero .logo .bd { font-size:11px; background:rgba(255,255,255,.18); padding:3px 9px; border-radius:6px; font-weight:400; }
.hero .slogan { font-size:13px; opacity:.88; margin-top:10px; line-height:1.8; }
.hero .meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; font-size:11px; }
.hero .meta span { background:rgba(255,255,255,.14); padding:4px 11px; border-radius:16px; }
.sec-title { font-size:15px; font-weight:800; margin:20px 16px 4px; display:flex; align-items:center; gap:7px; }
.sec-title::before { content:""; width:4px; height:15px; background:#2563eb; border-radius:2px; }
.sec-title small { font-weight:400; color:#9aa8ba; font-size:11px; }
.job-card { display:flex; align-items:center; gap:12px; background:#fff; border-radius:14px; padding:15px 14px; margin:10px 16px; box-shadow:0 2px 10px rgba(18,38,63,.05); cursor:pointer; transition:transform .12s; }
.job-card:active { transform:scale(.98); }
.job-card .ico { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:21px; flex-shrink:0; }
.job-card .info { flex:1; min-width:0; }
.job-card .name { font-size:15px; font-weight:800; }
.job-card .desc { font-size:11.5px; color:#7a8ba0; margin-top:3px; line-height:1.55; }
.job-card .arrow { color:#c3ccd8; font-size:20px; }
.quick-row { display:flex; gap:10px; margin:10px 16px; }
.quick-item { flex:1; background:#fff; border-radius:12px; padding:13px 8px; text-align:center; box-shadow:0 2px 8px rgba(18,38,63,.05); cursor:pointer; }
.quick-item:active { transform:scale(.97); }
.quick-item .qi { font-size:21px; }
.quick-item .qt { font-size:11px; color:#5b6b7f; margin-top:5px; }
.foot-note { text-align:center; font-size:10.5px; color:#9aa8ba; padding:16px 30px 26px; line-height:1.9; }

/* 输入页 */
.seg { display:flex; background:#e8edf5; border-radius:10px; padding:3px; margin:12px 16px 0; }
.seg div { flex:1; text-align:center; font-size:12.5px; padding:8px 0; border-radius:8px; color:#5b6b7f; cursor:pointer; }
.seg div.on { background:#fff; color:#1d4ed8; font-weight:800; box-shadow:0 1px 4px rgba(18,38,63,.08); }
.field { margin:14px 16px 0; }
.field label { font-size:13px; font-weight:700; display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px; }
.field label .req { color:#e11d48; margin-left:2px; }
.field label .hint { font-size:11px; color:#9aa8ba; font-weight:400; }
.field textarea { width:100%; margin-top:8px; border:1px solid #dde4ee; border-radius:10px; padding:11px 12px; font-size:14px; background:#fff; font-family:inherit; resize:vertical; transition:border .15s; }
.field textarea:focus { outline:none; border-color:#60a5fa; }
.wordcount { font-size:11px; color:#9aa8ba; text-align:right; margin-top:6px; }
.wordcount .ok { color:#059669; font-weight:700; }
.wordcount .warn { color:#d97706; font-weight:700; }
.material-toggle { font-size:12.5px; color:#1d4ed8; text-align:center; margin:12px 16px 0; cursor:pointer; padding:6px; }
.submit-bar { padding:12px 16px 22px; background:linear-gradient(to top,#f7f8fa 78%,rgba(247,248,250,0)); }

/* 阅卷中 */
.grading-wrap { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:0 26px; text-align:center; }
.pulse { width:110px; height:110px; border-radius:50%; background:radial-gradient(circle,#dbeafe,#eff6ff); display:flex; align-items:center; justify-content:center; font-size:44px; position:relative; }
.pulse::after { content:""; position:absolute; inset:-14px; border:2px solid #bfdbfe; border-radius:50%; animation:pl 1.6s ease-out infinite; }
@keyframes pl { 0%{transform:scale(.7);opacity:1} 100%{transform:scale(1.25);opacity:0} }
.g-title { font-size:17px; font-weight:800; margin-top:26px; }
.g-sub { font-size:12.5px; color:#7a8ba0; margin-top:8px; line-height:1.8; }
.steps { width:100%; margin-top:28px; }
.step { display:flex; align-items:center; gap:12px; background:#fff; border-radius:12px; padding:12px 14px; margin-bottom:10px; box-shadow:0 2px 8px rgba(18,38,63,.05); text-align:left; }
.step .si { width:30px; height:30px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:14px; background:#e8edf5; color:#7a8ba0; }
.step.done .si { background:#d1fae5; color:#059669; }
.step.doing .si { background:#dbeafe; color:#1d4ed8; animation:bk 1.1s infinite; }
@keyframes bk { 50%{opacity:.45; } }
.step .n { font-size:13.5px; font-weight:700; }
.step.doing .n { color:#1d4ed8; }
.step .d { font-size:11px; color:#9aa8ba; margin-top:2px; }

/* 报告页 */
.score-hero { background:linear-gradient(150deg,#1e3a8a,#2563eb); padding:24px 16px 28px; color:#fff; text-align:center; }
.grade-badge { display:inline-block; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.35); padding:5px 18px; border-radius:20px; font-size:12.5px; letter-spacing:2px; font-weight:700; }
.score-num { font-size:58px; font-weight:800; margin-top:10px; line-height:1; }
.score-num small { font-size:19px; font-weight:400; opacity:.7; }
.range { font-size:11.5px; opacity:.85; margin-top:8px; line-height:1.7; }
.rangebar { width:230px; height:6px; background:rgba(255,255,255,.25); border-radius:3px; margin:10px auto 0; position:relative; }
.rangebar i { position:absolute; top:-4px; width:3px; height:14px; background:#fde047; border-radius:2px; }
.engine-tip { font-size:11px; margin-top:12px; background:rgba(255,255,255,.12); border-radius:8px; display:inline-block; padding:5px 12px; }
.dim-card { background:#fff; border-radius:12px; margin:8px 16px; padding:13px 14px; box-shadow:0 2px 8px rgba(18,38,63,.05); }
.dim-card .hd { display:flex; align-items:baseline; }
.dim-card .nm { font-size:13.5px; font-weight:800; flex:1; }
.dim-card .sc { font-size:16px; font-weight:800; color:#1d4ed8; }
.dim-card .sc small { font-size:11px; color:#9aa8ba; font-weight:400; }
.bar { height:5px; background:#eef2f7; border-radius:3px; margin-top:8px; overflow:hidden; }
.bar i { display:block; height:100%; background:linear-gradient(90deg,#60a5fa,#2563eb); border-radius:3px; transition:width .8s ease; }
.ev { margin-top:8px; background:#fffbeb; border-left:3px solid #f59e0b; padding:8px 10px; font-size:11.5px; color:#5b6b7f; line-height:1.75; border-radius:0 8px 8px 0; }
.ev b { color:#b45309; }
.cmt { font-size:11.5px; color:#5b6b7f; margin-top:7px; line-height:1.75; }
.hit-card { background:#fffbeb; border:1px solid #fde68a; border-radius:12px; margin:8px 16px; padding:13px 14px; }
.hit-card .hi { display:flex; gap:8px; margin-top:9px; font-size:11.5px; color:#5b6b7f; line-height:1.75; }
.hit-card .no { width:18px; height:18px; border-radius:50%; background:#f59e0b; color:#fff; font-size:11px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; }
.act-card { background:#fff; border-radius:12px; margin:8px 16px; padding:13px 14px; box-shadow:0 2px 8px rgba(18,38,63,.05); }
.act { display:flex; gap:8px; padding:8px 0; font-size:12px; color:#40506a; line-height:1.65; border-bottom:1px dashed #eef2f7; }
.act:last-child { border-bottom:none; }
.gain { flex-shrink:0; color:#059669; font-weight:800; font-size:11px; background:#d1fae5; border-radius:6px; padding:2px 7px; height:fit-content; margin-top:1px; white-space:nowrap; }
.gate { display:flex; align-items:center; gap:8px; padding:6px 0; font-size:12px; color:#40506a; }
.gate .r { margin-left:auto; font-size:11px; font-weight:700; }
.pass { color:#059669; } .fail { color:#e11d48; }
.overall { font-size:12.5px; line-height:1.9; color:#40506a; }
.rep-actions { display:flex; gap:10px; padding:14px 16px 24px; }
.rep-actions .btn { font-size:14px; padding:12px; }

/* 历史 */
.hist-item { background:#fff; border-radius:12px; margin:10px 16px; padding:13px 14px; box-shadow:0 2px 8px rgba(18,38,63,.05); cursor:pointer; display:flex; align-items:center; gap:12px; }
.hist-item .hs { font-size:22px; font-weight:800; color:#1d4ed8; width:56px; text-align:center; flex-shrink:0; }
.hist-item .hs small { font-size:10px; color:#9aa8ba; font-weight:400; display:block; }
.hist-item .hi-info { flex:1; min-width:0; }
.hist-item .t { font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hist-item .m { font-size:11px; color:#9aa8ba; margin-top:3px; }
.hist-item .del { color:#c3ccd8; font-size:16px; padding:6px; }

/* 标准页 */
.rubric-tb { width:100%; border-collapse:collapse; font-size:11.5px; background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(18,38,63,.05); margin:10px 0; }
.rubric-tb th,.rubric-tb td { padding:9px 10px; border-bottom:1px solid #eef2f7; text-align:left; line-height:1.6; }
.rubric-tb th:first-child,.rubric-tb td:first-child { white-space:nowrap; }
.rubric-tb th:nth-child(2),.rubric-tb td:nth-child(2) { white-space:nowrap; width:64px; }
.rubric-tb th { background:#eff6ff; color:#1e3a8a; font-size:11px; }
.empty { text-align:center; color:#9aa8ba; font-size:12.5px; padding:50px 30px; line-height:2; }

/* 校验提示块（暴露问题，不做自动修正） */
.warn-block { margin:10px 16px 0; background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:11px 13px; font-size:11.5px; color:#92400e; line-height:1.75; }
.warn-block b { display:block; margin-bottom:4px; color:#b45309; }
.warn-block ul { padding-left:16px; }

/* 错误横幅 */
.err-banner { margin:12px 16px 0; background:#fef2f2; border:1px solid #fecaca; border-left:4px solid #e11d48; border-radius:10px; padding:11px 12px; font-size:12px; color:#9f1239; line-height:1.7; }
.err-banner button { margin-top:8px; background:#e11d48; color:#fff; border:none; border-radius:8px; padding:7px 14px; font-size:12px; font-weight:700; font-family:inherit; cursor:pointer; }

.toast { position:fixed; left:50%; bottom:80px; transform:translateX(-50%); background:rgba(18,38,63,.92); color:#fff; font-size:13px; padding:10px 20px; border-radius:24px; z-index:99; animation:ts .25s; max-width:80%; text-align:center; }
@keyframes ts { from{opacity:0; transform:translate(-50%,8px);} }

@media print {
  body * { visibility:hidden; }
  #printArea, #printArea * { visibility:visible; }
  #printArea { position:absolute; left:0; top:0; width:100%; }
}
