:root {
  --bg: #f4f1eb;
  --surface: #ffffff;
  --ink: #14222b;
  --muted: #69757d;
  --line: #e5e0d6;
  --primary: #0f5257;
  --primary-2: #1d827c;
  --mint: #7fd8c3;
  --night: #0c1b21;
  --night-2: #13282f;
  --good: #1f8a6e;
  --fair: #d4952a;
  --attention: #d4644a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 34, 43, .04), 0 8px 24px rgba(20, 34, 43, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--primary-2); }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + var(--safe-b)); position: relative; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: rgba(244, 241, 235, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; }
.lang { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.demo-bar { background: #fff4d6; color: #7a5a12; font-size: 12px; text-align: center; padding: 6px; }

/* 底部导航 */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 1fr; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + var(--safe-b)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tab.on { color: var(--primary); font-weight: 600; }
.tab svg { width: 22px; height: 22px; }
.tab-scan { margin-top: -22px; }
.tab-scan .scan-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15, 82, 87, .35); }

.page { padding: 4px 18px 24px; }
.h1 { font-size: 22px; font-weight: 750; margin: 10px 0 16px; letter-spacing: -0.01em; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card-title { font-weight: 700; margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 18px; border-radius: 14px; font-weight: 700; font-size: 16px; background: var(--primary); color: #fff; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #c9cfd1; color: #fff; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn.light { background: #eef4f3; color: var(--primary); }
.btn.mint { background: var(--mint); color: var(--night); }
.btn.sm { padding: 9px 14px; font-size: 14px; width: auto; border-radius: 11px; }
.link { color: var(--primary-2); font-weight: 600; }

.field { margin-bottom: 16px; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfaf7; outline: none; font-size: 16px; }
.input:focus { border-color: var(--primary-2); background: #fff; }
.input.bad { border-color: var(--attention); }
.err { color: var(--attention); font-size: 13px; margin-top: 6px; }
.notice { border-radius: 12px; padding: 11px 13px; font-size: 13px; }
.notice.err-box { background: #fbeae5; color: #8f3420; }
.notice.warn { background: #fdf3e0; color: #7b5511; }
.notice.ok { background: #e3f3ee; color: #155d4a; }

/* 首页 */
.hero { position: relative; overflow: hidden; border-radius: 24px; background: radial-gradient(120% 90% at 85% 10%, #1c5b5f 0%, var(--night) 62%); color: #fff; padding: 26px 22px 24px; margin: 6px 0 16px; }
.hero .eyebrow { font-size: 12px; letter-spacing: .08em; color: var(--mint); font-weight: 600; }
.hero h1 { font-size: 30px; line-height: 1.22; margin: 10px 0 10px; font-weight: 800; letter-spacing: -0.02em; position: relative; z-index: 1; }
.hero p { color: #c4d6d6; margin: 0 0 20px; font-size: 14px; position: relative; z-index: 1; max-width: 80%; }
.hero .mesh { position: absolute; right: -36px; top: 18px; width: 220px; opacity: .5; pointer-events: none; }
.hero .trust { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9fb9b8; margin-top: 12px; }
.features { display: grid; gap: 10px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #e6f1ef; color: var(--primary); display: grid; place-items: center; }
.feature b { display: block; font-size: 15px; }
.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* 检测表单 */
.photo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 14px; border: 1.5px dashed #c9d6d4; background: #f7faf9; color: var(--primary); font-weight: 600; font-size: 14px; }
.pick svg { width: 26px; height: 26px; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.tips li::before { content: "·"; margin-right: 4px; color: var(--primary-2); font-weight: 700; }
.preview { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.preview img { width: 92px; height: 92px; object-fit: cover; border-radius: 14px; border: 2px solid var(--mint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.privacy { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.privacy p { margin: 0 0 6px; }
.privacy b { color: var(--ink); }

/* 扫描动画 */
.scan-overlay { position: fixed; inset: 0; z-index: 50; background: var(--night); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
.scan-frame { position: relative; width: 230px; height: 290px; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(127, 216, 195, .3), 0 20px 60px rgba(0, 0, 0, .5); }
.scan-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.scan-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(127, 216, 195, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(127, 216, 195, .12) 1px, transparent 1px); background-size: 23px 23px; }
.scan-line { position: absolute; left: 0; right: 0; height: 70px; background: linear-gradient(180deg, transparent, rgba(127, 216, 195, .45) 80%, #b8f5e6); box-shadow: 0 6px 18px rgba(127, 216, 195, .6); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: -70px; } to { top: 100%; } }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--mint); }
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scan-steps { list-style: none; padding: 0; margin: 28px 0 0; width: 100%; max-width: 280px; }
.scan-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; color: #6f8a8c; transition: color .3s; }
.scan-steps li.on { color: #fff; }
.scan-steps li.done { color: var(--mint); }
.scan-steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; flex: none; }
.scan-steps li.on .dot { border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果页 */
.face-card { background: var(--night); color: #fff; border-radius: 24px; padding: 18px; margin-bottom: 14px; overflow: hidden; position: relative; }
.face-top { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.face-img { position: relative; width: 132px; height: 132px; border-radius: 18px; overflow: hidden; background: #000; }
.face-img img, .face-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.face-img .zone { fill: currentColor; fill-opacity: .16; stroke: currentColor; stroke-width: 2.5; animation: zone 2.4s ease-in-out infinite; }
@keyframes zone { 50% { fill-opacity: .32; } }
.face-img .lm { fill: var(--mint); animation: lm 1.6s ease-in-out infinite; }
@keyframes lm { 50% { r: 5; opacity: .6; } }
.age-label { font-size: 12px; color: var(--mint); letter-spacing: .06em; font-weight: 600; }
.age-big { font-size: 64px; font-weight: 800; line-height: 1; margin: 4px 0 2px; }
.age-big small { font-size: 18px; font-weight: 600; margin-left: 4px; color: #a9c2c2; }
.age-sub { font-size: 12px; color: #9cb4b4; }
.band { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--night-2); }
.band b { display: block; font-size: 16px; }
.band span { font-size: 13px; color: #a9c2c2; }
.band.younger b { color: var(--mint); }
.band.slightly_older b, .band.older b { color: #f2c777; }

.score-card { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: center; }
.gauge { position: relative; width: 124px; height: 124px; }
.gauge svg { transform: rotate(-90deg); }
.gauge .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; font-weight: 800; }
.focus-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.chip.good { background: #e1f2ec; color: var(--good); }
.chip.fair { background: #fbf0dc; color: #a26e12; }
.chip.attention { background: #fae6e0; color: #b0472f; }
.chip.focus { background: #fde9e2; color: #b0472f; }

.radar svg { width: 100%; height: auto; display: block; }
.radar .ring { fill: none; stroke: var(--line); }
.radar .axis { stroke: var(--line); }
.radar .shape { fill: rgba(29, 130, 124, .18); stroke: var(--primary-2); stroke-width: 2; animation: grow .9s ease-out both; transform-origin: 150px 140px; }
@keyframes grow { from { transform: scale(.2); opacity: 0; } }
.radar text { font-size: 11px; fill: var(--muted); }
.radar text.sc { font-size: 12px; font-weight: 700; fill: var(--ink); }

.metric { display: block; width: 100%; text-align: left; padding: 14px 0; border-top: 1px solid var(--line); }
.metric:first-of-type { border-top: 0; }
.metric.sel { background: #f3f8f7; margin: 0 -18px; padding: 14px 18px; width: calc(100% + 36px); }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-name { font-weight: 650; }
.metric-score { font-weight: 800; font-size: 18px; }
.bar { height: 6px; border-radius: 6px; background: #eeebe4; overflow: hidden; margin: 8px 0 6px; }
.bar i { display: block; height: 100%; border-radius: 6px; animation: fill 1.2s ease-out both; }
@keyframes fill { from { width: 0 !important; } }
.metric p { margin: 0; font-size: 13px; color: var(--muted); }

.locked { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: linear-gradient(160deg, #0f5257, #0c1b21); color: #fff; padding: 22px 18px; }
.locked h3 { margin: 0 0 4px; font-size: 19px; }
.locked .sub { color: #a9c7c5; font-size: 13px; margin-bottom: 16px; }
.lock-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.lock-item:first-of-type { border-top: 0; }
.lock-item .ico { width: 34px; height: 34px; border-radius: 10px; background: rgba(127, 216, 195, .14); color: var(--mint); display: grid; place-items: center; flex: none; }
.lock-item b { display: block; font-size: 14px; }
.lock-item span { font-size: 12px; color: #a9c7c5; }
.blur-preview { filter: blur(5px); opacity: .6; pointer-events: none; user-select: none; }

.detail { border-top: 1px solid var(--line); }
.detail:first-of-type { border-top: 0; }
.detail-head { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; text-align: left; font-weight: 650; }
.detail-body { padding: 0 0 14px; font-size: 14px; }
.detail-body h4 { font-size: 12px; color: var(--muted); margin: 12px 0 4px; font-weight: 600; letter-spacing: .04em; }
.detail-body ul { margin: 0; padding-left: 18px; }
.detail-body li { margin: 3px 0; }
.chev { transition: transform .2s; color: var(--muted); }
.chev.open { transform: rotate(180deg); }
.disclaimer { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 4px 4px 0; }

/* 我的 */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: #e2eeec; color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: linear-gradient(90deg, #f6d48a, #e9b453); color: #5a3d06; }
.menu { padding: 4px 18px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 0; border-top: 1px solid var(--line); font-weight: 600; text-align: left; }
.menu-item:first-child { border-top: 0; }
.menu-item.danger { color: var(--attention); }

/* 趋势与记录 */
.trend svg { width: 100%; height: auto; display: block; }
.record { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.record:first-child { border-top: 0; }
.rec-score { font-size: 22px; font-weight: 800; width: 52px; }

/* 计划 */
.plan-head { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.ring-sm { position: relative; width: 96px; height: 96px; }
.ring-sm svg { transform: rotate(-90deg); }
.ring-sm .val { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.day { aspect-ratio: 1; border-radius: 11px; background: #f1eee7; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); position: relative; }
.day.done { background: var(--primary-2); color: #fff; }
.day.partial { background: #d8ebe8; color: var(--primary); }
.day.today { box-shadow: 0 0 0 2px var(--primary); }
.day.sel { outline: 2px solid var(--mint); outline-offset: 2px; }
.day.lock { opacity: .45; }
.day.retest::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--fair); }
.task { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid #c6d3d1; display: grid; place-items: center; flex: none; transition: all .15s; }
.task.done .box { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.task.done span { color: var(--muted); text-decoration: line-through; }

.contact-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; background: #f3f7f6; font-weight: 600; margin-bottom: 10px; text-decoration: none; color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: rgba(12, 27, 33, .92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: 86%; text-align: center; }
.fade-enter-active, .fade-leave-active { transition: opacity .25s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
footer.foot { text-align: center; font-size: 11px; color: var(--muted); padding: 10px 24px 0; }

/* 可点击的重点方向 */
.chip.tap { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.chip.tap:active { transform: scale(.96); }
.metric .more { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--primary-2); }

/* 指标详细分析弹层 */
.sheet-mask { position: fixed; inset: 0; z-index: 55; background: rgba(12, 27, 33, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 84vh; background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(12, 27, 33, .25); padding-bottom: var(--safe-b); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #dcd6cb; margin: 10px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h3 { margin: 2px 0 0; font-size: 19px; }
.sheet-close { width: 34px; height: 34px; border-radius: 50%; background: #f1eee7; display: grid; place-items: center; color: var(--muted); }
.sheet-body { overflow-y: auto; padding: 16px 18px 22px; -webkit-overflow-scrolling: touch; }
.sheet-body h4 { font-size: 12px; color: var(--muted); margin: 16px 0 6px; font-weight: 700; letter-spacing: .04em; }
.sheet-body ul { margin: 0; padding-left: 18px; font-size: 14px; }
.sheet-body li { margin: 4px 0; }
.sheet-body p { margin: 0; }
.sheet-insight { display: flex; gap: 14px; align-items: center; background: #f6f3ee; border-radius: 14px; padding: 12px; }
.sheet-face { width: 92px !important; height: 92px !important; flex: none; border-radius: 12px; }
.tips-locked { margin-top: 12px; border-radius: 14px; padding: 14px; background: #f1f7f5; text-align: center; }
.ghost-lines { display: grid; gap: 7px; margin-bottom: 12px; justify-items: start; }
.ghost-lines i { display: block; height: 10px; width: 100%; border-radius: 5px; background: linear-gradient(90deg, #d7e7e3, #e8f1ef); }
.sheet-enter-active, .sheet-leave-active { transition: opacity .25s; }
.sheet-enter-active .sheet, .sheet-leave-active .sheet { transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-enter-from, .sheet-leave-to { opacity: 0; }
.sheet-enter-from .sheet, .sheet-leave-to .sheet { transform: translateY(100%); }
@media (prefers-reduced-motion: reduce) { .sheet-enter-active .sheet, .sheet-leave-active .sheet { transition: none; } }

/* 总结与暖心提示 */
.summary-card { background: linear-gradient(135deg, #e7f4f1 0%, #ffffff 70%); }
.summary-card p { margin: 6px 0 0; font-size: 15px; line-height: 1.75; }
.summary-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--primary-2); }
.why-box { margin-top: 14px; border-left: 3px solid var(--mint); padding: 2px 0 2px 12px; }
.why-box p { margin: 2px 0 0; font-size: 14px; line-height: 1.65; }
.why-label { font-size: 12px; font-weight: 700; color: var(--primary-2); }
.first-tip { background: #eaf6f2; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.first-tip-label { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--primary-2); border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }

/* 咨询记录 */
.thread { padding: 12px 0; border-top: 1px solid var(--line); }
.thread:first-of-type { border-top: 0; padding-top: 0; }
.bubble { margin-top: 6px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.bubble.me { background: #f3f0ea; }
.bubble.advisor { background: #eaf6f2; }
