/* AI颜值打分 · H5 网页版(杂志风,与小程序同源) */
:root {
  --paper: #FAF7F2;
  --ink: #191919;
  --ink-2: #6E6A64;
  --line: #E4DED4;
  --accent: #D7263D;
  --card: #FFFFFF;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 20px 40px;
}
@media (min-width: 900px) { body { max-width: 760px; padding-top: 40px; } }

.serif { font-family: var(--serif); }
.fine-print { font-size: 11px; color: var(--ink-2); text-align: center; margin-top: 18px; line-height: 1.8; }

/* 刊头 */
.masthead { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.masthead .vol { font-size: 13px; letter-spacing: 1px; color: var(--ink-2); }
.masthead .daily { font-size: 12px; color: var(--ink-2); }
.rule-line { height: 1px; background: var(--line); }
.rule-line.thick { height: 2px; background: var(--ink); }

.page-title { text-align: center; font-size: 34px; letter-spacing: 8px; padding: 22px 0 6px; }
.page-sub { text-align: center; color: var(--ink-2); font-size: 13px; padding-bottom: 20px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); padding: 18px; margin-bottom: 14px; }
.sec-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.sec-no { font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.sec-title { font-size: 16px; letter-spacing: 2px; }

/* 按钮 */
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  font-size: 16px; letter-spacing: 6px; padding: 13px 0; border-radius: 0;
  font-family: var(--sans);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; letter-spacing: 2px; }

/* 首页上传区 */
.upload-area {
  position: relative; min-height: 300px;
  border: 1px dashed var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-bottom: 14px; overflow: hidden;
}
.upload-area.has-photo { border-style: solid; }
.upload-area img.preview { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ph-inner { text-align: center; color: var(--ink-2); }
.ph-inner .ph-icon-img { width: 44px; height: 44px; opacity: 0.9; }
.ph-inner .ph-text { font-size: 15px; letter-spacing: 4px; color: var(--ink); margin-top: 10px; }
.ph-inner .ph-sub { font-size: 12px; margin-top: 6px; }

/* 目录式入口(一排3个,仅展示) */
.entries { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.entry { flex: 1 1 0; padding: 12px 0; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.entry + .entry { border-left: 1px solid var(--line); }
.entry .no { font-size: 11px; color: var(--ink-2); }
.entry .name { font-size: 14px; }
.entry.active .name { color: var(--accent); }

/* 检测动画 */
.scan-wrap { position: relative; }
.scan-line {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--accent);
  box-shadow: 0 0 12px rgba(215, 38, 61, .6);
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: 4%; } 50% { top: 94%; } }
.detect-text { text-align: center; margin-top: 14px; font-size: 14px; color: var(--ink-2); letter-spacing: 2px; }

/* 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(25,25,25,.55); z-index: 99;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 420px; background: var(--paper);
  border: 1px solid var(--ink); box-shadow: 8px 8px 0 rgba(25,25,25,.3);
  padding: 26px 26px 22px;
}
.modal .m-no { font-size: 12px; color: var(--accent); letter-spacing: 2px; }
.modal .m-title { font-family: var(--serif); font-size: 24px; letter-spacing: 4px; margin-top: 6px; }
.modal .m-rule { height: 2px; background: var(--ink); margin: 16px 0; }
.modal .m-price { font-family: var(--serif); font-size: 44px; color: var(--accent); text-align: center; }
.modal .m-price small { font-size: 14px; color: var(--ink-2); font-family: var(--sans); }
.modal .m-note { font-size: 12px; color: var(--ink-2); text-align: center; margin: 8px 0 16px; }
.modal .btn { margin-bottom: 10px; }
.modal .m-close { text-align: center; color: var(--ink-2); font-size: 13px; cursor: pointer; margin-top: 4px; }

/* 双支付按钮(左右结构,带品牌图标) */
.pay-btns { display: flex; gap: 10px; margin-bottom: 10px; }
.pay-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  border: none; cursor: pointer; color: #fff; font-size: 15px; letter-spacing: 1px;
  padding: 12px 0; border-radius: 4px; font-family: var(--sans);
}
.pay-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.pay-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.pay-btn.alipay { background: #1677FF; }
.pay-btn.wechat { background: #07C160; }
.pay-note {
  font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin: 2px 0 12px;
  background: var(--paper); border: 1px solid var(--line); padding: 8px 10px;
}

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: #fff;
  font-size: 15px; border-radius: 0; outline: none; font-family: var(--sans);
}
.field input:focus { border-color: var(--ink); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .field { flex: 1; margin-bottom: 14px; }
.captcha-q {
  min-width: 118px; text-align: center; background: #fff; border: 1px solid var(--line);
  padding: 10px 8px; font-size: 14px; cursor: pointer; user-select: none; color: var(--ink);
}
.form-tip { font-size: 12px; color: var(--ink-2); margin-top: 12px; text-align: center; }

/* 报告页 */
.rp-photo { width: 100%; max-height: 420px; object-fit: cover; display: block; margin-bottom: 4px; }
.score-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 18px 0 6px; }
.score-num { font-family: var(--serif); font-size: 84px; line-height: 1; color: var(--accent); }
.score-level { font-size: 16px; color: var(--ink-2); }
.headline { text-align: center; font-size: 15px; color: var(--ink-2); font-style: italic; padding: 0 10px 18px; }
.tag-row { display: flex; justify-content: center; gap: 8px; padding-bottom: 18px; flex-wrap: wrap; }
.tag { font-size: 12px; border: 1px solid var(--ink); padding: 3px 10px; }
.sub-scores { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sub-score { flex: 1; text-align: center; padding: 14px 0; }
.sub-score + .sub-score { border-left: 1px solid var(--line); }
.sub-score .v { font-family: var(--serif); font-size: 26px; }
.sub-score .k { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kv { display: flex; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 64px; flex-shrink: 0; color: var(--ink-2); }
.kv .v { flex: 1; }
.feature { padding: 10px 0; border-bottom: 1px solid var(--line); }
.feature:last-child { border-bottom: none; }
.feature .f-label { font-size: 14px; font-weight: 600; }
.feature .f-comment { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.quote { font-family: var(--serif); font-size: 16px; text-align: center; padding: 8px 6px 2px; }
.atmo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.atmo .a-item { background: var(--paper); border: 1px solid var(--line); text-align: center; padding: 12px 6px; }
.atmo .a-name { font-size: 12px; color: var(--ink-2); }
.atmo .a-value { font-family: var(--serif); font-size: 20px; margin-top: 4px; }
.atmo-summary { font-size: 13px; color: var(--ink-2); }
.sug { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sug:last-child { border-bottom: none; }
.sug .s-title { font-size: 14px; font-weight: 600; }
.sug .s-content { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* 我的测评列表 */
.hist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hist-item:last-child { border-bottom: none; }
.hist-item img { width: 44px; height: 58px; object-fit: cover; background: var(--paper); }
.hist-item .h-mid { flex: 1; }
.hist-item .h-date { font-size: 12px; color: var(--ink-2); }
.hist-item .h-level { font-size: 13px; margin-top: 2px; }
.hist-item .h-score { font-family: var(--serif); font-size: 22px; color: var(--accent); }
.empty { text-align: center; color: var(--ink-2); font-size: 13px; padding: 24px 0; }

/* 支付页状态 */
.pay-state { text-align: center; padding: 30px 0 10px; }
.pay-state .ps-icon { font-size: 44px; }
.pay-state .ps-title { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; margin-top: 10px; }
.pay-state .ps-sub { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* 全局提示 */
#toast {
  position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%);
  background: rgba(25,25,25,.85); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 4px; z-index: 999; display: none; max-width: 80vw;
}
.footer-links { display: flex; justify-content: center; gap: 18px; margin-top: 26px; font-size: 12px; color: var(--ink-2); }
.footer-links a { color: var(--ink-2); text-decoration: none; }
