/*!
 * 天赋能力测试 · 职业深度版 —— 样式
 * 移动端优先；桌面端居中为 480px 卡片式布局
 */

:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #94a3b8;
  --line: #e6ebf2;
  --bg: #f6f8fb;
  --brand: #0d9488;
  --brand-2: #14b8a6;
  --brand-3: #6366f1;
  --warn: #f59e0b;
  --radius: 20px;
  --shadow-s: 0 2px 10px rgba(15, 43, 58, .06);
  --shadow-m: 0 12px 34px rgba(15, 43, 58, .12);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 560px) {
  body {
    background:
      radial-gradient(900px 520px at 10% -10%, #d9f5f0 0%, rgba(217, 245, 240, 0) 58%),
      radial-gradient(900px 520px at 100% 0%, #e3e4ff 0%, rgba(227, 228, 255, 0) 55%),
      var(--bg);
    padding: 28px 0;
  }
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
  /* 不能加 overflow:hidden，否则答题页的 sticky 进度条会失效 */
}

@media (min-width: 560px) {
  .app { min-height: auto; border-radius: 28px; box-shadow: var(--shadow-m); }
  .screen--landing.is-active .hero,
  .screen--report.is-active .sharebanner,
  .screen--report.is-active .reporthero { border-radius: 28px 28px 0 0; }
}

/* ---------------- 屏幕切换 ---------------- */
.screen { display: none; }
.screen.is-active { display: block; }
.screen--quiz.is-active {
  display: flex; flex-direction: column; min-height: 100vh;
  position: relative;
  background-color: #f3f8fa;
  /* 答题页背景：三团柔光 + 一层极浅渐变，营造氛围但不抢题目的注意力 */
  background-image:
    radial-gradient(62% 42% at 94% -6%, rgba(99, 102, 241, .22) 0%, rgba(99, 102, 241, 0) 68%),
    radial-gradient(56% 36% at -10% 12%, rgba(20, 184, 166, .26) 0%, rgba(20, 184, 166, 0) 66%),
    radial-gradient(68% 46% at 48% 106%, rgba(56, 189, 248, .18) 0%, rgba(56, 189, 248, 0) 66%),
    radial-gradient(46% 30% at 110% 62%, rgba(129, 140, 248, .13) 0%, rgba(129, 140, 248, 0) 66%),
    linear-gradient(178deg, #f2fbfa 0%, #f5f7fe 50%, #f2f5fc 100%);
  background-repeat: no-repeat;
}
.screen--report.is-active { padding-bottom: 36px; }
@media (min-width: 560px) {
  .screen--quiz.is-active { min-height: 660px; border-radius: 28px; }
  .screen--quiz.is-active .quizbar { border-radius: 28px 28px 0 0; }
}
.is-hidden { display: none !important; }

/* ---------------- 通用 ---------------- */
.panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin: 14px;
  box-shadow: var(--shadow-s);
}
.panel--flush { background: transparent; box-shadow: none; margin-bottom: 0; padding-bottom: 0; }
.panel--actions {
  display: flex; flex-direction: column; gap: 10px;
  background: transparent; box-shadow: none; padding: 4px 14px 0; margin: 8px 0 0;
}
.panel--cta { text-align: center; }

.sectitle {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sectitle::before {
  content: "";
  width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand-3));
  flex: none;
}
.sectitle--num::before { display: none; }
.sectitle__score {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.secsub { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.subtitle {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.lead { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.legend {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 13.5px;
  line-height: 1.7;
}

.bullets { margin: 0; padding: 0; list-style: none; }
.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.bullets li::before {
  content: "";
  position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  border: 1px solid #cdeee9;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 11px;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
  white-space: nowrap;
}
.chip--light { background: rgba(255, 255, 255, .16); }

.btn {
  appearance: none; border: 0; width: 100%;
  padding: 15px 18px; border-radius: 16px;
  font-size: 16.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-align: center; text-decoration: none; display: block;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.985); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 135%);
  box-shadow: 0 8px 22px rgba(13, 148, 136, .3);
}
.btn--ghost { color: var(--brand); background: #effbf9; margin-top: 10px; }
.btn--ghost:disabled { opacity: .4; }
.btn--hero {
  background: #fff; color: #0f766e;
  box-shadow: 0 10px 26px rgba(4, 40, 48, .26);
  margin-top: 6px;
}
.btn--next { margin-top: 20px; opacity: .45; filter: saturate(.45); box-shadow: none; }
.btn--next.is-ready { opacity: 1; filter: none; box-shadow: 0 8px 22px rgba(13, 148, 136, .3); }

.fineprint {
  margin: 16px 4px 0;
  font-size: 12px; line-height: 1.7;
  color: var(--muted); text-align: center;
}
.fineprint--center { padding: 0 18px 10px; }
.fineprint b { color: var(--brand); }

.linkbtn {
  appearance: none; border: 0; background: none; padding: 0;
  font: inherit; color: var(--brand); font-weight: 700;
  text-decoration: underline; cursor: pointer;
}
.foot {
  padding: 22px 24px 34px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  padding: 38px 24px 34px;
  background: linear-gradient(158deg, #0f766e 0%, #14b8a6 48%, #6366f1 112%);
  color: #fff;
  overflow: hidden;
}
.hero__glow { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.hero__glow--a { width: 200px; height: 200px; top: -74px; right: -56px; }
.hero__glow--b { width: 150px; height: 150px; bottom: -86px; left: -46px; background: rgba(255, 255, 255, .13); }
.hero__inner { position: relative; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .92); margin-bottom: 20px;
}
.brand__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }

.hero__title {
  margin: 0 0 12px;
  font-size: 31px; line-height: 1.32; font-weight: 800; letter-spacing: .5px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, #fff 32%, #c7fff2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__badge {
  display: inline-block;
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  margin-bottom: 14px;
}
.hero__sub {
  margin: 0 0 20px;
  font-size: 13.5px; line-height: 1.85;
  color: rgba(255, 255, 255, .9);
}
.hero__stats {
  display: flex; margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 16px;
}
.statitem { flex: 1; text-align: center; }
.statitem b { display: block; font-size: 17px; font-weight: 800; }
.statitem span { font-size: 10.5px; color: rgba(255, 255, 255, .78); }

/* ---------------- 维度卡片 / 类型卡片 ---------------- */
.dimgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dimcard {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px 12px;
}
.dimcard__icon { font-size: 20px; line-height: 1.2; }
.dimcard__name { margin-top: 5px; font-size: 13.5px; font-weight: 700; }
.dimcard__short { margin-top: 3px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }

.typecard {
  border-left: 3px solid var(--brand-2);
  background: #f8fafc;
  border-radius: 0 14px 14px 0;
  padding: 13px 15px;
  margin-bottom: 10px;
}
.typecard:last-child { margin-bottom: 0; }
.typecard__name { font-size: 15px; font-weight: 700; color: var(--brand); }
.typecard__dims { font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: .3px; }
.typecard__desc { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin-top: 6px; }

.cta__title { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.cta__sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ---------------- 答题 ---------------- */
.quizbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  position: sticky; top: 0; z-index: 5;
  /* 毛玻璃顶栏，让背景的柔光透上来 */
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}
.iconbtn {
  appearance: none; border: 0; flex: none;
  background: #f1f5f9; color: var(--ink-2);
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding-bottom: 2px;
}
.iconbtn:disabled { opacity: .35; cursor: default; }
.progress { flex: 1; height: 8px; border-radius: 999px; background: #e8f3f2; overflow: hidden; }
.progress__fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transition: width .3s cubic-bezier(.4, 0, .2, 1);
}
.quizbar__counter {
  flex: none; min-width: 44px; text-align: right;
  font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.quizbody {
  flex: 1;
  padding: 24px 20px calc(30px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
@keyframes qIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* 换题时：题目与选项依次浮现，比整块横滑更耐看，50 题也不容易腻 */
.quizbody.anim-in .quizmeta,
.quizbody.anim-in .quiztext,
.quizbody.anim-in .scalehint { animation: qIn .3s ease backwards; }
.quizbody.anim-in .scale-item,
.quizbody.anim-in .choice-item { animation: qIn .36s cubic-bezier(.2, .7, .3, 1) backwards; }
.quizbody.anim-in .scale-item:nth-child(1),
.quizbody.anim-in .choice-item:nth-child(1) { animation-delay: .05s; }
.quizbody.anim-in .scale-item:nth-child(2),
.quizbody.anim-in .choice-item:nth-child(2) { animation-delay: .10s; }
.quizbody.anim-in .scale-item:nth-child(3) { animation-delay: .15s; }
.quizbody.anim-in .scale-item:nth-child(4) { animation-delay: .20s; }
.quizbody.anim-in .scale-item:nth-child(5) { animation-delay: .25s; }

.quizmeta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.quizdim {
  font-size: 12px; letter-spacing: .6px;
  color: var(--brand);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(13, 148, 136, .18);
  box-shadow: 0 4px 12px -8px rgba(13, 148, 136, .55);
  padding: 4px 11px; border-radius: 999px;
}
.quizleft { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiztext { margin: 0 0 22px; font-size: 20px; line-height: 1.55; font-weight: 700; }

.scalehint { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.scale, .choice { display: flex; flex-direction: column; gap: 9px; }
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.scale.shake, .choice.shake { animation: shakeX .3s ease; }

.scale-item {
  appearance: none; font-family: inherit;
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .07);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  cursor: pointer; text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 10px 22px -16px rgba(15, 23, 42, .34);
  transition: border-color .16s ease, background .16s ease, box-shadow .18s ease, transform .12s ease;
}
.scale-item:hover {
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05), 0 14px 26px -16px rgba(15, 23, 42, .36);
}
.scale-item:active { transform: scale(.99); }
.scale-item__dot {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.8px solid #cbd5e1; background: #fff;
  transition: all .16s ease;
}
.scale-item__label { flex: 1; font-size: 15px; }
.scale-item__num { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-item.is-picked {
  border-color: rgba(13, 148, 136, .55);
  background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .10), 0 12px 26px -14px rgba(13, 148, 136, .5);
}
.scale-item.is-picked .scale-item__dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 3px #fff;
}
.scale-item.is-picked .scale-item__label { font-weight: 600; color: #0f766e; }
.scale-item.is-picked .scale-item__num { color: var(--brand); font-weight: 700; }

.hint { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* 二选一题型 */
.choice-item {
  appearance: none; font-family: inherit; text-align: left;
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .07);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 10px 22px -16px rgba(15, 23, 42, .34);
  transition: border-color .16s ease, background .16s ease, box-shadow .18s ease, transform .12s ease;
}
.choice-item:hover {
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05), 0 14px 26px -16px rgba(15, 23, 42, .36);
}
.choice-item:active { transform: scale(.99); }
.choice-item__key {
  flex: none; width: 26px; height: 26px; border-radius: 9px;
  background: #f1f5f9; color: var(--muted);
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
  transition: all .16s ease;
}
.choice-item__text { font-size: 15.5px; line-height: 1.6; padding-top: 2px; }
.choice-item.is-picked {
  border-color: rgba(13, 148, 136, .55);
  background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .10), 0 12px 26px -14px rgba(13, 148, 136, .5);
}
.choice-item.is-picked .choice-item__key {
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
}

/* ---------------- 报告 ---------------- */
.sharebanner {
  margin: 12px 14px 0; padding: 12px 16px;
  border-radius: 14px;
  background: #fff7e6; border: 1px solid #ffe2b0; color: #8a5a00;
  font-size: 13.5px;
}

.reporthero {
  position: relative;
  padding: 30px 24px 28px;
  background: linear-gradient(158deg, #0f766e 0%, #14b8a6 50%, #6366f1 112%);
  color: #fff;
  overflow: hidden;
}
.reporthero__glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .17); top: -84px; right: -64px;
}
.reporthero__eyebrow { position: relative; font-size: 11.5px; letter-spacing: 1px; color: rgba(255, 255, 255, .82); }
.reporthero__type {
  position: relative;
  margin-top: 10px;
  font-size: 34px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.25;
}
.reporthero__tag { position: relative; margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .92); line-height: 1.7; }
.reporthero__index {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 8px;
  margin-top: 18px;
  padding: 8px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
}
.reporthero__indexnum { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.reporthero__indexlab { font-size: 12px; color: rgba(255, 255, 255, .85); }
.reporthero__chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* 雷达图 */
.radar { width: 100%; height: auto; display: block; font-family: var(--font); }
.radar__grid { fill: none; stroke: #e6ebf2; stroke-width: 1; }
.radar__axis { stroke: #e6ebf2; stroke-width: 1; }
.radar__area { fill: rgba(13, 148, 136, .2); stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.radar__dot { fill: var(--brand); }
.radar__label { font-size: 12px; font-weight: 600; fill: #475569; }
.radar__value { font-size: 11px; fill: #94a3b8; }

/* 维度条 */
.dbar { margin-bottom: 16px; }
.dbar:last-child { margin-bottom: 0; }
.dbar__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.dbar__name { font-size: 14px; font-weight: 600; }
.dbar__score { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dbar__score i { font-style: normal; font-size: 11px; font-weight: 500; margin-left: 1px; }
.dbar__track { height: 9px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.dbar__fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.3, 0, .2, 1); }
.dbar__foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 11.5px; }
.dbar__level { font-weight: 700; flex: none; }
.dbar__short { color: var(--muted); text-align: right; }

.lv-a { color: #0d9488; }
.lv-b { color: #6366f1; }
.lv-c { color: #64748b; }
.lv-d { color: #f59e0b; }
.dbar__fill.lv-a { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.dbar__fill.lv-b { background: linear-gradient(90deg, #6366f1, #818cf8); }
.dbar__fill.lv-c { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.dbar__fill.lv-d { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.ranknum {
  flex: none;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  padding: 3px 8px; border-radius: 7px;
}

/* 历史记录 */
.histitem {
  appearance: none; font-family: inherit;
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer;
}
.histitem:last-of-type { border-bottom: 0; }
.histitem__score {
  flex: none; min-width: 46px;
  font-size: 15px; font-weight: 800;
  color: var(--brand); background: #effbf9;
  padding: 6px 8px; border-radius: 10px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.histitem__meta { flex: 1; display: flex; flex-direction: column; }
.histitem__meta b { font-size: 14.5px; font-weight: 600; }
.histitem__meta i { font-style: normal; font-size: 12px; color: var(--muted); }
.histitem__go { font-size: 12.5px; color: var(--muted); }
#btn-hist-back { margin-top: 18px; }

/* ---------------- 海报弹层 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 30, 38, .7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal__panel {
  width: 100%; max-width: 380px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 24px; padding: 16px;
}
.modal__slot img { display: block; width: 100%; border-radius: 16px; box-shadow: var(--shadow-m); }
.modal__actions { margin-top: 14px; }
.modal__panel .fineprint { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
