@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  color: #1e2824;
  background: #f5f4ef;
  font-synthesis: none;
  --ink: #1e2824;
  --muted: #748079;
  --green: #285d4b;
  --green-dark: #1e4b3d;
  --cream: #f5f0e4;
  --orange: #e98952;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(560px, 1.08fr);
}

.story-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 45px clamp(42px, 6vw, 92px) 40px;
  color: #f8f5ea;
  background:
    radial-gradient(circle at 83% 18%, rgba(242, 174, 112, .18), transparent 19%),
    radial-gradient(circle at 20% 85%, rgba(166, 197, 169, .12), transparent 25%),
    linear-gradient(145deg, #1d4d3e 0%, #123b31 60%, #0d3028 100%);
}

.story-panel::before,
.story-panel::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(248, 245, 234, .08);
  border-radius: 50%;
}
.story-panel::before { width: 540px; height: 540px; right: -310px; top: 13%; }
.story-panel::after { width: 360px; height: 360px; left: -220px; bottom: -90px; }

.brand, .mobile-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size:24px;
  letter-spacing: .02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #173f33;
  background: #f2b372;
  transform: rotate(-4deg);
  box-shadow: 0 8px 24px rgba(3, 18, 13, .14);
}
.brand-mark span { transform: rotate(4deg); }

.story-copy { position: relative; z-index: 1; margin: auto 0 55px; max-width: 550px; }
.eyebrow, .chapter {
  display: inline-block;
  color: #f0b77d;
  font-size:15px;
  font-weight: 700;
  letter-spacing: .2em;
}
.story-copy h1 {
  margin: 19px 0 22px;
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(42px, 4.5vw, 68px);
  line-height: 1.26;
  letter-spacing: -.055em;
}
.story-copy p { margin: 0; max-width: 490px; color: rgba(248, 245, 234, .72); font-size:20px; line-height: 1.9; }

.journey-card {
  position: relative;
  z-index: 1;
  max-width: 525px;
  padding: 23px 25px 20px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(10px);
}
.journey-top { display: flex; align-items: center; justify-content: space-between; }
.journey-top > div { display: grid; gap: 4px; }
.tiny-label { color: rgba(255,255,255,.52); font-size:15px; }
.journey-top strong { font-size:20px; font-weight: 600; }
.route-count { color: #eeb17b; font-size:16px; }
.route-line { display: flex; align-items: center; margin-top: 19px; }
.route-dot {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: rgba(255,255,255,.5); font-size:13px;
}
.route-dot.active { color: #153e33; border-color: #f0b172; background: #f0b172; font-weight: 700; }
.route-progress { height: 1px; flex: 1; background: rgba(255,255,255,.16); }
.route-labels { display: flex; justify-content: space-between; margin-top: 8px; color: rgba(255,255,255,.48); font-size:14px; }
.route-labels span:first-child { color: rgba(255,255,255,.85); }
.quote { position: relative; z-index: 1; margin: 24px 0 0; color: rgba(255,255,255,.35); font-family: 'Noto Serif SC', serif; font-size:16px; }

.auth-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 36px 76px;
  background:
    radial-gradient(circle at 85% 12%, rgba(232, 137, 82, .09), transparent 23%),
    #f7f7f2;
}
.auth-panel::after {
  content: '';
  position: absolute;
  width: 140px; height: 140px; right: 8%; bottom: 8%;
  opacity: .35;
  background-image: radial-gradient(#9eaaa3 1px, transparent 1px);
  background-size: 13px 13px;
}
.mobile-brand { display: none; color: var(--green); }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 450px; }
.auth-heading { margin-bottom: 26px; }
.chapter { color: var(--orange); }
.auth-heading h2 {
  margin: 9px 0 10px;
  font-family: 'Noto Serif SC', serif;
  color: var(--ink);
  font-size:42px;
  letter-spacing: -.045em;
}
.auth-heading p { margin: 0; color: var(--muted); font-size:18px; }

.invite-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  margin: -9px 0 19px;
  padding: 12px 13px;
  border: 1px solid #ead5c1;
  border-radius: 12px;
  color: #664b38;
  background: #fbf0e4;
}
.invite-gift {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #8b5432;
  background: #f1d8c0;
  font-size:13px;
  font-weight: 700;
}
.invite-notice > div { display: grid; gap: 3px; }
.invite-notice b { font-size:14px; }
.invite-notice p { margin: 0; color: #8a7463; font-size:13px; line-height: 1.55; }
.invite-notice small { color: #b75142; font-size:12px; }
.invite-notice small:empty { display: none; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 26px; border-bottom: 1px solid #dfe2dc; }
.tabs.phone-login-hidden { grid-template-columns: repeat(2, 1fr); }
.tabs button {
  position: relative; padding: 12px 5px; border: 0; color: #929b96; background: transparent; cursor: pointer; font-size:14px; font-weight: 600;
}
.tabs button::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; background: transparent; }
.tabs button.active { color: var(--green); }
.tabs button.active::after { background: var(--green); }
.tabs button:disabled { color: #b5bcb8; cursor: not-allowed; }

.field { display: grid; margin-bottom: 2px; }
.field-label { margin-bottom: 8px; color: #48534e; font-size:16px; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; width: 18px; height: 18px; color: #87918c; pointer-events: none; }
.input-icon svg, .eye-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input {
  width: 100%; height: 49px; padding: 0 48px 0 45px;
  border: 1px solid #d8ddd7; border-radius: 12px; outline: none;
  color: var(--ink); background: rgba(255,255,255,.66); transition: border .2s, box-shadow .2s, background .2s;
}
.input-wrap input::placeholder { color: #a7afaa; }
.input-wrap input:focus { border-color: #5c8878; background: white; box-shadow: 0 0 0 3px rgba(40,93,75,.09); }
.has-error .input-wrap input { border-color: #c66d58; }
.field-message { min-height: 19px; padding: 3px 2px 0; color: #b75142; font-size:14px; }
.field-message.is-success { color: #347158; }
.human-verification { display: grid; gap: 7px; margin: 1px 0 9px; }
.human-verification [data-human-widget] { min-height: 65px; }
.human-verification-status { min-height: 19px; color: #6f7d76; font-size: 13px; }
.human-verification-status.is-error { color: #b75142; }
.verification-open { overflow: hidden; }
.verification-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 38, 31, .48);
  backdrop-filter: blur(5px);
}
.verification-dialog {
  position: relative;
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid rgba(40, 93, 75, .12);
  border-radius: 20px;
  outline: none;
  background: #fbfbf7;
  box-shadow: 0 24px 70px rgba(11, 35, 27, .22);
}
.verification-mark {
  float: left;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 13px 18px 0;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.verification-dialog .chapter { margin-top: 1px; font-size: 12px; }
.verification-dialog h2 {
  margin: 4px 42px 5px 0;
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  line-height: 1.35;
}
.verification-dialog > p { clear: both; margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.verification-dialog .human-verification { margin: 0; }
.verification-dialog .human-verification [data-human-widget] { min-height: 65px; overflow: hidden; border-radius: 8px; }
.verification-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: #78847e;
  background: #eef1ed;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.verification-close:hover { color: var(--green); background: #e3ebe5; }
.verification-close:focus-visible,
.verification-confirm:focus-visible { outline: 3px solid rgba(40, 93, 75, .22); outline-offset: 2px; }
.verification-confirm {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.verification-confirm:hover { background: #c96938; }
.verification-confirm:disabled { cursor: wait; opacity: .72; }
.input-wrap.with-action input { padding-right: 132px; }
.code-icon { display: grid; place-items: center; font-size:16px; font-weight: 700; }
.code-action {
  position: absolute;
  right: 7px;
  min-width: 112px;
  height: 35px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--green);
  background: #e8f0ea;
  cursor: pointer;
  font-size:13px;
  font-weight: 700;
  transition: background .18s, color .18s;
}
.code-action:hover:not(:disabled) { color: white; background: var(--green); }
.code-action:disabled { color: #8b9790; background: #edf0ed; cursor: wait; }
.eye-button { position: absolute; right: 12px; width: 31px; height: 31px; padding: 7px; border: 0; border-radius: 8px; color: #8a938e; background: transparent; cursor: pointer; }
.eye-button:hover { color: var(--green); background: #edf1ed; }
.eye-slash { stroke: #f7f7f2; stroke-width: 3.8 !important; }

.form-options, .check-row { display: flex; align-items: center; }
.form-options { justify-content: space-between; margin: 1px 0 21px; font-size:16px; }
.check-row { gap: 9px; color: #68736d; font-size:15px; cursor: pointer; line-height: 1.5; }
.check-row input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.check-row a, .form-options > a { color: var(--green); font-weight: 600; text-decoration: none; }
.standalone-error { display: block; margin: 5px 0 8px; color: #b75142; font-size:14px; }
.standalone-error:empty { display: none; }

.strength { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 16px; }
.strength > div { display: grid; grid-template-columns: repeat(4, 36px); gap: 4px; }
.strength span { height: 3px; border-radius: 3px; background: #dfe2dc; }
.strength span.filled { background: var(--orange); }
.strength small { color: #8a948e; font-size:13px; }

.submit-button {
  width: 100%; height: 51px; display: flex; align-items: center; justify-content: center; gap: 13px;
  margin-top: 20px; border: 0; border-radius: 12px; color: white; background: var(--green);
  box-shadow: 0 12px 24px rgba(31,79,63,.18); cursor: pointer; font-weight: 600; transition: transform .18s, background .18s, box-shadow .18s;
}
.submit-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 15px 28px rgba(31,79,63,.23); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.success-notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; padding: 11px 13px; border-radius: 10px; color: #235c47; background: #e8f2ec; font-size:15px; line-height: 1.55; }
.success-notice span { flex: 0 0 auto; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: white; background: #4d8b70; font-size:14px; }
.success-notice b { flex: 1; font-weight: 500; }
.success-notice a { flex: 0 0 auto; color: #235c47; font-weight: 700; text-decoration: none; }

.binding-reminder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 11px 0 0;
  color: #7b8780;
  font-size:12px;
}
.binding-reminder span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #347158; background: #e3eee7; font-size:9px; font-weight: 700; }
.phone-login-note { display: flex; align-items: center; gap: 7px; margin: -2px 0 16px; color: #708078; font-size:13px; }
.phone-login-note span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #347158; background: #e3eee7; font-size:11px; font-weight: 700; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 17px; color: #9aa39e; font-size:13px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: #dfe3de; }
.auth-divider span { flex: 0 0 auto; }
.social-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.social-buttons.single-provider { grid-template-columns: 1fr; }
.social-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid #d7ddd8;
  border-radius: 11px;
  color: #405048;
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size:14px;
  font-weight: 600;
  transition: border-color .18s, background .18s, transform .18s;
}
.social-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #a9b8af; background: white; }
.social-button:disabled { color: #9aa49f; background: #eff1ee; cursor: not-allowed; }
.social-mark {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: white;
  font-size:13px;
  font-weight: 700;
}
.social-button.wechat .social-mark { background: #19ad65; }
.social-button.alipay .social-mark { background: #1677ff; }
.social-button:disabled .social-mark { filter: grayscale(1); opacity: .55; }
.social-hint { margin: 10px 0 0; color: #98a19c; text-align: center; font-size:12px; }

.auth-flow { animation: flow-in .22s ease-out; }
@keyframes flow-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.flow-back { margin: 0 0 24px; padding: 4px 0; border: 0; color: #718078; background: transparent; cursor: pointer; font-size:14px; }
.flow-back:hover { color: var(--green); }
.flow-heading { display: flex; align-items: center; gap: 15px; }
.flow-heading h2 { margin: 4px 0 0; color: var(--ink); font-family: 'Noto Serif SC', serif; font-size:31px; letter-spacing: -.035em; }
.provider-badge {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: #19ad65;
  box-shadow: 0 9px 20px rgba(25,173,101,.19);
  font-size:22px;
  font-weight: 700;
}
.provider-badge.alipay { background: #1677ff; box-shadow: 0 9px 20px rgba(22,119,255,.18); }
.flow-intro { margin: 14px 0 17px; color: var(--muted); font-size:15px; line-height:1.65; }
.qr-shell {
  position: relative;
  width: min(100%, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto;
  padding: 13px;
  border: 1px solid #dce2dd;
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 34px rgba(28,65,52,.09);
}
.qr-shell img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-shell iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: white; }
.qr-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 13px; color: #7c8982; background: #fff; font-size:13px; }
.qr-loading span { width: 30px; height: 30px; border: 3px solid #dce8e0; border-top-color: var(--green); border-radius: 50%; animation: qr-spin .8s linear infinite; }
.qr-loading b { font-weight: 500; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
.oauth-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; color: #526159; text-align: left; }
.oauth-status > div { display: grid; gap: 2px; }
.oauth-status b { font-size:14px; font-weight: 600; }
.oauth-status small { min-height: 16px; color: #929c97; font-size:12px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #5c8e75; box-shadow: 0 0 0 5px rgba(92,142,117,.12); animation: status-pulse 1.6s ease-in-out infinite; }
.oauth-status.scanned .status-dot { background: var(--orange); box-shadow: 0 0 0 5px rgba(233,137,82,.12); }
.oauth-status.success .status-dot { background: #2f9465; animation: none; }
.oauth-status.error .status-dot, .oauth-status.expired .status-dot { background: #c16855; box-shadow: 0 0 0 5px rgba(193,104,85,.12); animation: none; }
@keyframes status-pulse { 50% { transform: scale(.78); opacity: .55; } }
.oauth-actions { min-height: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 13px; margin-top: 10px; }
.secondary-button, .secondary-link { padding: 7px 11px; border: 1px solid #d5ddd7; border-radius: 8px; color: var(--green); background: #fff; cursor: pointer; font-size:13px; font-weight: 600; text-decoration: none; }
.secondary-button:hover, .secondary-link:hover { border-color: #8eaa9b; background: #f4f8f4; }
.flow-security { margin: 17px 0 0; color: #9aa39e; text-align: center; font-size:12px; line-height:1.6; }
.flow-auth-heading { margin: 2px 0 28px; }
.flow-auth-heading h2 { font-size:38px; }
.flow-result { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 12px 13px; border-radius: 10px; color: #235c47; background: #e8f2ec; font-size:14px; }
.flow-result span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #4d8b70; }
.flow-result b { font-weight: 500; }

.switch-copy { margin: 21px 0 0; text-align: center; color: #7b8580; font-size:15px; }
.switch-copy button { padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-weight: 700; }
.preview-link { display: flex; justify-content: center; gap: 7px; margin-top: 15px; color: #77837d; text-decoration: none; font-size:14px; }
.preview-link:hover { color: var(--green); }
.copyright { position: absolute; z-index: 1; bottom: 24px; margin: 0; color: #a5aca8; font-size:13px; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; }
  .story-panel { display: none; }
  .auth-panel { align-items: flex-start; padding-top: 32px; }
  .mobile-brand { display: flex; position: absolute; top: 26px; left: 28px; }
  .auth-card { margin-top: 76px; }
}

@media (max-width: 520px) {
  .auth-panel { padding: 27px 22px 64px; background: #f7f7f2; }
  .mobile-brand { left: 22px; top: 23px; font-size:22px; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; }
  .auth-card { margin-top: 66px; }
  .auth-heading h2 { font-size:36px; }
  .auth-heading p { line-height: 1.6; }
  .flow-heading h2 { font-size:28px; }
  .flow-auth-heading h2 { font-size:34px; }
  .provider-badge { width: 47px; height: 47px; border-radius: 13px; }
  .qr-shell { width: min(100%, 286px); }
  .auth-panel::after { display: none; }
  .verification-modal { align-items: end; padding: 14px; }
  .verification-dialog { padding: 26px 20px 22px; border-radius: 18px; }
  .verification-dialog h2 { font-size: 22px; }
}

@media (max-width: 380px) {
  .social-buttons { grid-template-columns: 1fr; }
  .input-wrap.with-action input { padding-right: 119px; }
  .code-action { min-width: 101px; padding-inline: 7px; font-size:12px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .story-panel { padding-top: 30px; padding-bottom: 28px; }
  .story-copy { margin-bottom: 28px; }
  .story-copy h1 { font-size:49px; margin: 12px 0 14px; }
  .auth-panel { padding-top: 38px; padding-bottom: 48px; align-items: flex-start; }
  .auth-heading { margin-bottom: 18px; }
  .auth-heading h2 { font-size:36px; margin: 7px 0; }
  .tabs { margin-bottom: 18px; }
  .input-wrap input { height: 44px; }
  .submit-button { height: 46px; margin-top: 14px; }
  .copyright { display: none; }
}
