:root {
  color-scheme: dark;
  --bg: #131210;
  --surface: #1c1a17;
  --border: #373126;
  --text: #eee9df;
  --muted: #b1a797;
  --gold: #e0b767;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input { min-height: 46px; border-radius: 8px; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 13px; letter-spacing: .22em; margin-bottom: 28px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--gold);
  border: 1px solid #6b5733;
  border-radius: 8px;
  font: 22px Georgia, serif;
  letter-spacing: 0;
}
.login-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 48px #00000024;
}
.eyebrow { margin: 0 0 10px; color: var(--gold); letter-spacing: .14em; font-size: 10px; font-weight: 600; }
h1 { font-size: 27px; font-weight: 600; line-height: 1.25; letter-spacing: -.035em; margin: 0 0 10px; }
.intro { margin: 0; color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 25px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.tabs button { min-width: 0; padding: 8px 5px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.25; }
.tabs button[aria-selected="true"] { background: #302b23; border-color: #4a3e2b; color: var(--text); }
.key-symbol { font-size: 30px; line-height: 1; color: var(--gold); margin: 5px 0 19px; }
h2 { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.hint { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.primary { width: 100%; padding: 11px 14px; margin-top: 5px; border: 1px solid var(--gold); background: var(--gold); color: #211b11; font-weight: 600; transition: background-color 120ms ease, border-color 120ms ease; }
.primary:hover:not(:disabled) { background: #edc780; border-color: #edc780; }
button:disabled { cursor: wait; opacity: .65; }
label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 7px; }
input { width: 100%; min-width: 0; padding: 10px 12px; margin-bottom: 18px; border: 1px solid #51483a; background: #151411; color: var(--text); font-size: 16px; }
#token { letter-spacing: .22em; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.footnote { color: var(--muted); font-size: 12px; margin: 17px 0 0; }
.status { color: var(--muted); font-size: 12px; margin: 15px 0 0; }
.status:empty { display: none; }
.error { color: #f0b2a8; border-left: 2px solid #cd8576; padding-left: 11px; font-size: 13px; overflow-wrap: anywhere; margin: 18px 0 0; }
footer { margin-top: 23px; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 380px) {
  .login-shell { padding: 24px 16px; }
  .login-card { padding: 25px 20px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
