/* ============ 相亲对象打分器 样式 ============ */
:root {
  --bg: #fff5f7;
  --bg-soft: #ffe9ef;
  --card: #ffffff;
  --text: #2b2330;
  --muted: #8a7d85;
  --primary: #ff4d6d;
  --primary-soft: #ff8fa3;
  --accent: #ffb703;
  --line: #f0d9e0;
  --good: #2ec4b6;
  --warn: #ff9f1c;
  --bad: #e63946;
  --shadow: 0 8px 28px rgba(255, 77, 109, .12);
  --radius: 16px;
}
html.dark {
  --bg: #1a1620;
  --bg-soft: #241d2c;
  --card: #271f30;
  --text: #f3e9ee;
  --muted: #a99aa3;
  --primary: #ff6b85;
  --primary-soft: #c75a6e;
  --accent: #ffc857;
  --line: #3a2f44;
  --shadow: 0 8px 28px rgba(0, 0, 0, .4);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#1a1620; --bg-soft:#241d2c; --card:#271f30; --text:#f3e9ee; --muted:#a99aa3; --primary:#ff6b85; --primary-soft:#c75a6e; --accent:#ffc857; --line:#3a2f44; --shadow:0 8px 28px rgba(0,0,0,.4);}
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 16px 40px;
}
.wrap { max-width: 720px; margin: 0 auto; }
a { color: var(--primary); text-decoration: none; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 8px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand .logo { width: 34px; height: 34px; }
.theme-toggle {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary); }

/* Hero */
.hero { text-align: center; padding: 18px 8px 26px; }
.hero h1 { font-size: 28px; line-height: 1.3; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tag { background: var(--bg-soft); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: 12px; }

/* Version cards */
.ver-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 28px; }
.ver-card {
  display: block; background: var(--card); border-radius: var(--radius); padding: 22px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .15s ease, box-shadow .15s ease;
}
.ver-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(255,77,109,.2); }
.ver-card .vc-emoji { font-size: 34px; }
.ver-card h2 { font-size: 20px; margin: 6px 0 4px; }
.ver-card .vc-sub { color: var(--muted); font-size: 13px; }
.ver-card .vc-go { margin-top: 14px; display: inline-block; background: linear-gradient(90deg, var(--primary), var(--primary-soft)); color: #fff; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; }
@media (max-width: 560px) { .ver-cards { grid-template-columns: 1fr; } }

/* "Why" section */
.why { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; box-shadow: var(--shadow); }
.why h3 { font-size: 18px; margin-bottom: 8px; }
.why p { color: var(--muted); font-size: 14px; }
.why ul { margin: 10px 0 0 18px; color: var(--muted); font-size: 14px; }
.why li { margin: 4px 0; }

/* Quiz */
.back-link { display: inline-block; margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.quiz-head { text-align: center; padding: 8px 0 4px; }
.quiz-head h1 { font-size: 24px; }
.quiz-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.progress-shell { height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 16px 0 6px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .35s ease; }
.progress-text { text-align: right; font-size: 12px; color: var(--muted); }

.last-banner { background: var(--bg-soft); border-radius: 12px; padding: 10px 14px; margin: 14px 0; font-size: 13px; color: var(--text); }

.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.q-title { font-size: 16px; font-weight: 700; display: flex; gap: 10px; align-items: flex-start; }
.q-num { flex: 0 0 26px; height: 26px; width: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-soft)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.q-opts { display: grid; gap: 10px; margin-top: 14px; }
.opt {
  text-align: left; background: var(--bg); border: 1.5px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; cursor: pointer; transition: all .12s ease;
}
.opt:hover { border-color: var(--primary-soft); }
.opt.sel { border-color: var(--primary); background: var(--bg-soft); font-weight: 700; box-shadow: 0 0 0 3px rgba(255,77,109,.15); }

/* Result */
#result { display: none; }
#result.show { display: block; animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: none; } }
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); }
.r-score { font-size: 64px; font-weight: 900; line-height: 1; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r-score span { font-size: 22px; margin-left: 4px; -webkit-text-fill-color: var(--muted); }
.r-tier { font-size: 22px; font-weight: 800; margin-top: 8px; }
.r-tip { color: var(--muted); font-size: 14px; margin: 10px auto 0; max-width: 460px; }

.r-bars { margin: 22px 0 6px; text-align: left; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 10px; margin: 9px 0; }
.bar-label { font-size: 13px; color: var(--text); }
.bar-label i { color: var(--muted); font-style: normal; font-size: 11px; }
.bar { height: 9px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.bar-fill.low { background: linear-gradient(90deg, var(--bad), var(--warn)); }
.bar-val { font-size: 13px; text-align: right; color: var(--muted); }

.r-weak { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin: 16px 0; text-align: left; }
.r-analysis { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; margin: 18px 0; text-align: left; box-shadow: var(--shadow); }
.r-a-title { font-size: 16px; margin-bottom: 10px; }
.r-a-line { font-size: 13.5px; line-height: 1.7; margin: 8px 0; display: flex; gap: 8px; align-items: flex-start; }
.r-a-tag { flex: 0 0 auto; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 2px 8px; color: #fff; }
.r-a-tag.ok { background: var(--good); }
.r-a-tag.bad { background: var(--bad); }
.r-a-sum { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.bar-val { font-size: 13px; text-align: right; color: var(--muted); white-space: nowrap; }
.band { font-style: normal; font-size: 11px; font-weight: 800; border-radius: 5px; padding: 1px 6px; margin-left: 4px; color: #fff; background: var(--muted); }
.band-good { background: var(--good); }
.band-warn { background: var(--warn); }
.band-bad { background: var(--bad); }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.btn { border: none; border-radius: 999px; padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary-soft)); color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
.r-sharetext { margin-top: 14px; font-size: 12px; color: var(--muted); word-break: break-all; background: var(--bg); border-radius: 10px; padding: 10px 12px; }

/* Footer / Ad */
.site-footer { margin-top: 36px; border-top: 1px dashed var(--line); padding-top: 20px; text-align: center; }
.ad-zone { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 18px; }
.ad-cta { display: inline-block; background: linear-gradient(90deg, var(--accent), #ff7b00); color: #fff; font-weight: 800; padding: 12px 26px; border-radius: 999px; font-size: 15px; box-shadow: var(--shadow); }
.ad-cta:hover { filter: brightness(1.05); }
.ad-slot { width: 100%; max-width: 480px; min-height: 60px; border: 1.5px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; background: var(--bg-soft); }
.compliance { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.compliance a { color: var(--muted); text-decoration: underline; }
.compliance .dot { opacity: .5; }
.copyright { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 毒舌点评 */
.r-a-roast { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); text-align: left; }
.r-a-tag.roast { background: linear-gradient(90deg, var(--accent), #ff7b00); }
.r-a-roast-txt { font-size: 14px; line-height: 1.7; color: var(--text); margin: 8px 0 0; font-weight: 600; }
.r-a-roast-sub { font-size: 13px; color: var(--good); margin: 6px 0 0; }

/* 推荐匹配对象类型 / 人设标签 / 彩蛋 */
.r-match { background: linear-gradient(135deg, #fff0f6, #fffafc); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 18px 0; text-align: left; box-shadow: var(--shadow); }
.r-m-title { font-size: 16px; margin-bottom: 10px; }
.r-m-type { font-size: 19px; color: var(--text); margin-bottom: 6px; }
.r-m-type b { color: var(--primary); }
.r-m-desc { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 4px 0 10px; }
.r-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.r-tag { background: var(--bg-soft); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.r-m-advice { font-size: 13px; color: var(--text); background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; margin-top: 10px; line-height: 1.6; }
.r-egg { background: linear-gradient(90deg, #fff3bf, #ffe8cc); border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 700; color: #9a5b00; text-align: center; margin: 14px 0; }

/* 海报弹层 */
.poster-modal { position: fixed; inset: 0; display: none; z-index: 999; }
.poster-modal.show { display: block; }
.poster-backdrop { position: absolute; inset: 0; background: rgba(20, 10, 15, .62); backdrop-filter: blur(2px); }
.poster-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 420px); max-height: 92vh; background: var(--card);
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
.poster-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 15px; }
.poster-close { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.poster-canvas-wrap { padding: 14px; overflow-y: auto; text-align: center; }
.poster-img { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: var(--shadow); }
.poster-tip { text-align: center; font-size: 12px; color: var(--muted); padding: 0 14px 10px; }
.poster-actions { padding: 0 14px 16px; }
.poster-actions .btn { width: 100%; text-align: center; display: block; text-decoration: none; }
