/* assets/app.css - 适老化移动端设计（与小程序版同一设计语言） */
:root {
  --brand: #0f5132;
  --brand-light: #1a7a4e;
  --bg: #f2f5f3;
  --card: #ffffff;
  --ink: #1a2332;
  --sub: #5a6b60;
  --line: #e2eae5;
  --amber: #b45309;
  --red: #b91c1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  background: #dfe7e2;
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  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 24px rgba(0,0,0,.08);
}
#view { flex: 1; }

h1, h2, h3 { line-height: 1.4; }

/* ---------- 通用组件 ---------- */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px;
  background: var(--brand); color: #fff;
  font-size: 1.2rem; font-weight: 600;
  border: none; border-radius: 12px;
  cursor: pointer;
}
.btn-primary:disabled { background: #9fb8ab; color: #eef4f0; cursor: not-allowed; }

.btn-outline {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px;
  background: #fff; color: var(--brand);
  font-size: 1.1rem; font-weight: 500;
  border: 2px solid var(--brand); border-radius: 12px;
  cursor: pointer; text-decoration: none;
}
.btn-outline:disabled { border-color: #9fb8ab; color: #9fb8ab; }

.btn-plain {
  background: none; border: none; color: var(--sub);
  font-size: 1rem; padding: 10px; cursor: pointer;
  display: block; margin: 8px auto 0;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  margin: 14px 16px;
  box-shadow: 0 2px 8px rgba(15,81,50,.06);
}

.section-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.text-sub { color: var(--sub); font-size: .95rem; }
.text-small { color: var(--sub); font-size: .82rem; }

.ad-tag {
  display: inline-block;
  font-size: .72rem; color: #8a978f;
  border: 1px solid #c4d2ca; border-radius: 4px;
  padding: 0 6px; line-height: 1.5;
}

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

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-light) 100%);
  padding: 32px 22px 40px;
  color: #fff;
}
.hero-tag { margin-bottom: 14px; }
.hero-tag .ad-tag { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.5); }
.hero-title { font-size: 1.9rem; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.hero-sub { font-size: .95rem; color: #cfe8da; margin-bottom: 28px; }
.hero-btn {
  background: #fff; color: var(--brand);
  min-height: 60px; font-size: 1.25rem; font-weight: 700;
  border: none; border-radius: 12px; width: 100%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.hero-note { margin-top: 14px; font-size: .78rem; color: #a9cdb9; text-align: center; }

.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: 1.3rem; color: var(--brand); font-weight: 700; }
.feat-t { font-size: 1.05rem; font-weight: 600; }
.feat-d { font-size: .9rem; color: var(--sub); }

.offer-title { font-size: 1.15rem; font-weight: 700; color: var(--amber); margin-bottom: 10px; }
.offer-item { font-size: 1rem; padding: 4px 0; }

/* ---------- 页脚合规区 ---------- */
.site-footer {
  padding: 20px 22px 34px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.foot-row { display: flex; align-items: center; gap: 8px; }
.foot-review { font-size: .75rem; color: #8a978f; }
.foot-device { font-size: .72rem; color: #8a978f; margin-bottom: 4px; }
.foot-tip { font-size: .72rem; color: #9fb0a6; max-width: 340px; }
.foot-brand { font-size: .78rem; color: #8a978f; }
.foot-brand a { color: var(--brand); }

/* ---------- 准备页 ---------- */
.page-head { padding: 24px 22px 8px; }
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-sub { color: var(--sub); font-size: .95rem; margin-top: 6px; }

.step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 14px;
  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: 26px; height: 26px;
  border: 2px solid #9fb8ab; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .9rem; margin-top: 2px;
}
.step.on .step-box { background: var(--brand); border-color: var(--brand); }
.step.on .step-box::after { content: '✓'; }
.step-text { flex: 1; font-size: 1rem; line-height: 1.6; }

/* ---------- 测试页 ---------- */
.progress-wrap {
  height: 8px; background: #dfe9e3;
  border-radius: 999px; overflow: hidden;
  margin: 18px 22px 28px;
}
.progress-bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }

.ear-badge {
  align-self: center; display: block; margin: 0 auto 28px;
  background: var(--brand); color: #fff;
  font-size: 1.25rem; font-weight: 700;
  padding: 8px 34px; border-radius: 999px;
  width: fit-content;
}
.guide { text-align: center; margin-bottom: 36px; padding: 0 20px; }
.guide-main { font-size: 1.3rem; font-weight: 700; line-height: 1.5; }
.guide-sub { font-size: .9rem; color: var(--sub); margin-top: 8px; }

.stage { display: flex; flex-direction: column; align-items: center; }
.hear-btn {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--brand);
  color: var(--brand);
  font-size: 1.45rem; font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.hear-btn.active { background: var(--brand); color: #fff; transform: scale(1.04); }
.play-hint { margin-top: 24px; font-size: .95rem; color: var(--sub); }
.foot-note { text-align: center; margin-top: 36px; font-size: .8rem; color: var(--sub); }

/* "我没听到"按钮：嘀声播完进入应答期才亮起 */
.no-hear-btn {
  margin-top: 16px;
  width: 13rem; height: 3rem;
  background: #fff; color: var(--sub);
  border: 2px solid #c9d8cf; border-radius: .7rem;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: opacity .2s ease;
}
.no-hear-btn:disabled { opacity: .35; cursor: not-allowed; }

.digit-display {
  margin: 0 auto 28px;
  font-size: 2.4rem; font-weight: 800; letter-spacing: 14px;
  color: var(--brand);
  padding: 14px 28px;
  background: #fff; border-radius: 14px;
  width: fit-content; min-width: 240px; text-align: center;
}
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; padding: 0 30px;
}
.key {
  height: 64px;
  background: #fff; border: 2px solid #c9d8cf;
  border-radius: 12px;
  font-size: 1.5rem; font-weight: 700; color: var(--ink);
  cursor: pointer;
}
.key:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 报告页 ---------- */
.result-card { display: flex; flex-direction: column; align-items: center; }
.grade-chip {
  color: #fff; font-size: 1.15rem; font-weight: 700;
  padding: 7px 28px; border-radius: 999px;
  margin-bottom: 8px;
}
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.g-desc { font-size: .88rem; color: var(--sub); margin-top: 2px; }

.ear-row { display: flex; align-items: center; margin: 18px 0 4px; width: 100%; }
.ear-col { flex: 1; text-align: center; }
.ear-div { width: 1px; height: 44px; background: var(--line); }
.ear-t { font-size: .88rem; color: var(--sub); }
.ear-v { font-size: 1.4rem; 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: 4px 4px 0 0; min-height: 8px; }
.bar-l { background: var(--brand); }
.bar-r { background: #7fb89a; }
.bar-label { font-size: .75rem; color: var(--sub); margin-top: 6px; }
.legend { display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.lg { font-size: .82rem; color: var(--sub); display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

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

.cta-card { border: 2px solid #bfe0cd; }
.cta-title { font-size: 1.3rem; font-weight: 800; color: var(--amber); margin-bottom: 10px; }
.cta-stack > * + * { margin-top: 12px; }
.tel-link { text-decoration: none; }

.share-zone { padding: 4px 20px 40px; }

/* 电话回访内联表单 */
.callback-row { display: flex; gap: 10px; }
.callback-row input {
  flex: 1; min-height: 52px;
  border: 2px solid var(--line); border-radius: 12px;
  padding: 0 16px; font-size: 1.1rem;
}
.callback-row button {
  min-height: 52px; padding: 0 20px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}

/* ---------- 预约表单 ---------- */
.field { margin-bottom: 22px; }
.label { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; display: block; }
.input, .picker {
  width: 100%; min-height: 54px;
  background: #f7faf8;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 0 16px; font-size: 1.1rem;
  font-family: inherit;
}
select.picker { appearance: none; -webkit-appearance: none; }
.textarea {
  width: 100%; height: 90px;
  background: #f7faf8;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 12px 16px; font-size: 1rem; font-family: inherit;
  resize: none;
}
.radio-row { display: flex; gap: 12px; }
.radio {
  flex: 1; min-height: 50px;
  border: 2px solid var(--line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; background: #fbfdfc; cursor: pointer;
}
.radio.on { border-color: var(--brand); color: var(--brand); font-weight: 600; background: #f0f9f4; }

.agree-row { display: flex; align-items: flex-start; gap: 10px; padding: 4px 18px 16px; cursor: pointer; }
.checkbox {
  flex: none; width: 22px; height: 22px;
  border: 2px solid #9fb8ab; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem; margin-top: 3px;
  background: #fff;
}
.checkbox.on { background: var(--brand); border-color: var(--brand); }
.checkbox.on::after { content: '✓'; }
.agree-text { flex: 1; font-size: .85rem; 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; text-align: center; }
.succ-icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 2.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.succ-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 12px; }
.succ-desc { font-size: .95rem; color: var(--sub); line-height: 1.8; margin-bottom: 32px; max-width: 340px; }

/* ---------- 隐私政策 ---------- */
.privacy-page { padding: 24px 22px 40px; }
.p-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
.p-updated { font-size: .8rem; color: #8a978f; margin-bottom: 24px; }
.p-h { font-size: 1.1rem; font-weight: 700; margin: 22px 0 8px; }
.p-p { font-size: .95rem; color: #37474f; line-height: 1.8; margin-bottom: 8px; }

/* ---------- 同意弹窗 & 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: 400px; max-height: 86vh;
  background: #fff; border-radius: 16px;
  padding: 26px 22px 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.d-title { font-size: 1.25rem; font-weight: 700; text-align: center; margin-bottom: 14px; }
.d-body { max-height: 300px; overflow-y: auto; margin-bottom: 14px; font-size: .92rem; }
.d-body p { margin-bottom: 10px; color: #37474f; }
.d-link { color: var(--brand); font-weight: 500; }
.d-check { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 18px; cursor: pointer; }
.d-check-text { flex: 1; font-size: .88rem; color: #37474f; }

.toast {
  position: fixed; left: 50%; bottom: 80px;
  transform: translateX(-50%);
  background: rgba(20,30,25,.88); color: #fff;
  font-size: .95rem;
  padding: 10px 22px; border-radius: 999px;
  z-index: 1000; max-width: 80%;
}

/* ---------- 品牌角标（声为） ---------- */
.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); } }
