/* ════════════════════════════════════════════════════════════════════
   取向测试（role-quiz.html）
   所有类名带 rq- 前缀，避免和 styles.css / play-quiz.css 互相覆盖。
   两种语义色贯穿全页：a = 接受方（玫红），b = 施予方（石板蓝），n = 中性（军绿）。
   ════════════════════════════════════════════════════════════════════ */
.rq-page {
  --rq-bg: #f3f4ee;
  --rq-paper: #ffffff;
  --rq-ink: #1e211a;
  --rq-ink-2: #4f5546;
  --rq-muted: #848a78;
  --rq-line: #dfe2d6;
  --rq-accent: #4d5b2a;
  --rq-accent-soft: #e1e6cf;
  --rq-a: #a13a55;
  --rq-a-soft: #f4dde3;
  --rq-b: #2c5a6e;
  --rq-b-soft: #d9e7ee;
  --rq-warn: #9a6411;
  --rq-warn-soft: #f6e7c8;

  background: var(--rq-bg);
  color: var(--rq-ink);
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.rq-app { max-width: 520px; margin: 0 auto; padding: 24px 18px 64px; min-height: 70vh; }
.rq-page h1, .rq-page h2, .rq-page h3 {
  font-family: "Noto Serif SC", "Songti SC", serif; line-height: 1.25; text-wrap: balance; margin: 0;
}
.rq-view { display: none; }
.rq-view.on { display: block; }
.rq-small { font-size: 13px; color: var(--rq-muted); margin: 10px 0 0; }
.rq-center { text-align: center; }
.rq-link { color: var(--rq-accent); text-decoration: underline; text-underline-offset: 3px; }

.rq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 15px 20px; border-radius: 999px; border: 0; background: var(--rq-ink); color: #fff;
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, opacity .12s;
}
.rq-btn:hover { color: #fff; text-decoration: none; }
.rq-btn:active { transform: scale(.98); }
.rq-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.rq-btn.accent { background: var(--rq-accent); }
.rq-btn.ghost { background: transparent; color: var(--rq-ink); border: 1.5px solid var(--rq-line); }
.rq-btn.ghost:hover { color: var(--rq-ink); }
.rq-btn:focus-visible, .rq-page button:focus-visible, .rq-page select:focus-visible { outline: 3px solid var(--rq-accent-soft); outline-offset: 2px; }

/* ─── 入口 ─── */
.rq-hero { margin: 8px 0 22px; }
.rq-hero .kicker { font-size: 13px; color: var(--rq-accent); font-weight: 700; letter-spacing: .06em; margin-bottom: 10px; }
.rq-hero h1 { font-size: 36px; font-weight: 900; }
.rq-hero p { margin: 14px 0 0; color: var(--rq-ink-2); }
.rq-points { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rq-points li { background: var(--rq-paper); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 0 var(--rq-line); }
.rq-points b { font-size: 15px; }
.rq-points span { font-size: 14px; color: var(--rq-ink-2); }
.rq-age { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--rq-ink-2); margin: 0 0 14px; cursor: pointer; }
.rq-age input { width: 18px; height: 18px; accent-color: var(--rq-accent); }
.rq-meta-row { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; color: var(--rq-muted); justify-content: center; margin: 14px 0 0; }

/* ─── 答题 ─── */
.rq-topbar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--rq-muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.rq-topbar button { border: 0; background: none; font: inherit; color: var(--rq-ink-2); cursor: pointer; padding: 6px 0; }
.rq-topbar button:disabled { opacity: .3; cursor: default; }
.rq-prog { height: 4px; background: var(--rq-line); border-radius: 2px; overflow: hidden; margin-bottom: 22px; }
.rq-prog i { display: block; height: 100%; width: 0; background: var(--rq-accent); transition: width .25s; }
.rq-section { font-size: 13px; font-weight: 700; color: var(--rq-accent); letter-spacing: .04em; margin-bottom: 6px; }
.rq-row { padding: 14px 0; border-top: 1px solid var(--rq-line); display: flex; flex-direction: column; gap: 10px; }
.rq-row:first-child { border-top: 0; padding-top: 4px; }
.rq-side { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.rq-row.side-a .rq-side { color: var(--rq-a); }
.rq-row.side-b .rq-side { color: var(--rq-b); }
.rq-row.side-r .rq-side { color: var(--rq-accent); }
.rq-qtext { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.55; }
.rq-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rq-scale.opts { grid-template-columns: 1fr; }
.rq-scale button {
  font: inherit; font-size: 13px; line-height: 1.3; min-height: 52px; padding: 8px 3px; border-radius: 12px;
  border: 1.5px solid var(--rq-line); background: var(--rq-paper); color: var(--rq-ink); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.rq-scale.opts button { text-align: left; padding: 12px 16px; font-size: 15px; }
.rq-scale button:hover { border-color: var(--rq-accent); }
.rq-scale button[aria-pressed="true"] { background: var(--rq-accent); border-color: var(--rq-accent); color: #fff; font-weight: 700; }
.rq-row.side-a .rq-scale button[aria-pressed="true"] { background: var(--rq-a); border-color: var(--rq-a); }
.rq-row.side-b .rq-scale button[aria-pressed="true"] { background: var(--rq-b); border-color: var(--rq-b); }
#btnNext { margin-top: 18px; }

/* ─── 结果 ─── */
.rq-rcard { background: var(--rq-paper); border-radius: 20px; padding: 24px 22px; box-shadow: 0 1px 0 var(--rq-line); display: flex; flex-direction: column; gap: 8px; }
.rq-rcard .lab { font-size: 13px; color: var(--rq-muted); }
.rq-rcard h2 { font-size: 32px; font-weight: 900; }
.rq-rcard .note { margin: 0; color: var(--rq-ink-2); font-size: 14px; }
.rq-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.rq-chip b { font-variant-numeric: tabular-nums; }
.rq-chip.a { background: var(--rq-a-soft); color: var(--rq-a); }
.rq-chip.b { background: var(--rq-b-soft); color: var(--rq-b); }
.rq-chip.n { background: var(--rq-accent-soft); color: var(--rq-accent); }

.rq-sec { display: block; background: var(--rq-paper); border-radius: 18px; padding: 18px 18px; margin-top: 14px; box-shadow: 0 1px 0 var(--rq-line); }
.rq-sec h3 { font-size: 17px; margin-bottom: 12px; }
.rq-bars { display: flex; flex-direction: column; gap: 8px; }
.rq-bar { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 2.4em; gap: 10px; align-items: center; font-size: 14px; }
.rq-bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-bar .track { height: 10px; background: var(--rq-bg); border-radius: 5px; overflow: hidden; }
.rq-bar .fill { display: block; height: 100%; border-radius: 5px; background: var(--rq-accent); }
.rq-bar .fill.a { background: var(--rq-a); }
.rq-bar .fill.b { background: var(--rq-b); }
.rq-bar .val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--rq-ink-2); }
.rq-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 6px; vertical-align: middle; }
.rq-dot.a { background: var(--rq-a); }
.rq-dot.b { background: var(--rq-b); }
.rq-pairs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rq-pairs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.rq-pairs .arrow { color: var(--rq-muted); font-size: 13px; }
.rq-why { margin: 0; padding-left: 1.2em; font-size: 14px; color: var(--rq-ink-2); display: flex; flex-direction: column; gap: 4px; }
.rq-conf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rq-conf .lv { font-weight: 700; padding: 2px 12px; border-radius: 999px; font-size: 14px; }
.rq-conf .lv.hi { background: var(--rq-accent-soft); color: var(--rq-accent); }
.rq-conf .lv.mid { background: var(--rq-warn-soft); color: var(--rq-warn); }
.rq-conf .lv.lo { background: var(--rq-a-soft); color: var(--rq-a); }
.rq-conf .num { font-size: 13px; color: var(--rq-muted); font-variant-numeric: tabular-nums; }

.rq-fb-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rq-fb-scale button { font: inherit; font-size: 12.5px; min-height: 44px; padding: 6px 2px; border-radius: 12px; border: 1.5px solid var(--rq-line); background: var(--rq-bg); color: var(--rq-ink); cursor: pointer; }
.rq-fb-scale button[aria-pressed="true"] { background: var(--rq-accent); border-color: var(--rq-accent); color: #fff; font-weight: 700; }
.rq-fb-self { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 14px; }
.rq-fb-self select { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--rq-line); background: var(--rq-paper); color: var(--rq-ink); }

.rq-appcard { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--rq-ink); }
.rq-appcard:hover { color: var(--rq-ink); text-decoration: none; }
.rq-appcard .logo { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.rq-appcard .body { min-width: 0; }
.rq-appcard p { margin: 4px 0 6px; font-size: 14px; color: var(--rq-ink-2); }
.rq-appcard .go { font-size: 14px; font-weight: 700; color: var(--rq-accent); }
.rq-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

@media (max-width: 380px) {
  .rq-scale button { font-size: 12px; min-height: 56px; }
  .rq-bar { grid-template-columns: minmax(0, 7em) minmax(0, 1fr) 2.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .rq-btn, .rq-prog i, .rq-scale button { transition: none; }
}
