:root {
  color-scheme: light;
  --ink: #14231d;
  --green-950: #0c2b20;
  --green-700: #276b55;
  --green-100: #e6f1ec;
  --line: #d9e2dd;
  --muted: #59665f;
  --paper: #f6f8f7;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
::selection { color: #fff; background: var(--green-700); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(39,107,85,.23); outline-offset: 2px; }
a { color: var(--green-700); text-underline-offset: 3px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(460px, 1.08fr); }
.login-story { position: relative; min-height: 100vh; overflow: hidden; padding: 54px clamp(36px, 6vw, 96px); color: #fff; background: radial-gradient(circle at 78% 20%, rgba(103,169,140,.34), transparent 31%), linear-gradient(145deg, #081e17 0%, var(--green-950) 54%, #174a38 100%); display: flex; flex-direction: column; }
.login-story::after { content: ""; position: absolute; width: 420px; height: 420px; right: -175px; bottom: -155px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 20px 80px rgba(0,0,0,.18), 0 0 0 58px rgba(255,255,255,.025), 0 0 0 116px rgba(255,255,255,.018); }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--green-950); background: #d6eadf; font-size: 20px; font-weight: 900; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 22px; letter-spacing: .12em; }
.brand span { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 12px; letter-spacing: .1em; }
.story-copy { position: relative; z-index: 1; margin: auto 0; max-width: 590px; }
.story-copy h1 { margin: 0 0 26px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(38px, 4.6vw, 68px); line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; }
.story-copy p { max-width: 510px; margin: 0; color: rgba(255,255,255,.76); font-size: 17px; line-height: 1.9; }
.privacy-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.7); font-size: 12px; }
.privacy-note > span { width: 9px; height: 9px; border-radius: 50%; background: #73c59e; box-shadow: 0 5px 18px rgba(115,197,158,.2); }
.privacy-note p { margin: 0; line-height: 1.6; }
.privacy-note strong { color: #fff; font-size: 13px; }

.login-panel { min-height: 100vh; padding: 48px; display: grid; place-items: center; background: radial-gradient(circle at 20% 15%, #fff 0%, transparent 35%), var(--paper); }
.login-card { width: min(100%, 480px); padding: 44px; border-radius: 16px; background: #fff; box-shadow: 0 28px 80px rgba(25,50,40,.12); }
.login-card h2 { margin: 0 0 9px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 32px; letter-spacing: -.03em; }
.login-card .intro { max-width: 42ch; margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.login-card label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 800; }
.login-card input { width: 100%; height: 52px; padding: 0 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fff; transition: border-color .18s, box-shadow .18s; }
.login-card input::placeholder { color: #68756f; opacity: 1; }
.login-card input:focus { border-color: #5b9a7e; box-shadow: 0 0 0 4px rgba(39,107,85,.1); }
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 10px; }
.code-field button, .secondary-login-button { min-height: 52px; border: 1px solid #bdd0c7; border-radius: 12px; color: var(--green-700); background: #f5faf7; cursor: pointer; font-weight: 800; }
.code-field button:hover, .secondary-login-button:hover { border-color: #8fb4a4; background: var(--green-100); }
.code-field button:disabled, .secondary-login-button:disabled { cursor: wait; opacity: .65; }
.mode-hint { min-height: 40px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.mode-hint.test-code { padding: 10px 12px; border-radius: 10px; color: #704512; background: #fff4e4; font-variant-numeric: tabular-nums; }
.login-card .legal-consent { margin: 12px 0 0; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.65; }
.login-card .legal-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green-700); }
.legal-consent span { min-width: 0; }
.legal-consent a { margin: 0 2px; font-weight: 700; }
.login-button { width: 100%; height: 54px; margin-top: 20px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; color: #fff; background: var(--green-700); cursor: pointer; font-weight: 800; box-shadow: 0 12px 24px rgba(39,107,85,.2); }
.login-button:hover { background: #205d49; }
.login-button:disabled { cursor: wait; opacity: .64; }
.error-message { margin-top: 14px; padding: 11px 13px; border-radius: 10px; color: #852a2a; background: #fff0f0; font-size: 13px; line-height: 1.5; }
.hidden { display: none !important; }
.legacy-login { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.legacy-login summary { min-height: 44px; display: flex; align-items: center; color: #53625b; cursor: pointer; font-size: 13px; font-weight: 700; }
.legacy-login summary:hover { color: var(--green-700); }
.password-field { position: relative; }
.password-field input { padding-right: 70px; }
.password-field button { position: absolute; right: 8px; top: 8px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; color: var(--green-700); background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.password-field button:hover { background: var(--green-100); }
.secondary-login-button { width: 100%; margin-top: 18px; }
.local-address { margin: 18px 0 0; color: #77847e; text-align: center; font-size: 11px; }

@media (max-width: 860px) {
  .login-shell { display: block; min-height: 100vh; padding: 22px; background: linear-gradient(160deg, var(--green-950) 0 35%, var(--paper) 35%); }
  .login-story { min-height: auto; padding: 12px 8px 54px; background: none; }
  .story-copy, .privacy-note { display: none; }
  .login-panel { min-height: auto; padding: 0; display: block; background: none; }
  .login-card { margin: 0 auto; padding: 32px 24px; }
}

@media (max-width: 420px) {
  .login-shell { padding: 16px; }
  .code-field { grid-template-columns: 1fr; }
  .code-field button { min-height: 46px; }
}

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