/* 龙岩麻将 登录浮层样式（T04）。挂 body 顶层，z-index 高于 #GameCanvas。 */
#lymjLoginOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1c4d33 0%, #0c2b1a 100%);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: auto;
}
#lymjLoginOverlay * { box-sizing: border-box; }

.lymj-panel {
  width: 320px;
  max-width: 92vw;
  max-height: 96vh;
  overflow-y: auto;
  background: rgba(255, 253, 245, 0.97);
  border-radius: 14px;
  padding: 18px 22px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.lymj-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1c4d33;
  margin: 2px 0 12px;
  letter-spacing: 4px;
}
.lymj-subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: -8px 0 12px;
}

.lymj-field { margin-bottom: 10px; position: relative; }
.lymj-field label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 3px;
}
.lymj-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 15px;
  border: 1px solid #c9c2ad;
  border-radius: 8px;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
}
.lymj-field input:focus { border-color: #2e7d4f; }
.lymj-hint {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  line-height: 1.3;
}

/* 历史账号下拉（P1-4） */
.lymj-acc-wrap { display: flex; align-items: stretch; }
.lymj-acc-wrap input { flex: 1; border-radius: 8px 0 0 8px; }
.lymj-acc-toggle {
  width: 38px;
  border: 1px solid #c9c2ad;
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: #f2eee2;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}
.lymj-acc-list {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 10;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #c9c2ad;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  display: none;
}
.lymj-acc-list.lymj-open { display: block; }
.lymj-acc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #f0ece0;
}
.lymj-acc-item:last-child { border-bottom: none; }
.lymj-acc-item:active { background: #f5f2e8; }
.lymj-acc-del {
  color: #b44;
  font-size: 12px;
  padding: 2px 6px;
  flex: none;
}
.lymj-acc-empty { padding: 10px 12px; font-size: 13px; color: #999; }

.lymj-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
  margin: 4px 0 10px;
  user-select: none;
}
.lymj-remember input { width: 16px; height: 16px; }

.lymj-btn {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 9px;
  transition: opacity 0.15s;
}
.lymj-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.lymj-btn-primary { background: #2e7d4f; color: #fff; }
.lymj-btn-primary:active:not(:disabled) { background: #256a42; }

.lymj-btn-row { display: flex; gap: 9px; }
.lymj-btn-row .lymj-btn { flex: 1; height: 38px; font-size: 14px; font-weight: 500; }
.lymj-btn-ghost {
  background: #fff;
  color: #2e7d4f;
  border: 1px solid #2e7d4f;
}
.lymj-btn-ghost:active:not(:disabled) { background: #eef7f1; }

.lymj-divider {
  display: flex;
  align-items: center;
  color: #999;
  font-size: 12px;
  margin: 6px 0 10px;
}
.lymj-divider::before, .lymj-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd6c2;
}
.lymj-divider span { padding: 0 10px; }

.lymj-btn-wechat {
  background: #07c160;
  color: #fff;
}
.lymj-btn-wechat:active:not(:disabled) { background: #06a552; }

.lymj-error {
  min-height: 18px;
  font-size: 13px;
  color: #d33;
  text-align: center;
  margin: 2px 0 0;
  line-height: 1.35;
  word-break: break-all;
}
.lymj-field .lymj-error { text-align: left; min-height: 0; }

.lymj-back {
  background: none;
  border: none;
  color: #2e7d4f;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 2px;
}

/* 加载中/微信登录中态 */
.lymj-loading { text-align: center; padding: 26px 0 30px; }
.lymj-loading .lymj-spinner {
  width: 34px; height: 34px;
  margin: 0 auto 14px;
  border: 3px solid #cfe6d8;
  border-top-color: #2e7d4f;
  border-radius: 50%;
  animation: lymjSpin 0.9s linear infinite;
}
@keyframes lymjSpin { to { transform: rotate(360deg); } }
.lymj-loading p { color: #444; font-size: 15px; margin: 0; }

.lymj-hidden { display: none !important; }

/* 非微信浏览器引导（设计 §9-1） */
.lymj-wxguide { text-align: center; padding: 6px 0; }
.lymj-wxguide p { font-size: 14px; color: #444; margin: 6px 0 12px; line-height: 1.5; }

/* 横屏小高度适配 */
@media (max-height: 420px) {
  #lymjLoginOverlay { align-items: flex-start; padding: 8px 0; }
  .lymj-panel { padding: 10px 18px 12px; }
  .lymj-title { font-size: 18px; margin: 0 0 8px; }
  .lymj-field input { height: 34px; }
  .lymj-btn { height: 38px; }
}
