:root { color-scheme: light; font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif; color: #111827; background: #eef2f7; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { width: 100%; min-width: 0; overflow-x: hidden; }
body { margin: 0; width: 100%; min-width: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow-x: hidden; }
.auth-shell { width: min(920px, 100%); min-height: 600px; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; border: 1px solid #dbe3ee; border-radius: 8px; box-shadow: 0 24px 70px rgba(15,23,42,.16); overflow: hidden; }
.auth-brand { padding: 54px; background: #101827; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand small { color: #93c5fd; font-weight: 800; }
.auth-brand h1 { margin: 14px 0 12px; font-size: 42px; letter-spacing: 0; }
.auth-brand p { margin: 0; color: #cbd5e1; line-height: 1.7; }
.auth-brand strong { font-size: 14px; color: #94a3b8; }
.auth-panel { min-height: 0; max-height: 100vh; overflow-y: auto; overscroll-behavior: contain; padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h2 { margin: 0 0 8px; font-size: 28px; }
.auth-panel > p { margin: 0 0 28px; color: #64748b; }
.auth-recovery-notice { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 14px; font-weight: 800; line-height: 1.5; }
.auth-recovery-notice[data-reason="access-revoked"] { border-color: #fecaca; background: #fef2f2; color: #b42318; }
.social-login { display: grid; gap: 9px; margin: 22px 0 18px; }
.google-identity-button { width: 100%; min-height: 48px; overflow: hidden; border-radius: 6px; }
.google-identity-button > div,
.google-identity-button iframe { width: 100% !important; min-height: 48px !important; }
.google-identity-button:focus-within,
.google-identity-button:has(iframe:focus),
.google-identity-button.is-iframe-focused {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .2);
}
.social-button { min-height: 48px; display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 14px; background: #fff; color: #0f172a; font: inherit; font-weight: 850; cursor: pointer; }
.social-button span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 900; }
.social-google span { border: 1px solid #dbe3ee; color: #2563eb; }
.social-kakao { border-color: #f1d900; background: #fee500; color: #191919; }
.social-kakao span { background: #191919; color: #fee500; }
.social-naver { border-color: #03a94d; background: #03c75a; color: #fff; }
.social-naver span { background: #fff; color: #03a94d; }
.social-button:disabled { opacity: .6; cursor: wait; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #94a3b8; font-size: 13px; font-weight: 750; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e2e8f0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f1f5f9; border-radius: 6px; margin-bottom: 24px; }
.auth-tabs button { min-height: 44px; border: 0; background: transparent; padding: 12px; font: inherit; font-weight: 800; cursor: pointer; border-radius: 4px; }
.auth-tabs button.is-active { background: #fff; color: #2563eb; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
[data-auth-view] { contain: layout paint; }
[data-name-field][hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}
label { display: grid; gap: 7px; margin-bottom: 16px; font-weight: 800; color: #475569; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 13px 14px; font: inherit; color: #0f172a; background: #fff; }
textarea { min-height: 82px; resize: vertical; }
.primary { width: 100%; border: 0; border-radius: 6px; padding: 15px; background: #2563eb; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.primary:disabled { opacity: .55; cursor: wait; }
.auth-message { min-height: 44px; margin-top: 16px; padding: 11px 12px; border-radius: 6px; color: #475569; background: #f8fafc; }
.auth-message.is-error { color: #b42318; background: #fff1f0; }
.auth-install{display:grid;gap:8px;margin-top:12px;padding:14px;border:1px solid #dbe5f1;border-radius:8px;background:#f8fafc}.auth-install strong{font-size:14px}.auth-install p{margin:0;color:#64748b;font-size:13px;line-height:1.5}.auth-install button{min-height:44px;border:1px solid #93b4e8;border-radius:7px;background:#fff;color:#1d4ed8;font:inherit;font-weight:850;cursor:pointer}
.access-form { display: none; }
.access-form.is-visible { display: block; }
.connection-form { display: none; }
.connection-form.is-visible { display: block; }
.access-status { display: none; }
.access-status.is-visible { display: block; }
.access-status > p { margin: 0 0 20px; color: #64748b; line-height: 1.6; }
.access-status-progress { display: flex; min-height: 58px; align-items: center; gap: 12px; padding: 15px 16px; border-radius: 8px; color: #1d4ed8; background: #eff6ff; }
.access-status-progress[hidden] { display: none; }
.access-status-progress span { width: 20px; height: 20px; flex: 0 0 20px; border: 3px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: access-status-spin .8s linear infinite; }
.access-status[data-state="rejected"] [data-access-status-message],
.access-status[data-state="revoked"] [data-access-status-message],
.access-status[data-state="offline"] [data-access-status-message],
.access-status[data-state="server-error"] [data-access-status-message] { color: #b42318; background: #fff1f0; }
@keyframes access-status-spin { to { transform: rotate(360deg); } }
.connection-form > p, .access-form > p { margin: 0 0 24px; color: #64748b; line-height: 1.55; }
.view-kicker { display: block; margin-bottom: 8px; color: #2563eb; font-size: 13px; font-weight: 900; }
.secondary-action { width: 100%; margin-top: 10px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 13px; background: #fff; color: #334155; font: inherit; font-weight: 850; cursor: pointer; }
.auth-text-action{display:block;margin:10px auto 0;border:0;background:transparent;color:#1d4ed8;font:inherit;font-size:14px;font-weight:800;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.member-link-request { display: grid; margin-top: 14px; padding: 16px; border: 1px solid #bfdbfe; border-radius: 8px; background: #f8fbff; }
.member-link-request > strong { margin-bottom: 5px; color: #1d4ed8; }
.member-link-request > p { margin: 0 0 14px; color: #64748b; font-size: 13px; line-height: 1.55; }
.member-link-request label small { color: #64748b; font-weight: 650; }
.member-link-status{display:grid;gap:10px;margin-top:14px;padding:16px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff}.member-link-status__head{display:flex;align-items:center;justify-content:space-between;gap:10px}.member-link-status__head strong{color:#1d4ed8}.member-link-status__head span{padding:5px 8px;border-radius:999px;background:#fff;color:#475569;font-size:12px;font-weight:850}.member-link-status p{margin:0;color:#475569;font-size:13px;line-height:1.55}.member-link-status__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.member-link-status__actions button{min-height:42px;border:1px solid #bfdbfe;border-radius:6px;background:#fff;color:#1d4ed8;font:inherit;font-weight:850;cursor:pointer}.member-link-status[data-state="rejected"]{border-color:#fecaca;background:#fef2f2}.member-link-status[data-state="rejected"] .member-link-status__head strong{color:#b42318}.member-link-status[data-state="approved"]{border-color:#a7f3d0;background:#ecfdf5}.member-link-status[data-state="approved"] .member-link-status__head strong{color:#047857}
.branch-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.branch-options label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; border: 1px solid #dbe3ee; border-radius: 6px; }
.branch-options input { width: auto; }
@media (max-width: 760px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { display: block; min-height: 100svh; padding: 0; background: #fff; }
  .auth-shell {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
  }
  .auth-panel { width: 100%; max-width: 100%; max-height: none; overflow: visible; justify-content: flex-start; padding: 22px 18px 16px; }
  .auth-panel h2 { font-size: 24px; margin-bottom: 4px; }
  .auth-panel > p { margin-bottom: 10px; }
  .auth-recovery-notice { margin-bottom: 10px; padding: 10px 12px; font-size: 13px; }
  .social-login { gap: 8px; margin: 12px 0; }
  .social-button { min-height: 44px; padding: 0 12px; }
  .google-identity-button,
  .google-identity-button > div,
  .google-identity-button iframe { min-height: 44px !important; }
  .social-button span { width: 24px; height: 24px; }
  .auth-divider { margin-bottom: 10px; }
  .auth-tabs { margin-bottom: 10px; }
  .auth-tabs button { padding: 10px; }
  label { gap: 5px; margin-bottom: 10px; }
  input, select, textarea { min-height: 44px; padding: 10px 12px; font-size: 16px; }
  .primary { padding: 13px; }
  .auth-brand {
    display: none !important;
  }
  .auth-message { min-height: 0; margin-top: 10px; padding: 10px; }
  .branch-options { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  body { padding: 0; }
  .auth-shell { width: 100%; }
  .auth-panel { padding: 16px 14px 12px; }
}
