/* 全局样式
 *
 * 配色说明（整套视觉的源头）：
 *   底色  #FFFBF6  暖白
 *   主文  #3D3630  深棕
 *   次文  #5A4C42
 *   弱文  #B5AA9E
 *   强调  #C2553C  砖红
 *   线    #EFE6DC
 *   卡片  #FFFFFF
 *
 * 单位：全部用 rpx（750 设计稿，0.5px = 0.5px）
 *
 * ★ 这个文件被开发者工具覆盖过一次（换成 TS 模板），
 *   反推来源：preview/style.css（从本文件逐条转换而来）
 *   重新生成：node tools/restore-wxss.js
 */
 body.wb-body {
  background: #FFFBF6;
  color: #3D3630;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

view, text, input, textarea, button, scroll-view {
  box-sizing: border-box;
}

.page { padding: 22px 18px 44px; background: #FFFBF6; min-height: 100%; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 246, .97);
  border-bottom: 1px solid #EFE6DC;
  padding: 13px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .tb { font-size: 15.5px; font-weight: 600; }
.topbar .bk { width: 30px; font-size: 20px; color: #8A7F75; }

.h1 { font-size: 23px; font-weight: 600; margin-bottom: 8px; }
.sub { font-size: 13.5px; color: #8A7F75; margin-bottom: 22px; line-height: 1.95; white-space: pre-line; }

.card {
  background: #fff; border: 1px solid #EFE6DC; border-radius: 18px;
  padding: 20px; margin-bottom: 14px;
}
.fq { font-size: 14.5px; font-weight: 500; margin-bottom: 9px; line-height: 1.6; }
.frow { margin-bottom: 20px; }

.btn {
  display: block; width: 100%; padding: 15px; border-radius: 999px;
  background: #E8785C; color: #fff; font-size: 15.5px; font-weight: 600;
  text-align: center; border: none; line-height: 1.5; font-family: inherit;
}
.btn.ghost { background: #fff; color: #3D3630; border: 1px solid #EFE6DC; }
.btn.dark { background: #3D3630; }
.btn.soft { background: #FDF0E9; color: #C2553C; }
.sp { height: 11px; }
.sp2 { height: 22px; }

.input {
  width: 100%; padding: 14px; border: 1px solid #EFE6DC; border-radius: 14px;
  font-size: 15px; background: #FAF6F1; margin-bottom: 12px;
  font-family: inherit; color: #3D3630;
  /* ★ 必须显式给高度。
   * input 是小程序原生组件，自带一个很矮的默认高度（约 1.4em ≈ 21px）。
   * 全局 view/input/textarea 都设了 box-sizing: border-box，
   * 于是上下 padding 28px 直接把这个高度撑爆 → 内容区被压成负数，
   * placeholder 只剩上半截（截图里那个「你的真名叫什么」被切一半）。
   * 50px - 28px padding = 22px 内容区，容得下 15px 字体。
   */
  height: 50px; line-height: 22px;
}
.input::placeholder { color: #B5AA9E; }
textarea.input { height: 100px; line-height: 1.7; padding: 12px 14px; }
.hint { font-size: 12.5px; color: #B5AA9E; margin-top: 7px; line-height: 1.75; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 11px 16px; border-radius: 999px; border: 1px solid #EFE6DC;
  background: #fff; font-size: 14.5px; color: #5A4C42; line-height: 1.5;
}
.chip.on { background: #3D3630; border-color: #3D3630; color: #fff; }
.chip.dash { border-style: dashed; color: #AEA398; font-size: 13px; }
.chip.word { font-size: 15px; padding: 12px 18px; text-align: left; }
.chip.word .sm { display: block; font-size: 11.5px; color: #AEA398; margin-top: 2px; line-height: 1.4; }
.chip.word.on .sm { color: rgba(255, 255, 255, .72); }

.bubble {
  background: #FDF0E9; border-radius: 20px 20px 20px 7px;
  padding: 22px; font-size: 15px; line-height: 2.05; color: #5A463C; white-space: pre-line;
}

.prog { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #B5AA9E; margin-bottom: 4px; }
.bar { flex: 1; height: 4px; background: #EFE6DC; border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #E8785C; border-radius: 2px; }

.modhd { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.modicon {
  width: 44px; height: 44px; border-radius: 13px; background: #FDF0E9;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto;
}
.modt { font-size: 17px; font-weight: 600; }
.modd { font-size: 12.5px; color: #AEA398; line-height: 1.5; }

.hair { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.hchip {
  font-size: 12.5px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid #EFE6DC; background: #FAF6F1; color: #5A4C42; line-height: 1.5;
}
.hchip.on { background: #3D3630; color: #fff; border-color: #3D3630; }
.hchip.add { border-style: dashed; color: #AEA398; }

.dangerbox { background: #FBE9E6; border: 1px solid #F0CFC8; border-radius: 16px; padding: 20px; margin-bottom: 14px; }
.dangerbox .fq { color: #A83C2D; font-weight: 600; }
.req { color: #E8785C; font-weight: 600; }

.rlwrap { position: relative; height: 22px; margin: 14px 0 4px; }
.rlwrap .rtrack { position: absolute; top: 9px; left: 0; right: 0; height: 4px; background: #EFE6DC; border-radius: 2px; }
.rlwrap .rfill { position: absolute; top: 9px; left: 0; height: 4px; background: #E8785C; border-radius: 2px; }
.rlwrap .rknob {
  position: absolute; top: 1px; width: 20px; height: 20px; margin-left: -10px;
  background: #fff; border: 1px solid #E8785C; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.rlabels { display: flex; justify-content: space-between; font-size: 11.5px; color: #B5AA9E; }
.rlabels .rv { color: #E8785C; font-weight: 600; }

/* ---------- 气质测试 ---------- */
.scene {
  background: #FDF0E9; border-radius: 999px; padding: 6px 14px;
  font-size: 12.5px; color: #C2553C; display: inline-block; margin-bottom: 13px;
}
.dimtag {
  background: #F1F0FC; color: #5C52A8; border-radius: 999px; padding: 2px 10px;
  font-size: 11.5px; margin-left: 8px; font-weight: 400;
}
.qtitle { font-size: 17px; font-weight: 500; line-height: 1.6; margin-bottom: 17px; }
.opt {
  display: block; width: 100%; text-align: left; padding: 14px 16px;
  border: 1px solid #EFE6DC; border-radius: 14px; background: #fff;
  font-size: 14.5px; margin-bottom: 10px; color: #4F4339; line-height: 1.7;
}
.opt.on { border-color: #E8785C; background: #FDF0E9; }
.opt .sc {
  display: inline-block; font-size: 11px; color: #C0B4A7; border: 1px solid #EFE6DC;
  border-radius: 5px; padding: 0 7px; margin-right: 9px; font-weight: 400;
}
.fb {
  margin-top: 15px; padding: 13px 16px; background: #F0F8F5;
  border: 1px dashed #CFE6E0; border-radius: 12px; font-size: 13.5px; color: #3F8577; line-height: 1.8;
  display: flex; align-items: center;
}
.fb .fbgo { font-size: 12.5px; color: #3F8577; white-space: nowrap; font-weight: 500; margin-left: 10px; }

/* 题号导航：一行 1-8 + 左右箭头 */
.qnav {
  display: flex; align-items: center; gap: 8px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid #EFE6DC;
}
.qnums { flex: 1; display: flex; justify-content: space-between; }
.qdot {
  width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid #EFE6DC; background: #FAF6F1; font-size: 12px; color: #AEA398;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.qdot.done { background: #EAF5EE; border-color: #C5E0D0; color: #5B9A86; }
.qdot.cur { background: #E8785C; border-color: #E8785C; color: #fff; font-weight: 600; }
.qarrow {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #8A7F75; background: #FAF6F1; border: 1px solid #EFE6DC; line-height: 1;
}
.qarrow.off { color: #DCD5CC; background: #FDFBF8; border-color: #F5F0E8; }
.qskip { text-align: center; font-size: 12.5px; color: #B5AA9E; margin-top: 12px; padding: 5px; }

/* ---------- 气质结果 ---------- */
.bigtitle {
  text-align: center; font-family: 'Songti SC', 'STSong', serif; font-style: italic;
  font-size: 27px; font-weight: 700; line-height: 1.4; margin: 6px 0 6px;
}
.bigname { text-align: center; font-size: 12.5px; color: #AEA398; letter-spacing: .14em; margin-bottom: 22px; }
.card.main { background: #FDF6F3; border-color: #F6D5CB; }
.maintitle { font-size: 17px; font-weight: 600; line-height: 1.6; margin-bottom: 12px; color: #8A4A32; }
.mainbody { font-size: 14px; line-height: 2.05; color: #5A463C; white-space: pre-line; }
.fh { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.dimrow { margin-bottom: 18px; }
.dimrow:last-child { margin-bottom: 0; }
.dimtop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.dimname { font-size: 13.5px; color: #8A7F75; }
.dimscore { font-size: 12px; color: #B5AA9E; }
.dimbar { height: 6px; background: #F7F2EB; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.dimbar i { display: block; height: 100%; background: linear-gradient(90deg, #F2A03C, #E8785C); border-radius: 3px; }
.dimdesc { font-size: 13px; color: #5A4C42; line-height: 1.85; }

.card.fit { text-align: center; }
.fitwrap { position: relative; width: 110px; height: 110px; margin: 6px auto 12px; }
.ring { width: 110px; height: 110px; display: block; transform: rotate(-90deg); }
.fitnum {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-52%);
  text-align: center; font-size: 27px; font-weight: 600; color: #E8785C; line-height: 1;
}
.fitnum span { font-size: 14px; }
.fittag {
  display: inline-block; font-size: 13px; background: #FDF0E9; color: #C2553C;
  padding: 5px 16px; border-radius: 999px; margin-bottom: 10px;
}
.fitdesc { font-size: 13.5px; color: #5A4C42; line-height: 1.9; padding: 0 4px; }

/* ---------- 快问快答两步式 ---------- */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qbtn {
  width: calc(25% - 6px); padding: 12px 4px; border: 1px solid #EFE6DC;
  border-radius: 12px; background: #fff; font-size: 12.5px; text-align: center; line-height: 1.4;
}
.qbtn.yes { background: #EAF5EE; border-color: #BFE0CC; color: #3F8577; }
.qbtn.no { background: #FBE9E6; border-color: #F0CFC8; color: #A8574A; }
.qbtn.picked { border-color: #E8785C; box-shadow: 0 0 0 2px rgba(232, 120, 92, .18); }
.quickpick { margin-top: 14px; background: #FAF6F1; border: 1px solid #EFE6DC; border-radius: 14px; padding: 16px; }
.qp-title { font-size: 14px; font-weight: 500; text-align: center; margin-bottom: 12px; }
.qp-btns { display: flex; gap: 10px; }
.qp-b {
  flex: 1; text-align: center; font-size: 14px; padding: 11px 0; border-radius: 12px;
  border: 1px solid #EFE6DC; background: #fff; line-height: 1.5;
}
.qp-b.yes { border-color: #BFE0CC; color: #3F8577; }
.qp-b.yes.on { background: #3F8577; color: #fff; border-color: #3F8577; }
.qp-b.no { border-color: #F0CFC8; color: #A8574A; }
.qp-b.no.on { background: #C9503F; color: #fff; border-color: #C9503F; }
.qp-b.skip { color: #AEA398; flex: 0 0 82px; }

/* ---------- 平行世界整幅 ---------- */
.pwbox {
  position: relative; border-radius: 24px; overflow: hidden;
  min-height: 520px; padding: 30px 22px 26px; color: #fff;
  box-shadow: 0 8px 30px rgba(60, 45, 50, .18);
}
.pwart { position: absolute; inset: 0; z-index: 0; }
.pwart img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pwveil { position: absolute; inset: 0; z-index: 1; }
.pwbody { position: relative; z-index: 2; }

.pwtop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.pwho { font-size: 11.5px; color: rgba(255, 255, 255, .8); }
.pswap {
  font-size: 11px; padding: 5px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .3); color: #fff;
}
.pwtitle {
  font-family: 'Songti SC', 'STSong', serif; font-style: italic;
  font-size: 25px; font-weight: 700; letter-spacing: .03em; margin-bottom: 9px;
}
.pwlabel {
  display: inline-block; font-size: 11px; letter-spacing: .16em;
  padding: 5px 16px; border-radius: 999px; margin-bottom: 26px;
}
.pl {
  text-align: center; font-size: 14.5px; line-height: 2.1; margin-bottom: 4px;
}
.pwend { margin-top: 24px; border-radius: 16px; padding: 18px; text-align: center; }
.pweye { font-size: 10px; letter-spacing: .16em; margin-bottom: 8px; }
.pendtext { font-size: 13.5px; line-height: 2.05; }
.pwsign { text-align: center; font-size: 11px; letter-spacing: .08em; margin: 18px 0 6px; }
.pwend2 { text-align: center; font-size: 16px; line-height: 2.1; }

.bgrow { margin-top: 4px; }
.bgrow-t { font-size: 13px; color: #8A7F75; margin-bottom: 10px; }

/* ---------- 预览页没覆盖、但小程序在用的 ---------- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: #B5AA9E;
  font-size: 13.5px;
  line-height: 2;
}
.emptyicon { font-size: 45px; display: block; margin-bottom: 12px; }

.fn {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fm { font-size: 12.5px; color: #8A7F75; line-height: 1.8; }
.pw { font-size: 12px; color: #B5AA9E; font-weight: 400; }

.fcard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 0.5px solid #EFE6DC;
  border-radius: 11px;
  padding: 14px 15px;
  margin-bottom: 9px;
}
.fcard .fava {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FDF0E9;
  color: #C2553C;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.fcard .fmain { flex: 1; min-width: 0; }
.fcard .fname { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }

.fbx { flex: 1; line-height: 1.8; }

/* 档案条目：左问题右答案，多个页面都在用 */
.arow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 0.5px solid #F3EDE4;
}
.arow:last-child { border-bottom: none; }
.ak { font-size: 13px; color: #5A4C42; flex: 1; }
.av { font-size: 13px; color: #B5AA9E; text-align: right; margin-left: 12px; }

.card.center { text-align: center; }
.card.center .fh { margin-bottom: 0; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sw {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid transparent;
}
.sw.on { border-color: #3D3630; }

.range { margin: 0 0 4px; }



/* ============================================================
   网页专属
   ============================================================ */

:root {
  --wb-max: 500px;      /* 内容最大宽度（平板上居中） */
}

html { -webkit-text-size-adjust: 100%; }

body.wb-body {
  margin: 0;
  padding: 0;
  background: #FFFBF6;
  color: #3D3630;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  /* 桌面端不要选中（像 App 一样） */
  -webkit-tap-highlight-color: transparent;
}

.wb-app {
  max-width: var(--wb-max);
  margin: 0 auto;
  min-height: 100vh;
  background: #FFFBF6;
  position: relative;
  overflow-x: hidden;
}

/* 桌面端给个边框，像手机 */
@media (min-width: 560px) {
  body.wb-body { background: #F0E6DC; }
  .wb-app { box-shadow: 0 0 40px rgba(0,0,0,.08); }
}

/* 小程序里的 <i> 是内置组件（图标），网页里就是 <i> */
i { font-style: normal; }

/* 按钮去掉默认样式 */
button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
button:disabled { cursor: default; opacity: .6; }

/* 图片 */
img { display: block; max-width: 100%; }

/* 滚动条（桌面端） */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #E0D5C8; border-radius: 3px; }

/* ============================================================
   wx 适配层生成的 UI（toast / modal / sheet / loading）
   ============================================================ */

.wb-toast {
  position: fixed;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%) scale(.9);
  background: rgba(50,44,38,.92);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 70%;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.wb-toast-in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.wb-toast-text { padding: 10px 18px; }

.wb-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity .18s;
}
.wb-mask-in { opacity: 1; }
.wb-mask-bottom { align-items: flex-end; }

.wb-modal {
  width: 280px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transform: scale(.95);
  transition: transform .18s;
}
.wb-mask-in .wb-modal { transform: scale(1); }
.wb-modal-title {
  padding: 22px 20px 0;
  font-size: 16px; font-weight: 500;
  text-align: center; color: #3D3630;
}
.wb-modal-content {
  padding: 12px 20px 22px;
  font-size: 14px; color: #6B5D52;
  text-align: center; line-height: 1.7;
  white-space: pre-wrap;
}
.wb-modal-btns { display: flex; border-top: 1px solid #EFE6DC; }
.wb-modal-btn {
  flex: 1; padding: 14px 0; text-align: center;
  font-size: 16px; cursor: pointer;
}
.wb-modal-cancel { color: #8A7F75; border-right: 1px solid #EFE6DC; }
.wb-modal-ok { color: #C2553C; }

.wb-sheet {
  width: 100%; max-width: var(--wb-max);
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform .22s;
}
.wb-mask-in .wb-sheet { transform: translateY(0); }
.wb-sheet-item {
  padding: 15px 20px; text-align: center;
  font-size: 16px; color: #3D3630;
  border-bottom: 1px solid #F5EFE8;
  cursor: pointer;
}
.wb-sheet-item:active { background: #FAF6F1; }
.wb-sheet-cancel { color: #8A7F75; border-bottom: none; margin-top: 6px; }

.wb-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 9997;
  pointer-events: none;
}
.wb-loading-box {
  background: rgba(50,44,38,.9);
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
}
.wb-loading-text { color: #fff; font-size: 13px; margin-top: 10px; }
.wb-spinner {
  width: 26px; height: 26px; margin: 0 auto;
  border: 2.5px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wb-spin .8s linear infinite;
}
@keyframes wb-spin { to { transform: rotate(360deg); } }
