:root {
  --bg: oklch(99.2% 0.001 260);
  --surface: oklch(100% 0 0);
  --surface-soft: oklch(94.8% 0.003 260);
  --surface-muted: oklch(97.2% 0.002 260);
  --fg: oklch(21% 0.012 260);
  --muted: oklch(52% 0.010 260);
  --border: oklch(88.5% 0.005 260);
  --accent: oklch(58% 0.19 286);
  --accent-soft: oklch(92% 0.032 286);
  --action: oklch(18% 0.014 260);
  --ink-strong: oklch(15% 0.014 260);
  --danger: oklch(54% 0.18 26);
  --font-display: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, oklch(92% 0.032 286 / 0.86), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, oklch(96.6% 0.004 260) 100%);
  color: var(--fg);
  font-family: var(--font-body);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input { font: inherit; }

button {
  border: 0;
  cursor: pointer;
}

.auth-card {
  min-width: 0;
  width: 100%;
  max-width: 430px;
  padding: 28px 28px 22px;
  border: 1px solid oklch(100% 0 0 / 0.72);
  border-radius: 26px;
  background: oklch(100% 0 0 / 0.94);
  box-shadow: 0 24px 80px oklch(42% 0.01 260 / 0.14);
  overflow: hidden;
}

h1 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  letter-spacing: 0;
}

.lock-wrap {
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  width: 112px;
  height: 112px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, oklch(100% 0 0), oklch(96% 0.006 260)),
    var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 18px 48px oklch(42% 0.01 260 / 0.1);
  color: var(--action);
}

.lock-wrap svg {
  width: 54px;
  height: 54px;
  display: block;
}

h1 {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1;
  font-weight: 650;
  text-align: center;
}

.subtitle {
  max-width: 310px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

label {
  display: block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input {
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--fg);
  outline: none;
}

input:focus,
button:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--accent) 22%, transparent);
  outline-offset: 2px;
}

.primary-action {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  border-radius: 18px;
  font-weight: 650;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-action {
  background: var(--action);
  color: oklch(99% 0.004 258);
}

.primary-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.primary-action span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.primary-action:hover {
  transform: translateY(-1px);
}

.primary-action:active {
  transform: translateY(0);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.message {
  min-height: 0;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.message:empty { display: none; }
.message.is-error { color: var(--danger); }
.setup-only { display: none; }
body.is-setup .setup-only { display: block; }

@media (max-width: 420px) {
  body {
    padding: 14px;
  }

  .auth-card {
    padding: 20px 20px 18px;
    border-radius: 22px;
  }

  .lock-wrap {
    width: 96px;
    height: 96px;
    border-radius: 26px;
  }

  .lock-wrap svg {
    width: 48px;
    height: 48px;
  }

  h1 {
    font-size: 31px;
  }

  .primary-action {
    padding: 0 12px;
  }
}
