/* assets/app.css - 「听力年龄挑战」活力社交主题 */
:root {
  --brand: #5b3fd4; --brand-light: #7c5cf0;
  --bg: #f4f3fb; --card: #fff;
  --ink: #1e1b31; --sub: #6b6685; --line: #e3e0f2;
  --amber: #d97706; --red: #dc2626;
  --gold: #f59e0b; --pink: #ec4899;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: #d9d5ec; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); font-size: 17px; line-height: 1.7;
}
.phone {
  max-width: 480px; margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(91, 63, 212, .14);
}
#view { flex: 1; padding-bottom: 24px; }

/* ---------- 按钮 ---------- */
.btn-primary, .btn-outline, .btn-plain {
  display: flex; align-items: center; justify-content: center;
  width: 100%; border-radius: 14px; border: none; cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  height: 56px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff;
  font-size: 19px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(91, 63, 212, .35);
}
.btn-primary:disabled { background: #b9b3d9; box-shadow: none; }
.btn-outline {
  height: 52px; background: #fff; color: var(--brand);
  font-size: 18px; font-weight: 600; border: 2px solid var(--brand);
}
.btn-plain { background: none; color: var(--sub); font-size: 15px; padding: 10px; }

/* ---------- 卡片与文字 ---------- */
.card {
  background: var(--card); border-radius: 16px;
  padding: 20px; margin: 14px 16px;
  box-shadow: 0 2px 10px rgba(91, 63, 212, .07);
}
.page-head { padding: 26px 20px 6px; }
.page-title { font-size: 25px; font-weight: 800; }
.page-sub { color: var(--sub); font-size: 15px; margin-top: 4px; }
.section-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.text-sub { color: var(--sub); font-size: 15px; }
.text-small { color: var(--sub); font-size: 13px; }

/* ---------- 首页 hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #3b2585 0%, #5b3fd4 55%, #7c5cf0 100%);
  padding: 46px 24px 56px; color: #fff;
}
.hero-tag { margin-bottom: 14px; }
.ad-tag {
  display: inline-block; font-size: 11px; color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 0 8px; line-height: 18px;
}
.hero-title { font-size: 32px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.hero-sub { font-size: 16px; color: #d9d2f7; margin-bottom: 28px; }
.hero-btn {
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--brand);
  height: 60px; border-radius: 16px;
  font-size: 21px; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.hero-note { margin-top: 14px; font-size: 12px; color: #b6aee0; text-align: center; }
.hero-badge {
  position: absolute; top: 46px; right: 24px;
  width: 108px; height: 108px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 2px dashed rgba(255,255,255,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(8deg);
}
.hero-badge .n { font-size: 30px; font-weight: 800; }
.hero-badge .t { font-size: 11px; color: #d9d2f7; }
.hero-notes span {
  position: absolute; color: rgba(255,255,255,.16);
  font-size: 28px; animation: floatNote 6s ease-in-out infinite;
}
.hero-notes span:nth-child(1) { bottom: 24%; right: 18%; animation-delay: 0s; }
.hero-notes span:nth-child(2) { top: 16%; right: 40%; font-size: 36px; animation-delay: 1.5s; }
.hero-notes span:nth-child(3) { bottom: 14%; left: 8%; font-size: 22px; animation-delay: 3s; }
@keyframes floatNote {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

/* ---------- 战报卡（分享图实体化） ---------- */
.battle-card {
  margin: 14px 16px;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, #3b2585, #6d4de0);
  color: #fff; padding: 28px 24px;
  position: relative;
  box-shadow: 0 8px 24px rgba(59, 37, 133, .3);
}
.battle-card::after {
  content: '♪'; position: absolute; right: 18px; top: 12px;
  font-size: 64px; color: rgba(255,255,255,.1);
}
.bc-label { font-size: 13px; color: #c9bdf2; }
.bc-age { font-size: 52px; font-weight: 800; line-height: 1.2; }
.bc-quip { font-size: 16px; margin-top: 6px; color: #efeaff; }
.bc-foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: 11px; color: #b6aee0;
  display: flex; justify-content: space-between;
}

/* ---------- 排行榜 ---------- */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  background: #f8f7fd; border: 2px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.rank-item.first { border-color: var(--gold); background: #fffaf0; }
.rank-medal { flex: none; font-size: 24px; }
.rank-who { flex: 1; font-size: 16px; font-weight: 600; }
.rank-age { font-size: 15px; color: var(--sub); }
.rank-age b { font-size: 20px; color: var(--brand); }
.rank-mock { text-align: center; font-size: 12px; color: #a79fc4; margin-top: 10px; }

/* ---------- 步骤/特性 ---------- */
.feat { display: flex; flex-direction: column; gap: 16px; }
.feat-item { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; }
.feat-num { grid-row: span 2; font-size: 22px; color: var(--brand); font-weight: 800; }
.feat-t { font-size: 17px; font-weight: 700; }
.feat-d { font-size: 14px; color: var(--sub); }
.offer-title { font-size: 18px; font-weight: 800; color: var(--amber); margin-bottom: 10px; }
.offer-item { font-size: 16px; padding: 4px 0; }

/* ---------- 步骤勾选（准备页） ---------- */
.step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 15px 12px; border-radius: 12px;
  border: 2px solid var(--line); margin-bottom: 12px;
  background: #fbfaff; cursor: pointer;
}
.step.on { border-color: var(--brand); background: #f1eeff; }
.step-box {
  flex: none; width: 24px; height: 24px;
  border: 2px solid #b9b3d9; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; margin-top: 2px;
}
.step.on .step-box { background: var(--brand); border-color: var(--brand); }
.step.on .step-box::before { content: '✓'; }
.step-text { flex: 1; font-size: 16px; line-height: 1.6; }

/* ---------- 测试页 ---------- */
.progress-wrap {
  height: 8px; background: #ddd8f0; border-radius: 999px;
  overflow: hidden; margin: 18px 20px 26px;
}
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--pink)); border-radius: 999px; transition: width .3s ease; }

.ear-badge {
  align-self: center; background: var(--brand); color: #fff;
  font-size: 20px; font-weight: 800; padding: 8px 30px;
  border-radius: 999px; margin: 0 auto 14px; display: block; width: fit-content;
}
.band-badge {
  display: block; width: fit-content; margin: 0 auto 26px;
  background: #efeaff; color: #4c33a8; border: 1px solid #cfc3f5;
  font-size: 15px; font-weight: 600; padding: 4px 18px; border-radius: 999px;
}

.guide { text-align: center; margin-bottom: 34px; padding: 0 20px; }
.guide-main { font-size: 21px; font-weight: 800; line-height: 1.5; }
.guide-sub { font-size: 15px; color: var(--sub); margin-top: 8px; }

.stage { display: flex; flex-direction: column; align-items: center; position: relative; }
.hear-btn {
  width: 210px; height: 210px; border-radius: 50%;
  background: #fff; border: 5px solid var(--brand);
  color: var(--brand); font-size: 23px; font-weight: 800; line-height: 1.45;
  cursor: pointer; font-family: inherit;
  transition: transform .15s ease, background .15s ease;
}
.hear-btn.active { background: var(--brand); color: #fff; transform: scale(1.05); }
.play-hint { margin-top: 22px; font-size: 16px; color: var(--sub); }
.foot-note { text-align: center; margin-top: 34px; }

.fly-notes { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.fly-notes i {
  position: absolute; left: 50%; top: 40%;
  font-style: normal; font-size: 26px; color: var(--gold);
  opacity: 0;
}
.fly-notes.on i { animation: fly 1.1s ease-out forwards; }
.fly-notes.on i:nth-child(1) { animation-delay: 0s; }
.fly-notes.on i:nth-child(2) { animation-delay: .25s; }
.fly-notes.on i:nth-child(3) { animation-delay: .5s; }
@keyframes fly {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -120px) scale(1.3) rotate(20deg); }
}

.no-hear-btn {
  margin-top: 18px;
  width: 210px; height: 50px;
  background: #fff; color: var(--sub);
  border: 2px solid #cfc9e8; border-radius: 12px;
  font-size: 17px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: opacity .2s ease;
}
.no-hear-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 报告页 ---------- */
.result-card { display: flex; flex-direction: column; align-items: center; }
.grade-chip {
  color: #fff; font-size: 19px; font-weight: 800;
  padding: 6px 26px; border-radius: 999px; margin-bottom: 14px;
}
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.g-desc { font-size: 15px; color: var(--sub); margin-top: 2px; }
.ear-row { display: flex; align-items: center; margin: 18px 0 6px; width: 100%; }
.ear-col { flex: 1; text-align: center; }
.ear-div { width: 1px; height: 42px; background: var(--line); }
.ear-t { font-size: 14px; color: var(--sub); }
.ear-v { font-size: 23px; font-weight: 800; }

.bars {
  display: flex; justify-content: space-around; align-items: flex-end;
  height: 150px; border-bottom: 1px solid var(--line);
}
.bar-group { display: flex; flex-direction: column; align-items: center; }
.bar-pair { display: flex; align-items: flex-end; gap: 6px; height: 132px; }
.bar { width: 24px; border-radius: 5px 5px 0 0; min-height: 10px; }
.bar-l { background: var(--brand); }
.bar-r { background: #a893ec; }
.bar-label { font-size: 13px; color: var(--sub); margin-top: 6px; font-weight: 600; }
.legend { display: flex; gap: 16px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.lg { font-size: 13px; color: var(--sub); display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }

.gap-note {
  margin: 14px 16px 0; padding: 12px 14px;
  background: #efeaff; border: 1px solid #cfc3f5; border-radius: 12px;
  font-size: 14px; color: #4c33a8; line-height: 1.7;
}

.scene { font-size: 16px; line-height: 1.8; margin-bottom: 12px; }
.advice { font-size: 16px; line-height: 1.8; color: var(--brand); font-weight: 600; }

.disclaimer {
  margin: 14px 16px;
  background: #fdf6ec; border: 1px solid #f0dfc0; border-radius: 12px;
  padding: 14px; font-size: 14px; color: #7a5c2e; line-height: 1.7;
}

.cta-card { border: 2px solid #cfc3f5; }
.cta-title { font-size: 21px; font-weight: 800; color: var(--amber); margin-bottom: 10px; }
.cta-stack { display: flex; flex-direction: column; gap: 12px; }
.callback-row { display: flex; gap: 8px; }
.callback-row input {
  flex: 1; height: 52px; border: 2px solid var(--line); border-radius: 12px;
  padding: 0 14px; font-size: 17px; font-family: inherit;
}
.callback-row button {
  flex: none; width: 110px; height: 52px;
  background: var(--brand); color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.tel-link { text-decoration: none; }

.share-zone { padding: 4px 20px 40px; }
.share-hint { text-align: center; margin-top: 10px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 20px; }
.label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.input, .textarea, select.picker {
  width: 100%; background: #fbfaff;
  border: 2px solid var(--line); border-radius: 12px;
  padding: 0 16px; font-size: 17px; font-family: inherit;
}
.input { height: 52px; }
.textarea { height: 90px; padding: 12px 16px; resize: none; }
select.picker { height: 52px; appearance: none; color: var(--ink); }
.radio-row { display: flex; gap: 10px; }
.radio {
  flex: 1; height: 48px; border: 2px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: #fbfaff; cursor: pointer;
}
.radio.on { border-color: var(--brand); color: var(--brand); font-weight: 700; background: #f1eeff; }

.agree-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 22px 16px; cursor: pointer; }
.checkbox {
  flex: none; width: 22px; height: 22px;
  border: 2px solid #b9b3d9; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; margin-top: 2px;
}
.checkbox.on { background: var(--brand); border-color: var(--brand); }
.checkbox.on::before { content: '✓'; }
.agree-text { flex: 1; font-size: 14px; color: var(--sub); line-height: 1.6; }
.link { color: var(--brand); text-decoration: underline; }

.success { padding: 70px 28px; display: flex; flex-direction: column; align-items: center; }
.succ-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 42px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
}
.succ-title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.succ-desc { font-size: 15px; color: var(--sub); text-align: center; line-height: 1.8; margin-bottom: 30px; max-width: 300px; }

/* ---------- 隐私政策 ---------- */
.privacy-page { padding: 24px 20px 60px; }
.p-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.p-updated { font-size: 13px; color: #a79fc4; margin-bottom: 22px; }
.p-h { font-size: 18px; font-weight: 700; margin: 20px 0 8px; }
.p-p { font-size: 15px; color: #443f5c; line-height: 1.8; margin-bottom: 8px; }

/* ---------- 页脚合规 ---------- */
.site-footer {
  padding: 18px 20px 30px; text-align: center;
  border-top: 1px solid var(--line);
}
.foot-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.foot-review { font-size: 11px; color: #a79fc4; }
.foot-device { font-size: 11px; color: #a79fc4; margin-bottom: 4px; }
.foot-tip { font-size: 11px; color: #b3aed0; line-height: 1.6; margin-bottom: 6px; }
.foot-brand { font-size: 12px; color: #a79fc4; }
.foot-brand a { color: var(--brand); }

/* ---------- 弹窗 / Toast ---------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(30, 20, 60, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
}
.mask[hidden] { display: none; }
.dialog {
  width: 100%; max-width: 420px; max-height: 86vh;
  background: #fff; border-radius: 18px;
  padding: 26px 22px 18px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.d-title { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 14px; }
.d-body { margin-bottom: 14px; }
.d-body p { font-size: 14.5px; color: #443f5c; margin-bottom: 10px; line-height: 1.7; }
.d-link { color: var(--brand); font-size: 14.5px; font-weight: 600; }
.d-check { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 18px; cursor: pointer; }
.d-check-text { flex: 1; font-size: 14px; color: #443f5c; }
.d-check .checkbox { margin-top: 1px; }
#consentAgree { margin-bottom: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(30, 27, 49, .92); color: #fff;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; z-index: 1000; max-width: 80vw; text-align: center;
}

/* ---------- 品牌角标（声为） ---------- */
.brand-chip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  display: flex; align-items: center;
  background: rgba(255,255,255,.94);
  border-radius: 999px; padding: 5px 14px 5px 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  backdrop-filter: blur(4px);
  text-decoration: none;
}
.brand-chip img { height: 24px; display: block; }
@media (min-width: 520px) { .brand-chip { left: calc(50% - 228px); } }
