/* 全站共享登录弹窗（2026-08-24）：水墨主题，与全站同基调
   用法：<link rel="stylesheet" href="/static/login_modal.css">
         <script src="/static/login_modal.js"></script>
         LoginModal.open({ onSuccess: fn }) / LoginModal.close()
   依赖页面引入 review.css（基色变量）；登录成功写 localStorage auth_token，
   原地调用 onSuccess（默认 location.reload()），不再整页跳 login.html。
   验证码/找回密码流程仍走独立 login.html（弹窗只覆盖账号密码登录）。 */
.lgm-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(35,40,42,.42);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.lgm-mask.open { opacity: 1; pointer-events: auto; }
.lgm-box {
  width: 100%; max-width: 380px;
  background: var(--card, #fbfbf9); border: 1px solid var(--line, rgba(35,40,42,.14));
  border-radius: 10px; padding: 24px 22px 18px;
  box-shadow: 0 18px 50px rgba(35,40,42,.18);
  transform: translateY(12px); transition: transform .2s ease;
}
.lgm-mask.open .lgm-box { transform: none; }
.lgm-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.lgm-title { font-family: var(--serif, serif); font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--ink, #23282a); }
.lgm-close {
  border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer;
  color: var(--ink-faint, #9aa3a4); padding: 2px 6px;
}
.lgm-close:hover { color: var(--ink, #23282a); }
.lgm-field { margin-bottom: 14px; }
.lgm-field label { display: block; font-size: 12.5px; color: var(--ink-soft, #5c6567); margin-bottom: 5px; }
.lgm-field input {
  width: 100%; padding: 11px 13px; font-size: 14.5px; color: var(--ink, #23282a);
  background: #fff; border: 1px solid var(--line, rgba(35,40,42,.14)); border-radius: 5px;
  outline: none; font-family: inherit;
}
.lgm-field input:focus { border-color: var(--zhu, #c0483a); }
.lgm-err { min-height: 18px; font-size: 12.5px; color: var(--zhu, #c0483a); margin: 2px 0 8px; }
.lgm-submit {
  width: 100%; padding: 12px 0; font-size: 15px; font-weight: 600; letter-spacing: .1em;
  color: #fff; background: var(--ink, #23282a); border: none; border-radius: 5px;
  cursor: pointer;
}
.lgm-submit:disabled { opacity: .55; cursor: default; }
.lgm-foot { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--ink-soft, #5c6567); }
.lgm-foot a { color: var(--zhu, #c0483a); text-decoration: none; }
.lgm-foot a:hover { text-decoration: underline; }
