:root {
  --paper: #f3efe6;
  --paper-soft: #faf8f3;
  --ink: #27241f;
  --muted: #777066;
  --line: #d8d0c3;
  --red: #a4473e;
  --pine: #213b35;
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans: Inter, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

button, input { font: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(400px, 1.08fr) minmax(500px, .92fr);
  min-height: 100vh;
}

.poem-side {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 80px clamp(50px, 8vw, 130px);
  overflow: hidden;
  color: #f4eee4;
  background: var(--pine);
}

.poem-side::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(19,39,34,.2), transparent 60%), linear-gradient(0deg, rgba(13,30,26,.55), transparent 55%);
}

.ink-landscape { position: absolute; inset: 0; overflow: hidden; }
.sun {
  position: absolute;
  top: 15%;
  right: 17%;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(190,92,69,.72);
  box-shadow: 0 0 70px rgba(190,92,69,.22);
}
.mountain {
  position: absolute;
  bottom: -14%;
  background: linear-gradient(155deg, rgba(118,143,129,.68), rgba(8,30,24,.95));
  filter: blur(1px);
}
.mountain-a {
  left: -15%;
  width: 92%;
  height: 68%;
  border-radius: 45% 55% 0 0;
  transform: rotate(11deg) skewX(-12deg);
}
.mountain-b {
  right: -38%;
  width: 90%;
  height: 84%;
  opacity: .7;
  border-radius: 55% 45% 0 0;
  transform: rotate(-12deg) skewX(10deg);
}
.water {
  position: absolute;
  left: 5%;
  right: 0;
  bottom: -4%;
  height: 37%;
  opacity: .18;
  background: repeating-radial-gradient(ellipse at 40% 0, transparent 0 18px, white 19px 20px, transparent 21px 37px);
}

.poem-content { position: relative; z-index: 2; margin-top: 12vh; }
.season {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 38px;
  color: #d9aa9e;
  font-size: 12px;
  letter-spacing: .22em;
}
.season i { width: 28px; height: 1px; background: currentColor; }
blockquote { margin: 0 0 30px; }
blockquote p { margin: 0; font: 500 clamp(35px, 4vw, 58px)/1.65 var(--serif); letter-spacing: .1em; }
cite { color: rgba(255,255,255,.58); font: normal 14px var(--serif); letter-spacing: .14em; }
.vertical-note { position: absolute; top: 65px; left: 50px; z-index: 3; margin: 0; color: rgba(255,255,255,.32); font: 11px/1.8 var(--serif); letter-spacing: .42em; writing-mode: vertical-rl; }

.form-side {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 60px clamp(35px, 6vw, 100px);
  background: var(--paper-soft);
}

.login-card { width: min(410px, 100%); }
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(60px, 10vh, 105px); }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; color: #f6eee3; background: var(--red); font: 20px var(--serif); }
.brand div { display: flex; flex-direction: column; gap: 3px; }
.brand b { font: 600 22px var(--serif); letter-spacing: .14em; }
.brand small { color: var(--muted); font-size: 8px; letter-spacing: .34em; }
.welcome .kicker { margin: 0 0 12px; color: var(--red); font-size: 12px; letter-spacing: .2em; }
.welcome h1 { margin: 0; font: 500 clamp(34px, 3.6vw, 51px)/1.42 var(--serif); letter-spacing: .08em; }
.welcome > p:last-child { margin: 18px 0 42px; color: var(--muted); font: 14px var(--serif); }

form > label { display: block; margin: 22px 0 9px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.field { position: relative; display: flex; align-items: center; height: 54px; border-bottom: 1px solid var(--line); }
.field:focus-within { border-color: var(--red); }
.field svg { width: 19px; margin-right: 13px; fill: none; stroke: #8d867d; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.field input { min-width: 0; flex: 1; height: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; }
.reveal { width: 36px; height: 36px; padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font: 13px var(--serif); }
.error { min-height: 20px; margin: 14px 0 4px; color: var(--red); font-size: 12px; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 56px; margin-top: 12px; padding: 0 20px 0 24px; color: white; background: var(--pine); border: 0; cursor: pointer; transition: background .2s, transform .2s; }
.submit-button:hover { background: #172c27; transform: translateY(-1px); }
.submit-button:disabled { opacity: .65; cursor: wait; }
.submit-button i { color: #d2a097; font: normal 20px var(--serif); }
.security-note { margin: 25px 0 0; color: #999188; text-align: center; font-size: 10px; letter-spacing: .06em; }
.security-note span { margin-right: 7px; color: var(--red); }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .poem-side { min-height: 38vh; padding: 75px 35px 45px; }
  .poem-content { margin: 0; }
  blockquote p { font-size: clamp(30px, 6vw, 44px); }
  .form-side { min-height: 62vh; padding: 55px 28px 70px; }
  .brand { margin-bottom: 45px; }
  .vertical-note { display: none; }
}

@media (max-width: 540px) {
  .poem-side { min-height: 32vh; padding: 72px 24px 35px; }
  .season { margin-bottom: 18px; }
  blockquote { margin-bottom: 18px; }
  blockquote p { font-size: 28px; }
  .sun { width: 70px; height: 70px; }
  .form-side { place-items: start center; min-height: 68vh; padding: 40px 24px 65px; }
  .brand { margin-bottom: 35px; }
  .welcome h1 { font-size: 34px; }
  .welcome > p:last-child { margin-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}

