/* 张小野 · 移动端（仿「察颜」紫色风格）
   仅服务 /m/ 下的手机页面，独立于桌面后台模板 */

:root {
    --m-bg-top: #eef0ff;
    --m-bg-bottom: #f7f5ff;
    --m-primary: #6C5CE7;
    --m-primary-soft: #8B7CFF;
    --m-primary-ghost: rgba(108, 92, 231, 0.10);
    --m-ink: #2a2550;
    --m-ink-soft: #6b6790;
    --m-line: rgba(108, 92, 231, 0.12);
    --m-card: #ffffff;
    --m-sev-heavy: #FF6B6B;
    --m-sev-mid: #FFB020;
    --m-sev-light: #34C759;
    --m-sev-good: #5AC8FA;
    --m-radius: 18px;
    --m-shadow: 0 12px 30px rgba(108, 92, 231, 0.10);
    --m-tabbar-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, var(--m-bg-top) 0%, var(--m-bg-bottom) 38%, #ffffff 100%);
    color: var(--m-ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) {
    html, body { background-attachment: fixed; }
}

.m-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============ 顶部品牌栏 ============ */
.m-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px 10px;
    background: linear-gradient(180deg, rgba(238,240,255,0.96), rgba(238,240,255,0.0));
    backdrop-filter: blur(6px);
}
.m-brand { display: flex; align-items: center; gap: 8px; }
.m-brand-logo {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 15px;
    box-shadow: 0 6px 14px rgba(108,92,231,.32);
}
.m-brand-name { font-size: 18px; font-weight: 800; letter-spacing: .04em; color: var(--m-ink); }
.m-brand-name b { color: var(--m-primary); }
.m-topbar-actions { display: flex; align-items: center; gap: 8px; }
.m-pill-btn {
    display: inline-flex; align-items: center; gap: 5px;
    height: 30px; padding: 0 12px; border-radius: 999px;
    background: #fff; color: var(--m-ink-soft); font-size: 12px; font-weight: 700;
    box-shadow: 0 4px 12px rgba(108,92,231,.10);
    white-space: nowrap; flex: 0 0 auto;
}
.m-pill-primary {
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,92,231,.30);
}
.m-pill-primary:active { opacity: .88; }

/* 历史方案下拉切换 */
.m-rec { position: relative; }
.m-rec-select {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px; border-radius: 999px;
    background: #fff; color: var(--m-ink); font-size: 12px; font-weight: 700;
    box-shadow: 0 4px 12px rgba(108,92,231,.12); max-width: 56vw;
}
.m-rec-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-rec-select i { font-size: 9px; color: var(--m-ink-soft); transition: transform .2s ease; flex: 0 0 auto; }
.m-rec.open .m-rec-select i { transform: rotate(180deg); }
.m-rec-menu {
    position: absolute; right: 0; top: 38px;
    min-width: 224px; max-height: 62vh; overflow-y: auto;
    background: #fff; border-radius: 14px; padding: 6px;
    box-shadow: 0 14px 34px rgba(42,37,80,.20); border: 1px solid var(--m-line);
    display: none; z-index: 60;
}
.m-rec.open .m-rec-menu { display: block; }
.m-rec-item { padding: 10px 12px; border-radius: 10px; }
.m-rec-item:active { background: var(--m-primary-ghost); }
.m-rec-item.active { background: var(--m-primary-ghost); }
.m-rec-item strong { display: block; font-size: 13px; font-weight: 800; color: var(--m-ink); }
.m-rec-item.active strong::after { content: ' ✓'; color: var(--m-primary); }
.m-rec-item span { display: block; font-size: 11px; color: var(--m-ink-soft); margin-top: 3px; }
.m-rec-badge {
    display: inline-block; font-size: 10px; font-weight: 700; color: var(--m-primary);
    background: var(--m-primary-ghost); padding: 1px 7px; border-radius: 999px; margin-left: 6px;
}

/* ============ 入口卡（仿 AI皮肤检测 / AI助手）============ */
.m-entry-row { display: flex; gap: 12px; padding: 4px 16px 8px; }
.m-entry-card {
    flex: 1; min-width: 0;
    border-radius: 16px; padding: 14px 14px;
    background: linear-gradient(135deg, #f1efff 0%, #f8f6ff 100%);
    border: 1px solid var(--m-line);
    display: flex; flex-direction: column; gap: 4px;
    position: relative; overflow: hidden;
}
.m-entry-card .m-entry-title { font-size: 14px; font-weight: 800; color: var(--m-ink); display: flex; align-items: center; gap: 6px; }
.m-entry-card .m-entry-sub { font-size: 12px; color: var(--m-ink-soft); }
.m-entry-card .m-vip { font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(135deg,#b06bff,#7b61ff); padding: 1px 6px; border-radius: 6px; }
.m-entry-ico { position: absolute; right: 10px; top: 12px; font-size: 18px; opacity: .55; }

/* ============ 段 Tab（五官总览 / 眉形分析 / 问题分解）============ */
.m-segtabs {
    display: flex; gap: 6px;
    margin: 8px 16px 4px;
    padding: 5px;
    background: rgba(255,255,255,.7);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px var(--m-line);
}
.m-segtab {
    flex: 1; text-align: center;
    padding: 9px 6px; border-radius: 10px;
    font-size: 14px; font-weight: 700; color: var(--m-ink-soft);
    transition: all .2s ease;
}
.m-segtab.active {
    background: #fff; color: var(--m-ink); font-weight: 800;
    box-shadow: 0 4px 12px rgba(108,92,231,.14);
}

/* ============ 评分卡（紫色渐变）============ */
.m-score-card {
    margin: 12px 16px;
    border-radius: 20px;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, #6f63e6 0%, #8b7cff 50%, #b4a4ff 100%);
    color: #fff;
    position: relative; overflow: hidden;
    box-shadow: 0 16px 34px rgba(108,92,231,.30);
}
.m-score-card::after {
    content: ''; position: absolute; width: 200px; height: 200px;
    right: -64px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.14);
}
.m-score-body { display: flex; gap: 12px; position: relative; z-index: 1; }
.m-score-left { flex: 0 0 auto; }
.m-score-num { font-size: 50px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.m-score-num small { font-size: 17px; font-weight: 700; margin-left: 3px; }
.m-score-rank { font-size: 12px; opacity: .92; margin-top: 8px; max-width: 150px; }
.m-score-rank b { font-weight: 800; }
.m-score-right { flex: 1; min-width: 0; }
.m-score-right h5 { margin: 0 0 6px; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.m-score-points { margin: 0; padding: 0; list-style: none; counter-reset: pt; }
.m-score-points li { font-size: 12px; line-height: 1.65; opacity: .96; padding-left: 18px; position: relative; }
.m-score-points li::before {
    counter-increment: pt; content: counter(pt);
    position: absolute; left: 0; top: 1px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255,255,255,.26); color: #fff;
    font-size: 9px; font-weight: 800; line-height: 14px; text-align: center;
}

/* ============ 头像问题环 ============ */
@keyframes m-spin { to { transform: rotate(360deg); } }

.m-ring-wrap {
    position: relative;
    margin: 20px 8px 4px;
    height: 190px;
}
.m-ring {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 142px; height: 142px;
}
.m-ring-photo {
    position: absolute; inset: 11px;
    border-radius: 50%; overflow: hidden;
    background: #ece9ff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
}
.m-ring-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-ring-photo.m-no-photo::after {
    content: '👤';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    opacity: .35;
    pointer-events: none;
}
.m-ring-dash {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(108,92,231,.42);
    animation: m-spin 36s linear infinite;
}

/* 左右两列：标签固定在圆圈外侧，不遮挡照片 */
.m-ring-col {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 12px;
}
.m-ring-col.left { right: calc(50% + 80px); align-items: flex-end; }
.m-ring-col.right { left: calc(50% + 80px); align-items: flex-start; }

.m-ring-label {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 9px;
    background: #fff; border-radius: 999px;
    font-size: 11px; font-weight: 700; color: var(--m-ink);
    box-shadow: 0 6px 14px rgba(108,92,231,.14);
    white-space: nowrap; max-width: 46vw;
}
.m-ring-label i { width: 4px; height: 13px; border-radius: 3px; flex: 0 0 auto; }
.m-ring-label b { font-weight: 800; }
.m-ring-col.right .m-ring-label { flex-direction: row-reverse; }

/* 眉形采集打点图 */
.m-brow-shot {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0d0818;
    border: 1px solid var(--m-line);
    max-height: 560px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.m-brow-shot:active { opacity: .92; }
.m-brow-shot canvas,
.m-brow-shot img { width: 100%; height: auto; display: block; vertical-align: top; max-height: 560px; object-fit: contain; }
.m-brow-shot.m-no-photo canvas,
.m-brow-shot.m-no-photo img { opacity: 0; }
.m-brow-shot-zoom {
    position: absolute; right: 10px; bottom: 10px;
    width: 32px; height: 32px; border-radius: 10px;
    background: rgba(255,255,255,.88); color: #5c5690;
    font-size: 16px; font-weight: 800; line-height: 32px; text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none;
}
.m-brow-shot-hint {
    margin: 8px 0 0; font-size: 12px; color: #9b97bb; text-align: center;
}

.m-sev-heavy { background: var(--m-sev-heavy) !important; }
.m-sev-mid { background: var(--m-sev-mid) !important; }
.m-sev-light { background: var(--m-sev-light) !important; }
.m-sev-good { background: var(--m-sev-good) !important; }
.m-sev-dot-heavy { color: var(--m-sev-heavy); }
.m-sev-dot-mid { color: var(--m-sev-mid); }
.m-sev-dot-light { color: var(--m-sev-light); }

.m-view-origin {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 14px auto 4px; padding: 8px 16px;
    background: #fff; border-radius: 999px;
    font-size: 13px; font-weight: 700; color: var(--m-ink-soft);
    box-shadow: 0 6px 14px rgba(108,92,231,.10);
}
.m-center { display: flex; justify-content: center; }

/* ============ 客户头部（姓名/性别/年龄）============ */
.m-cust-head {
    margin: 4px 16px 0; padding: 0 2px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-wrap: wrap;
}
.m-cust-name { font-size: 18px; font-weight: 800; color: var(--m-ink); }
.m-cust-tag {
    font-size: 12px; font-weight: 700; color: var(--m-primary);
    background: var(--m-primary-ghost); padding: 3px 10px; border-radius: 999px;
}

/* ============ 通用内容卡 ============ */
.m-card {
    margin: 12px 16px;
    background: var(--m-card);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    border: 1px solid var(--m-line);
    overflow: hidden;
}
.m-card-head {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 16px 0;
}
.m-card-head .m-bar { width: 4px; height: 16px; border-radius: 3px; background: var(--m-primary); }
.m-card-head h4 { margin: 0; font-size: 15px; font-weight: 800; color: var(--m-ink); }
.m-card-head .m-sev {
    margin-left: 4px; font-size: 11px; font-weight: 800; color: #fff;
    padding: 2px 9px; border-radius: 999px;
}
.m-card-sub { padding: 2px 16px 0; font-size: 12px; color: var(--m-ink-soft); }
.m-card-body { padding: 12px 16px 16px; }
.m-card-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.75; color: #4a456e; }
.m-card-body p:last-child { margin-bottom: 0; }

.m-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.m-tags span {
    font-size: 12px; font-weight: 700; color: var(--m-primary);
    background: var(--m-primary-ghost); padding: 5px 12px; border-radius: 999px;
}

.m-list { margin: 0; padding: 0; list-style: none; }
.m-list li {
    position: relative; padding: 8px 0 8px 18px;
    font-size: 13px; line-height: 1.7; color: #4a456e;
    border-bottom: 1px dashed var(--m-line);
}
.m-list li:last-child { border-bottom: none; }
.m-list li::before {
    content: ''; position: absolute; left: 2px; top: 15px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--m-primary-soft);
}

/* 推荐方案卡 */
.m-reco {
    border-radius: 14px; padding: 14px;
    background: linear-gradient(135deg, #f3f0ff, #fbf9ff);
    border: 1px solid var(--m-line);
}
.m-reco h5 { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--m-primary); }
.m-reco p { margin: 0; font-size: 13px; line-height: 1.7; color: #4a456e; }

.m-fengshui-card { background: linear-gradient(180deg, #fffdf8 0%, #fff 100%); }
.m-bar-gold { background: linear-gradient(180deg, #c9a227, #e8c547) !important; }
.m-fengshui-text p { margin: 0 0 10px; font-size: 13px; line-height: 1.75; color: #4a4568; }
.m-fengshui-text p:last-child { margin-bottom: 0; }

/* 指标条 */
.m-metric { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.m-metric:last-child { margin-bottom: 0; }
.m-metric > span:first-child { flex: 0 0 78px; font-size: 13px; color: var(--m-ink-soft); }
.m-metric-bar { flex: 1; height: 8px; border-radius: 999px; background: #eceaf8; overflow: hidden; }
.m-metric-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--m-primary), var(--m-primary-soft)); }
.m-metric > strong { flex: 0 0 32px; text-align: right; font-size: 14px; font-weight: 800; color: var(--m-ink); }

/* 问题分解：问题卡 */
.m-issue {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--m-line);
}
.m-issue:last-child { border-bottom: none; }
.m-issue-ring {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
}
.m-issue-main { flex: 1; min-width: 0; }
.m-issue-main h5 { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: var(--m-ink); display: flex; align-items: center; gap: 8px; }
.m-issue-main h5 .m-sev { font-size: 10px; padding: 1px 8px; border-radius: 999px; color: #fff; }
.m-issue-main p { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--m-ink-soft); }

/* 最终结论 */
.m-final {
    margin: 12px 16px;
    border-radius: var(--m-radius);
    padding: 16px;
    background: linear-gradient(135deg, #2a2550, #3a3170);
    color: #fff; box-shadow: 0 14px 30px rgba(42,37,80,.28);
}
.m-final h4 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: #fff; }
.m-final p { margin: 0; font-size: 13px; line-height: 1.75; opacity: .94; }

/* ============ 空态 / 上传引导 ============ */
.m-empty {
    margin: 30px 16px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.m-upload-ring {
    width: 180px; height: 180px; border-radius: 50%;
    border: 2px dashed rgba(108,92,231,.5);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--m-primary);
    background: radial-gradient(circle at 50% 40%, #f3f0ff, #ffffff);
    box-shadow: 0 12px 30px rgba(108,92,231,.12);
}
.m-upload-ring .m-up-ico { font-size: 40px; }
.m-upload-ring .m-up-txt { font-size: 14px; font-weight: 800; }
.m-empty .m-empty-tip { margin-top: 16px; font-size: 13px; color: var(--m-ink-soft); line-height: 1.7; max-width: 260px; }
.m-empty .m-up-btn {
    margin-top: 18px; padding: 12px 30px; border-radius: 999px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    color: #fff; font-size: 15px; font-weight: 800;
    box-shadow: 0 12px 26px rgba(108,92,231,.30);
}

/* ============ 加载态 ============ */
.m-loading { padding: 60px 16px; text-align: center; color: var(--m-ink-soft); }
.m-error {
    margin: 24px 16px;
    padding: 16px;
    border-radius: 12px;
    background: #fff5f5;
    color: #b42318;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid rgba(180, 35, 24, .15);
}
.m-spinner {
    width: 36px; height: 36px; margin: 0 auto 14px;
    border: 3px solid var(--m-primary-ghost); border-top-color: var(--m-primary);
    border-radius: 50%; animation: m-spin .8s linear infinite;
}

/* ============ 底部 TabBar ============ */
.m-tabbar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 100%; max-width: 480px;
    height: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--m-line);
    display: flex; z-index: 50;
    box-shadow: 0 -6px 20px rgba(108,92,231,.08);
}
.m-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: #a7a3c4; font-size: 11px; font-weight: 700;
}
.m-tab .m-tab-ico { font-size: 21px; line-height: 1; }
.m-tab.active { color: var(--m-primary); }

/* ============ 档案列表 ============ */
.m-search {
    margin: 6px 16px 10px;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 14px; padding: 11px 14px;
    box-shadow: var(--m-shadow); border: 1px solid var(--m-line);
}
.m-search input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--m-ink); }
.m-search input::placeholder { color: #b3afce; }

.m-cust-card {
    margin: 10px 16px;
    background: #fff; border-radius: 16px; padding: 14px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--m-shadow); border: 1px solid var(--m-line);
    transition: transform .15s ease;
}
.m-cust-card:active { transform: scale(.985); }
.m-cust-avatar {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    color: #fff; font-size: 20px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.m-cust-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-cust-info { flex: 1; min-width: 0; }
.m-cust-info .m-cust-line1 { display: flex; align-items: center; gap: 8px; }
.m-cust-info .m-cust-line1 strong { font-size: 15px; font-weight: 800; color: var(--m-ink); }
.m-cust-info .m-cust-line1 .m-cust-sub { font-size: 12px; color: var(--m-ink-soft); }
.m-cust-info .m-cust-line2 { margin-top: 4px; font-size: 12px; color: var(--m-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-cust-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.m-cust-count { font-size: 11px; font-weight: 800; color: var(--m-primary); background: var(--m-primary-ghost); padding: 3px 9px; border-radius: 999px; }
.m-cust-arrow { color: #c7c3e0; font-size: 16px; }

.m-list-empty { text-align: center; color: var(--m-ink-soft); padding: 50px 20px; font-size: 14px; line-height: 1.8; }

.m-section-title { margin: 6px 18px 2px; font-size: 13px; font-weight: 800; color: var(--m-ink-soft); }

.m-hidden { display: none !important; }

/* ============ 移动采集页 ============ */
.m-cap-zone {
    margin: 12px 16px;
    border: 2px dashed rgba(108,92,231,.42); border-radius: 18px;
    background: radial-gradient(circle at 50% 35%, #f3f0ff, #fff);
    min-height: 260px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--m-primary); text-align: center; padding: 26px;
}
.m-cap-zone .m-cap-ico { font-size: 46px; line-height: 1; }
.m-cap-zone .m-cap-title { font-size: 16px; font-weight: 800; }
.m-cap-zone .m-cap-hint { font-size: 12px; color: var(--m-ink-soft); font-weight: 600; line-height: 1.7; }
.m-cap-preview { margin: 12px 16px; border-radius: 18px; overflow: hidden; position: relative; background: #000; }
.m-cap-preview img { width: 100%; display: block; }
.m-cap-change {
    position: absolute; right: 12px; bottom: 12px;
    background: rgba(0,0,0,.55); color: #fff; padding: 8px 16px;
    border-radius: 999px; font-size: 13px; font-weight: 700;
}
.m-cap-actions { padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.m-cap-cancel { text-align: center; padding: 12px; font-size: 14px; font-weight: 700; color: var(--m-ink-soft); }

.m-process-overlay {
    position: fixed; inset: 0; z-index: 210;
    background: rgba(8,6,20,.82); backdrop-filter: blur(2px);
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #fff;
}
.m-process-overlay.open { display: flex; }
.m-process-overlay .m-spinner { width: 44px; height: 44px; border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.m-process-overlay p { font-size: 14px; font-weight: 700; margin: 0; }

/* ============ 查看分析弹层（全屏 + 脸部裁剪放大） ============ */
body.m-analysis-open { overflow: hidden; }
.m-analysis-viewer {
    position: fixed; inset: 0; z-index: 210;
    background: #0d0818;
    display: none; flex-direction: column;
    padding: 0; animation: m-fade .2s ease;
}
.m-analysis-viewer.open { display: flex; }
.m-analysis-panel {
    width: 100%; height: 100%; max-width: none; max-height: none;
    background: #fff;
    border-radius: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}
.m-analysis-head {
    display: flex; align-items: center; justify-content: space-between;
    flex: 0 0 auto;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
}
.m-analysis-head h4 { margin: 0; font-size: 16px; font-weight: 800; color: #1a2421; }
.m-analysis-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: #f3f0ff; color: #5c5690;
    font-size: 22px; line-height: 34px; text-align: center; cursor: pointer;
}
.m-analysis-canvas-wrap {
    flex: 1 1 52%;
    min-height: 0;
    overflow: hidden;
    background: #0d0818;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.m-analysis-canvas-wrap canvas {
    width: 100%; height: 100%;
    max-height: none;
    display: block;
    object-fit: contain;
}
.m-analysis-metric-list {
    flex: 0 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    padding: 10px 14px 8px; border-bottom: 1px solid var(--m-line);
    background: #fff;
}
.m-analysis-metric-item {
    border: 1px solid var(--m-line); border-radius: 12px;
    background: #faf9ff; padding: 8px 6px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-family: inherit;
}
.m-analysis-metric-item.active {
    border-color: #6C5CE7; background: linear-gradient(180deg, #f0ecff, #faf9ff);
    box-shadow: 0 0 0 2px rgba(108,92,231,.15);
}
.m-analysis-metric-name { font-size: 11px; color: #6b6788; }
.m-analysis-metric-score { font-size: 18px; font-weight: 900; color: #1a2421; }
.m-analysis-metric-detail {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 16px 16px;
    overflow-y: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: #fff;
}
.m-analysis-metric-detail h5 {
    margin: 0 0 8px; font-size: 14px; font-weight: 800; color: #1a2421;
}
.m-analysis-think {
    margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: #4a4568;
}
.m-analysis-hint {
    margin: 0; font-size: 12px; color: #9b97bb;
}
.m-dot-red {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #e63232; vertical-align: middle; margin-right: 4px;
}
.m-metric-pick { cursor: pointer; }
.m-metric-pick:active { opacity: .85; }
.m-ring-label.m-metric-pick { cursor: pointer; }

/* ============ 眉形采集图全屏弹层 ============ */
.m-brow-viewer {
    position: fixed; inset: 0; z-index: 215;
    background: #0d0818;
    display: none; flex-direction: column;
    padding: 0; animation: m-fade .2s ease;
}
.m-brow-viewer.open { display: flex; }
.m-brow-viewer-panel {
    width: 100%; height: 100%;
    background: #fff;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.m-brow-viewer-canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #0d0818;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.m-brow-viewer-canvas-wrap canvas {
    width: 100%; height: 100%;
    display: block;
    object-fit: contain;
}

/* ============ 全屏原图查看层（保留兼容） ============ */
.m-img-viewer {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(8, 6, 20, .94);
    display: none; align-items: center; justify-content: center;
    padding: 24px;
    animation: m-fade .2s ease;
}
.m-img-viewer.open { display: flex; }
.m-img-viewer img {
    max-width: 100%; max-height: 100%;
    border-radius: 12px; object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.m-img-close {
    position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 18px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.16); color: #fff;
    font-size: 24px; line-height: 38px; text-align: center;
}

/* ============ 移动登录页 ============ */
.m-login {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: linear-gradient(160deg, #6f63e6 0%, #8b7cff 46%, #b4a4ff 100%);
    position: relative; overflow: hidden;
    padding: 0 24px;
}
.m-login::before, .m-login::after {
    content: ''; position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.m-login::before { width: 260px; height: 260px; right: -90px; top: -70px; }
.m-login::after { width: 200px; height: 200px; left: -80px; bottom: 120px; background: rgba(255,255,255,.08); }

.m-login-hero {
    flex: 0 0 auto; padding: 64px 4px 26px; color: #fff; position: relative; z-index: 2;
}
.m-login-logo {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 900; color: #fff; margin-bottom: 22px;
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.m-login-hero h1 { margin: 0 0 10px; font-size: 28px; font-weight: 900; line-height: 1.25; }
.m-login-hero p { margin: 0; font-size: 14px; line-height: 1.7; opacity: .92; max-width: 280px; }

.m-login-card {
    position: relative; z-index: 2;
    background: #fff; border-radius: 22px 22px 0 0;
    margin: auto -24px 0; padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(42,37,80,.20);
}
.m-login-card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--m-ink); }
.m-login-card .m-login-sub { margin: 0 0 20px; font-size: 13px; color: var(--m-ink-soft); }

.m-field { margin-bottom: 14px; }
.m-field label { display: block; font-size: 13px; font-weight: 700; color: var(--m-ink-soft); margin-bottom: 6px; }
.m-field-input {
    display: flex; align-items: center; gap: 8px;
    background: #f5f4fb; border: 1.5px solid transparent; border-radius: 13px;
    padding: 13px 14px; transition: border-color .15s ease, background .15s ease;
}
.m-field-input:focus-within { border-color: var(--m-primary); background: #fff; }
.m-field-input input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 15px; color: var(--m-ink);
}
.m-field-input .m-eye { color: #b3afce; font-size: 16px; padding: 2px 4px; cursor: pointer; }

.m-login-btn {
    width: 100%; margin-top: 8px; padding: 15px; border-radius: 14px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    color: #fff; font-size: 16px; font-weight: 800;
    box-shadow: 0 12px 26px rgba(108,92,231,.30);
    transition: transform .12s ease, opacity .15s ease;
}
.m-login-btn:active { transform: scale(.985); }
.m-login-btn[disabled] { opacity: .65; }

.m-login-err {
    background: rgba(255,107,107,.10); color: #e0464b;
    border-radius: 11px; padding: 11px 13px; font-size: 13px; font-weight: 600;
    margin-bottom: 14px; display: none;
}
.m-login-tip { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--m-ink-soft); line-height: 1.7; }

/* ============ 底部弹出层（新建档案）============ */
.m-sheet-page {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(26, 22, 52, .45);
    display: flex; flex-direction: column; justify-content: flex-end;
    animation: m-fade .2s ease;
}
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
.m-sheet {
    background: #fff; border-radius: 22px 22px 0 0;
    max-height: 94vh; overflow-y: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    animation: m-sheet-up .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes m-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.m-sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: #dcd9ee; margin: 9px auto 2px; }
.m-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px 14px; border-bottom: 1px solid var(--m-line);
}
.m-sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--m-ink); }
.m-sheet-close { font-size: 24px; color: #b3afce; line-height: 1; padding: 2px 6px; }
.m-sheet-body { padding: 16px 20px 4px; }
.m-sheet-foot { padding: 10px 20px 6px; display: flex; gap: 12px; }
.m-btn-ghost {
    flex: 1; padding: 14px; border-radius: 13px;
    background: #f2f1fa; color: var(--m-ink-soft); font-weight: 800; font-size: 15px;
}
.m-btn-primary {
    flex: 2; padding: 14px; border-radius: 13px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-soft));
    color: #fff; font-weight: 800; font-size: 15px;
    box-shadow: 0 10px 22px rgba(108,92,231,.28);
}
.m-btn-primary[disabled] { opacity: .6; }

/* 生日：年/月/日三下拉（跨平台固定格式） */
.m-date3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.m-select {
    width: 100%;
    background: #f5f4fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a7a3c4' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1.5px solid transparent; border-radius: 13px;
    padding: 13px 28px 13px 12px; font-size: 15px; color: var(--m-ink);
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.m-select:focus { outline: none; border-color: var(--m-primary); background-color: #fff; }

/* 性别二选一 */
.m-seg2 { display: flex; gap: 10px; }
.m-seg-item { flex: 1; position: relative; }
.m-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.m-seg-item span {
    display: block; text-align: center; padding: 12px; border-radius: 12px;
    background: #f5f4fb; border: 1.5px solid transparent;
    font-weight: 700; color: var(--m-ink-soft);
}
.m-seg-item input:checked + span {
    background: #fff; border-color: var(--m-primary); color: var(--m-primary);
    box-shadow: 0 4px 12px rgba(108,92,231,.14);
}
