/* ============================================================
   十加一 · 登录页（login.css）
   三段：选名字 → 输密码（或首次设置密码） → 忘记密码说明
   配色与按钮全部走 skin.css，这里只管这一页的排版。
   ============================================================ */

.lg {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 20px
           calc(env(safe-area-inset-bottom, 0px) + 26px);
}

/* ---------- 品牌头 ---------- */
.lg-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.lg-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  border-radius: 20px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 10px 26px -14px rgba(29, 25, 19, .45);
}
.lg-head h1 {
  margin: 2px 0 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--ink);
}
.lg-sub {
  margin: 0;
  max-width: 300px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-3);
}

/* ---------- 上次登录提示 ---------- */
.lg-last {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(200, 145, 42, .32);
  border-radius: 16px;
  background: var(--brand-soft);
  text-align: left;
}
.lg-last .lbl {
  display: block;
  margin-bottom: 1px;
  font-size: 11.5px;
  font-weight: 700;
  color: #A06F16;
}
.lg-last b {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--ink);
}
.lg-last .btn { margin-left: auto; }

/* ---------- 名字墙 ---------- */
.lg-search {
  position: relative;
  margin: 20px 0 12px;
}
.lg-search .inp { padding-left: 40px; height: 46px; }
.lg-search .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  pointer-events: none;
}
.lg-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 9px;
}
.name-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.name-chip:hover {
  border-color: rgba(200, 145, 42, .5);
  background: #FFFCF6;
}
.name-chip:active {
  transform: none;
  background: var(--brand-soft);
  box-shadow: inset 0 1px 3px rgba(29, 25, 19, .1);
}
.name-chip .zi {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 12.5px;
  font-weight: 800;
}
.name-chip em {
  flex: 0 0 auto;
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #B9AE99;
}
.name-chip em.on { color: var(--green); }

.lg-none {
  display: none;
  padding: 26px 10px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* ---------- 密码 / 设密码面板 ---------- */
.lg-panel { display: none; margin-top: 24px; }
.lg-panel.on { display: block; }

.lg-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.lg-who .ava {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 18px -10px rgba(200, 145, 42, .9);
}
.lg-who .t { min-width: 0; flex: 1; }
.lg-who b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .2px;
}
.lg-who span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}
.lg-back {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 6px 2px;
  color: var(--brand-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.lg-back:hover { text-decoration: underline; }

.lg-tip {
  display: flex;
  gap: 9px;
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: #8C6415;
  font-size: 12.5px;
  line-height: 1.6;
}
.lg-tip .ic { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; }

.lg-field { margin-bottom: 12px; }
.lg-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.lg-pw { position: relative; }
.lg-pw .inp { height: 48px; padding-right: 62px; letter-spacing: .5px; }
.lg-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lg-eye:hover { background: #F4F0E7; color: var(--ink-2); }

.lg-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.lg-alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #F2D3CE;
  border-radius: 12px;
  background: #FDECEA;
  color: #A63428;
  font-size: 13px;
  line-height: 1.55;
}
/* 类里的 display:flex 会盖掉浏览器给 [hidden] 的 display:none，
   于是提示条一直占位：空的显示成粉条/绿条，「首次登录」还会跑到登录态上。
   本页只有 login.css + skin.css，直接兜住所有 [hidden]。 */
[hidden] { display: none !important; }
.lg-alert.ok {
  border-color: #CFE9DA;
  background: #EAF6EF;
  color: #23764E;
}
.lg-submit { margin-top: 18px; }

.lg-forgot {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  padding: 6px;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.lg-forgot:hover { color: var(--brand-2); text-decoration: underline; }

/* ---------- 页脚 ---------- */
.lg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
}
.lg-foot a { color: var(--ink-3); }
.lg-foot a:hover { color: var(--brand-2); }

/* ---------- 桌面：登录页收成一张卡，别铺满整屏 ---------- */
@media (min-width: 820px) {
  .lg {
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
  }
  .lg-inner {
    width: 100%;
    max-width: 560px;
    padding: 34px 34px 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 30px 70px -40px rgba(29, 25, 19, .5),
                0 2px 6px rgba(29, 25, 19, .04);
  }
  .lg-wall { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .lg-foot { margin-top: 26px; }
}

@media (max-width: 380px) {
  .lg-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
