/* 对外公开页共用样式：开店 /kaidian（register.html）、推荐落地页 /r、下载页 /app、员工加入 /join。
   手机优先：360–430 宽不横向滚动；输入框字号 ≥16px，iOS 点开不放大。≥960 宽改成左右两栏（左边说清楚机掌柜是什么，右边填表）。
   颜色只用品牌蓝一套；红色只用于出错。 */
.reg-body {
  --pub-blue: var(--blue, #1f4fd8);
  --pub-deep: #163bb0;
  --pub-soft: #eef3ff;
  --pub-line: #dfe5ef;
  --pub-input: #d3dbe8;
  --pub-err: #c62a2f;
  --pub-err-bg: #fdf0f0;
  font-size: 16px; overflow-x: hidden; min-height: 100vh; color: var(--ink);
  background: #f5f7fb linear-gradient(180deg, #e9f0ff 0, #f5f7fb 260px) no-repeat;
  -webkit-font-smoothing: antialiased;
}
.reg-body a { color: var(--pub-blue); text-decoration: none; }
.reg-body a:hover { text-decoration: underline; }
.reg-body *, .reg-body *::before { min-width: 0; }

/* 顶栏：品牌 + 登录入口 */
.pub-top {
  max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left));
}
.pub-brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.reg-body .pub-brand:hover { text-decoration: none; }
.pub-brand img { width: 36px; height: 36px; border-radius: 9px; }
.pub-brand span { display: grid; line-height: 1.25; }
.pub-brand strong { font-size: 18px; color: var(--pub-blue); letter-spacing: .5px; }
.pub-brand em { font-style: normal; font-size: 12px; color: var(--sub); }
.pub-nav { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sub); white-space: nowrap; }
.pub-nav-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--pub-line); background: #fff; color: var(--ink) !important; font-weight: 600; }
.reg-body .pub-nav-btn:hover { text-decoration: none; border-color: var(--pub-blue); color: var(--pub-blue) !important; }
@media (max-width: 420px) { .pub-nav-hint { display: none; } }

.pub { max-width: 1160px; margin: 0 auto; }
.reg {
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: 10px calc(16px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
/* 旧版页头（个别页还在用） */
.reg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.reg-head img { width: 40px; height: 40px; border-radius: 10px; }
.reg-head div { display: grid; line-height: 1.3; }
.reg-head strong { font-size: 20px; color: var(--pub-blue); }
.reg-head span { font-size: 13px; color: var(--sub); }

.reg h1 { font-size: 28px; line-height: 1.3; letter-spacing: .5px; }
.reg-sub { margin: 6px 0 16px; color: var(--sub); line-height: 1.6; }
.reg-banner { background: var(--pub-soft); color: var(--pub-deep); border: 1px solid #d6e2ff; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; line-height: 1.6; font-weight: 500; }
.reg-app { display: grid; gap: 10px; background: #fff; border: 1px solid var(--pub-line); border-radius: 14px; padding: 14px; margin: 0 0 16px; }
.reg-app > div:first-child { display: grid; gap: 2px; }
.reg-app strong { font-size: 16px; }
.reg-app span { color: var(--sub); font-size: 14px; line-height: 1.55; }
.reg-app-actions { display: flex; gap: 8px; }
.reg-app-actions .reg-btn { min-height: 44px; font-size: 16px; }

/* 步骤条：圆点 + 连线，做完的打勾 */
.reg-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.reg-steps li { position: relative; display: grid; justify-items: center; gap: 6px; color: var(--sub); font-size: 14px; white-space: nowrap; }
.reg-steps li + li::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--pub-line); z-index: 0; }
.reg-steps li.on::before, .reg-steps li.done::before { background: var(--pub-blue); }
.reg-steps b { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--pub-line); color: var(--sub); font-size: 13px; }
.reg-steps li.on { color: var(--ink); font-weight: 600; }
.reg-steps li.on b { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; box-shadow: 0 0 0 4px rgba(31, 79, 216, .14); }
.reg-steps li.done b { background: var(--pub-soft); border-color: var(--pub-blue); color: transparent; }
.reg-steps li.done b::after { content: ''; position: absolute; width: 10px; height: 6px; border: solid var(--pub-blue); border-width: 0 0 2.4px 2.4px; transform: translate(0, -1px) rotate(-45deg); }

/* 卡片与表单 */
.reg-card { background: #fff; border-radius: 18px; padding: 20px 18px; display: grid; gap: 16px; border: 1px solid #e8edf5; box-shadow: 0 10px 30px rgba(22, 46, 110, .06); }
.reg-card:focus { outline: none; }
.reg-field { display: grid; gap: 8px; font-weight: 600; font-size: 15px; }
.reg-label { display: block; }
.reg-field em, .reg-more summary em { font-style: normal; font-weight: 400; color: var(--sub); font-size: 13px; margin-left: 6px; }
.reg-field input:not([type=file]):not([type=checkbox]), .reg-code input {
  width: 100%; height: 50px; padding: 0 14px; font-size: 17px; font-weight: 400; border-radius: 12px; border: 1px solid var(--pub-input);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.reg-field input::placeholder { color: #9aa3b2; }
.reg-field input:focus, .reg-code input:focus { outline: none; border-color: var(--pub-blue); box-shadow: 0 0 0 3px rgba(31, 79, 216, .15); }
.reg-field input[aria-invalid="true"] { border-color: var(--pub-err); background: #fffafa; }
.reg-field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(198, 42, 47, .14); }
.reg-code { display: flex; gap: 8px; }
.reg-code input { flex: 1; }
.reg-code .reg-btn { flex: none; width: 124px; padding: 0 10px; font-size: 15px; min-height: 50px; color: var(--pub-blue); border-color: #c9d6f5; }
.reg-code .reg-btn:disabled { color: var(--sub); border-color: var(--pub-line); background: #f6f8fb; opacity: 1; font-variant-numeric: tabular-nums; }
.reg-tip { color: var(--sub); font-size: 14px; font-weight: 400; margin: 0; line-height: 1.55; }
.reg-err { display: flex; gap: 6px; align-items: flex-start; color: var(--pub-err); font-size: 14px; font-weight: 500; line-height: 1.5; }
.reg-err::before, .reg-error::before { content: '!'; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--pub-err); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.reg-error { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--pub-err-bg); color: var(--pub-err); font-size: 15px; line-height: 1.55; }
.reg-error a { color: inherit; font-weight: 600; text-decoration: underline; }
.reg-dev { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f6f8fb; border: 1px dashed var(--pub-input); color: var(--sub); font-size: 14px; }
.reg-agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.6; padding: 2px 0; cursor: pointer; }
.reg-agree input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pub-blue); }
.reg-agree.is-invalid { color: var(--pub-err); }
.reg-agree.is-invalid input { outline: 2px solid var(--pub-err); outline-offset: 1px; border-radius: 4px; }
.reg-foot { text-align: center; margin: 18px 0 0; color: var(--sub); font-size: 14px; }
.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 选填项折叠 */
.reg-more { border: 1px solid var(--pub-line); border-radius: 12px; }
.reg-more summary { list-style: none; cursor: pointer; padding: 13px 40px 13px 14px; position: relative; font-weight: 600; font-size: 15px; }
.reg-more summary::-webkit-details-marker { display: none; }
.reg-more summary::after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border: solid var(--sub); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.reg-more[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.reg-more-body { display: grid; gap: 16px; padding: 2px 14px 16px; }

/* 第 3 步顶部：前两步填了什么，一眼核对 */
.reg-summary { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; font-size: 14px; color: var(--sub); }
.reg-summary:empty { display: none; }
.reg-summary div { display: flex; justify-content: space-between; gap: 12px; }
.reg-summary b { color: var(--ink); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 按钮：老板手指好点；加载中转圈 */
.reg-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--pub-input); background: #fff; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600;
  text-decoration: none !important; cursor: pointer; overflow: hidden; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.reg-btn:hover { border-color: #b8c5dc; }
.reg-btn:active:not(:disabled) { transform: translateY(1px); }
.reg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31, 79, 216, .25); }
.reg-btn.primary { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; box-shadow: 0 6px 16px rgba(31, 79, 216, .22); }
.reg-btn.primary:hover { background: var(--pub-deep); border-color: var(--pub-deep); }
.reg-btn.ghost { border-color: transparent; background: none; color: var(--sub); font-weight: 500; min-height: 44px; box-shadow: none; }
.reg-btn.ghost:hover { color: var(--ink); }
.reg-btn:disabled { opacity: .6; cursor: not-allowed; }
.reg-btn.is-loading { opacity: 1; cursor: progress; }
.reg-btn.is-loading::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: reg-spin .7s linear infinite; }
@keyframes reg-spin { to { transform: rotate(360deg); } }
.reg-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

/* 营业执照拍照 */
.lic-empty { display: grid; gap: 10px; }
.lic-frame { position: relative; height: 150px; border-radius: 12px; background: #f6f8fd; display: grid; place-items: center; text-align: center; color: var(--sub); font-weight: 400; font-size: 15px; line-height: 1.5; }
.lic-frame i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--pub-blue); }
.lic-frame i:nth-child(1) { left: 14px; top: 14px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.lic-frame i:nth-child(2) { right: 14px; top: 14px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.lic-frame i:nth-child(3) { left: 14px; bottom: 14px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.lic-frame i:nth-child(4) { right: 14px; bottom: 14px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.lic-done { display: grid; gap: 10px; }
.lic-done img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; background: #f6f8fd; border: 1px solid var(--pub-line); }

/* 开店成功 */
.reg-done { text-align: center; padding: 28px 20px 22px; }
.reg-done-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; background: var(--pub-blue); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 8px var(--pub-soft); }
.reg-done h2 { font-size: 24px; margin-top: 4px; }
.reg-done-sub { margin: -6px 0 0; color: var(--sub); line-height: 1.6; }
.reg-next { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.reg-next li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; }
.reg-next b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--pub-blue); color: var(--pub-blue); font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.reg-next span { display: grid; gap: 2px; color: var(--sub); font-size: 14px; line-height: 1.5; }
.reg-next strong { color: var(--ink); font-size: 15px; }

/* 右侧（电脑）/ 底部（手机）：机掌柜是什么、为什么放心 */
.pub-aside { margin: 0 16px calc(24px + env(safe-area-inset-bottom)); padding: 20px 18px; border-radius: 18px; background: #fff; border: 1px solid #e8edf5; }
.pub-eyebrow { margin: 0 0 6px; color: var(--pub-blue); font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.pub-title { font-size: 20px; line-height: 1.45; }
.pub-points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.pub-points li { display: flex; gap: 12px; align-items: flex-start; }
.pub-points i { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--pub-soft); color: var(--pub-blue); display: grid; place-items: center; }
.pub-points svg, .pub-trust svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pub-points span { display: grid; gap: 2px; color: var(--sub); font-size: 14px; line-height: 1.55; }
.pub-points strong { color: var(--ink); font-size: 15px; }
.pub-trust { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--pub-line); display: grid; gap: 10px; font-size: 14px; color: var(--sub); }
.pub-trust li { display: flex; gap: 8px; align-items: center; }
.pub-trust svg { width: 18px; height: 18px; flex: none; color: var(--pub-blue); }
.pub-legal { margin: 16px 0 0; font-size: 12px; color: #98a1b0; line-height: 1.6; }
.reg-body .pub-legal a { color: inherit; }

@media (min-width: 960px) {
  .reg-body { background: #f5f7fb linear-gradient(180deg, #e9f0ff 0, #f5f7fb 420px) no-repeat; }
  .pub-top { padding-top: 22px; padding-bottom: 10px; }
  .reg-signup .pub { display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 56px; align-items: start; padding: 24px 32px 48px; }
  .reg-signup .reg { grid-column: 2; grid-row: 1; max-width: none; padding: 0; }
  .reg-signup .pub-aside {
    grid-column: 1; grid-row: 1; position: sticky; top: 24px; margin: 0; padding: 44px 40px; border: 0; border-radius: 24px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0, #3a6cf0 0, transparent 60%), linear-gradient(160deg, #1f4fd8, #143a9e);
    box-shadow: 0 24px 60px rgba(20, 58, 158, .25); min-height: 560px; display: flex; flex-direction: column;
  }
  .reg-signup .pub-eyebrow { color: #b9cdff; }
  .reg-signup .pub-title { font-size: 32px; line-height: 1.35; }
  .reg-signup .pub-points { margin: 26px 0 0; gap: 16px; }
  .reg-signup .pub-points i { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; }
  .reg-signup .pub-points svg { width: 22px; height: 22px; }
  .reg-signup .pub-points span { color: #c9d7ff; font-size: 15px; }
  .reg-signup .pub-points strong { color: #fff; font-size: 17px; }
  .reg-signup .pub-trust { margin-top: auto; padding-top: 22px; border-top-color: rgba(255, 255, 255, .18); color: #dce6ff; }
  .reg-signup .pub-trust svg { color: #fff; }
  .reg-signup .pub-legal { color: #9fb5ef; }
  .reg h1 { font-size: 30px; }
  .reg-card { padding: 26px 26px; }
  .reg-app-actions .reg-btn { width: auto; }
}

/* 开店页左侧的 3D 手机（电脑宽屏才显示；样式和登录页 login.css 的 .scene 一致） */
.pub-scene { display: none; }
@media (min-width: 960px) {
  .reg-signup .pub-aside { overflow: hidden; }
  .pub-scene { display: block; position: relative; flex: 1 1 auto; min-height: 300px; margin: 8px -20px 0; }
  .pub-scene .scene-still, .pub-scene .scene-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .pub-scene .scene-still { object-fit: contain; object-position: 50% 62%; transition: opacity .6s ease; filter: drop-shadow(0 26px 36px rgba(8, 24, 80, .35)); }
  .pub-scene .scene-stage { opacity: 0; transition: opacity .6s ease; }
  .pub-scene.is-3d .scene-stage { opacity: 1; }
  .pub-scene.is-3d .scene-still { opacity: 0; }
  .pub-scene .scene-canvas { display: block; width: 100%; height: 100%; cursor: grab; outline: none; touch-action: pan-y; }
  .pub-scene.grabbed .scene-canvas { cursor: grabbing; }
  .pub-scene .scene-card { position: absolute; z-index: 2; display: grid; gap: 2px; padding: 10px 13px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 14px 32px rgba(8, 26, 90, .28); pointer-events: none; animation: scene-float 7s ease-in-out infinite; }
  .pub-scene .scene-card span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5b6576; }
  .pub-scene .scene-card em { font-style: normal; font-size: 10px; color: var(--pub-blue); background: #eaf0ff; padding: 1px 6px; border-radius: 6px; }
  .pub-scene .scene-card b { font-size: 22px; line-height: 1.15; color: var(--pub-blue); }
  .pub-scene .scene-card b small { font-size: 12px; margin-left: 2px; color: #5b6576; font-weight: 500; }
  .pub-scene .scene-c1 { left: 20px; top: 12%; }
  .pub-scene .scene-c2 { right: 20px; top: 2%; animation-delay: -3s; }
  .pub-scene .scene-note { position: absolute; right: 24px; bottom: 4px; margin: 0; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(10, 26, 80, .78); font-size: 12px; color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .pub-scene.is-3d .scene-note::after { content: ' · 按住可拖动'; }
}
@keyframes scene-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .pub-scene .scene-card { animation: none; } }

.reg-body .toast { max-width: calc(100vw - 32px); font-size: 15px; line-height: 1.5; text-align: center; }
@media (prefers-reduced-motion: reduce) { .reg-btn.is-loading::before { animation-duration: 2s; } }
/* 密码框小眼睛（pwd-eye.js）：给眼睛留位置 */
.reg-field .pwd-wrap input:not([type=file]):not([type=checkbox]) { padding-right: 50px; }
.reg-field .pwd-eye { right: 7px; width: 38px; height: 38px; }
