/* ============ 로그인 (화이트 / 블랙) ============ */
.lg {
  --l-bg: #ffffff; --l-hero: #f4f4f5; --l-ink: #09090b; --l-ink2: #3f3f46; --l-mute: #71717a; --l-line: #e4e4e7;
  --l-grid: rgba(9,9,11,.06); --l-spot: rgba(255,255,255,.95); --l-btn: #5865F2; --l-btn-ink: #ffffff; --l-btn-h: #4752C4;
  --c-top: #ffffff; --c-l: #e9e9ec; --c-r: #d6d6db; --c-edge: rgba(9,9,11,.14); --c-in: rgba(9,9,11,.06);
  margin: 0; min-height: 100vh; background: var(--l-bg); color: var(--l-ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
[data-theme='dark'] .lg {
  --l-bg: #09090b; --l-hero: #0c0c0e; --l-ink: #fafafa; --l-ink2: #d4d4d8; --l-mute: #8b8b94; --l-line: #1f1f23;
  --l-grid: rgba(255,255,255,.055); --l-spot: rgba(255,255,255,.07); --l-btn: #5865F2; --l-btn-ink: #ffffff; --l-btn-h: #4752C4;
  --c-top: #26262b; --c-l: #18181c; --c-r: #111114; --c-edge: rgba(255,255,255,.1); --c-in: rgba(255,255,255,.05);
}
body.lg::before { display: none; }
.lg-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: 100vh; }

/* ----- 왼쪽 소개 ----- */
.lg-hero { position: relative; overflow: hidden; background: var(--l-hero); border-right: 1px solid var(--l-line); display: flex; flex-direction: column; padding: 40px 56px 52px; isolation: isolate; }
.lg-grid { position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--l-grid) 1px, transparent 1px), linear-gradient(90deg, var(--l-grid) 1px, transparent 1px);
  background-size: 44px 44px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%); }
.lg-spot { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 55%) var(--my, 40%), var(--l-spot), transparent 60%); transition: background .2s; }
.lg-brand { display: flex; align-items: center; gap: 10px; }
.lg-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--l-ink); color: var(--l-bg); flex: none; }
.lg-mark svg.lucide { width: 18px; height: 18px; }
.lg-mark[hidden], .lg-logo[hidden] { display: none; }
.lg-logo { height: 36px; max-width: 180px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.2)); }
.lg-logo.sm { height: 32px; }
.lg-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.lg-art { flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px 0; }
.lg-svg { width: min(100%, 560px); height: auto; max-height: 52vh; overflow: visible; transform: translate(var(--tx, 0), var(--ty, 0)); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cb .f-t { fill: var(--c-top); }
.cb .f-l { fill: var(--c-l); }
.cb .f-r { fill: var(--c-r); }
.cb polygon { stroke: var(--c-edge); stroke-width: 1; stroke-linejoin: round; }
.cb .f-in { fill: none; stroke: var(--c-in); }
.base { animation: lgRise .9s cubic-bezier(.2,.7,.2,1) both; }
.fl { animation: lgFloat 6s ease-in-out infinite; }
.fl.b { animation-delay: -1.5s; animation-duration: 7s; }
.fl.c { animation-delay: -3s; animation-duration: 6.5s; }
.fl.d { animation-delay: -4.5s; animation-duration: 5.5s; }
.fl.hi .f-t { fill: var(--l-ink); }
.fl.hi .f-l { fill: color-mix(in srgb, var(--l-ink) 82%, var(--l-bg)); }
.fl.hi .f-r { fill: color-mix(in srgb, var(--l-ink) 68%, var(--l-bg)); }
.fl.hi .f-in { stroke: color-mix(in srgb, var(--l-bg) 25%, transparent); }
@keyframes lgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes lgRise { from { opacity: 0; transform: translateY(14px); } }
.lg-copy { animation: lgRise .9s .1s cubic-bezier(.2,.7,.2,1) both; }
.lg-kicker { margin: 0 0 14px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .18em; color: var(--l-mute); }
.lg-copy h1 { margin: 0; font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; }
.lg-feats { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--l-ink2); font-size: 14.5px; }
.lg-feats li { display: inline-flex; align-items: center; gap: 8px; }
.lg-feats svg.lucide { width: 16px; height: 16px; color: var(--l-mute); }

/* ----- 오른쪽 로그인 ----- */
.lg-side { display: flex; flex-direction: column; padding: 36px 48px 32px; background: var(--l-bg); }
.lg-top { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.lg-brand.sm { display: none; margin-right: auto; }
.lg-mark.sm { width: 30px; height: 30px; border-radius: 9px; }
.lg-theme { position: relative; display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--l-line); background: var(--l-bg); }
.lg-theme button { position: relative; z-index: 1; width: 34px; height: 28px; border: 0; background: none; border-radius: 999px; display: grid; place-items: center; color: var(--l-mute); cursor: pointer; transition: color .2s; }
.lg-theme button svg.lucide { width: 15px; height: 15px; }
.lg-theme button[aria-pressed='true'] { color: var(--l-ink); }
.lg-theme-thumb { position: absolute; top: 3px; left: 3px; width: 34px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--l-ink) 8%, transparent); transition: transform .25s cubic-bezier(.3,.7,.2,1); }
.lg-theme[data-on='dark'] .lg-theme-thumb { transform: translateX(34px); }

.lg-form { width: 100%; max-width: 380px; margin: auto; padding: 32px 0; animation: lgRise .7s .15s cubic-bezier(.2,.7,.2,1) both; }
.lg-form h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.lg-sub { margin: 10px 0 30px; color: var(--l-mute); font-size: 15px; }
.lg-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
[data-theme='dark'] .lg-alert { color: #fda29b; background: rgba(240,68,56,.08); border-color: rgba(240,68,56,.25); }
.lg-alert[hidden] { display: none; }
.lg-alert svg.lucide { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.lg-discord { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 14px; text-decoration: none;
  background: var(--l-btn); color: var(--l-btn-ink); font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.08); transition: background .15s, transform .15s, box-shadow .15s; }
.lg-discord:hover { background: var(--l-btn-h); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(88,101,242,.65); }
.lg-discord:active { transform: none; }
.lg-discord:focus-visible { outline: 2px solid var(--l-ink); outline-offset: 3px; }
.lg-discord .lg-go { position: absolute; right: 18px; width: 18px; height: 18px; opacity: 0; transform: translateX(-6px); transition: opacity .15s, transform .2s; }
.lg-discord:hover .lg-go { opacity: .7; transform: none; }
.lg-discord.busy { pointer-events: none; opacity: .75; }
.lg-discord.busy .lg-go { display: none; }
.lg-info { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--l-line); display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--l-mute); }
.lg-info div { display: flex; align-items: center; gap: 10px; }
.lg-info b { color: var(--l-ink2); font-weight: 700; }
.lg-info svg.lucide { width: 16px; height: 16px; flex: none; }
.lg-foot { margin: 0; text-align: center; font-size: 12.5px; color: var(--l-mute); }

.lg-art-m { display: none; }
@media (max-width: 960px) {
  .lg-art-m { display: block; width: 210px; margin: 0 auto 30px; }
  .lg-art-m .lg-svg { width: 100%; max-height: none; }
  .lg-shell { grid-template-columns: 1fr; }
  .lg-hero { display: none; }
  .lg-brand.sm { display: flex; }
  .lg-side { min-height: 100vh; padding: 22px 22px 24px; }
  .lg-top { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .fl, .base, .lg-copy, .lg-form { animation: none; }
  .lg-svg { transition: none; }
}


/* ----- 2단계 인증 (모노 미니멀) ----- */
.lg-form[hidden], .lg-pane[hidden], .lg-step[hidden], .lg-alt[hidden] { display: none; }
.lg-mfa { max-width: 392px; --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; --l-soft: color-mix(in srgb, var(--l-ink) 4%, var(--l-bg)); }
.lg-step, .lg-pane { animation: lgFade .35s ease both; }
@keyframes lgFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lg-eb { font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--l-mute); }
.lg-mfa h2 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.035em; }
.lg-mfa .lg-sub { margin: 10px 0 30px; font-size: 14.5px; line-height: 1.65; color: var(--l-mute); }
.lg-mfa .lg-sub b { color: var(--l-ink); font-weight: 600; }
/* 로그인 중인 계정 */
.lg-who { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; font-size: 13px; color: var(--l-mute); }
.lg-who img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; background: var(--l-line); }
.lg-who img[hidden] { display: none; }
.lg-who b { color: var(--l-ink); font-weight: 600; }
.lg-who span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-who a { color: var(--l-mute); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--l-line); white-space: nowrap; }
.lg-who a:hover { color: var(--l-ink); text-decoration-color: currentColor; }
/* 오류 */
.lg-mfa .lg-alert { border-radius: 10px; font-size: 13.5px; }
/* 6칸 코드 */
.lg-otp { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.lg-otp[hidden] { display: none; }
.lg-otp input { flex: 1; min-width: 0; width: 100%; height: 62px; padding: 0; border: 1px solid var(--l-line); border-radius: 10px; background: var(--l-bg); color: var(--l-ink);
  font: 600 26px/1 var(--mono); text-align: center; outline: none; caret-color: var(--l-ink); transition: border-color .15s, box-shadow .15s; }
.lg-otp input:hover { border-color: color-mix(in srgb, var(--l-ink) 25%, var(--l-line)); }
.lg-otp input:focus { border-color: var(--l-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--l-ink) 7%, transparent); }
.lg-otp input.on { border-color: color-mix(in srgb, var(--l-ink) 30%, var(--l-line)); }
.lg-otp-dash { flex: none; width: 8px; }
.lg-otp.shake { animation: lgShake .38s; }
.lg-otp.bad input { border-color: #dc2626; color: #dc2626; }
.lg-otp.good input { border-color: var(--l-ink); background: var(--l-soft); }
@keyframes lgShake { 0%, 100% { transform: none; } 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.lg-rc { display: block; width: 100%; height: 62px; margin-bottom: 24px; padding: 0 16px; border: 1px solid var(--l-line); border-radius: 10px; background: var(--l-bg); color: var(--l-ink);
  font: 600 20px/1 var(--mono); letter-spacing: .14em; text-align: center; outline: none; box-sizing: border-box; }
.lg-rc:focus { border-color: var(--l-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--l-ink) 7%, transparent); }
.lg-rc[hidden] { display: none; }
/* 버튼 */
.lg-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--l-ink); color: var(--l-bg); font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; transition: opacity .15s; }
.lg-primary:hover:not(:disabled) { opacity: .86; }
.lg-primary:disabled { opacity: .3; cursor: not-allowed; }
.lg-primary.busy { opacity: .7; }
.lg-primary.busy span::before { content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 9px; vertical-align: -2px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--l-bg) 35%, transparent); border-top-color: var(--l-bg); animation: lgSpin .7s linear infinite; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
.lg-alt { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; font-size: 13px; color: var(--l-mute); }
.lg-alt button { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--l-ink); cursor: pointer; }
.lg-alt button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.lg-alt button:disabled { color: var(--l-mute); font-weight: 500; cursor: default; font-variant-numeric: tabular-nums; }
.lg-alt .lg-back { color: var(--l-mute); font-weight: 500; }
/* 앱 목록 */
.lg-apps { margin-bottom: 30px; border-top: 1px solid var(--l-line); }
.lg-apps > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--l-line); }
.lg-apps b { font-size: 14px; font-weight: 600; }
.lg-apps span { font: 500 11.5px/1 var(--mono); letter-spacing: .04em; color: var(--l-mute); }
/* QR */
.lg-qr { width: 196px; height: 196px; margin: 0 auto 22px; padding: 12px; border: 1px solid var(--l-line); border-radius: 12px; background: #fff; }
.lg-qr-box { width: 100%; height: 100%; display: grid; place-items: center; }
.lg-qr-box svg { width: 100%; height: 100%; display: block; }
.lg-qr-none { font-size: 12.5px; color: #71717a; text-align: center; line-height: 1.6; }
.lg-spin { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #e4e4e7; border-top-color: #09090b; animation: lgSpin .8s linear infinite; }
.lg-key { margin-bottom: 26px; }
.lg-key > span { display: block; margin-bottom: 8px; font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--l-mute); }
.lg-key > div { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border: 1px solid var(--l-line); border-radius: 10px; background: var(--l-soft); }
.lg-key code { flex: 1; min-width: 0; font: 500 13px/1.55 var(--mono); letter-spacing: .04em; word-break: break-all; }
.lg-key button { flex: none; border: 0; background: none; padding: 0; font: 600 12.5px/1 inherit; font-family: inherit; color: var(--l-ink); cursor: pointer; }
.lg-key button:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 복구 코드 */
.lg-codes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--l-line); border-radius: 10px; overflow: hidden; }
.lg-codes code { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font: 500 13.5px/1 var(--mono); letter-spacing: .05em; border-bottom: 1px solid var(--l-line); }
.lg-codes code:nth-child(odd) { border-right: 1px solid var(--l-line); }
.lg-codes code:nth-last-child(-n+2) { border-bottom: 0; }
.lg-codes code i { font-style: normal; font-size: 10.5px; color: var(--l-mute); }
.lg-code-act { display: flex; justify-content: flex-end; gap: 16px; margin: 10px 0 22px; }
.lg-code-act button { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--l-ink); cursor: pointer; }
.lg-code-act button:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-check { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13.5px; color: var(--l-ink2); cursor: pointer; }
.lg-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--l-ink); }
/* 아래 줄 */
.lg-mfoot { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--l-line); font: 500 11px/1 var(--mono); letter-spacing: .08em; color: var(--l-mute); }
.lg-mfoot.low #mfaTime { color: #dc2626; }
@media (max-width: 420px) {
  .lg-otp { gap: 6px; } .lg-otp input { height: 54px; font-size: 22px; }
  .lg-mfa h2 { font-size: 26px; }
  .lg-mfoot { margin-top: 40px; }
}
