:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #131e2c;
  --muted: #586274;
  --paper: #f7f6f2;
  --accent: #24476c;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; color: var(--ink); background: var(--paper); }
main { min-height: 100svh; }
.form-side { display: grid; grid-template-rows: 1fr auto 1fr; min-height: 100svh; padding: 32px clamp(22px, 5vw, 76px); }
header, footer { align-self: start; }
footer { align-self: end; justify-self: center; }
a { color: inherit; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: .83rem; font-weight: 700; letter-spacing: .11em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; background: var(--ink); color: var(--paper); border-radius: 9px; letter-spacing: 0; }
.form-wrap { width: min(100%, 364px); margin: 28px auto 38px; }
.study-art {
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
}
h1 { animation: enter .25s ease-out; margin: 0; text-align: center; font-size: clamp(2rem, 1.65rem + 1.15vw, 2.75rem); letter-spacing: -.045em; line-height: 1.15; font-weight: 700; }
.intro { margin: 12px 0 28px; text-align: center; font-size: .91rem; line-height: 1.6; color: var(--muted); }
form { display: grid; row-gap: 10px; }
label { font-size: .86rem; font-weight: 650; }
input { width: 100%; height: 51px; border: 1px solid #c8cbd0; border-radius: 9px; background: #fff; color: var(--ink); padding: 0 14px; font: inherit; }
input:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid #396b9d; outline-offset: 3px; }
form > label:not(:first-child) { margin-top: 10px; }
button { font: inherit; cursor: pointer; }
.password-field { position: relative; }
.password-field:has(.toggle:not([hidden])) input { padding-right: 100px; }
.toggle { position: absolute; top: 4px; bottom: 4px; right: 4px; padding: 0 12px; border: none; border-radius: 6px; color: var(--accent); background: #fff; font-size: .79rem; }
.toggle:hover { background: #edf2f7; }
.submit { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-top: 14px; padding: 0 16px; border: 0; border-radius: 9px; color: white; background: var(--ink); font-weight: 650; transition: background 160ms ease; }
.submit span { transition: transform 160ms ease; }
.submit:hover { background: var(--accent); }
.submit:hover span { transform: translateX(3px); }
footer a { display: inline-flex; gap: 7px; align-items: center; font-size: .82rem; text-decoration: none; color: var(--muted); }
footer a:hover { text-decoration: underline; }
.error { margin: -14px 0 22px; padding: 10px 12px; border-radius: 7px; background: #fbece9; color: #8e271c; font-size: .87rem; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px), (max-height: 660px) {
  .form-side { padding-top: 22px; padding-bottom: 22px; }
  .form-wrap { margin-top: 18px; margin-bottom: 26px; }
  .study-art { width: 92px; height: 74px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
