:root {
    --paper: #f7f4ee;
    --surface: #fffdf9;
    --ink: #171513;
    --ink-soft: #4e4943;
    --muted: #746d64;
    --line: #ded7cc;
    --cinnabar: #a61f24;
    --cinnabar-dark: #7f1519;
    --gold: #aa8246;
    --success: #287a4b;
    --danger: #b4232a;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-sans); line-height: 1.65; }
button, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(166, 31, 36, .28); outline-offset: 3px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 560px); }
.auth-visual { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 5vw, 76px); color: #fff; background: #1b1815 url("/images/juejin-hero-ink.png") center / cover no-repeat; overflow: hidden; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23, 21, 19, .94), rgba(23, 21, 19, .2) 72%); }
.auth-brand-light, .auth-visual-copy { position: relative; z-index: 1; }
.auth-brand-light { width: max-content; display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.auth-brand-light > span, .auth-brand-mobile { display: flex; gap: 3px; }
.auth-brand-light i, .auth-brand-mobile i { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--cinnabar); border-radius: 3px; font: 700 16px/1 var(--font-serif); font-style: normal; }
.auth-brand-light strong { font-family: var(--font-serif); }
.auth-visual-copy { max-width: 680px; }
.auth-visual-copy > span, .auth-heading > span { color: #d2aa70; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.auth-visual-copy h1 { margin: 18px 0; font: 700 clamp(42px, 5vw, 70px)/1.14 var(--font-serif); letter-spacing: -.035em; }
.auth-visual-copy p { max-width: 620px; color: #d0c6bb; font-size: 15px; }
.auth-visual-copy ul { margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .16); list-style: none; }
.auth-visual-copy li { position: relative; padding: 5px 0 5px 22px; color: #b9aea3; font-size: 13px; }
.auth-visual-copy li::before { content: ""; position: absolute; left: 0; top: 13px; width: 9px; height: 5px; border-left: 2px solid #d2aa70; border-bottom: 2px solid #d2aa70; transform: rotate(-45deg); }

.auth-side { position: relative; display: grid; align-items: center; padding: 64px 58px; }
.auth-wrap { width: 100%; max-width: 420px; margin: auto; }
.auth-brand-mobile { display: none; width: max-content; margin-bottom: 34px; text-decoration: none; }
.auth-heading h2 { margin: 10px 0 8px; font: 700 34px/1.2 var(--font-serif); }
.auth-heading p { margin: 0 0 28px; color: var(--muted); font-size: 13px; }

.auth-message { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 7px; font-size: 13px; }
.auth-message.is-error { color: #8c171c; background: #f8e9e7; border-color: #ecc8c4; }
.auth-message.is-success { color: #236a42; background: #e9f5ee; border-color: #c7e4d3; }
.auth-field { margin-bottom: 17px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.auth-field input { width: 100%; min-height: 48px; padding: 0 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 16px; }
.auth-field input[aria-invalid="true"] { border-color: var(--danger); }
.auth-field input:focus { outline: 3px solid rgba(166, 31, 36, .12); border-color: var(--cinnabar); }
.auth-hint, .auth-field-error { min-height: 17px; margin: 5px 0 0; font-size: 11px; }
.auth-hint { color: var(--muted); }
.auth-field-error { color: var(--danger); }
.password-control { position: relative; }
.password-control input { padding-right: 64px; }
.password-control button { position: absolute; right: 4px; top: 4px; min-width: 52px; height: 40px; color: var(--cinnabar); background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 9px; }
.captcha-image { height: 48px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.captcha-image svg { max-width: 100%; height: 100%; }
.auth-remember { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--muted); font-size: 12px; cursor: pointer; }
.auth-remember input { width: 18px; height: 18px; accent-color: var(--cinnabar); }
.auth-submit { width: 100%; min-height: 50px; color: #fff; background: var(--cinnabar); border: 0; border-radius: 7px; font-weight: 700; cursor: pointer; transition: background-color .2s ease; }
.auth-submit:hover { background: var(--cinnabar-dark); }
.auth-submit:disabled { cursor: wait; opacity: .66; }
.auth-fineprint { margin: 15px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.auth-links { display: flex; justify-content: space-between; gap: 20px; }
.auth-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--cinnabar); font-size: 12px; text-decoration: none; }

@media (max-width: 900px) {
    .auth-page { display: block; }
    .auth-visual { min-height: 290px; padding: 34px 28px; }
    .auth-visual-copy h1 { font-size: 42px; }
    .auth-visual-copy ul { display: none; }
    .auth-side { min-height: 650px; padding: 52px 24px; }
}

@media (max-width: 520px) {
    .auth-visual { min-height: 210px; justify-content: flex-end; }
    .auth-brand-light { display: none; }
    .auth-visual-copy h1 { margin: 10px 0 0; font-size: 32px; }
    .auth-visual-copy p { display: none; }
    .auth-side { min-height: 0; padding: 36px 20px 46px; }
    .auth-brand-mobile { display: flex; }
    .auth-heading h2 { font-size: 30px; }
    .captcha-row { grid-template-columns: minmax(0, 1fr) 112px; }
}

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