/* ============================================================
   共享设计系统 · 温暖浅色   玻璃拟+ 柔和暖光+ 悬浮发光
   主题色由各测:root 提供 fallback，结构不侵入 JS。已移除深色模式，全站统一温暖浅色。   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&display=swap');

/* ---------- 变量（温暖浅色默认值） ---------- */
:root {
  --bg:         #fdf6ef;
  --bg-2:       #fbeee2;
  --surface:    rgba(255,255,255,0.66);
  --surface-h:  rgba(255,255,255,0.92);
  --border:     rgba(180,140,110,0.16);
  --border-h:   rgba(244,134,84,0.45);
  --text:       #4a3f33;
  --muted:      #997f68;
  --heading:    #2e2519;
  --card:       #fffdfa;
  --card-h:     #fff6ec;

  --primary:    #f4864e;
  --accent:     #ff7eb0;
  --primary-rgb:244,134,78;
  --accent-rgb: 255,126,176;
  --ok:         #3a9d6b;
  --warn:      #d99427;
  --err:       #e0604f;

  --glow-sm:    0 4px 16px rgba(244,134,78,0.12);
  --glow-md:    0 8px 32px rgba(244,134,78,0.16);
  --glow-lg:    0 16px 48px rgba(244,134,78,0.20);

  --radius:     20px;
  --radius-sm:  13px;
  --font:       'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- 基础 Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(180,140,110,0.25); border-radius: 10px; }

/* ---------- 背景光晕（温暖浅色氛围） ---------- */
.app-wrap {
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.app-wrap::before {
  content: '';
  position: fixed;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb),0.14), transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.app-wrap::after {
  content: '';
  position: fixed;
  top: 42%; right: -90px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.12), transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- App 容器 ---------- */
.app {
  position: relative; z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 16px 14px 90px;
}

/* ---------- 顶部---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 22px;
}
.topbar-back {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s; flex-shrink: 0;
}
.topbar-back:hover { background: var(--surface-h); border-color: var(--border-h); }
.topbar-title { font-size: 14px; font-weight: 700; color: var(--heading); }
.topbar .spacer { flex: 1; }

/* ---------- 进度---------- */
.progress-wrap { margin-bottom: 22px; }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted); margin-bottom: 8px;
  font-weight: 600; align-items: center;
}
.q-badge {
  background: rgba(var(--primary-rgb),0.12);
  border: 1px solid rgba(var(--primary-rgb),0.2);
  color: #a89cff; padding: 3px 11px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
}
.dim-badge {
  background: rgba(var(--accent-rgb),0.08);
  border: 1px solid rgba(var(--accent-rgb),0.18);
  color: #ff8fb6; padding: 3px 11px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700;
}
.progress-track {
  height: 6px; background: rgba(255,255,255,0.07);
  border-radius: 8px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px rgba(var(--primary-rgb),0.4);
}

/* ---------- 玻璃卡片 ---------- */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--glow-md);
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.04), rgba(var(--accent-rgb),0.03));
  pointer-events: none;
}

/* ---------- 标题文字 ---------- */
.intro-title, .title, h1 {
  font-size: clamp(20px, 5vw, 27px); font-weight: 800;
  color: var(--heading); line-height: 1.3; letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.intro-title em, .title em, h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.intro-sub, .subtitle, .sub, h2 {
  font-size: 13.5px; color: var(--muted); line-height: 1.8;
  margin: 0 0 24px;
}
.q-text, .question, h3 {
  font-size: 18px; font-weight: 700; color: var(--heading);
  line-height: 1.55; margin-bottom: 20px;
}
.dim-name { font-size: 19px; font-weight: 800; color: var(--heading); margin: 4px 0 6px; letter-spacing: -0.3px; }
.dim-desc { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.65; }

/* ---------- 按钮 ---------- */
.btn {
  display: block; width: 100%; border: none; border-radius: var(--radius-sm);
  padding: 16px; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
  font-family: inherit; text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(var(--primary-rgb),0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; pointer-events: none; transform: none; box-shadow: none; }

.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-h); border-color: var(--border-h); transform: translateY(-1px); }

.btn-nav { display: flex; gap: 10px; margin-top: 20px; }
.btn-nav .btn { flex: 1; }

/* ---------- 选项 ---------- */
.option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 9px; cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s, box-shadow .12s;
}
.option:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  transform: translateY(-1px);
}
.option.selected, .option.active {
  background: rgba(var(--primary-rgb),0.1);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(var(--primary-rgb),0.15);
}
.option:active { transform: scale(0.98); }

.opt-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted);
  transition: all .12s;
}
.option.selected .opt-dot, .option.active .opt-dot {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 10px rgba(var(--primary-rgb),0.4);
}
.opt-letter {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--muted);
  transition: all .12s;
}
.option.selected .opt-letter, .option.active .opt-letter {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent; color: #fff;
}
.option-text { font-size: 14px; line-height: 1.5; flex: 1; }

/* ---------- 结果---------- */
.result-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glow-md);
  position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.result-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(var(--primary-rgb),0.1);
  border: 1px solid rgba(var(--primary-rgb),0.2);
  color: #a89cff; font-size: 11.5px; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
}
.result-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(0.7);} }

.result-title { font-size: 13px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.result-score {
  font-size: 38px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin: 10px 0;
}
.result-main {
  font-size: 22px; font-weight: 800; color: var(--heading);
  margin: 8px 0 14px;
}
.result-main .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-desc {
  font-size: 13.5px; line-height: 1.85; color: var(--muted);
}
.result-desc b { color: var(--heading); font-weight: 700; }

/* ---------- 评分---------- */
.bar-row { margin: 14px 0; }
.bar-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar-meta b { font-weight: 700; color: var(--heading); font-size: 13px; }
.bar-val {
  font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bar-track { height: 10px; background: rgba(255,255,255,0.06); border-radius: 8px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .7s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px rgba(var(--primary-rgb),0.35);
}

/* ---------- 网格卡片 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; text-align: center;
}
.grid-item .k { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.grid-item .v {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}

/* ---------- 标签 ---------- */
.tag { display: inline-block; }
.tag-primary {
  background: rgba(var(--primary-rgb),0.12);
  border: 1px solid rgba(var(--primary-rgb),0.2);
  color: #a89cff; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px;
}
.tag-accent {
  background: rgba(var(--accent-rgb),0.12);
  border: 1px solid rgba(var(--accent-rgb),0.2);
  color: #ff8fb6; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.tag-ok {
  background: rgba(52,178,123,0.12);
  border: 1px solid rgba(52,178,123,0.2);
  color: #34b27b; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.tag-warn {
  background: rgba(224,162,58,0.12);
  border: 1px solid rgba(224,162,58,0.2);
  color: #e0a23a; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.tag-err {
  background: rgba(255,87,87,0.12);
  border: 1px solid rgba(255,87,87,0.2);
  color: #ff5757; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}

/* ---------- 列表 ---------- */
.tips { margin-top: 18px; }
.tip-item {
  display: flex; gap: 10px; margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
}
.tip-item::before {
  content: attr(data-n);
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(var(--primary-rgb),0.15);
  border: 1px solid rgba(var(--primary-rgb),0.2);
  color: #a89cff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tip-item b { color: var(--heading); font-weight: 700; }

/* ---------- 分隔---------- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  margin: 18px 0;
}

/* ---------- 刻度按钮（选项）---------- */
.scale { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin-bottom: 6px; }
.scale button {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  padding: 14px 4px; aspect-ratio: 1;
  transition: background .12s, border-color .12s, transform .12s, box-shadow .12s;
  font-family: inherit; line-height: 1;
}
.scale button:hover { background: var(--surface-h); border-color: var(--border-h); transform: translateY(-2px); }
.scale button.selected, .scale button.sel {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb),0.45);
  transform: translateY(-2px);
}
.scale-anchors { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; padding: 0 2px; }

/* ---------- 性别选择 ---------- */
.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.gender-btn {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 16px; text-align: center;
  transition: background .12s, border-color .12s, transform .12s, box-shadow .12s;
  font-family: inherit; line-height: 1.3;
}
.gender-btn:hover { background: var(--surface-h); border-color: var(--border-h); transform: translateY(-2px); }
.gender-btn.selected, .gender-btn.sel {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb),0.45);
  transform: translateY(-2px);
}
.gender-btn .icon { font-size: 24px; display: block; margin-bottom: 6px; }

/* ---------- 免责声明 ---------- */
.note {
  font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px; margin-top: 18px; line-height: 1.75;
}
.note b { color: var(--text); font-weight: 700; }

/* ---------- Hero 卡片 ---------- */
.hero-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
  box-shadow: var(--glow-md);
  margin-bottom: 16px;
}
.hero-card::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb),0.2), transparent 70%);
  filter: blur(40px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(var(--primary-rgb),0.12);
  border: 1px solid rgba(var(--primary-rgb),0.25);
  color: #a89cff; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px; margin-bottom: 14px;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 8px var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ---------- 语言切换 ---------- */
.lang-switch { display: flex; gap: 5px; }
.lang-btn {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 12px; padding: 5px 11px;
  border-radius: 20px; transition: background .15s, border-color .15s;
}
.lang-btn.on {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb),0.35);
}

/* ---------- 复制成功提示 ---------- */
.copied-msg { font-size: 12px; color: var(--ok); margin-top: 8px; text-align: center; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 雷达图区---------- */
.radar-section { margin-top: 20px; padding-top: 20px; border-top: 1px dashed rgba(255,255,255,0.06); }
.radar-title { font-size: 13px; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.radar-canvas { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 16px; }

/* ---------- 响应---------- */
@media (max-width: 400px) {
  .scale { grid-template-columns: repeat(5,1fr); gap: 5px; }
  .grid-item .v { font-size: 22px; }
  .result-score { font-size: 30px; }
}

