/* 每芬爱-性观念测评 共用样式（移动端优先） */
:root {
  --bg: #f4f2f5;
  --card: #ffffff;
  --ink: #2b2b31;
  --sub: #8a8a93;
  --brand: #b03a5b;
  --brand-deep: #8f2e4a;
  --brand-soft: #faeef2;
  --line: #e8e6ea;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 12px 16px 40px; }
.card { background: var(--card); border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.05); margin-bottom: 14px; }
.brand { text-align: center; padding: 26px 0 6px; color: var(--brand); font-weight: 700; font-size: 19px; letter-spacing: 3px; }
.brand small { display: block; font-size: 12px; color: var(--sub); letter-spacing: 1px; font-weight: 400; margin-top: 4px; }
h1.title { font-size: 19px; text-align: center; margin-bottom: 10px; }
p.intro { font-size: 13.5px; color: #555; line-height: 1.7; text-align: justify; }
p.prompt { font-size: 13.5px; color: var(--brand-deep); line-height: 1.7; margin-top: 8px; }
.btn {
  display: block; width: 100%; padding: 13px; border: none; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 16px; cursor: pointer; text-align: center; text-decoration: none;
}
.btn:active { background: var(--brand-deep); }
.btn:disabled { background: #dcc3cc; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
input[type="text"], input[type="password"] {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; outline: none;
}
input:focus { border-color: var(--brand); }
label.field { display: block; font-size: 13px; color: var(--sub); margin: 14px 0 6px; }
.footer { text-align: center; color: #b9b7c0; font-size: 12px; margin-top: 26px; }

/* 7 点量表 */
.qnum { font-weight: 700; color: var(--brand); margin-right: 6px; }
.qtext { font-size: 15px; line-height: 1.6; }
.scale { display: flex; gap: 6px; margin: 10px 0 2px; }
.scale button {
  flex: 1; max-width: 46px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--sub); font-size: 15px; cursor: pointer;
}
.scale button.sel { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.scale-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--sub); }
.progress-sticky {
  position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 16px 6px;
  max-width: 640px; margin: 0 auto;
}
.progress-text { font-size: 12.5px; color: var(--sub); text-align: center; margin-bottom: 6px; }
.progress-bar { height: 6px; border-radius: 3px; background: #e7e4e9; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 3px; transition: width .2s; }

/* 结果页 */
.score-label { text-align: center; font-size: 14px; color: var(--sub); margin-top: 8px; }
.score-big { text-align: center; font-size: 68px; font-weight: 800; color: var(--brand); line-height: 1.15; }
.score-range { text-align: center; font-size: 12px; color: #b9b7c0; margin-top: 2px; }
.bar-wrap { position: relative; height: 16px; border-radius: 8px; margin: 30px 8px 8px;
  background: linear-gradient(90deg, #7d8fb5 0%, #c9b7c6 50%, #e08ba4 100%); }
.bar-marker {
  position: absolute; top: -7px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transform: translateX(-50%); transition: left .5s ease;
}
.bar-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin: 0 4px; }
.interp { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.7; color: var(--brand-deep); }
.name-line { text-align: center; color: var(--sub); font-size: 13px; margin-bottom: 4px; }

/* 后台 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.tbl th { color: var(--sub); font-weight: 500; font-size: 12.5px; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover { background: var(--brand-soft); }
.tbl td.name { color: var(--brand-deep); font-weight: 600; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.topbar h1 { font-size: 17px; }
.topbar .ops { display: flex; gap: 8px; align-items: center; }
.small-btn { padding: 8px 14px; border: 1px solid var(--brand); color: var(--brand); border-radius: 999px; font-size: 13px; text-decoration: none; background: #fff; cursor: pointer; }
.admin-head { background: var(--brand); color: #fff; text-align: center; padding: 18px; font-size: 16px; letter-spacing: 2px; border-radius: 0 0 14px 14px; margin-bottom: 16px; }

/* PDF 样式详情（仿原 PDF 版面） */
.report { background: #fff; border-radius: 14px; padding: 22px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.report h1 { font-size: 18px; text-align: center; margin-bottom: 12px; }
.report .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: #666; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.report .qitem { margin-bottom: 16px; }
.report .qrow { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.report .qrow .end { font-size: 10.5px; color: #888; white-space: nowrap; }
.report .dot {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #c9c6cd; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: #777;
}
.report .dot.chosen { background: #2b2b31; border-color: #2b2b31; color: #fff; font-weight: 700; }
.report .qrow .spacer { flex: 1; border-top: 1px dashed #e4e2e7; }
.report .scores { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.report .total-big { text-align: center; font-size: 44px; font-weight: 800; color: var(--brand); }
.report .scoreline { font-size: 13.5px; margin: 6px 0; }
.report .scoreline b { margin-left: 4px; }
.login-box { max-width: 380px; margin: 60px auto 0; }
