/* 人格测评三件套共用样式。纸色底 + 每个产品一个强调色（--accent），
   隐藏角色用 .is-hidden 走黑金，与明面角色在视觉上完全分开。 */
:root {
  --paper: #f8f5f0;
  --paper2: #f1ece4;
  --white: #fffdfb;
  --ink: #29242b;
  --muted: #746b73;
  --line: #e5dcd3;
  --accent: #684457;
  --accent-soft: #efe2e1;
  --gold: #b79a68;
  --shadow: 0 16px 44px rgba(66, 42, 54, 0.08);
  --r: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.pp-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; border-bottom: 1px solid rgba(111, 80, 88, 0.12);
}
.pp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.03em; }
.pp-mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: #f6e8cf; font-family: Georgia, "Songti SC", serif; font-size: 19px;
}
.pp-brand small { display: block; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; margin-top: -3px; }
.pp-back { font-size: 13px; color: var(--accent); font-weight: 700; padding: 8px 0; }
.pp-top .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

/* ---------- 屏幕 ---------- */
.screen { display: none; }
.screen.on { display: block; animation: fade 0.26s ease; }
@keyframes fade { from { opacity: 0.3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.on { animation: none; } }

/* ---------- 落地页 ---------- */
.landing { padding: 54px 0 70px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; font-size: 12px; letter-spacing: 0.08em;
}
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.landing h1 { font-size: clamp(32px, 5.4vw, 52px); line-height: 1.2; letter-spacing: -0.035em; margin: 20px 0 14px; }
.landing h1 em { font-style: normal; color: var(--accent); }
.landing .lead { font-size: 16px; line-height: 1.95; color: var(--muted); max-width: 620px; margin: 0 0 26px; }
.landing .dialogue {
  border-left: 2px solid var(--gold); padding: 2px 0 2px 16px; margin: 0 0 30px;
  font-size: 15px; color: #5d4a52; line-height: 1.9;
}
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { font-size: 12px; color: var(--muted); background: #fcf8f4; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; padding: 14px 22px; font-weight: 700; font-size: 15px;
  transition: transform 0.16s, box-shadow 0.16s;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: #fffaf4; box-shadow: 0 10px 24px rgba(104, 68, 87, 0.22); }
.btn-ghost { background: var(--white); border: 1px solid var(--line); color: var(--accent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.landing-foot { margin-top: 34px; font-size: 12px; color: #8d8186; line-height: 1.85; }
.intro-list { margin: 0; padding-left: 20px; }
.intro-list li { font-size: 15px; line-height: 1.95; color: #4a4148; margin-bottom: 12px; }
.intro-list li:last-child { margin-bottom: 0; }

/* ---------- 答题 ---------- */
.quiz { padding: 26px 0 60px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.quiz-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { height: 5px; background: #e8ddd8; border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.q-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.q-group { font-size: 11px; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; }
.q-text { font-size: clamp(20px, 2.8vw, 26px); line-height: 1.55; margin: 12px 0 22px; letter-spacing: -0.01em; }
.options { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  background: #fffdfa; border: 1px solid #e8ded7; border-radius: 15px; padding: 14px 16px;
  font-size: 14.5px; line-height: 1.7; color: var(--ink); transition: border-color 0.15s, background 0.15s;
}
.opt:hover { border-color: #cdb7c0; }
.opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.opt-key {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #dfd1d0; font-size: 11px; color: #8b777f; background: #fff;
}
.opt.picked .opt-key { background: var(--accent); border-color: var(--accent); color: #fff; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.link-btn { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 计算中 ---------- */
.calc { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.calc-ring { width: 84px; height: 84px; border-radius: 50%; border: 2px solid #e5d8d5; border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.calc p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- 结果 ---------- */
.result { padding: 24px 0 66px; }
.hero {
  border-radius: 26px; padding: clamp(22px, 4.4vw, 40px); position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
}
.hero:after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid #e2d3d0; right: -120px; top: -140px;
}
.hero-label { font-size: 11px; letter-spacing: 0.16em; color: var(--accent); font-weight: 700; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.22; letter-spacing: -0.03em; margin: 12px 0 6px; position: relative; }
.hero .sub { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.hero blockquote {
  margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft);
  font-size: 15px; line-height: 1.85; color: #4d3944; position: relative;
}
.hero .code { font-size: 11px; letter-spacing: 0.18em; color: var(--gold); margin-top: 14px; }

/* 身份说明：给没玩过这个游戏的人看的一句话，不参与评分 */
.identity {
  margin-top: 16px; padding: 13px 16px; border-radius: 14px;
  background: #fcf8f4; border: 1px dashed #e3d4c6;
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
}
.identity span { flex: 0 0 auto; font-size: 11px; letter-spacing: 0.12em; color: #a2814f; font-weight: 700; }
.identity p { margin: 0; font-size: 13.5px; line-height: 1.85; color: #5d4a52; }

/* 隐藏角色：黑金、无编号、语气单独 */
.result.is-hidden .hero { background: #221d26; border-color: #3a3038; }
.result.is-hidden .hero-label { color: var(--gold); letter-spacing: 0.3em; }
.result.is-hidden .hero h1 { color: #f3e6cf; }
.result.is-hidden .hero .sub, .result.is-hidden .hero .code { color: #b9a88f; }
.result.is-hidden .hero blockquote { background: #2e2731; color: #eddfc8; }
.result.is-hidden .hero:after { border-color: #4a3d33; }
.result.is-hidden .identity { background: #2a232e; border-color: #4a3d33; }
.result.is-hidden .identity p { color: #d9c9b0; }
.result.is-hidden .identity span { color: var(--gold); }
.result.is-hidden .hidden-note {
  margin-top: 16px; font-size: 12px; color: var(--gold); letter-spacing: 0.08em;
  border-top: 1px solid #4a3d33; padding-top: 12px; position: relative;
}

.sec { margin-top: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.sec h2 { font-size: 14px; margin: 0 0 12px; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.sec h2 i { width: 4px; height: 14px; border-radius: 2px; background: var(--accent); display: block; }
.sec p { margin: 0 0 10px; font-size: 14px; line-height: 1.95; color: #4a4148; }
.sec p:last-child { margin-bottom: 0; }
.sec ul { margin: 0; padding-left: 18px; }
.sec li { font-size: 14px; line-height: 1.95; color: #4a4148; margin-bottom: 8px; }
.sec li:last-child { margin-bottom: 0; }
.sec .hint { font-size: 12px; color: #8d8186; line-height: 1.8; margin-top: 10px; }

/* 雷达图（不显示分数） */
.radar-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.radar { width: 220px; height: 220px; }
.radar-legend { display: grid; gap: 7px; }
.radar-legend div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #5f5157; }
.radar-legend em { font-style: normal; color: var(--accent); }

/* TWIN 三轴 */
.axis-row { margin: 0 0 16px; }
.axis-row:last-child { margin-bottom: 0; }
.axis-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.axis-track { position: relative; height: 6px; background: #ece0da; border-radius: 99px; }
.axis-track i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fffaf5; }
.axis-read { font-size: 12px; color: #7a6c72; margin-top: 7px; }

/* 推荐模块 */
.reco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reco {
  display: block; text-align: left; width: 100%; background: #fffcf8; border: 1px solid var(--line);
  border-radius: 16px; padding: 15px; transition: border-color 0.15s;
}
.reco:hover { border-color: #cdb7c0; }
.reco b { display: block; font-size: 14px; margin-bottom: 5px; }
.reco span { font-size: 12px; color: var(--muted); line-height: 1.7; }
.reco.warn { background: #fdf6f3; border-color: #f0ded4; }

/* 操作区 */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions .btn { flex: 1; min-width: 132px; }
.accuracy { margin-top: 18px; text-align: center; }
.accuracy p { font-size: 12px; color: var(--muted); margin: 0 0 9px; }
.accuracy-row { display: flex; gap: 8px; justify-content: center; }
.accuracy-row button { font-size: 12.5px; border: 1px solid var(--line); background: #fffdfb; border-radius: 999px; padding: 7px 14px; color: var(--muted); }
.accuracy-row button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.foot-note { margin-top: 20px; font-size: 11.5px; color: #8d8186; line-height: 1.9; text-align: center; }

/* 未定型 */
.undet { text-align: center; padding: 60px 0; }
.undet h2 { font-size: 24px; margin: 0 0 12px; }
.undet p { color: var(--muted); font-size: 14px; line-height: 1.9; max-width: 460px; margin: 0 auto 26px; }

/* 双人配对 */
.pair-box { background: var(--accent-soft); border-radius: 18px; padding: 18px; margin-top: 16px; }
.pair-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 24px; letter-spacing: 0.28em;
  color: var(--accent); font-weight: 700; margin: 8px 0 12px;
}
.pair-note { font-size: 12px; color: #7a6c72; line-height: 1.8; }
.combo-title { font-size: clamp(24px, 4vw, 34px); margin: 6px 0 4px; letter-spacing: -0.02em; }
.two-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.role-card { background: #fffcf8; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.role-card b { display: block; font-size: 15px; margin-bottom: 4px; }
.role-card span { font-size: 12px; color: var(--muted); }
.bias { display: flex; align-items: baseline; gap: 10px; }
.bias strong { font-size: 28px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 海报预览弹窗 */
.modal { position: fixed; inset: 0; background: rgba(34, 26, 33, 0.68); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal.on { display: flex; }
.modal-box { background: var(--white); border-radius: 20px; padding: 16px; width: min(100%, 420px); max-height: 92vh; overflow: auto; }
.modal-box h3 { margin: 0 0 10px; font-size: 15px; }
.modal-box img { width: 100%; border-radius: 12px; display: block; }
.modal-close { margin-top: 12px; width: 100%; }

/* 海报本体（离屏渲染，1080×1920） */
#poster { position: fixed; left: -9999px; top: 0; width: 1080px; height: 1920px; background: var(--paper); color: var(--ink); padding: 110px 84px; display: flex; flex-direction: column; }
#poster .p-mark { width: 92px; height: 92px; border-radius: 26px; background: var(--accent); color: #f6e8cf; display: grid; place-items: center; font-family: Georgia, "Songti SC", serif; font-size: 48px; }
#poster .p-brand { font-size: 26px; letter-spacing: 0.16em; color: var(--muted); margin-top: 26px; }
#poster .p-label { font-size: 24px; letter-spacing: 0.24em; color: var(--accent); margin-top: 120px; }
#poster .p-title { font-size: 96px; line-height: 1.16; font-weight: 800; letter-spacing: -0.03em; margin-top: 26px; }
#poster .p-sub { font-size: 34px; color: var(--muted); margin-top: 18px; }
#poster .p-line { font-size: 40px; line-height: 1.62; color: #4d3944; margin-top: 60px; padding-left: 30px; border-left: 6px solid var(--gold); }
#poster .p-foot { margin-top: auto; font-size: 24px; color: #8d8186; letter-spacing: 0.06em; display: flex; justify-content: space-between; }
#poster .p-bar { height: 10px; background: var(--accent); margin-top: 34px; }
#poster.is-hidden { background: #221d26; color: #f3e6cf; }
#poster.is-hidden .p-mark { background: #b79a68; color: #221d26; }
#poster.is-hidden .p-label { color: #b79a68; }
#poster.is-hidden .p-line { color: #eddfc8; }
#poster.is-hidden .p-sub, #poster.is-hidden .p-brand, #poster.is-hidden .p-foot { color: #b9a88f; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 14px);
  background: #332833; color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: 0.22s; z-index: 80; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .pp-top { height: 62px; }
  .landing { padding: 34px 0 50px; }
  .landing .lead { font-size: 14.5px; }
  .q-card { padding: 19px; border-radius: 18px; }
  .q-text { font-size: 20px; margin: 10px 0 18px; }
  .opt { font-size: 14px; padding: 13px; }
  .hero { border-radius: 20px; }
  .hero h1 { font-size: 30px; }
  .radar-wrap { grid-template-columns: 1fr; justify-items: center; }
  .radar { width: 200px; height: 200px; }
  .radar-legend { width: 100%; }
  .reco-grid { grid-template-columns: 1fr; }
  .two-roles { grid-template-columns: 1fr; }
  .sec { padding: 16px; border-radius: 16px; }
  .sec p, .sec li { font-size: 13.5px; }
}

/* ===== 移动端：禁止双击 / 双指放大 + 隐藏滚动条（保留滚动能力） ===== */
html,body{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body,*{scrollbar-width:none;-ms-overflow-style:none}
*::-webkit-scrollbar{width:0!important;height:0!important;display:none!important;background:transparent}
@supports (-webkit-touch-callout:none){input,textarea,select{font-size:16px}}
