/* 登录页 /login：版式照 AutoMods 登录页（左边介绍、右边白卡片扫码；窄屏上下排），颜色用我们的草绿 */
:root {
  color-scheme: light;
  --bg: #f8faf7;
  --glow: #e6f1df;
  --card: #fff;
  --ink: #172016;
  --muted: #666e62;
  --line: #e2e7df;
  --green: #3f8e2d;
  --green-2: #35792a;
  --green-soft: #edf6e7;
  --green-line: #cfe5c3;
  --err: #923b2d;
  --err-bg: #fff3ed;
  --err-line: #f1d7cc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #15181c; --glow: #1c2618; --card: #1c2026; --ink: #e8ebef; --muted: #98a1ad; --line: #2e343d;
    --green: #6dbb45; --green-2: #5aa53a; --green-soft: #1f2d19; --green-line: #2f4a25; --err: #ff9c8f; --err-bg: #2a1b18; --err-line: #4a2a24;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column; color: var(--ink); font-size: 14px;
  background: radial-gradient(ellipse at 30% 0%, var(--glow) 0, transparent 60%);
}
a { color: inherit; }

.lg-brand { display: flex; align-items: center; padding: 22px clamp(16px, 6vw, 88px); }
.lg-brand a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lg-brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.lg-brand b { font-size: 20px; font-weight: 750; letter-spacing: -.2px; }

/* 两栏 */
.lg-layout {
  width: min(1060px, calc(100% - 32px)); margin: auto; padding: 12px 0 8px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 477px); gap: 56px; align-items: center;
}

/* 左：介绍 */
.lg-icon { width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 24px -14px rgba(23, 32, 22, .35), 0 2px 0 rgba(23, 32, 22, .06); }
.lg-icon img { width: 60px; height: 60px; image-rendering: pixelated; }
.lg-pitch h1 { margin: 0; font-size: 38px; line-height: 1.32; letter-spacing: -.5px; font-weight: 700; }
.lg-lead { margin: 16px 0 26px; font-size: 15px; line-height: 1.75; color: var(--muted); }
.lg-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lg-points li { position: relative; padding-left: 20px; display: grid; gap: 3px; }
.lg-points li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; background: var(--green); }
.lg-points b { font-size: 14.5px; }
.lg-points span { font-size: 13px; color: var(--muted); }
.lg-formats { display: flex; flex-wrap: wrap; gap: 18px; margin: 26px 0 0; font-size: 12.5px; color: var(--muted); }
.lg-formats span { display: inline-flex; align-items: center; gap: 7px; }
.lg-formats svg { width: 20px; height: 20px; shape-rendering: crispEdges; }

/* 右：扫码卡片 */
.lg-card {
  display: grid; gap: 10px; padding: 30px 28px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 32px -14px rgba(23, 32, 22, .32), 0 2px 0 rgba(23, 32, 22, .06);
}
.lg-card h2 { margin: 0; font-size: 19px; font-weight: 700; }
.lg-sub { margin: 4px 0 0; color: var(--muted); line-height: 1.7; }

.lg-scan { display: flex; align-items: center; gap: 18px; margin-top: 16px; padding: 14px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.lg-qr { position: relative; flex: none; width: 184px; height: 184px; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.lg-qr img { display: block; width: 168px; height: 168px; object-fit: contain; }
.lg-qr-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-size: 12px; color: #666e62; }
.lg-qr-wait i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #dfe8dc; border-top-color: #3f8e2d; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lg-qr-wait i { animation-duration: 3s; } }
.lg-qr-mask {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; text-align: center;
  background: rgba(255, 255, 255, .95); border-radius: 10px; color: #172016;
}
.lg-qr-mask p { margin: 0; font-size: 13.5px; font-weight: 600; }
.lg-qr-mask.ok p { color: #3f8e2d; font-size: 16px; }
.lg-qr-mask button { border: 0; border-radius: 9px; background: #3f8e2d; color: #fff; font: inherit; font-weight: 700; min-height: 38px; padding: 8px 18px; cursor: pointer; }
.lg-qr-mask button:hover { background: #35792a; }
.lg-scan-text { display: grid; gap: 6px; min-width: 0; }
.lg-scan-text b { font-size: 18px; }
.lg-status { font-size: 13px; font-weight: 700; color: var(--green); line-height: 1.5; min-height: 20px; }
.lg-status.ok { font-size: 14px; }
.lg-scan-text small { font-size: 12px; line-height: 1.8; color: var(--muted); }

.lg-gift { display: grid; gap: 2px; margin-top: 6px; padding: 12px; background: var(--green-soft); border: 1px solid var(--green-line); border-radius: 10px; }
.lg-gift b { font-size: 13.5px; color: var(--green-2); }
.lg-gift span { font-size: 11.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .lg-gift b { color: var(--green); } }

.lg-avatar { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 14px; overflow: hidden; background: var(--green-soft); }
.lg-avatar canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.lg-btn {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 10px 0 4px; padding: 10px 32px;
  border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 15px; font-weight: 650; text-decoration: none;
}
.lg-btn:hover { background: var(--green-2); }
@media (prefers-color-scheme: dark) { .lg-btn { color: #0d1409; } }
.lg-link { background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-underline-offset: 4px; }
.lg-link:hover { color: var(--ink); text-decoration: underline; }

.lg-error { font-size: 14px; line-height: 1.8; color: var(--err); background: var(--err-bg); padding: 12px 14px; border: 1px solid var(--err-line); border-radius: 10px; margin: 6px 0 0; text-align: left; }

.lg-offline {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 12px; margin-top: 6px; padding: 11px 14px;
  border: 1px dashed var(--line); border-radius: 10px; text-align: left; text-decoration: none; color: var(--ink);
}
.lg-offline:hover { border-color: var(--green); background: var(--green-soft); }
.lg-offline b { font-size: 13.5px; }
.lg-offline span { grid-column: 1 / 3; grid-row: 2; font-size: 12px; color: var(--muted); }
.lg-offline i { grid-row: 1 / 3; grid-column: 3; font-style: normal; color: var(--green); font-size: 18px; }

footer { text-align: center; font-size: 12px; color: var(--muted); padding: 28px 16px; }
:focus-visible { outline: 3px solid #93bca2; outline-offset: 3px; }

/* 窄屏：上下排，介绍在上、卡片在下 */
@media (max-width: 900px) {
  .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 520px; }
  .lg-pitch { text-align: center; }
  .lg-icon { margin: 0 auto 18px; }
  .lg-pitch h1 { font-size: 30px; }
  .lg-points { text-align: left; max-width: 400px; margin: 0 auto; }
  .lg-formats { justify-content: center; }
}
@media (max-width: 480px) {
  .lg-brand { padding: 16px; }
  .lg-pitch h1 { font-size: 25px; }
  .lg-lead { font-size: 14px; }
  .lg-card { padding: 22px 16px; }
  .lg-scan { flex-direction: column; text-align: center; }
  .lg-scan-text { justify-items: center; }
  /* 手机上：扫码卡片放到介绍前面，打开就能看到二维码 */
  .lg-layout { display: flex; flex-direction: column-reverse; }
}
