/* 登录页，色调跟小屋里间保持一致。 */
:root {
  --ink: #221c16;
  --ink-soft: #5c5146;
  --muted: #6a5e52;
  --desk: #efe4d2;
  --sheet: #fbf8f2;
  --line: #e3d5c2;
  --cover: #24312c;
  --cream: #f3eadc;
  --seal: #c2503a;
  --seal-deep: #8c3224;
  --brass: #c4a15a;
  --moss: #3e5346;
  --font: system-ui, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, rgba(255, 255, 255, 0.35), transparent 46%),
    var(--desk);
  text-rendering: optimizeLegibility;
}

::selection { background: #f0c7b4; color: var(--ink); }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: min(420px, 100%);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 4px 16px 6px 6px;
  box-shadow: 0 18px 40px rgba(36, 30, 24, 0.08);
  padding: 28px 26px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.seal {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--cover);
  color: var(--cream);
  font-weight: 650;
  font-size: 20px;
  border-radius: 2px 10px 2px 2px;
}

.brand-name, .brand-sub { display: block; }
.brand-name { font-size: 15px; letter-spacing: 0.02em; }
.brand-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 650;
}

.lead, .fine, .err { margin: 0 0 18px; }
.lead { color: var(--ink-soft); }
.fine { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.err {
  color: var(--seal-deep);
  background: #f8e8e2;
  border: 1px solid #ead0c8;
  border-radius: 3px;
  padding: 8px 10px;
}

label { display: block; margin-bottom: 14px; }
label span {
  display: block;
  margin-bottom: 6px;
  color: var(--moss);
  font-size: 13px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  padding: 10px 11px;
}

input[type="text"]:focus-visible,
input[type="password"]:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 1px;
  border-color: transparent;
}

button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--cover);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  padding: 11px 14px;
  cursor: pointer;
}

button[type="submit"]:hover { background: #1b2622; }
