:root {
  color-scheme: light;
  --bg: #faf9f5;
  --surface: #ffffff;
  --line: #e8e6dc;
  --fg: #141413;
  --dim: #8f8d85;
  --label: #5e5d59;
  --accent: #c96442;
  --accent-ring: rgba(201, 100, 66, .18);
  --bad: #b5432f;
  --input-bg: #ffffff;
  --input-line: #d9d6ca;
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 12px 32px rgba(20, 20, 19, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #262624;
    --surface: #30302e;
    --line: #3d3d3a;
    --fg: #f5f4ee;
    --dim: #918f87;
    --label: #c2c0b6;
    --accent: #d97757;
    --accent-ring: rgba(217, 119, 87, .25);
    --bad: #e8806b;
    --input-bg: #262624;
    --input-line: #4b4a46;
    --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 360px;
  padding: 36px 32px 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

h1 {
  margin: 0 0 6px;
  font-family: "Tiempos Headline", "Copernicus", Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.01em;
}
/* 品牌星标：纯 CSS 画在标题上方，免得改 login.html 结构。 */
h1::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(45 16 16)'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(90 16 16)'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(135 16 16)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(45 16 16)'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(90 16 16)'/%3E%3Crect x='14.6' y='3' width='2.8' height='26' rx='1.4' transform='rotate(135 16 16)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

p.sub {
  margin: 0 0 26px;
  font-size: 13px;
  color: var(--dim);
}

form { text-align: left; }

label {
  display: block;
  font-size: 12.5px;
  color: var(--label);
  margin-bottom: 7px;
}

input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid var(--input-line);
  background: var(--input-bg);
  color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: filter .15s;
}
button:hover:not(:disabled) { filter: brightness(1.06); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .6; cursor: default; }

p.msg {
  margin: 12px 0 0;
  font-size: 12.5px;
  min-height: 16px;
  color: var(--bad);
}
p.msg:empty { min-height: 0; }
