/* NP Studio 로그인 — 왼쪽: 직접 그린 지형 지도(npart.js), 오른쪽: 로그인. 모바일: 지도 띠 위 + 로그인 아래. */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(400px, 520px); min-height: 100vh; min-height: 100dvh; }

/* ---------- 지도 ---------- */
.art { position: relative; overflow: hidden; background: #2b4c8c; border-right: 1px solid var(--line-soft); }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
/* 청크 격자(16칸) — 지도 칸 수(96)와 맞춘 6×6 */
.art-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .09) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: calc(100% / 6) calc(100% / 6); mix-blend-mode: overlay; }
.art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(6, 10, 18, .72), rgba(6, 10, 18, 0) 42%); }
.art-legend { position: absolute; z-index: 1; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); bottom: clamp(20px, 4vw, 44px); display: flex; flex-direction: column; gap: 6px; color: #f3f6fb; }
.art-prompt { font-size: clamp(18px, 2vw, 26px); font-weight: 600; line-height: 1.35; letter-spacing: -.2px; max-width: 28ch; text-wrap: balance; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.art-meta { font-size: 13px; color: rgba(243, 246, 251, .78); }

/* ---------- 로그인 ---------- */
.side { display: flex; flex-direction: column; min-width: 0; background: var(--bg); padding: 20px clamp(20px, 4vw, 48px) 16px; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none; font-size: var(--fs-md); }
.brand svg { color: var(--accent); }
.side-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; width: 100%; max-width: 400px; margin: 32px auto; }
.side-body h1 { margin: 0; font-size: var(--fs-2xl); line-height: 1.25; letter-spacing: -.6px; font-weight: 700; text-wrap: balance; }
.side-body .lead { margin: -6px 0 4px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; text-wrap: pretty; }

.flow { display: flex; flex-direction: column; gap: 14px; }
.flow .field input { width: 100%; }
.flow .check .sub { display: block; margin-top: 2px; color: var(--faint); }
.flow .fine { margin: 0; font-size: var(--fs-xs); color: var(--faint); line-height: 1.55; }
.flow .msg { margin: -4px 0 0; }
.flow .msg:empty { display: none; }

/* 이메일 → 코드 두 단계 */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--faint); }
.steps li { display: inline-flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--line); margin-right: 2px; }
.steps .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 700; font-size: 11px; }
.steps li.on { color: var(--text); }
.steps li.on .n { background: var(--accent); color: var(--accent-ink); }
.steps li.done .n { background: var(--ok-soft); color: var(--ok); }
.code-row { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.code-row .sent { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.code-row .sent b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.flow input.code { font: 600 22px/1 var(--mono); letter-spacing: .35em; text-align: center; min-height: 52px; }
.linkish { align-self: center; border: 0; background: none; color: var(--accent); font-size: var(--fs-xs); padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.linkish:disabled { color: var(--faint); cursor: default; }

/* SSO */
.sso { display: flex; flex-direction: column; gap: 14px; }
.sso-btn { background: var(--text) !important; color: var(--bg) !important; border-color: var(--text) !important; font-weight: 600; }
.sso-btn:hover { opacity: .92; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: var(--fs-xs); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 탭(초대 코드 · 비밀번호 계정) */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-xs); }
.tabs button { flex: 1; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 0 6px; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }

.side-foot { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.5; color: var(--faint); text-align: center; }
.side-foot a { color: var(--muted); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .art { height: clamp(168px, 30vh, 260px); border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .art-legend { bottom: 16px; }
  .art-prompt { font-size: 17px; }
  .side { padding: 16px 16px 12px; }
  .side-top { position: absolute; top: 12px; left: 16px; right: 16px; }
  .brand { color: #f3f6fb !important; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
  .brand svg { color: #f3f6fb; }
  .side-body { margin: 8px auto 24px; justify-content: flex-start; }
  .side-body h1 { font-size: 24px; }
}
@media (max-width: 380px) {
  .tabs button { font-size: 12px; padding: 0 4px; }
  .art-meta { display: none; }
}
/* 일본어·중국어 제목이 낱말 가운데서 끊기지 않게(지원하는 브라우저) */
.side-body h1, .art-prompt { word-break: auto-phrase; }
