:root {
  color-scheme: light;
  --ink: #17213d;
  --sky: #c9efff;
  --cream: #fffaf0;
  --pink: #ff94c2;
  --pink-deep: #e95391;
  --mint: #6bdcc2;
  --line: #263047;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 255, 255, .8) 0 7%, transparent 7.5%),
    radial-gradient(circle at 88% 76%, rgba(255, 244, 181, .7) 0 9%, transparent 9.5%),
    linear-gradient(165deg, var(--sky) 0 54%, #fff0dc 54% 100%);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-card {
  position: relative;
  width: min(100%, 470px);
  padding: 112px 38px 30px;
  border: 4px solid var(--line);
  border-radius: 28px 23px 31px 25px;
  background: rgba(255, 250, 240, .96);
  box-shadow: 10px 12px 0 rgba(23, 33, 61, .16);
  text-align: center;
}

.mascot {
  position: absolute;
  top: -46px;
  left: 50%;
  width: 180px;
  transform: translateX(-50%) rotate(-1deg);
}

.mascot svg { display: block; width: 100%; overflow: visible; }
.pig-body, .pig-ear { fill: #fffdf7; stroke: var(--line); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.pig-ear { fill: none; }
.pig-snout { fill: #ffd2e3; stroke: var(--line); stroke-width: 6; }
.pig-eye, .pig-nose { fill: var(--line); }
.pig-cap { fill: var(--mint); stroke: var(--line); stroke-width: 6; stroke-linejoin: round; }
.pig-band { fill: none; stroke: var(--pink); stroke-width: 7; stroke-linecap: round; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink-deep);
  font: 800 12px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
}

h1 { margin: 0; font-size: clamp(25px, 7vw, 35px); line-height: 1.25; letter-spacing: .02em; }
.welcome { margin: 12px auto 24px; max-width: 340px; color: #536078; font-size: 14px; line-height: 1.7; }
form { text-align: left; }
label { display: block; margin: 14px 0 7px; font-size: 14px; font-weight: 800; }

input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 3px solid var(--line);
  border-radius: 13px 11px 14px 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: 700 17px/1 system-ui, sans-serif;
  transition: box-shadow .15s, transform .15s;
}

input:focus { box-shadow: 0 0 0 4px rgba(107, 220, 194, .35); transform: translateY(-1px); }

.login-error {
  min-height: 20px;
  margin: 12px 2px 0;
  color: #c63e4b;
  font-size: 13px;
  font-weight: 700;
}

.login-error:empty { min-height: 8px; }

button {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 3px solid var(--line);
  border-radius: 15px 13px 17px 14px;
  background: var(--pink);
  color: var(--ink);
  box-shadow: 5px 6px 0 rgba(23, 33, 61, .18);
  font: 900 17px/1.2 inherit;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}

button:hover { background: #ffabd0; transform: translateY(-2px); box-shadow: 7px 8px 0 rgba(23, 33, 61, .16); }
button:active { transform: translate(3px, 4px); box-shadow: 2px 2px 0 rgba(23, 33, 61, .18); }
button:focus-visible { outline: 4px solid rgba(107, 220, 194, .65); outline-offset: 3px; }
button span { color: #fff; text-shadow: 0 2px 0 var(--pink-deep); }
.helper { margin: 22px 0 0; color: #778198; font-size: 11px; line-height: 1.6; }

@media (max-width: 480px) {
  .login-card { padding: 104px 22px 25px; border-width: 3px; box-shadow: 7px 8px 0 rgba(23, 33, 61, .15); }
  .mascot { width: 164px; }
}

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