/* 能赢么 H5 · 公安蓝主题 */
:root { --blue:#164a8c; --blue2:#1e5aa8; --line:#e3e9f3; --txt:#1f2a3d; --sub:#7a8699; --bg:#f2f5fa; }
* { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
body { background:var(--bg); color:var(--txt); font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; font-size:17px; line-height:1.6; }
.page { max-width:480px; margin:0 auto; min-height:100vh; }

.hero { background:linear-gradient(160deg,var(--blue),var(--blue2)); color:#fff; padding:34px 24px 26px; border-radius:0 0 22px 22px; }
.hero-title { font-size:26px; font-weight:700; letter-spacing:2px; }
.hero-sub { font-size:14px; opacity:.85; margin-top:6px; }

.card { background:#fff; border-radius:14px; margin:14px 14px 0; padding:18px 16px; box-shadow:0 2px 10px rgba(22,74,140,.06); }
.sec { font-size:16px; font-weight:700; color:var(--blue); margin:10px 0 10px; }
.sec:first-child { margin-top:0; }
.sec .tip { font-size:12px; color:var(--sub); font-weight:400; margin-left:6px; }

.sel { width:100%; height:46px; border:1px solid var(--line); border-radius:10px; padding:0 12px; font-size:16px; color:var(--txt); background:#fbfcfe; appearance:none; }
.sel:disabled { opacity:.5; }
.region3 { display:flex; gap:8px; }
.region3 .sel { flex:1; min-width:0; padding:0 8px; }

.q { margin-bottom:14px; }
.q label { display:block; font-size:14px; color:var(--sub); margin-bottom:8px; }
.opts { display:flex; flex-wrap:wrap; gap:8px; }
.opts button { flex:1; min-width:72px; height:42px; border:1px solid var(--line); border-radius:10px; background:#fbfcfe; font-size:15px; color:var(--txt); }
.opts button.on { background:var(--blue); border-color:var(--blue); color:#fff; font-weight:600; }

.ta { width:100%; border:1px solid var(--line); border-radius:10px; padding:12px; font-size:16px; background:#fbfcfe; resize:none; }
.ta-count { text-align:right; font-size:12px; color:var(--sub); margin:4px 0 8px; }

.imgs { display:flex; flex-wrap:wrap; gap:8px; }
.imgs img.th { width:74px; height:74px; object-fit:cover; border-radius:10px; border:1px solid var(--line); }
.img-add { width:74px; height:74px; display:flex; align-items:center; justify-content:center; border:1px dashed #a5b8d6; border-radius:10px; color:var(--blue); font-size:13px; text-align:center; cursor:pointer; }
.img-x { position:absolute; width:20px; height:20px; margin-left:-26px; margin-top:-6px; background:#d64541; color:#fff; border:none; border-radius:50%; font-size:12px; line-height:20px; }
.thumb-wrap { position:relative; }

.btn-primary { display:flex; align-items:center; justify-content:center; width:calc(100% - 28px); margin:18px 14px 4px; height:52px; background:var(--blue); color:#fff; border:none; border-radius:12px; font-size:18px; font-weight:700; letter-spacing:2px; }
.btn-primary:active { opacity:.85; }
.btn-primary:disabled { opacity:.5; }
.free-tag { text-align:center; font-size:12px; color:#e38b00; margin:6px 0 10px; }
.btn-plain { display:flex; align-items:center; justify-content:center; height:44px; background:#fff; color:var(--blue); border:1px solid #a5b8d6; border-radius:10px; font-size:15px; padding:0 18px; }
.history-entry { text-align:center; color:var(--blue); font-size:14px; padding:12px 0 4px; }
.foot { text-align:center; font-size:11px; color:#9aa3b2; padding:10px 20px 26px; }

/* 等待 */
.loading-box { text-align:center; padding:90px 30px; position:relative; }
.spinner { width:92px; height:92px; margin:0 auto; border-radius:50%; border:5px solid #dbe5f3; border-top-color:var(--blue); animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.ai-core { position:absolute; top:116px; left:50%; transform:translateX(-50%); width:64px; height:64px; line-height:64px; background:var(--blue); color:#fff; border-radius:50%; font-weight:700; font-size:20px; animation:breath 2s ease-in-out infinite; }
@keyframes breath { 0%,100%{opacity:.55} 50%{opacity:1} }
.load-tip { margin-top:22px; font-size:16px; color:var(--txt); }
.load-sec { font-size:13px; color:var(--sub); margin-top:6px; }
.steps { display:flex; justify-content:center; gap:14px; margin-top:26px; }
.step { font-size:12px; color:#b6c1d4; }
.step.on { color:var(--blue); font-weight:700; }
.btn-skip { margin-top:30px; background:none; border:1px solid #a5b8d6; color:var(--blue); border-radius:20px; padding:8px 20px; font-size:14px; }

/* 结果 */
.score-card { text-align:center; padding-bottom:22px; }
.ring-wrap { position:relative; width:170px; margin:6px auto 8px; }
.ring { width:170px; height:170px; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:#e3e9f3; stroke-width:10; }
.ring-fg { fill:none; stroke:var(--blue); stroke-width:10; stroke-linecap:round; stroke-dasharray:326.7; stroke-dashoffset:326.7; transition:stroke-dashoffset 1s ease; }
.ring-num { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-num b { font-size:44px; color:var(--blue); }
.ring-num i { font-style:normal; font-size:16px; color:var(--blue); }
.ring-num span { font-size:14px; color:var(--sub); }
.engine { font-size:12px; color:var(--sub); }
.summary { text-align:left; font-size:15px; margin-top:12px; color:var(--txt); }

.dim-row { margin-bottom:12px; }
.dim-top { display:flex; justify-content:space-between; font-size:14px; }
.dim-bar { height:8px; background:#e9eef7; border-radius:4px; margin-top:6px; overflow:hidden; }
.dim-bar i { display:block; height:100%; background:var(--blue); border-radius:4px; }
.dim-note { font-size:12px; color:var(--sub); margin-top:4px; }

.list { list-style:none; }
.list li { position:relative; padding-left:20px; font-size:14px; margin-bottom:8px; }
.list.good li::before { content:"✓"; color:#2e9e5b; position:absolute; left:0; font-weight:700; }
.list.bad li::before { content:"!"; color:#d64541; position:absolute; left:4px; font-weight:700; }
.list.todo li::before { content:"→"; color:var(--blue); position:absolute; left:0; font-weight:700; }

/* 律师卡 */
.lawyer-card { border:1px solid #d5dfef; }
.lawyer-head { font-size:13px; color:var(--blue); font-weight:700; letter-spacing:1px; margin-bottom:10px; }
.lawyer-body { display:flex; gap:12px; }
.lawyer-info { flex:1; min-width:0; }
.lw-photo { width:48px; height:48px; border-radius:50%; object-fit:cover; float:left; margin-right:10px; }
.lw-name { font-size:17px; font-weight:700; clear:none; }
.lw-firm { font-size:13px; color:var(--sub); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lw-license { font-size:12px; color:var(--sub); margin-top:6px; word-break:break-all; }
.lw-spec { font-size:12px; color:var(--blue); margin-top:6px; }
.lawyer-qr { flex-shrink:0; text-align:center; }
.lawyer-qr img { width:110px; height:110px; object-fit:contain; border:1px solid var(--line); border-radius:8px; background:#fff; }
.qr-tip { font-size:11px; color:var(--sub); margin-top:4px; }
.lawyer-note { font-size:11px; color:#9aa3b2; margin-top:12px; line-height:1.5; }
#lwCall { width:100%; margin-top:12px; }

.result-actions { display:flex; gap:10px; margin:16px 14px 0; }
.result-actions .btn-plain { flex:1; }
.empty { color:var(--sub); font-size:14px; padding:10px 0; }
.hist-item { border-bottom:1px solid var(--line); padding:10px 2px; cursor:pointer; }
.hist-item b { color:var(--blue); }
.hist-item .h-sub { font-size:12px; color:var(--sub); }

.overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:99; }
.overlay[hidden] { display:none; } /* 修复：hidden 属性被 display:flex 覆盖导致遮罩常驻 */
.toast { background:#fff; color:var(--txt); border-radius:10px; padding:14px 22px; font-size:15px; max-width:80%; }
@media (min-width:520px){
  body { font-size:18px; background:#dde5f0; }
  .page { box-shadow:0 0 40px rgba(22,74,140,.15); background:var(--bg); }
}
