
:root {
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.74);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(15, 23, 42, 0.08);
  --field: #f2f4f8;
  --accent: #0071e3;
  --accent-solid: #0071e3;
  --accent-fg: #ffffff;
  --danger: #d70015;
  --glow-a: rgba(0, 113, 227, 0.16);
  --glow-b: rgba(88, 86, 214, 0.12);
  --glow-c: rgba(15, 159, 110, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 30px 60px -24px rgba(15, 23, 42, 0.25);
  --target-size: 44px;
  color-scheme: light dark;
  accent-color: var(--accent);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; 
  --bg: #0d1016;
  --surface: rgba(21, 25, 34, 0.72);
  --text: #f5f5f7;
  --muted: #9aa3b2;
  --hairline: rgba(255, 255, 255, 0.08);
  --field: #1c222e;
  --accent: #3898ff;
  --accent-solid: #1f6fe0;
  --danger: #ff6961;
  --glow-a: rgba(56, 152, 255, 0.18);
  --glow-b: rgba(125, 122, 255, 0.14);
  --glow-c: rgba(52, 211, 153, 0.08);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
 }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { 
  --bg: #0d1016;
  --surface: rgba(21, 25, 34, 0.72);
  --text: #f5f5f7;
  --muted: #9aa3b2;
  --hairline: rgba(255, 255, 255, 0.08);
  --field: #1c222e;
  --accent: #3898ff;
  --accent-solid: #1f6fe0;
  --danger: #ff6961;
  --glow-a: rgba(56, 152, 255, 0.18);
  --glow-b: rgba(125, 122, 255, 0.14);
  --glow-c: rgba(52, 211, 153, 0.08);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
 }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-block-size: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(56rem 36rem at 8% -12%, var(--glow-a), transparent 62%),
    radial-gradient(48rem 34rem at 108% 6%, var(--glow-b), transparent 60%),
    radial-gradient(44rem 30rem at 50% 118%, var(--glow-c), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a, code { overflow-wrap: anywhere; }
.card {
  inline-size: min(25rem, 100%);
  background: var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
  display: grid;
  gap: 1.25rem;
}
.brand { display: grid; justify-items: center; text-align: center; gap: 0.4rem; }
.emblem {
  inline-size: 3.25rem;
  block-size: 3.25rem;
  margin-block-end: 0.35rem;
  filter: drop-shadow(0 6px 14px rgba(0, 113, 227, 0.32));
}
h1 {
  margin: 0;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p { margin: 0; color: var(--muted); font-size: 0.9rem; text-wrap: pretty; }
form { display: grid; gap: 0.5rem; }
label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
input[type="password"] {
  inline-size: 100%;
  min-block-size: var(--target-size);
  padding: 0.6rem 0.85rem;
  border-radius: 11px;
  border: 0;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
input[type="password"]:focus-visible {
  outline: 2px solid transparent;
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}
.hint { font-size: 0.78rem; }
button {
  inline-size: 100%;
  min-block-size: var(--target-size);
  min-inline-size: var(--target-size);
  margin-block-start: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 11px;
  border: 0;
  background: var(--accent-solid);
  color: var(--accent-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 16px -8px rgba(0, 113, 227, 0.6);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
button:hover { filter: brightness(1.06); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.err {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  color: var(--text);
  font-size: 0.88rem;
}
.err strong { color: var(--danger); font-size: 0.82rem; }
