/* account.css —— 家长账号（account.js / lockpad.js，spec/025）：登录 / 注册 / 认领卡片、家长密码锁（九宫格 / 数字）、游戏里弹的锁层。
   启动画面（main.js）、家长入口、手机家长速看（m.html）共用，只依赖 tokens.css。 */

.mx-acct { width: min(420px, 100%); margin: 0 auto; color: var(--ink); font-size: 16px; line-height: 1.5; text-align: left; }
.mx-acct__step { display: flex; flex-direction: column; gap: 10px; }
.mx-acct__title { margin: 0 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 26px; text-align: center; color: var(--ink); }
.mx-acct__hint { margin: 0; font-size: 14px; color: var(--ink-soft); text-align: center; }
.mx-acct__note { margin: -4px 0 0; font-size: 12px; color: var(--ink-soft); }
.mx-acct__err { min-height: 1.2em; margin: 0; font-size: 14px; color: var(--bad-text); text-align: center; }
.mx-acct__field { display: flex; flex-direction: column; gap: 4px; }
.mx-acct__label { font-size: 13px; color: var(--ink-soft); }
.mx-acct__input {
  width: 100%; min-height: 46px; padding: 8px 14px; box-sizing: border-box;
  border: 1.5px solid var(--card-stroke); border-radius: 12px; background: #fff;
  font: inherit; font-size: 18px; color: var(--ink); outline: none;
}
.mx-acct__input:focus { border-color: var(--sky-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky-accent) 25%, transparent); }
.mx-acct__row { display: flex; gap: 8px; align-items: flex-end; }
.mx-acct__row .mx-acct__field { flex: 1 1 auto; }
.mx-acct__btn {
  min-height: 46px; padding: 8px 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--paper-2); color: var(--ink); font: inherit; font-size: 17px;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--paper-2), var(--ink) 18%);
}
.mx-acct__btn.is-primary { background: var(--coral-deep); color: #fff; font-family: var(--font-display); font-size: 20px; box-shadow: 0 3px 0 color-mix(in srgb, var(--coral), var(--ink) 30%); }
.mx-acct__btn:disabled { opacity: .55; cursor: default; }
.mx-acct__btn.is-busy { opacity: .7; }
.mx-acct__smsbtn { flex: 0 0 auto; min-width: 7.5em; font-size: 15px; }
.mx-acct__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.mx-acct__links.is-more { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--card-stroke); }
.mx-acct__link { padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--coral-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mx-acct__seg { display: flex; gap: 6px; justify-content: center; }
.mx-acct__seg .mx-acct__btn { min-height: 38px; font-size: 15px; }
.mx-acct__seg .mx-acct__btn.is-on { background: var(--ink); color: var(--paper); box-shadow: none; }
.mx-acct__padhost { display: flex; justify-content: center; padding: 6px 0; }

/* ---------------------------------------------------------------- 九宫格 */

.mx-lock { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mx-lock__grid {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  width: min(270px, 72vw); aspect-ratio: 1; padding: 6px; box-sizing: border-box;
  border-radius: 22px; background: color-mix(in srgb, var(--paper-2) 70%, #fff); touch-action: none;
}
.mx-lock__dot { position: relative; z-index: 1; display: grid; place-items: center; pointer-events: none; }
.mx-lock__dot i {
  display: block; width: 26%; aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 22%, transparent); transition: transform 120ms, background 120ms, box-shadow 120ms;
}
.mx-lock__dot.is-on i { transform: scale(1.5); background: var(--sky-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sky-accent) 25%, transparent); }
.mx-lock__trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; display: none; }
.mx-lock.is-trail .mx-lock__trail { display: block; }
.mx-lock__trail polyline { fill: none; stroke: color-mix(in srgb, var(--sky-accent) 70%, transparent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.mx-lock.is-bad .mx-lock__dot.is-on i { background: var(--bad); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 25%, transparent); }
.mx-lock.is-bad .mx-lock__grid, .mx-lock.is-bad .mx-lock__slots { animation: mx-lock-shake 320ms ease-in-out; }
.mx-lock.is-busy { opacity: .6; pointer-events: none; }
@keyframes mx-lock-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------------------------------------------------------------- 数字 */

.mx-lock--pin { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mx-lock__slots { display: flex; gap: 12px; }
.mx-lock__slots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.mx-lock__slots i.is-extra:not(.is-on) { opacity: .35; }
.mx-lock__slots i.is-on { background: var(--ink); border-color: var(--ink); }
.mx-lock.is-bad .mx-lock__slots i.is-on { background: var(--bad); border-color: var(--bad); }
.mx-lock__keys { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; }
.mx-lock__key {
  height: 56px; border: 0; border-radius: 16px; cursor: pointer;
  background: #fff; color: var(--ink); font: inherit; font-size: 24px; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 0 var(--card-stroke), 0 4px 10px rgba(60, 50, 30, .08);
}
.mx-lock__key:active { transform: translateY(1px) scale(.96); }
.mx-lock__key.is-fn { background: var(--paper-2); font-size: 20px; }

/* ---------------------------------------------------------------- 游戏里弹的锁 */

.mx-acct-layer { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(30, 24, 16, .45); }
.mx-acct-layer__box {
  width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 20px; box-sizing: border-box;
  border-radius: var(--radius-lg); background-color: var(--paper); background-image: var(--paper-noise); box-shadow: 0 12px 40px rgba(30, 24, 16, .3);
}
/* 阿里云验证码：弹窗画在 .mx-acct__captcha 里（它自己定位、盖在最上面），只把触发用的按钮藏起来 */
.mx-acct__captcha { position: relative; z-index: 9500; }
.mx-acct__captcha-btn { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- 通行密钥 */

.mx-acct__btn.mx-acct__pkbtn { background: #fff; border: 1.5px solid var(--card-stroke); box-shadow: none; font-size: 16px; }
.mx-acct--lock .mx-acct__btn.is-primary { margin: 4px auto 0; min-width: 12em; }

/* ---------------------------------------------------------------- 一家多孩：谁来玩 */

.mx-acct__kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px 0; }
.mx-acct__btn.mx-acct__kid { min-width: 7em; min-height: 64px; font-size: 26px; }
