:root {
  color-scheme: light;
  --page: #eee8dc;
  --surface: #fffdf9;
  --surface-soft: #faf7f1;
  --ink: #344a3a;
  --text: #343b32;
  --muted: #827d72;
  --line: #e4ddd0;
  --gold: #f0c16e;
  --sage: #74866a;
  --danger: #c23f36;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; overflow-x: hidden; background: var(--page); color: var(--text); }
body { min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }

.auth-shell { min-height: 100vh; min-height: 100dvh; padding: 12px; }
.auth-header { width: 100%; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border: 1px solid #ebe4d8; border-radius: 16px; background: rgba(255,253,249,.96); box-shadow: 0 3px 18px rgba(91,76,52,.04); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: block; border-radius: 12px; object-fit: cover; }
.brand b, .brand small { display: block; }
.brand b { color: var(--text); font-size: 14px; }
.brand small { margin-top: 2px; color: #918b7e; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.header-note { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid #dfe4d8; border-radius: 17px; background: var(--surface); color: #64705c; font-size: 10px; font-weight: 700; }
.header-note svg { width: 14px; }

.auth-layout { width: min(100%, 1500px); min-height: calc(100vh - 100px); min-height: calc(100dvh - 100px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); gap: 22px; align-items: stretch; margin: 12px auto 0; }
.auth-visual { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .58fr); grid-template-rows: auto 1fr auto; gap: 20px 24px; padding: clamp(30px, 4vw, 58px); overflow: hidden; border: 1px solid #e2dbcf; border-radius: 24px; background: #f8f4eb; box-shadow: 0 18px 50px rgba(91,76,52,.09); }
.eyebrow { color: #a08d70; font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.visual-copy { align-self: end; }
.visual-copy h1 { max-width: 650px; margin: 12px 0 15px; color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.08; letter-spacing: 0; }
.visual-copy p { max-width: 620px; margin: 0; color: #777468; font-size: 13px; line-height: 1.85; }

.visual-workspaces { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-self: start; }
.visual-workspaces article { position: relative; min-width: 0; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 18px; border: 1px solid #e2ddd2; border-radius: 16px; background: rgba(255,253,249,.82); }
.visual-workspaces article > b { position: absolute; top: 13px; right: 14px; color: #c4c9bd; font-family: Georgia, serif; font-size: 22px; }
.workspace-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #e9efe6; color: #55745e; }
.tryon-workspace .workspace-icon { background: #f4e9de; color: #a66c52; }
.workspace-icon svg { width: 21px; }
.visual-workspaces div { min-width: 0; display: grid; gap: 4px; padding-right: 24px; }
.visual-workspaces small { color: #55745e; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.tryon-workspace small { color: #a66c52; }
.visual-workspaces strong { color: #41463e; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
.visual-workspaces p { margin: 2px 0 0; color: #8b8578; font-size: 9px; line-height: 1.55; }

.visual-preview { grid-column: 2; grid-row: 1 / 3; position: relative; min-width: 0; min-height: 470px; margin: 0; overflow: hidden; border-radius: 18px; background: #d9d8d5; box-shadow: 0 18px 34px rgba(72,67,58,.14); }
.visual-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.visual-preview::after { position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(28,32,28,.74)); content: ""; }
.visual-preview figcaption { position: absolute; z-index: 1; right: 20px; bottom: 20px; left: 20px; color: white; }
.visual-preview figcaption span, .visual-preview figcaption b { display: block; }
.visual-preview figcaption span { margin-bottom: 7px; color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.visual-preview figcaption b { font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.visual-meta { grid-column: 1 / 3; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding-top: 18px; border-top: 1px solid #dfd8cc; color: #79776c; font-size: 9px; font-weight: 700; }
.visual-meta span { display: inline-flex; align-items: center; gap: 7px; }
.visual-meta svg { width: 15px; color: var(--sage); }

.auth-panel { min-width: 0; display: flex; flex-direction: column; padding: clamp(24px, 3vw, 46px); border: 1px solid #e8e0d3; border-radius: 24px; background: var(--surface); box-shadow: 0 16px 40px rgba(91,76,52,.1); }
.auth-content { width: min(100%, 430px); margin: auto; }
.panel-heading { position: relative; margin-bottom: 24px; }
.auth-back { position: absolute; top: -4px; right: 0; display: inline-flex; align-items: center; gap: 5px; padding: 6px 0 6px 8px; border: 0; background: transparent; color: #74866a; font-size: 10px; font-weight: 700; cursor: pointer; }
.auth-back svg { width: 14px; }
.auth-title { margin-top: 9px; }
.auth-title h2 { margin: 0; color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 31px; letter-spacing: 0; }
.auth-title p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; padding: 4px; border: 1px solid #e1e5d8; border-radius: 12px; background: #f3f5ee; }
.auth-tabs button { min-height: 39px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--ink); font-weight: 800; box-shadow: 0 3px 10px rgba(91,76,52,.08); }

#authForm { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field > span { color: #625b4f; font-size: 11px; font-weight: 700; }
.field > div { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #e6ded1; border-radius: 10px; background: var(--surface-soft); transition: border-color .16s ease, box-shadow .16s ease; }
.field > div:focus-within { border-color: #9bab8f; box-shadow: 0 0 0 3px rgba(116,134,106,.12); }
.field svg { width: 17px; color: #8c8b7f; }
.field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.field input::placeholder { color: #a49e92; }
.field button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.verification-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.verification-row .field { min-width: 0; }
.code-button { min-height: 48px; padding: 0 13px; border: 1px solid #d9d1c3; border-radius: 10px; background: var(--surface); color: #625b4f; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.code-button:hover:not(:disabled) { border-color: var(--sage); }
.code-button:disabled { opacity: .55; cursor: wait; }
.submit-button { min-height: 49px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 5px; border: 1px solid var(--ink); border-radius: 13px; background: var(--ink); color: #fffaf1; font-weight: 800; cursor: pointer; }
.submit-button:hover { background: #415b48; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.submit-button svg { width: 17px; color: var(--gold); }
.auth-error { min-height: 18px; margin: 0; color: var(--danger); font-size: 11px; text-align: center; }
.auth-error.is-success { color: #4f8964; }
.auth-forgot { display: block; margin: 10px 0 0 auto; padding: 4px 0; border: 0; background: transparent; color: #74866a; font-size: 10px; font-weight: 700; cursor: pointer; }
.auth-forgot:hover, .auth-back:hover { color: #344a3a; text-decoration: underline; }
.panel-assurance { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 13px; border: 1px solid #e4e6dd; border-radius: 12px; background: #f5f6ef; }
.panel-assurance > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--sage); }
.panel-assurance svg { width: 16px; }
.panel-assurance p { display: grid; gap: 3px; margin: 0; }
.panel-assurance b { color: #4c5248; font-size: 10px; }
.panel-assurance small { color: #918b7e; font-size: 8px; }
.auth-footer { margin: 22px 0 0; color: #9a9488; font-size: 8px; text-align: center; }

@media (max-width: 1180px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); }
  .auth-visual { grid-template-columns: minmax(0, 1fr) 220px; padding: 34px; }
  .visual-workspaces { grid-template-columns: minmax(0, 1fr); }
  .visual-workspaces article:nth-child(2) { display: none; }
  .visual-preview { min-height: 420px; }
}
@media (max-width: 880px) {
  .auth-shell { padding: 8px; }
  .auth-header { height: 60px; padding-inline: 16px; }
  .header-note { display: none; }
  .auth-layout { min-height: 0; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
  .auth-panel { grid-row: 1; min-height: calc(100dvh - 84px); padding: 32px 22px; }
  .auth-visual { display: none; }
}
@media (max-width: 480px) {
  .auth-shell { padding: 0; }
  .auth-header { height: 62px; border-width: 0 0 1px; border-radius: 0; }
  .brand b { font-size: 13px; }
  .auth-layout { margin: 0; }
  .auth-panel { min-height: calc(100dvh - 62px); padding: 26px 16px max(18px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .auth-title h2 { font-size: 28px; }
  .field input { font-size: 16px; }
  .verification-row { grid-template-columns: minmax(0, 1fr) 104px; }
}
@media (max-height: 760px) and (min-width: 881px) {
  .auth-layout { min-height: calc(100dvh - 94px); }
  .auth-visual { padding: 28px; }
  .visual-copy h1 { font-size: clamp(34px, 3.6vw, 50px); }
  .visual-preview { min-height: 360px; }
  .visual-meta { padding-top: 12px; }
  .auth-panel { padding-block: 24px; }
  .panel-heading, .auth-tabs { margin-bottom: 18px; }
  #authForm { gap: 12px; }
  .panel-assurance { margin-top: 14px; }
}
