/* assets/app.css - 旋律版全局样式（适老化 + 音乐主题） */
:root {
  --brand: #0f5132; --brand-light: #1a7a4e;
  --bg: #f2f5f3; --card: #fff;
  --ink: #1a2332; --sub: #5a6b60; --line: #e2eae5;
  --amber: #b45309; --red: #b91c1c;
  --gold: #d4a017;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: #dfe7e2; }
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(15,81,50,.12);
}
#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: var(--brand); color: #fff;
  font-size: 19px; font-weight: 700;
}
.btn-primary:disabled { background: #9fb8ab; color: #eef4f0; }
.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(15,81,50,.06);
}
.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 {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0f5132 0%, #14663f 55%, #1a7a4e 100%);
  padding: 42px 24px 54px; color: #fff;
}
.hero-tag { margin-bottom: 16px; }
.ad-tag {
  display: inline-block; font-size: 11px; color: #8a978f;
  border: 1px solid #c4d2ca; border-radius: 4px; padding: 0 8px; line-height: 18px;
}
.hero-tag .ad-tag { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.5); }
.hero-title { font-size: 30px; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.hero-sub { font-size: 16px; color: #cfe8da; margin-bottom: 30px; }
.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,.18);
}
.hero-note { margin-top: 16px; font-size: 12px; color: #a9cdb9; text-align: center; }
/* 漂浮音符装饰 */
.hero-notes span {
  position: absolute; color: rgba(255,255,255,.18);
  font-size: 30px; animation: floatNote 6s ease-in-out infinite;
}
.hero-notes span:nth-child(1) { top: 18%; left: 8%; animation-delay: 0s; }
.hero-notes span:nth-child(2) { top: 30%; right: 10%; font-size: 40px; animation-delay: 1.5s; }
.hero-notes span:nth-child(3) { bottom: 24%; left: 14%; font-size: 24px; animation-delay: 3s; }
.hero-notes span:nth-child(4) { top: 12%; right: 28%; font-size: 22px; animation-delay: 2s; }
@keyframes floatNote {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

.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: #fbfdfc; cursor: pointer;
}
.step.on { border-color: var(--brand); background: #f0f9f4; }
.step-box {
  flex: none; width: 24px; height: 24px;
  border: 2px solid #9fb8ab; 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: #dfe9e3; border-radius: 999px;
  overflow: hidden; margin: 18px 20px 26px;
}
.progress-bar { height: 100%; background: var(--brand); 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: #fff3d6; color: #8a5a00; border: 1px solid #ecd28a;
  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; }

/* "我没听到"按钮：乐句播完进入应答期才亮起 */
.no-hear-btn {
  margin-top: 18px;
  width: 210px; height: 50px;
  background: #fff; color: var(--sub);
  border: 2px solid #c9d8cf; 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; }

/* 播放时跳跃的音符 */
.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); }
}

/* ---------- 报告页 ---------- */
.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: #7fb89a; }
.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: #fff3d6; border: 1px solid #ecd28a; border-radius: 12px;
  font-size: 14px; color: #7a5c00; 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 #bfe0cd; }
.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; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 20px; }
.label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.input, .textarea, select.picker {
  width: 100%; background: #f7faf8;
  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: #fbfdfc; cursor: pointer;
}
.radio.on { border-color: var(--brand); color: var(--brand); font-weight: 700; background: #f0f9f4; }

.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 #9fb8ab; 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: #8a978f; margin-bottom: 22px; }
.p-h { font-size: 18px; font-weight: 700; margin: 20px 0 8px; }
.p-p { font-size: 15px; color: #37474f; 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: #8a978f; }
.foot-device { font-size: 11px; color: #8a978f; margin-bottom: 4px; }
.foot-tip { font-size: 11px; color: #9aa7a0; line-height: 1.6; margin-bottom: 6px; }
.foot-brand { font-size: 12px; color: #8a978f; }
.foot-brand a { color: var(--brand); }

/* ---------- 弹窗 / Toast ---------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(10,30,20,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
}
.mask[hidden] { display: none; } /* display:flex 会覆盖 hidden，必须显式压制 */
.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: #37474f; 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: #37474f; }
.d-check .checkbox { margin-top: 1px; }
#consentAgree { margin-bottom: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(26,35,50,.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); } }
