/* =============================================================
   麦穗健康 · 引导页 + 登录页（v2）
   ============================================================= */

/* ============================== 认证层 ============================== */
.auth {
  position: absolute; inset: 0; z-index: 200;
  background: var(--bg-app);
  display: flex; flex-direction: column;
  transition: opacity 340ms var(--ease), transform 340ms var(--ease);
}
.auth.hide { opacity: 0; transform: scale(1.03); pointer-events: none; }

.ob, .lg { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ============================== 品牌标识 ============================== */
.brand-mark {
  display: block; margin: 0 auto;
  width: auto; height: auto; object-fit: contain;
  -webkit-user-drag: none; user-select: none;
}
.brand-mark.sm { width: 40px; height: 40px; }
.brand-mark.md { width: 96px; height: 96px; }
.brand-mark.lg { width: 148px; height: 148px; }
.brand-name {
  text-align: center; font-size: 27px; font-weight: 750;
  letter-spacing: 4px; text-indent: 4px; margin-top: 16px;
}
.brand-slogan {
  text-align: center; font-size: 13px; color: var(--tx-3);
  letter-spacing: 6px; text-indent: 6px; margin-top: 8px;
}

/* ============================== 引导页 ============================== */
.ob-body { flex: 1; min-height: 0; overflow: hidden; }
.ob-track {
  display: flex; height: 100%;
  transition: transform 440ms var(--ease);
  will-change: transform;
}
.ob-page {
  flex: 0 0 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: 8px 30px 0;
}

/* ---- 插画：统一风格场景插画 ---- */
.ob-art {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ob-illu {
  position: relative; width: 244px; height: 244px; flex: none;
  border-radius: 30px; overflow: hidden;
  background: var(--bg-raise);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .18);
}
.ob-illu img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; -webkit-user-drag: none; user-select: none;
}
.ob-illu::after {
  content: ""; position: absolute; inset: 0; border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); pointer-events: none;
}
/* 末屏（品牌）用透明底 logo，不裁切 */
.ob-final .ob-art { gap: 0; }
.ob-final .ob-illu {
  width: 196px; height: 196px; border-radius: 0;
  background: none; box-shadow: none; overflow: visible;
}
.ob-final .ob-illu::after { display: none; }
.ob-final .ob-illu img { object-fit: contain; }
.ob-final .brand-name { margin-top: 18px; }
.ob-final .ob-desc {
  font-size: 16px; font-weight: 600; color: var(--tx-1);
  margin-top: 18px; letter-spacing: 2px; text-indent: 2px;
}

/* ---- 文案 ---- */
.ob-copy { flex: none; text-align: center; padding-top: 26px; }
.ob-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 13px; border-radius: var(--r-pill);
  background: var(--ob-soft); color: var(--ob-fg);
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-indent: 1.5px;
}
.ob-title {
  font-size: 30px; font-weight: 780; letter-spacing: -1.2px;
  margin-top: 16px; line-height: 1.28;
}
.ob-desc {
  font-size: 15px; color: var(--tx-2); line-height: 1.7;
  margin-top: 12px; max-width: 300px; margin-left: auto; margin-right: auto;
}

/* ---- 底部 ---- */
.ob-foot {
  flex: none; padding: 22px 30px calc(26px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.ob-dots { display: flex; gap: 7px; }
.ob-dots i {
  width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--line-2); transition: all var(--dur) var(--ease); display: block;
}
.ob-dots i.on { width: 24px; background: var(--brand); }
.ob-acts {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.ob-acts .btn {
  width: 100%; max-width: 300px;
  height: 50px; font-size: 16px; border-radius: var(--r-md);
}
.ob-skip {
  font-size: 14px; color: var(--tx-3);
  padding: 4px 12px;
}
.ob-skip:active { opacity: .55; }

/* 每屏配色 */
.ob-page.p1 { --ob-fg:#1a9c62; --ob-soft:var(--tint-green);  --ob-tint:rgba(26,156,98,.15);  --ob-line:rgba(26,156,98,.32); }
.ob-page.p2 { --ob-fg:#0a84ff; --ob-soft:var(--tint-blue);   --ob-tint:rgba(10,132,255,.15); --ob-line:rgba(10,132,255,.32); }
.ob-page.p3 { --ob-fg:#7a5cf0; --ob-soft:var(--tint-purple); --ob-tint:rgba(122,92,240,.15); --ob-line:rgba(122,92,240,.32); }
.ob-page.p4 { --ob-fg:#e08700; --ob-soft:var(--tint-amber);  --ob-tint:rgba(224,135,0,.16);  --ob-line:rgba(224,135,0,.32); }


/* ============================== 手写标语行 ============================== */
.brand-hand {
  position: relative;
  display: inline-flex; align-items: baseline; justify-content: center;
  flex-wrap: nowrap; gap: 0;
  margin: 20px auto 0; padding: 2px 6px 14px;
  font-family: "Xingkai SC", "STXingkai", "华文行楷", "华文楷体", "KaiTi", "STKaiti",
               "楷体", "Kaiti SC", "Kaiti TC", "BiauKai", "cursive", serif;
  font-size: 16px; font-weight: 400; line-height: 1.2;
  color: var(--tx-3); letter-spacing: 1px;
  filter: url(#fInk);
}
.brand-hand .bh-a { letter-spacing: 3px; }
.brand-hand .bh-b { letter-spacing: 1px; }
.brand-hand .bh-dot {
  display: inline-block; margin: 0 9px;
  font-size: 15px; opacity: .45; transform: translateY(-1px);
}
/* 逐字轻微错落：由 JS 写入 --r / --y */
.brand-hand i.hc {
  display: inline-block; font-style: normal;
  transform: translateY(var(--y, 0px)) rotate(var(--r, 0deg));
}
/* 手绘下划线笔触 */
.brand-hand .bh-ink {
  position: absolute; left: 2%; bottom: 0; width: 96%; height: 13px;
  overflow: visible; pointer-events: none;
}
.brand-hand .bh-ink path {
  fill: none; stroke: var(--brand); stroke-linecap: round;
  stroke-width: 1.9; opacity: .38;
}
.brand-hand .bh-ink path.thin {
  stroke-width: 1; opacity: .22; stroke-dasharray: 46 130;
  stroke-dashoffset: 12;
}
.ob-final .brand-hand { margin-top: 18px; }
.lg-brand .brand-hand { margin-top: 12px; font-size: 16px; }
.lg-brand .brand-hand .bh-ink { width: 82%; left: 9%; }
.ob-final .ob-desc { display: none; }

/* ============================== 登录页 ============================== */

.lg-body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 0 26px calc(22px + var(--safe-b));
  display: flex; flex-direction: column;
}
.lg-brand { padding: 34px 0 34px; text-align: center; }

.lg-form { display: flex; flex-direction: column; gap: 12px; }
.lg-field {
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 15px;
  background: var(--bg-group); border: 1.5px solid transparent;
  border-radius: 14px;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.lg-field:focus-within { border-color: var(--brand); background: var(--bg-group); }
.lg-field .pre {
  flex: none; font-size: 15.5px; color: var(--tx-1); font-weight: 650;
  display: inline-flex; align-items: center; gap: 6px;
}
.lg-field .pre .ic { width: 18px; height: 18px; color: var(--tx-3); stroke-width: 1.9; }
.lg-field .pre .sep {
  width: 1px; height: 18px; background: var(--line-2); margin-left: 5px;
}
.lg-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 17px; font-family: var(--font-mono); letter-spacing: 1px;
  color: var(--tx-1);
}
.lg-field input::placeholder {
  font-family: var(--font-sans); letter-spacing: 0; color: var(--tx-3); font-size: 15.5px;
}
.lg-field .clr {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--line-2); color: var(--bg-group);
  display: none; place-items: center;
}
.lg-field .clr.show { display: grid; }
.lg-field .clr .ic { width: 11px; height: 11px; stroke-width: 3.4; }
.lg-code {
  flex: none; height: 36px; padding: 0 13px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 13.5px; font-weight: 650; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.lg-code:active { opacity: .65; }
.lg-code.off { background: var(--bg-raise); color: var(--tx-3); }

.lg-err {
  font-size: 12.5px; color: var(--danger); min-height: 17px;
  padding: 1px 3px 0; display: flex; align-items: center; gap: 5px;
}
.lg-err .ic { width: 13px; height: 13px; }

.lg-hint {
  font-size: 12px; color: var(--tx-3); line-height: 1.55; padding: 2px 3px 0;
}

.lg-btn { margin-top: 12px; }
.lg-btn .btn {
  width: 100%; height: 52px; font-size: 16.5px; font-weight: 650;
  border-radius: 14px;
}

.lg-agree {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 18px 2px 0; font-size: 12.5px; color: var(--tx-2); line-height: 1.6;
}
.lg-agree .box {
  flex: none; width: 19px; height: 19px; border-radius: 6px; margin-top: 1px;
  border: 1.5px solid var(--line-strong); background: var(--bg-group);
  display: grid; place-items: center; color: #fff;
  transition: all 160ms var(--ease);
}
.lg-agree .box .ic { width: 12px; height: 12px; stroke-width: 3.2; opacity: 0; }
.lg-agree.on .box { background: var(--brand); border-color: var(--brand); }
.lg-agree.on .box .ic { opacity: 1; }
.lg-agree a { color: var(--brand); text-decoration: none; font-weight: 650; }

.lg-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 18px; color: var(--tx-3); font-size: 12px;
}
.lg-divider::before, .lg-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line-1);
}
.lg-social { display: flex; justify-content: center; gap: 40px; }
.lg-so {
  width: 54px; display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.lg-so .cir {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--bg-group); border: 1px solid var(--line-1);
  display: grid; place-items: center; color: var(--tx-1);
  overflow: hidden; padding: 0;
  transition: transform 140ms var(--ease);
}
.lg-so .cir img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; -webkit-user-drag: none; user-select: none;
}
.lg-so:active .cir { transform: scale(.93); }
.lg-so .cir .ic { width: 24px; height: 24px; }
/* 官方 logo 自带品牌色，无需额外着色 */
.lg-so span { font-size: 11.5px; color: var(--tx-3); }


.lg-foot {
  text-align: center; font-size: 11.5px; color: var(--tx-3);
  padding: 26px 0 0; line-height: 1.7;
}

/* ============================== 长辈模式放大 ============================== */
body.elder .ob-title { font-size: 37px; }
body.elder .ob-desc { font-size: 19px; max-width: 330px; }
body.elder .ob-kicker { height: 32px; font-size: 15px; padding: 0 16px; }
body.elder .ob-skip { font-size: 17px; }
body.elder .ob-dots i { width: 10px; height: 10px; }
body.elder .ob-dots i.on { width: 32px; }
body.elder .ob-acts .btn { height: 60px; font-size: 19px; max-width: 320px; }
body.elder .brand-name { font-size: 34px; }
body.elder .brand-slogan { font-size: 16px; }
body.elder .lg-field { height: 66px; border-radius: 16px; }
body.elder .lg-field input { font-size: 21px; }
body.elder .lg-field .pre { font-size: 19px; }
body.elder .lg-code { height: 46px; font-size: 17px; }
body.elder .lg-agree { font-size: 16px; }
body.elder .lg-agree .box { width: 25px; height: 25px; }
body.elder .lg-btn .btn { height: 62px; font-size: 20px; }
body.elder .lg-so .cir { width: 62px; height: 62px; }
body.elder .lg-so span { font-size: 14px; }
body.elder .ob-final .ob-desc { font-size: 18px; }

/* ============================ 验证码弹层 ============================ */
#msCodeMask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 18, 26, .48);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease, ease-out);
  padding: 24px;
}
#msCodeMask.show { opacity: 1; pointer-events: auto; }
.ms-code-card {
  width: 100%; max-width: 320px;
  background: var(--bg-card, #fff);
  border-radius: 20px; padding: 26px 22px 20px;
  text-align: center;
  transform: translateY(14px) scale(.96);
  transition: transform 220ms var(--ease, ease-out);
  box-shadow: 0 18px 50px rgba(10, 20, 40, .22);
}
#msCodeMask.show .ms-code-card { transform: none; }
.ms-code-ic { width: 40px; height: 40px; color: var(--brand, #0a84ff); }
.ms-code-title { font-size: 16.5px; font-weight: 700; margin-top: 10px; color: var(--tx-1, #1c1f26); }
.ms-code-phone { font-size: 13px; color: var(--tx-3, #8a8f99); margin-top: 4px; }
.ms-code-num {
  display: flex; justify-content: center; gap: 10px; margin: 16px 0 12px;
}
.ms-code-num i {
  width: 46px; height: 56px; border-radius: 12px;
  border: 1.5px solid var(--line-strong, #d8dce4);
  background: var(--bg-group, #f2f3f7);
  font-style: normal; font-size: 26px; font-weight: 750; font-family: ui-monospace, monospace;
  display: grid; place-items: center; color: var(--tx-1, #1c1f26);
  letter-spacing: 0;
}
.ms-code-tip { font-size: 12px; color: var(--tx-3, #8a8f99); line-height: 1.6; }
.ms-code-fill { width: 100%; height: 48px; margin-top: 16px; font-size: 15.5px; border-radius: 13px; }
.ms-code-close {
  margin-top: 10px; border: 0; background: none; cursor: pointer;
  font-size: 13.5px; color: var(--tx-3, #8a8f99); padding: 8px 16px;
}
.ms-code-close:active { opacity: .6; }

/* ============================ 表单报错动画 ============================ */
@keyframes msShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: msShake 420ms ease; border-color: var(--danger, #e0343e) !important; }

.lg-agree.flash .box {
  animation: msAgreeFlash 1.2s ease;
}
@keyframes msAgreeFlash {
  0%, 100% { border-color: var(--line-strong, #d8dce4); box-shadow: none; }
  25%, 65% { border-color: var(--brand, #0a84ff); box-shadow: 0 0 0 4px rgba(10,132,255,.18); }
}

/* ============================ 安装提示 ============================ */
.ms-install-btn {
  position: fixed; right: 16px; bottom: 96px; z-index: 260;
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 16px; border: 0; border-radius: 21px;
  background: var(--brand, #0a84ff); color: #fff;
  font-size: 14px; font-weight: 650; cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 132, 255, .38);
  animation: msInstallIn 320ms var(--ease, ease-out);
}
.ms-install-btn .ic { width: 17px; height: 17px; }
.ms-install-btn:active { opacity: .8; }
@keyframes msInstallIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.ms-ios-hint {
  position: fixed; left: 12px; right: 12px; top: 12px; z-index: 260;
  display: flex; align-items: center; gap: 8px;
  background: rgba(28, 31, 38, .92); color: #fff;
  border-radius: 14px; padding: 12px 8px 12px 14px;
  font-size: 13px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: msInstallIn 320ms var(--ease, ease-out);
}
.ms-ios-hint span { flex: 1; }
.ms-ios-hint button {
  flex: none; border: 0; background: rgba(255,255,255,.14); color: #fff;
  width: 28px; height: 28px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center;
}
.ms-ios-hint .ic { width: 14px; height: 14px; }

/* 图标描边修正 */
.ms-code-ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
