:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f4eee3;
  color: #292923;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 8%, rgb(177 126 98 / 18%), transparent 32rem),
    linear-gradient(155deg, #f8f2e9 0%, #eee7d9 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100svh;
  justify-content: center;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.login-card {
  width: 100%;
  max-width: 430px;
  justify-self: center;
  padding: 40px 30px 32px;
  border: 1px solid rgb(62 61 50 / 12%);
  border-radius: 28px;
  background: rgb(255 252 245 / 90%);
  box-shadow: 0 24px 70px rgb(69 58 43 / 14%);
  text-align: center;
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 24px;
  color: #98705b;
  font: 700 0.72rem/1.4 Georgia, serif;
  letter-spacing: 0.18em;
}

.seal {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 18px;
  background: #aa6851;
  color: #fffaf1;
  font: 500 1.6rem/1 "Songti SC", "STSong", serif;
  box-shadow: 0 10px 24px rgb(132 75 56 / 24%);
}

h1 {
  margin: 0;
  font: 600 clamp(1.8rem, 7vw, 2.25rem)/1.2 "Songti SC", "STSong", Georgia, serif;
  letter-spacing: 0.04em;
}

.intro {
  margin: 14px 0 30px;
  color: #6d695f;
  font-size: 0.96rem;
}

form,
label {
  display: block;
  text-align: left;
}

label {
  margin-bottom: 8px;
  color: #56544c;
  font-size: 0.84rem;
  font-weight: 650;
}

input,
button {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font: inherit;
}

input {
  padding: 0 16px;
  border: 1px solid #d4cbbb;
  outline: none;
  background: #fffdf8;
  color: #292923;
}

input:focus {
  border-color: #a86c55;
  box-shadow: 0 0 0 4px rgb(168 108 85 / 14%);
}

button {
  margin-top: 14px;
  border: 0;
  background: #9f624c;
  color: #fffaf3;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 9px 20px rgb(127 74 54 / 18%);
}

button:hover {
  background: #8f5744;
}

button:focus-visible {
  outline: 3px solid #375d51;
  outline-offset: 3px;
}

.error {
  margin: -10px 0 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6dfd6;
  color: #7a3228;
  font-size: 0.87rem;
  text-align: left;
}

.privacy {
  margin: 22px 0 0;
  color: #858076;
  font-size: 0.78rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #1e201c;
    color: #f3eadc;
  }

  body {
    background:
      radial-gradient(circle at 10% 8%, rgb(170 104 81 / 14%), transparent 30rem),
      linear-gradient(155deg, #24251f 0%, #191b18 100%);
  }

  .login-card {
    border-color: rgb(239 223 198 / 12%);
    background: rgb(41 42 36 / 92%);
  }

  .intro,
  label {
    color: #c9c0b2;
  }

  input {
    border-color: #5b594f;
    background: #20211d;
    color: #f3eadc;
  }

  .privacy {
    color: #aaa295;
  }
}

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