/* ==========================================================================
   HCL-32 轻躁狂量表 · 复刻版
   设计基调：暖橙渐变 + 奶油底色 + 大圆角卡片
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --orange:      #FF7507;
  --orange-deep: #E96100;
  --orange-soft: #FFAA56;
  --orange-pale: #FFE9D6;

  --cream:  #FFF5ED;
  --paper:  #FFF9F4;
  --line:   #F5E3D3;

  --ink:    #2E2118;
  --ink-2:  #574539;
  --muted:  #8C7A6B;
  --faint:  #B9A697;

  --green:  #2F9E74;
  --amber:  #DF9A21;
  --red:    #D0462A;

  --tier:   #FF7507;

  --radius: 20px;
  --shadow: 0 8px 26px rgba(168, 105, 48, .09);
  --shadow-lg: 0 16px 40px rgba(168, 105, 48, .14);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Segoe UI", sans-serif;
}

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 50% -8%, #FFE2C4 0%, rgba(255, 226, 196, 0) 62%),
    #EFE4D9;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--paper);
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(120, 80, 40, .05), 0 24px 70px rgba(120, 80, 40, .14);
}

@media (max-width: 480px) {
  body { display: block; background: var(--paper); }
  #app { max-width: none; box-shadow: none; }
}

.view { animation: viewIn .32s ease both; }

/* 只动 opacity：带 transform 的入场动画会让 position:fixed 的子元素
   变成相对整页定位，底部的 CTA 条会跑到页面最末尾 */
@keyframes viewIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   通用组件
   -------------------------------------------------------------------------- */

.btn {
  border: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .14s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
  user-select: none;
}
.btn:active { transform: scale(.98); }

.btn--primary {
  background: linear-gradient(135deg, #FF9A32 0%, #FF6400 100%);
  color: #fff;
  padding: 15px 26px;
  font-size: 16px;
  letter-spacing: .5px;
  box-shadow: 0 10px 22px rgba(255, 110, 10, .28);
}
.btn--primary:disabled {
  background: #F1DCCA;
  color: #AE9481;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid #F0DCC9;
  padding: 14px 22px;
  font-size: 15px;
}
.btn--ghost:active { background: #FFF7F0; }
.btn--ghost:disabled {
  color: #C6AE9C;
  border-color: #F5E7DA;
  background: #FFFCFA;
  cursor: not-allowed;
}

.btn--block { display: flex; width: 100%; }

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 235, 219, .9);
}
.card + .card { margin-top: 12px; }
.card p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.88;
  color: var(--ink-2);
}
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--orange-deep); font-weight: 700; }
.card em { font-style: normal; color: var(--ink); font-weight: 600; }
.card--muted { background: #FFFCF8; box-shadow: none; border: 1px dashed #F0DCC9; }
.card__h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--ink); }
.card__lead {
  font-size: 15px !important;
  font-weight: 700;
  color: var(--ink) !important;
  line-height: 1.8 !important;
}

.sec { margin-top: 26px; }
.sec__head { text-align: center; margin-bottom: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF9A32, #FF6A00);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 0 #F2AC7C, 0 10px 20px rgba(255, 117, 7, .2);
  position: relative;
}
.badge::before, .badge::after {
  content: "✦";
  font-size: 9px;
  opacity: .85;
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.6px;
  color: #D08A4F;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   首页 · 头部
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(16px + env(safe-area-inset-top)) 22px 28px;
  color: #fff;
  background: linear-gradient(155deg, #FFA845 0%, #FF7C12 48%, #F06305 100%);
  border-radius: 0 0 32px 32px;
}
.hero::after {
  content: "";
  position: absolute;
  left: -30%; right: -30%; bottom: -70%;
  height: 240px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent 70%);
  pointer-events: none;
}

.hero__deco {
  position: absolute;
  right: -46px;
  top: -50px;
  width: 290px;
  height: 290px;
  pointer-events: none;
}

.hero__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .8px;
}
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
}
.hero__tag {
  font-size: 11px;
  letter-spacing: .5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(4px);
}

.hero__title {
  position: relative;
  margin: 0;
  font-size: clamp(27px, 8.2vw, 33px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(150, 60, 0, .14);
}
.hero__title small {
  display: block;
  margin-top: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.6px;
  color: rgba(255, 255, 255, .82);
  text-shadow: none;
}

.hero__slogan {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 18px 0 0;
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: .5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(4px);
}

.hero__meta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .92);
}
.hero__meta b {
  font-size: 15px;
  font-weight: 800;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.hero__meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------------------
   首页 · 内容
   -------------------------------------------------------------------------- */

.home { padding: 20px 16px 124px; }

.intro__title {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: .2px;
}
.intro__quote {
  margin-top: 16px !important;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cream);
  border-left: 3px solid var(--orange-soft);
  font-size: 13.5px !important;
  color: var(--ink-2) !important;
  line-height: 1.8 !important;
}

.moments { padding: 16px 14px; }
.moment { display: flex; gap: 10px; align-items: flex-start; }
.moment + .moment { margin-top: 12px; }
.moment__icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-top: 3px;
}
.moment__bubble {
  position: relative;
  flex: 1;
  margin: 0 !important;
  padding: 13px 15px;
  border-radius: 4px 16px 16px 16px;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #3B2C22 !important;
  font-weight: 500;
}
.moment__bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 12px;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 1px;
}

.gain { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.gain:first-child { padding-top: 2px; }
.gain:last-child { border-bottom: 0; padding-bottom: 0; }
.gain__n {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #FFB25E, #FF7507);
  box-shadow: 0 5px 12px rgba(255, 117, 7, .28);
  margin-top: 1px;
}
.gain__t { margin: 0 0 5px; font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.gain__d { margin: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }

.fit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
}
.fit:last-child { border-bottom: 0; padding-bottom: 0; }
.fit:first-child { padding-top: 0; }
.fit__ok {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFF1E4;
  color: var(--orange);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

ol.notice { margin: 0; padding: 0; list-style: none; counter-reset: n; }
ol.notice li {
  position: relative;
  padding-left: 27px;
  margin-bottom: 13px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
  counter-increment: n;
}
ol.notice li:last-child { margin-bottom: 0; }
ol.notice li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--cream);
  color: var(--orange-deep);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.legal {
  margin: 30px 4px 0;
  font-size: 11.5px;
  line-height: 1.95;
  color: #A8968A;
  text-align: center;
}
.legal strong { color: var(--orange-deep); }

/* 续测提示 */
.resume {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1.5px solid #FFD9B8;
  border-radius: 16px;
  background: linear-gradient(120deg, #FFF6EC, #FFFFFF);
  box-shadow: 0 8px 20px rgba(255, 140, 40, .1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: viewIn .3s ease both;
}
.resume__ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #FFEBD8;
  color: var(--orange-deep);
  font-size: 17px;
  font-weight: 700;
}
.resume__txt { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.resume__txt b { font-size: 14px; font-weight: 800; color: var(--ink); }
.resume__txt i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.resume__go { font-size: 13px; font-weight: 700; color: var(--orange-deep); }

/* 底部操作条 */
.cta-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 249, 244, 0), rgba(255, 249, 244, .94) 34%, #FFF9F4 68%);
  backdrop-filter: blur(6px);
  z-index: 20;
}
.cta-bar .btn--primary { flex: 1; }
.cta-bar__ghost {
  flex: none;
  width: 58px;
  height: 50px;
  border-radius: 16px;
  border: 1.5px solid #F0DCC9;
  background: #fff;
  color: var(--orange-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  transition: background .2s;
}
.cta-bar__ghost:active { background: #FFF6EC; }

/* --------------------------------------------------------------------------
   答题页
   -------------------------------------------------------------------------- */

#view-test {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
}

.quiz-head {
  padding: calc(14px + env(safe-area-inset-top)) 18px 16px;
  color: #fff;
  background: linear-gradient(160deg, #FFA845 0%, #FF7C12 58%, #F06305 100%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 12px 26px rgba(240, 99, 5, .16);
}
.quiz-head__row { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s;
}
.icon-btn:active { background: rgba(255, 255, 255, .3); }
.quiz-head__kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .76);
}
.quiz-head__title { margin: 3px 0 0; font-size: 16px; font-weight: 800; letter-spacing: .4px; }
.quiz-head__idx {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar {
  margin-top: 15px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFE7C6, #fff);
  transition: width .4s cubic-bezier(.3, .8, .3, 1);
}
.quiz-head__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .82);
  font-variant-numeric: tabular-nums;
}

.quiz-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 16px 12px;
  display: flex;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

.qcard {
  width: 100%;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #FFEEDF;
  box-shadow: var(--shadow-lg);
  padding: 26px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.qcard__kicker {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #E9A66F;
}
.qcard__text {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink);
}
.qcard__tip {
  margin: 16px 0 0;
  padding-top: 4px;
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  line-height: 1.6;
}

.opts { display: flex; flex-direction: column; gap: 10px; }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 15px;
  border: 1.5px solid #F3E2D2;
  background: #FFFCF9;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
}
.opt:active { transform: scale(.99); }
.opt__mark {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #E3CBB6;
  transition: border-color .18s, background .18s;
}
.opt__label { font-weight: 700; }
.opt__hint {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--faint);
  transition: color .18s;
  white-space: nowrap;
}
.opt.is-selected {
  border-color: #FF8A2B;
  background: #FFF6EC;
  box-shadow: 0 6px 16px rgba(255, 117, 7, .1);
}
.opt.is-selected .opt__mark { border-color: var(--orange); background: var(--orange); }
.opt.is-selected .opt__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fff;
}
.opt.is-selected .opt__hint { color: var(--orange-deep); }

.quiz-foot {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--paper);
  box-shadow: 0 -12px 20px rgba(255, 249, 244, .92);
  z-index: 2;
}
.quiz-foot .btn--ghost { flex: 0 0 100px; }
.quiz-foot .btn--primary { flex: 1; }

/* --------------------------------------------------------------------------
   基本信息页
   -------------------------------------------------------------------------- */

.simple-head {
  padding: calc(28px + env(safe-area-inset-top)) 22px 22px;
  background: linear-gradient(165deg, #FFF0DF 0%, #FFF9F4 100%);
  border-radius: 0 0 28px 28px;
  text-align: center;
}
.simple-head__title {
  margin: 8px 0 6px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .5px;
}
.simple-head__sub { margin: 0; font-size: 12.5px; color: var(--muted); }

.info-body { padding: 18px 16px 40px; }

.field { margin-bottom: 22px; }
.field--last { margin-bottom: 0; }
.field__label {
  display: block;
  margin-bottom: 11px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.field__label::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--orange-soft);
  vertical-align: 3px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.segmented button {
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid #F3E2D2;
  background: #FFFCF9;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
}
.segmented button.is-active {
  border-color: var(--orange);
  background: #FFF6EC;
  color: var(--orange-deep);
  box-shadow: 0 6px 16px rgba(255, 117, 7, .12);
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips button {
  padding: 10px 14px;
  border-radius: 11px;
  border: 1.5px solid #F3E2D2;
  background: #FFFCF9;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.chips button.is-active {
  border-color: var(--orange);
  background: #FFF6EC;
  color: var(--orange-deep);
  box-shadow: 0 5px 14px rgba(255, 117, 7, .12);
}

.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 18px;
  font-size: 11.5px;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   报告中心
   -------------------------------------------------------------------------- */

.orders-body { padding: 18px 16px 40px; }

.orders-empty {
  margin-bottom: 16px;
  padding: 34px 22px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid #FFEEDF;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.orders-empty__ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: linear-gradient(150deg, #FFF3E6, #FFE3CB);
}
.orders-empty b { display: block; margin-bottom: 6px; font-size: 15.5px; color: var(--ink); }
.orders-empty p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--muted); }

.order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px 16px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid #FFEEDF;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease;
}
.order-card:active { transform: scale(.99); }
.order-card__bar { flex: none; width: 4px; height: 34px; border-radius: 99px; }
.order-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.order-card__main b { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.order-card__main i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.order-card__state {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: #A08B7B;
  background: #F6EDE5;
}
.order-card__state.is-on { color: var(--orange-deep); background: #FFF1E4; }

#ordersStartBtn { margin-top: 6px; }

/* 本地数据说明 */
.privacy-note {
  margin: 18px 4px 0;
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--faint);
}
.privacy-note strong { color: #9C8878; font-weight: 700; }

/* 合规说明 */
.legal-note {
  margin: 18px 4px 0;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--faint);
  text-align: center;
}
.legal-note--report { margin: 24px 6px 0; }

/* 报告底部：保存长图 */
.report-save { margin-top: 26px; }
.report-save__hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--faint);
  text-align: center;
}

/* --------------------------------------------------------------------------
   报告生成（过渡页）
   -------------------------------------------------------------------------- */

#view-transition {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper);
}

.trans-top {
  padding: calc(48px + env(safe-area-inset-top)) 20px 96px;
  text-align: center;
  background: linear-gradient(180deg, #FFBE82 0%, #FFA95F 100%);
}
.trans-icon { width: 112px; height: 112px; margin: 0 auto 14px; }
.trans-icon svg { width: 100%; height: 100%; display: block; }
.trans-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .6px;
  color: #fff;
}
.dots { display: inline-flex; gap: 3px; margin-left: 6px; }
.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  animation: dotPulse 1.15s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: .14s; }
.dots i:nth-child(3) { animation-delay: .28s; }
.dots i:nth-child(4) { animation-delay: .42s; }
@keyframes dotPulse {
  0%, 70%, 100% { opacity: .35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.trans-card {
  position: relative;
  margin: -66px 16px 0;
  padding: 4px 18px 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(168, 105, 48, .16);
}

.trans-tabs { display: flex; border-bottom: 1px solid #F6E7D8; }
.trans-tab {
  flex: 1;
  padding: 15px 0 13px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #B9A697;
  position: relative;
  cursor: default;
  transition: color .25s;
}
.trans-tab.is-active { color: var(--orange); font-weight: 800; }
.trans-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
}

.trans-row { padding: 17px 0 0; animation: fadeIn .3s ease both; }
.trans-row__label { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: #5C4A3D; }
.trans-bar { height: 7px; border-radius: 99px; background: #FFF5ED; overflow: hidden; }
.trans-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFC48A, #FFAC60);
  transition: width 2.5s linear;
}

.trans-hint {
  margin: 20px 24px 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   结果页
   -------------------------------------------------------------------------- */

.result-hero {
  position: relative;
  padding: calc(22px + env(safe-area-inset-top)) 20px 20px;
  text-align: center;
  background: linear-gradient(180deg, #FFEEDC 0%, #FFF9F4 100%);
  border-radius: 0 0 28px 28px;
}

.ring-wrap {
  position: relative;
  width: 186px;
  height: 186px;
  margin: 12px auto 6px;
}
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: #FFE6D3; stroke-width: 12; }
.ring__value {
  fill: none;
  stroke: var(--tier);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.15s cubic-bezier(.25, .8, .3, 1), stroke .4s;
}
.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 3px;
}
.ring-center b {
  font-size: 46px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ring-center span { font-size: 11px; color: var(--faint); letter-spacing: 1px; }

.tier-title {
  margin: 10px 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--ink);
}
.tier-tag { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

.chips-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--tier);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(168, 105, 48, .1);
  font-variant-numeric: tabular-nums;
}
.chip--ghost { color: var(--muted); background: rgba(255, 255, 255, .55); }

.result-date { margin: 12px 0 0; font-size: 11px; color: var(--faint); letter-spacing: .3px; }

.result-body { padding: 18px 16px 40px; }

.dim { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.dim:first-child { padding-top: 0; }
.dim:last-child { border-bottom: 0; padding-bottom: 0; }
.dim__top { display: flex; align-items: baseline; gap: 8px; }
.dim__name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.dim__score {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
  color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
}
.dim__score i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--faint); }
.dim__track {
  height: 8px;
  border-radius: 99px;
  background: #FBEADB;
  margin: 10px 0 10px;
  overflow: hidden;
}
.dim__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFB463, #FF7000);
  transition: width .95s cubic-bezier(.25, .8, .3, 1);
}
.dim__desc { margin: 0; font-size: 12.8px; line-height: 1.8; color: var(--muted); }

/* 高分条目 */
.hl {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.hl:first-child { padding-top: 0; }
.hl:last-child { border-bottom: 0; padding-bottom: 0; }
.hl__n {
  flex: none;
  width: 26px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--orange-deep);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hl__t { flex: 1; }

/* 参考文献 */
.ref-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ref-cite { font-size: 11.5px; line-height: 1.75; color: var(--faint); }

.arche {
  border-radius: 20px;
  padding: 20px 18px;
  color: #fff;
  background: linear-gradient(150deg, #FF9C3A, #FF6A00);
  box-shadow: 0 16px 34px rgba(255, 110, 10, .28);
  position: relative;
  overflow: hidden;
}
.arche::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, .07);
}
.arche__k {
  margin: 0 0 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 2.6px;
  opacity: .72;
}
.arche__name { margin: 0 0 5px; font-size: 24px; font-weight: 800; letter-spacing: 1.5px; }
.arche__tag { margin: 0 0 12px; font-size: 12.5px; opacity: .92; letter-spacing: .3px; }
.arche__desc { margin: 0; font-size: 13.5px; line-height: 1.85; opacity: .96; position: relative; z-index: 1; }

.advice { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.advice:first-child { padding-top: 0; }
.advice:last-child { border-bottom: 0; padding-bottom: 0; }
.advice__n {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--orange-deep);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
}
.advice__t { margin: 0; font-size: 13.6px; line-height: 1.8; color: var(--ink-2); }

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 26px;
}
.result-actions .btn { width: 100%; padding: 13px 6px; font-size: 13px; }
.result-actions .btn--primary { grid-column: 1 / -1; padding: 14px; font-size: 14.5px; }

/* --------------------------------------------------------------------------
   付费墙
   -------------------------------------------------------------------------- */

.pay-lock { animation: fadeIn .3s ease both; }

/* 免费第一屏：分级结论 + 两条因子 */
.teaser {
  padding: 18px 18px 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid rgba(255, 235, 219, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.teaser__summary {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
  font-weight: 600;
}
.teaser__factors { display: flex; flex-direction: column; gap: 14px; }
.teaser__factors .dim { padding: 0; border: 0; }
.teaser__factors .dim__track { margin-bottom: 0; }

.pay-lock__box {
  padding: 24px 18px 18px;
  text-align: center;
  background: #fff;
  border: 1px solid #FFEEDF;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.pay-lock__ico {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: linear-gradient(150deg, #FFF3E6, #FFE3CB);
}
.pay-lock__title { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.pay-lock__note { margin: 0 0 16px; font-size: 12.8px; line-height: 1.78; color: var(--muted); }
.pay-lock__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-bottom: 16px;
}
.pay-lock__price b {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
}
.pay-lock__price span { font-size: 11.5px; color: var(--faint); }
.pay-lock__tip { margin: 12px 0 0; font-size: 11px; color: var(--faint); text-align: center; }

.pay-lock__kefu {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--orange-deep);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 117, 7, .45);
  padding-bottom: 2px;
}
.pay-lock__kefu:active { opacity: .7; }

/* 免费第一屏里的小号因子行 */
.dim--mini { padding: 0; border: 0; }
.dim--mini .dim__track { margin: 8px 0 0; }

/* --------------------------------------------------------------------------
   支付回跳确认页（原 paid.html）
   -------------------------------------------------------------------------- */

#view-paid {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 20px;
  background:
    radial-gradient(700px 420px at 50% -10%, #FFE2C4, rgba(255, 226, 196, 0) 65%),
    var(--paper);
}
.paid-card {
  width: 100%;
  max-width: 340px;
  padding: 28px 20px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid #FFEEDF;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(168, 105, 48, .16);
}
.spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid #FFE3CC;
  border-top-color: var(--orange);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.paid-card h1 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--ink);
}
.paid-card h1.is-bad { color: var(--red); }
.paid-card p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted); }

.paid-btns { display: grid; gap: 10px; margin-top: 20px; }
.paid-btns .btn { width: 100%; }

.paid-order { margin-top: 14px !important; font-size: 11.5px !important; color: var(--faint) !important; word-break: break-all; }

/* --------------------------------------------------------------------------
   弹层 / Toast
   -------------------------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(45, 28, 16, .46);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.overlay__card {
  width: 100%;
  max-width: 330px;
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(60, 30, 10, .26);
  animation: pop .26s cubic-bezier(.2, .9, .3, 1.1) both;
  text-align: center;
}
@keyframes pop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.overlay__title { margin: 0 0 10px; font-size: 18px; font-weight: 800; }
.overlay__text { margin: 0 0 20px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.overlay__btns { display: flex; gap: 10px; }
.overlay__btns .btn { flex: 1; padding: 13px 10px; font-size: 14.5px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translate(-50%, 12px);
  z-index: 80;
  max-width: 80vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(46, 33, 24, .93);
  color: #fff;
  font-size: 12.5px;
  letter-spacing: .3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   细节修正
   -------------------------------------------------------------------------- */

@media (max-width: 359px) {
  .qcard__text { font-size: 18px; }
  .opt__hint { display: none; }
  .hero__title { font-size: 25px; }
  .ring-wrap { width: 160px; height: 160px; }
  .ring-center b { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
