:root {
  --member-paper: #f2f3f1;
  --member-surface: #fafbf9;
  --member-ink: #14171a;
  --member-muted: #686e72;
  --member-line: #cfd3d2;
  --member-signal: #7f91b3;
  --member-danger: #963f3f;
  --member-success: #2f6b51;
  --member-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --member-serif: "Noto Serif SC", "Songti SC", STSong, Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--member-paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--member-ink);
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(20, 23, 26, .035) 50%, transparent 50.06%),
    var(--member-paper);
  font-family: var(--member-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--member-signal);
  outline-offset: 3px;
}
.shell { width: min(calc(100% - 48px), 1160px); margin: 0 auto; }
.topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--member-line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(18, 20, 23, .1), 0 5px 14px rgba(18, 20, 23, .1);
  transition: transform .35s cubic-bezier(.2, .75, .2, 1);
}
.brand:hover img { transform: rotate(-7deg) scale(1.05); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; line-height: 1.05; }
.brand-copy strong { font-size: 13px; font-weight: 780; letter-spacing: .09em; }
.brand-copy small {
  color: var(--member-muted);
  font-size: 8.5px;
  font-weight: 720;
  letter-spacing: .13em;
}
.top-actions { display: flex; align-items: center; gap: 16px; }
.back { color: var(--member-muted); font-size: 12px; text-decoration: none; }
.back:hover { color: var(--member-ink); }

.auth-main {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(64px, 9vw, 128px);
  align-items: center;
  min-height: calc(100vh - 144px);
  padding: clamp(54px, 8vh, 90px) 0;
}
.auth-intro { max-width: 490px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--member-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 7px;
  height: 7px;
  border: 1px solid var(--member-ink);
  border-radius: 50%;
  background: var(--member-signal);
  content: "";
  animation: memberPulse 2.8s ease-in-out infinite;
}
@keyframes memberPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 145, 179, .3); }
  50% { box-shadow: 0 0 0 8px rgba(127, 145, 179, 0); }
}
h1 {
  margin: 0;
  font-family: var(--member-serif);
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.06em;
  text-wrap: balance;
}
.intro-copy {
  max-width: 450px;
  margin: 28px 0 0;
  color: var(--member-muted);
  font-size: 14px;
  line-height: 1.9;
}
.intro-note {
  margin: 48px 0 0;
  color: #848a8e;
  font-size: 10px;
  letter-spacing: .08em;
}

.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--member-line);
  background: rgba(250, 251, 249, .92);
  box-shadow: 0 28px 70px rgba(25, 30, 34, .08);
}
.auth-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 86px;
  height: 3px;
  background: linear-gradient(90deg, #7089b0, #ad8ba2, #b39a6d);
  content: "";
}
.auth-card-head { padding: 30px 34px 24px; border-bottom: 1px solid var(--member-line); }
.auth-card-head h2 { margin: 0; font-size: 26px; font-weight: 640; letter-spacing: -.035em; }
.auth-card-head p {
  margin: 9px 0 0;
  color: var(--member-muted);
  font-size: 12px;
  line-height: 1.7;
}
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 22px 0 0;
  border: 1px solid var(--member-line);
  background: #edf0ee;
}
.mode-switch button {
  min-height: 38px;
  border: 0;
  color: var(--member-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}
.mode-switch button[aria-pressed="true"] {
  color: var(--member-ink);
  background: var(--member-surface);
  box-shadow: inset 0 0 0 1px var(--member-line);
  font-weight: 680;
}
.auth-form { display: grid; gap: 17px; padding: 28px 34px 34px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
label { color: #555c60; font-size: 11px; font-weight: 660; }
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--member-line);
  border-radius: 0;
  color: var(--member-ink);
  background: #fff;
  padding: 0 13px;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus { border-color: var(--member-signal); box-shadow: 0 0 0 3px rgba(127, 145, 179, .1); }
input::placeholder { color: #9a9fa1; }
.field-hint { margin: -2px 0 0; color: #858b8e; font-size: 10px; line-height: 1.6; }
.code-button {
  min-width: 112px;
  border: 1px solid var(--member-line);
  color: var(--member-ink);
  background: #f4f5f3;
  cursor: pointer;
  font-size: 11px;
}
.code-button:disabled { cursor: wait; opacity: .55; }
.check-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--member-muted);
  font-size: 11px;
  line-height: 1.7;
}
.check-row input { min-height: 0; margin: 3px 0 0; width: 14px; height: 14px; }
.check-row a { text-underline-offset: 3px; }
.primary-button {
  min-height: 48px;
  border: 1px solid var(--member-ink);
  color: var(--member-paper);
  background: var(--member-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  transition: transform .2s ease, opacity .2s ease;
}
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .58; transform: none; }
.secondary-button {
  min-height: 44px;
  border: 1px solid var(--member-line);
  color: var(--member-ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.secondary-button:disabled { cursor: wait; opacity: .55; }
.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: #92979a;
  font-size: 10px;
}
.divider::before, .divider::after { height: 1px; background: var(--member-line); content: ""; }
.google-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--member-line);
  color: var(--member-ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.google-button svg { width: 16px; height: 16px; }
.form-links { display: flex; justify-content: space-between; gap: 14px; }
.text-button {
  padding: 0;
  border: 0;
  color: var(--member-muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.message {
  min-height: 20px;
  margin: 0;
  color: var(--member-muted);
  font-size: 11px;
  line-height: 1.7;
}
.message[data-state="error"] { color: var(--member-danger); }
.message[data-state="success"] { color: var(--member-success); }
.auth-unavailable {
  margin: 0 34px 34px;
  padding: 14px 16px;
  border: 1px solid #d9c9aa;
  color: #7a6440;
  background: #fbf7ee;
  font-size: 11px;
  line-height: 1.7;
}

.account-main { padding: clamp(54px, 8vh, 88px) 0 100px; }
.account-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}
.account-heading h1 { font-size: clamp(42px, 6vw, 66px); }
.account-status { color: var(--member-muted); font-size: 11px; }
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 24px;
}
.account-panel {
  border: 1px solid var(--member-line);
  background: rgba(250, 251, 249, .9);
  padding: 30px;
}
.account-panel h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.account-panel > p { margin: 9px 0 24px; color: var(--member-muted); font-size: 12px; line-height: 1.8; }
.account-form { display: grid; gap: 18px; }
.account-meta { display: grid; gap: 0; margin: 0; }
.account-meta div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--member-line);
}
.account-meta div:last-child { border-bottom: 1px solid var(--member-line); }
.account-meta dt { color: var(--member-muted); font-size: 10px; }
.account-meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.account-actions button { padding: 0 16px; }

footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--member-line);
  color: var(--member-muted);
  font-size: 10px;
  letter-spacing: .06em;
}
footer a { text-decoration: none; }

[hidden] { display: none !important; }

@media (max-width: 820px) {
  body { background: var(--member-paper); }
  .auth-main { grid-template-columns: 1fr; gap: 42px; padding: 46px 0 72px; }
  .auth-intro { max-width: 620px; }
  .intro-note { margin-top: 28px; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 30px), 1160px); }
  .topbar { min-height: 64px; }
  .brand-copy small { display: none; }
  .site-language-picker { max-width: 104px; }
  .auth-main { padding-top: 34px; }
  h1 { font-size: 43px; }
  .auth-card-head, .auth-form { padding-inline: 22px; }
  .auth-unavailable { margin-inline: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .code-button { min-height: 42px; }
  .account-heading { align-items: start; flex-direction: column; }
  .account-panel { padding: 22px; }
  .account-meta div { grid-template-columns: 82px minmax(0, 1fr); }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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