:root {
  color-scheme: light;
  --auth-bg: #f3f5f8;
  --auth-surface: #ffffff;
  --auth-text: #1b1d22;
  --auth-muted: #6b707a;
  --auth-line: #d9dee7;
  --auth-primary: #0877de;
  --auth-primary-dark: #075fae;
  --auth-danger: #c93842;
  font-family: Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--auth-text); background: var(--auth-bg); }
button, input { font: inherit; letter-spacing: 0; }
.auth-page { min-height: 100vh; }
.auth-shell { width: min(100% - 32px, 420px); margin: 0 auto; padding: max(40px, 9vh) 0 48px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin: 0 2px 18px; }
.auth-brand img { width: auto; height: 34px; }
.auth-brand div { display: flex; flex-direction: column; gap: 2px; }
.auth-brand b { font-size: 17px; line-height: 1; }
.auth-brand span { color: var(--auth-muted); font-size: 11px; line-height: 1; }
.auth-panel { min-height: 420px; padding: 28px; border: 1px solid var(--auth-line); border-radius: 8px; background: var(--auth-surface); box-shadow: 0 12px 32px rgba(31, 42, 58, .08); }
.auth-panel form { display: flex; flex-direction: column; gap: 14px; }
.auth-heading { margin-bottom: 6px; }
.auth-heading h1, .auth-state h1 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: 0; }
.auth-heading p, .auth-state p { margin: 7px 0 0; color: var(--auth-muted); font-size: 13px; line-height: 1.5; }
.auth-panel label { display: flex; flex-direction: column; gap: 7px; color: var(--auth-muted); font-size: 12px; font-weight: 600; }
.auth-panel input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--auth-line); border-radius: 6px; color: var(--auth-text); background: var(--auth-surface); font-size: 15px; }
.auth-panel input:focus { outline: 3px solid rgba(8, 119, 222, .14); border-color: var(--auth-primary); }
.auth-panel button { width: 100%; height: 42px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 700; }
.auth-panel button:focus-visible { outline: 3px solid rgba(8, 119, 222, .18); outline-offset: 2px; }
.auth-primary { margin-top: 4px; border: 1px solid var(--auth-primary); color: #fff; background: var(--auth-primary); }
.auth-primary:hover { background: var(--auth-primary-dark); border-color: var(--auth-primary-dark); }
.auth-primary:disabled { cursor: wait; opacity: .6; }
.auth-secondary { border: 1px solid var(--auth-line); color: var(--auth-text); background: var(--auth-surface); }
.auth-secondary:hover { background: var(--auth-bg); }
.auth-error { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--auth-danger); color: var(--auth-danger); background: rgba(201, 56, 66, .06); font-size: 12px; line-height: 1.45; }
.auth-state { min-height: 360px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.auth-state .auth-secondary { margin-top: 22px; }
.auth-state code { margin-top: 18px; padding: 8px 10px; border: 1px solid var(--auth-line); border-radius: 4px; background: var(--auth-bg); font-size: 12px; }
.auth-status-mark { width: 30px; height: 30px; margin-bottom: 18px; border: 3px solid var(--auth-line); border-top-color: var(--auth-primary); border-radius: 50%; animation: auth-spin 1s linear infinite; }
[hidden] { display: none !important; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-status-mark { animation: none; border-color: var(--auth-primary); } }
@media (max-width: 520px) {
  .auth-page { background: var(--auth-surface); }
  .auth-shell { width: 100%; padding: 22px 20px 32px; }
  .auth-brand { margin-bottom: 26px; }
  .auth-panel { min-height: 0; padding: 0; border: 0; box-shadow: none; }
  .auth-state { min-height: 50vh; }
}
