/* ============================================================
   心测评 · 站点样式（移动优先）
   ============================================================ */
:root{
  --ink:#1b2030;--ink2:#3d4557;--muted:#7a8296;--line:#e9edf5;
  --bg:#f4f6fb;--card:#fff;--brand:#4f6df5;--brand2:#7b5cf0;
  --ok:#17a673;--warn:#f0a13a;--bad:#e45a5a;
  --radius:16px;--shadow:0 8px 28px rgba(27,32,48,.07);
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
  color:var(--ink);font-size:15px;line-height:1.65;-webkit-font-smoothing:antialiased;padding-bottom:70px}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit}

.shell{max-width:640px;margin:0 auto;background:var(--bg);min-height:100vh}

/* ---------- 顶栏 ---------- */
.topbar{position:sticky;top:0;z-index:40;height:54px;display:flex;align-items:center;gap:10px;
  padding:0 16px;background:rgba(255,255,255,.86);backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid rgba(233,237,245,.9)}
.topbar .logo{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,#4f6df5,#7b5cf0);
  color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;flex:0 0 30px}
.topbar .name{font-weight:700;font-size:15px;letter-spacing:.2px}
.topbar .spacer{flex:1}
.topbar .icon-btn{width:32px;height:32px;border-radius:50%;background:#f1f4fb;border:0;display:grid;place-items:center;
  color:#556;cursor:pointer;font-size:15px}

/* ---------- 通用 ---------- */
.section{padding:18px 16px 0}
.section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px}
.section-head h3{font-size:17px;font-weight:800;letter-spacing:.2px}
.section-head small{font-size:12px;color:var(--muted)}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow)}
.empty{padding:60px 20px;text-align:center;color:var(--muted);font-size:14px}

/* ---------- Banner ---------- */
.banner{padding:14px 16px 0}
.banner-track{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:18px}
.banner-track::-webkit-scrollbar{display:none}
.banner-slide{flex:0 0 100%;scroll-snap-align:center}
.banner-slide img{width:100%;height:150px;object-fit:cover;border-radius:18px;box-shadow:0 10px 24px rgba(27,32,48,.12)}
.banner-dots{display:flex;gap:6px;justify-content:center;margin-top:10px}
.banner-dots i{width:6px;height:6px;border-radius:50%;background:#d7deee;transition:.2s}
.banner-dots i.on{width:16px;border-radius:9px;background:var(--brand)}

/* ---------- 分类胶囊（自动换行，不再横向裁切） ---------- */
.cats{display:flex;flex-wrap:wrap;gap:8px;padding:14px 16px 6px}
.cats a{flex:0 0 auto;height:34px;padding:0 15px;border-radius:999px;background:#fff;color:#4a5266;
  font-size:13.5px;display:flex;align-items:center;box-shadow:0 1px 6px rgba(27,32,48,.05);white-space:nowrap}
.cats a.on{background:linear-gradient(135deg,#4f6df5,#7b5cf0);color:#fff;box-shadow:0 6px 16px rgba(79,109,245,.3)}

/* ---------- 测评卡片 ---------- */
.exam-list{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:0 16px}
.exam-card{display:flex;gap:12px;background:#fff;border-radius:16px;padding:12px;box-shadow:var(--shadow);align-items:center;min-width:0;overflow:hidden}
.exam-card .cover{width:78px;height:78px;border-radius:12px;object-fit:cover;background:#eef1f8;flex:0 0 78px}
.exam-card .body{flex:1;min-width:0}
.exam-card h4{font-size:15px;font-weight:700;line-height:1.45;margin-bottom:4px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.exam-card p{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exam-card .meta{display:flex;align-items:center;gap:8px;margin-top:6px}
.price{color:#e8543f;font-weight:800;font-size:15px}
.price small{font-size:11px;font-weight:600}
.count{font-size:11.5px;color:#9aa2b5}
.tag{font-size:11px;padding:1px 7px;border-radius:6px;background:#eef1f8;color:#6b7386}

/* 热门测评：网格换行，避免横向裁切 */
.hot-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0 16px 4px}
.hot-card{background:#fff;border-radius:16px;padding:10px;box-shadow:var(--shadow);min-width:0}
.hot-card img{width:100%;height:88px;object-fit:cover;border-radius:11px;margin-bottom:8px;background:#eef1f8}
.hot-card h5{font-size:13px;font-weight:700;line-height:1.4;height:36px;overflow:hidden;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hot-card .price{font-size:13px;margin-top:4px}
@media (min-width:480px){ .hot-track{grid-template-columns:repeat(4,minmax(0,1fr));} }
@media (min-width:680px){ .hot-track{grid-template-columns:repeat(6,minmax(0,1fr));} }

/* ---------- 详情 ---------- */
.detail-hero{position:relative}
.detail-hero img{width:100%;height:230px;object-fit:cover}
.detail-hero .back{position:absolute;left:14px;top:14px;width:34px;height:34px;border-radius:50%;
  background:rgba(0,0,0,.35);color:#fff;border:0;font-size:17px;cursor:pointer;backdrop-filter:blur(6px)}
.detail-body{background:var(--bg);border-radius:20px 20px 0 0;margin-top:-20px;position:relative;padding-top:6px}
.detail-title{padding:14px 16px 0}
.detail-title h1{font-size:21px;font-weight:800;line-height:1.4;letter-spacing:-.2px}
.detail-title .sub{font-size:13px;color:var(--muted);margin-top:6px}
.detail-stats{display:flex;gap:8px;padding:14px 16px 0;flex-wrap:wrap}
.detail-stats span{font-size:12px;background:#fff;border-radius:99px;padding:6px 11px;color:#5b6479;box-shadow:0 1px 6px rgba(27,32,48,.05)}
.detail-stats b{color:var(--ink)}
.prose{padding:16px;font-size:14px;color:var(--ink2);line-height:1.85}
.prose img{border-radius:12px;margin:10px 0}
.prose p{margin-bottom:10px}
.notice{background:#fff;border-radius:16px;padding:16px;box-shadow:var(--shadow);margin:0 16px}
.notice h4{font-size:14px;font-weight:800;margin-bottom:8px}
.notice ol{padding-left:18px;font-size:13px;color:#5b6479;line-height:1.9}
.notice li{margin-bottom:4px}

/* 底部操作条 */
.buybar{position:fixed;left:0;right:0;bottom:0;z-index:50;background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
.buybar .inner{max-width:640px;margin:0 auto;display:flex;align-items:center;gap:12px}
.buybar .p{flex:1}
.buybar .p b{font-size:19px;color:#e8543f;font-weight:800}
.buybar .p span{font-size:11.5px;color:var(--muted);display:block}
.btn{height:48px;border:0;border-radius:14px;font-size:15px;font-weight:700;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 22px;
  transition:transform .15s ease,box-shadow .15s ease}
.btn:active{transform:scale(.985)}
.btn-primary{background:linear-gradient(135deg,#4f6df5,#7b5cf0);color:#fff;box-shadow:0 8px 20px rgba(79,109,245,.3)}
.btn-ghost{background:#fff;color:#3d4557;box-shadow:0 2px 10px rgba(27,32,48,.06)}
.btn-block{width:100%}
.btn-sm{height:38px;padding:0 14px;border-radius:11px;font-size:13px}

/* ---------- 答题 ---------- */
.run-top{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);
  padding:10px 16px 12px;border-bottom:1px solid var(--line)}
.run-top .row{display:flex;align-items:center;justify-content:space-between;font-size:12.5px;color:var(--muted);margin-bottom:8px}
.run-top .row b{color:var(--ink);font-weight:800}
.progress{height:6px;border-radius:9px;background:#e9edf5;overflow:hidden}
.progress i{display:block;height:100%;width:0;border-radius:9px;background:linear-gradient(90deg,#6f8bff,#7b5cf0);transition:width .3s ease}
.q-wrap{padding:18px 16px 24px}
.q-title{font-size:18px;font-weight:700;line-height:1.6;margin-bottom:16px;letter-spacing:-.2px}
.q-title .no{color:var(--brand);margin-right:6px}
.q-img{border-radius:14px;margin-bottom:16px;background:#fff}
.opts{display:grid;gap:10px}
.opt{display:flex;align-items:center;gap:11px;background:#fff;border:1.5px solid transparent;border-radius:14px;
  padding:15px 16px;font-size:15px;color:var(--ink2);cursor:pointer;box-shadow:0 2px 10px rgba(27,32,48,.045);
  transition:.15s ease;line-height:1.5}
.opt .radio{width:20px;height:20px;border-radius:50%;border:2px solid #cfd6e6;flex:0 0 20px;position:relative}
.opt.on{border-color:var(--brand);background:#f7f9ff;color:var(--ink);box-shadow:0 6px 18px rgba(79,109,245,.12)}
.opt.on .radio{border-color:var(--brand);background:var(--brand)}
.opt.on .radio::after{content:"";position:absolute;left:5px;top:5px;width:8px;height:8px;border-radius:50%;background:#fff}
.opt img{height:44px;width:auto}
.nav-row{display:flex;gap:10px;padding:0 16px 30px}
.nav-row .btn{flex:1}

/* ---------- 支付 ---------- */
.pay-wrap{padding:20px 16px}
.pay-card{background:#fff;border-radius:20px;padding:22px;box-shadow:var(--shadow);text-align:center}
.pay-card .icon{width:64px;height:64px;border-radius:20px;margin:0 auto 14px;
  background:linear-gradient(135deg,#eaf0ff,#f3ecff);display:grid;place-items:center;font-size:28px}
.pay-card h2{font-size:19px;font-weight:800;margin-bottom:6px}
.pay-card .desc{font-size:13px;color:var(--muted);line-height:1.7}
.pay-card .amount{margin:18px 0 6px;font-size:40px;font-weight:900;letter-spacing:-1.5px;color:#e8543f}
.pay-card .amount small{font-size:16px;font-weight:700}
.channels{display:flex;gap:10px;margin:18px 0 6px}
.channel{flex:1;height:56px;border-radius:14px;border:1.5px solid #e6eaf4;background:#fff;display:flex;align-items:center;
  justify-content:center;gap:8px;font-size:14px;font-weight:600;color:#4a5266;cursor:pointer}
.channel.on{border-color:#4f6df5;background:#f7f9ff;color:#3b57e0}
.channel i{width:18px;height:18px;border-radius:50%;display:inline-block}
.pay-ic{width:22px;height:22px;border-radius:6px;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:800}
.pay-ic.wx{background:#22c55e}.pay-ic.ali{background:#1677ff}
.pay-tip{font-size:12px;color:#9aa2b5;margin-top:14px;line-height:1.7}
.pay-test{margin-top:14px;padding:12px;border-radius:12px;background:#fff8e8;border:1px solid #ffe4b0;font-size:12.5px;color:#8a5b00}
.pay-test a{color:#b26b00;font-weight:700;text-decoration:underline}

/* ---------- 查询 / 我的 ---------- */
.form{padding:16px}
.form label{display:block;font-size:13px;font-weight:600;color:#3d4557;margin:14px 0 7px}
.form input{width:100%;height:48px;border:1px solid #dde2ee;border-radius:13px;padding:0 14px;font-size:15px;background:#fff;outline:none}
.form input:focus{border-color:#8fa4ff;box-shadow:0 0 0 3px rgba(79,109,245,.12)}
.order-card{background:#fff;border-radius:16px;padding:14px 16px;box-shadow:var(--shadow);margin-bottom:12px;display:flex;gap:12px;align-items:center}
.order-card .info{flex:1;min-width:0}
.order-card h4{font-size:14px;font-weight:700;margin-bottom:3px}
.order-card .no{font-size:11.5px;color:#9aa2b5;font-family:ui-monospace,Consolas,monospace}
.badge{font-size:11px;padding:3px 9px;border-radius:99px;font-weight:700}
.badge.paid{background:rgba(23,166,115,.12);color:#17a673}
.badge.pending{background:rgba(240,161,58,.15);color:#b26b00}
.badge.closed{background:#eef1f8;color:#7a8296}

/* ---------- 底部导航 ---------- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:45;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);
  border-top:1px solid var(--line);display:flex;padding-bottom:env(safe-area-inset-bottom)}
.tabbar a{flex:1;height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-size:11px;color:#98a0b3}
.tabbar a.on{color:var(--brand);font-weight:700}
.tabbar svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- 提示 ---------- */
.flash{position:fixed;left:50%;top:70px;transform:translateX(-50%);z-index:99;background:rgba(27,32,48,.9);
  color:#fff;font-size:13px;padding:10px 16px;border-radius:11px;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);z-index:99;background:rgba(27,32,48,.92);
  color:#fff;font-size:13px;padding:11px 18px;border-radius:12px;max-width:80%;text-align:center}

@media (min-width:680px){
  .shell{box-shadow:0 30px 80px rgba(27,32,48,.12);min-height:100vh}
  .buybar{left:50%;transform:translateX(-50%);max-width:640px;border-radius:16px 16px 0 0}
  .tabbar{left:50%;transform:translateX(-50%);max-width:640px}
}

/* ---------- 分类卡片 ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 16px 20px}
.cat-card{position:relative;border-radius:18px;padding:16px;color:#fff;overflow:hidden;
  box-shadow:0 10px 24px rgba(27,32,48,.14);min-height:116px;
  display:flex;flex-direction:column;justify-content:space-between}
.cat-card::after{content:"";position:absolute;width:120px;height:120px;border-radius:50%;
  right:-46px;top:-50px;background:rgba(255,255,255,.16)}
.cat-card .ico{font-size:24px;line-height:1;position:relative;z-index:1}
.cat-card h3{font-size:17px;font-weight:800;margin-top:10px;position:relative;z-index:1}
.cat-card p{font-size:11.5px;opacity:.85;margin-top:2px;position:relative;z-index:1}
.cat-card .arrow{position:absolute;right:14px;bottom:10px;font-size:16px;opacity:.6;z-index:1}
@media (min-width:520px){ .cat-grid{grid-template-columns:repeat(3,minmax(0,1fr));} }

/* ---------- 支付宝当面付 ---------- */
.qr-box{margin:18px auto 0;width:220px;height:220px;border-radius:16px;background:#fff;
  border:1px solid #eef1f8;display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 18px rgba(27,32,48,.06);padding:10px;box-sizing:border-box}
.qr-box canvas,.qr-box img{display:block;border-radius:6px}
.qr-loading{font-size:13px;color:#9aa2b5;text-align:center;padding:0 14px;line-height:1.7}
.qr-tip{margin-top:12px;font-size:13px;color:#5b6479}
.pay-status{margin-top:10px;font-size:12.5px;color:#9aa2b5}
.pay-status::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;
  background:#f0a13a;margin-right:6px;vertical-align:middle;animation:payPulse 1.2s infinite}
@keyframes payPulse{0%,100%{opacity:.25}50%{opacity:1}}
.pay-err{display:none;margin-top:14px;padding:12px 14px;border-radius:12px;background:#fff5f5;
  border:1px solid #ffd9d4;color:#c0392b;font-size:12.5px;line-height:1.8;text-align:left}
.pay-err a{color:#c0392b;text-decoration:underline}
