:root {
  color-scheme: dark;
  --ink: #f3efe3;
  --muted: #a9a99e;
  --gold: #e7b553;
  --gold-pale: #f6d68c;
  --green: #193229;
  --line: rgba(231, 181, 83, 0.22);
  --panel: rgba(14, 25, 21, 0.9);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(37, 99, 75, 0.35), transparent 36rem),
    radial-gradient(circle at 88% 82%, rgba(147, 97, 32, 0.16), transparent 32rem),
    linear-gradient(135deg, #07100d, #0d1713 54%, #080e0c);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg width='130' height='130' viewBox='0 0 130 130' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 31rem);
  gap: clamp(3rem, 9vw, 10rem);
  align-items: center;
  width: min(76rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 4rem 0;
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: clamp(4rem, 10vh, 8rem);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  color: #101a16;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 2rem rgba(231, 181, 83, 0.18);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { max-width: 12ch; font-size: clamp(3.4rem, 7vw, 6.8rem); line-height: 0.92; letter-spacing: -0.045em; }
h1 em { color: var(--gold-pale); font-weight: 400; }
h2 { font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.05; }

.welcome-copy {
  max-width: 34rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.mana-line { display: flex; gap: 0.58rem; margin-top: 2.1rem; }
.mana-line i { width: 0.46rem; aspect-ratio: 1; border-radius: 50%; background: #d5c6a4; box-shadow: 0 0 0.8rem currentColor; }
.mana-line i:nth-child(2) { color: #57a7c8; background: currentColor; }
.mana-line i:nth-child(3) { color: #1f1d1b; background: #77736b; }
.mana-line i:nth-child(4) { color: #c85b3c; background: currentColor; }
.mana-line i:nth-child(5) { color: #4a9a65; background: currentColor; }

.login-card {
  display: grid;
  gap: 1.55rem;
  padding: clamp(2rem, 5vw, 3.4rem);
  background: linear-gradient(145deg, rgba(23, 38, 32, 0.94), var(--panel));
  border: 1px solid var(--line);
  border-radius: 1.7rem;
  box-shadow: 0 2.4rem 7rem rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.support-copy { margin: 0.8rem 0 0; color: var(--muted); line-height: 1.5; }

#login-form { display: grid; gap: 0.62rem; }
label { margin-top: 0.58rem; color: #d6d4c9; font-size: 0.82rem; font-weight: 720; letter-spacing: 0.02em; }
input {
  width: 100%;
  min-height: 3.45rem;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font: inherit;
  background: rgba(5, 12, 9, 0.72);
  border: 1px solid rgba(216, 210, 187, 0.18);
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input:hover { border-color: rgba(231, 181, 83, 0.38); }
input:focus { background: rgba(6, 15, 11, 0.94); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 181, 83, 0.13); }

button, .button-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1rem;
  padding: 0.8rem 1.15rem;
  color: #142017;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold));
  border: 0;
  border-radius: 0.78rem;
  cursor: pointer;
  box-shadow: 0 0.8rem 2rem rgba(122, 76, 15, 0.18);
  transition: transform 130ms ease, filter 130ms ease;
}
button:hover, .button-link:hover { filter: brightness(1.05); transform: translateY(-1px); }
button:active, .button-link:active { transform: translateY(0); }
button:focus-visible, .button-link:focus-visible { outline: 3px solid rgba(246, 214, 140, 0.42); outline-offset: 3px; }

.message { margin: 0; padding: 0.85rem 1rem; color: #f5d7b0; background: rgba(145, 67, 38, 0.2); border: 1px solid rgba(227, 132, 85, 0.35); border-radius: 0.7rem; line-height: 1.45; }
.message.success { color: #bde9ce; background: rgba(39, 121, 75, 0.2); border-color: rgba(88, 189, 126, 0.33); }
.signed-in { margin: 0; color: var(--muted); }
button.quiet { justify-content: center; margin-top: 0.7rem; color: var(--muted); background: transparent; border: 1px solid rgba(216, 210, 187, 0.16); box-shadow: none; }
.privacy { margin: 0; color: #858a82; font-size: 0.76rem; line-height: 1.5; }
.privacy span { margin-right: 0.35rem; color: var(--gold); }

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; gap: 3rem; width: min(34rem, calc(100% - 2rem)); padding: 2rem 0; }
  .brand { margin-bottom: 3rem; }
  h1 { font-size: clamp(3.25rem, 15vw, 5.4rem); }
  .welcome-copy { margin-top: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
