:root {
  color-scheme: light;
  --paper: #f7f8fa;
  --surface: #ffffff;
  --ink: #15233b;
  --muted: #647188;
  --navy: #173f73;
  --navy-soft: #eaf0f7;
  --line: #d9e0e8;
  --green: #2f725d;
  --red: #9d3d43;
}

* { box-sizing: border-box; }
html { font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
button, input, textarea { font: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(23, 63, 115, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 63, 115, .025) 1px, transparent 1px),
    radial-gradient(circle at 11% 8%, rgba(72, 111, 156, .09), transparent 27%);
  background-size: 32px 32px, 32px 32px, auto;
}

.topbar {
  position: relative;
  max-width: 1160px;
  margin: auto;
  padding: 25px 28px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navy);
  background: var(--surface);
  color: var(--navy);
  font: 700 24px/1 Georgia, "Times New Roman", serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Noto Serif SC", SimSun, serif; font-size: 17px; letter-spacing: .04em; }
.brand small { margin-top: 4px; color: #7a8597; font: 10px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .13em; }
.connection { display: flex; gap: 8px; align-items: center; color: var(--green); font-size: 13px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.shell {
  position: relative;
  max-width: 1160px;
  margin: auto;
  padding: 68px 28px 82px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  gap: 72px;
  align-items: center;
}

.intro { max-width: 650px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #9baabd;
  padding: 0 0 8px;
  color: #59677c;
  font-size: 13px;
  letter-spacing: .08em;
}
.eyebrow span { color: var(--navy); font: 700 12px/1 Georgia, serif; }
h1 {
  margin: 23px 0 20px;
  color: var(--ink);
  font-family: "Noto Serif SC", STSong, SimSun, Georgia, serif;
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.045em;
}
.intro h1 span { display: block; margin-top: 7px; color: var(--navy); font-size: .66em; letter-spacing: -.025em; }
.intro > p { margin: 0; max-width: 600px; color: var(--muted); font-size: 16px; line-height: 1.9; }

.stepper { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 590px; border-top: 1px solid var(--line); }
.stepper li { position: relative; display: flex; align-items: center; gap: 10px; padding-top: 16px; color: #8993a2; font-size: 14px; }
.stepper li::before { content: ""; position: absolute; top: -2px; left: 0; width: 0; height: 3px; background: var(--navy); transition: width .25s ease; }
.stepper b { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c9d2dd; background: #fff; color: #778397; border-radius: 50%; font: 600 12px/1 Georgia, serif; }
.stepper li.active { color: var(--ink); }
.stepper li.active::before, .stepper li.done::before { width: 72%; }
.stepper li.active b { border-color: var(--navy); background: var(--navy); color: #fff; }
.stepper li.done b { border-color: #8cad9f; background: #edf6f2; color: var(--green); }

.panel-wrap { position: relative; }
.panel-wrap::before { content: ""; position: absolute; inset: 13px -12px -13px 12px; border: 1px solid #cbd4de; background: #eef2f6; }
.panel {
  position: relative;
  border: 1px solid #cbd4de;
  border-top: 4px solid var(--navy);
  background: rgba(255, 255, 255, .96);
  padding: 31px;
  box-shadow: 0 18px 50px rgba(30, 53, 78, .1);
}
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 27px; }
.panel-heading small { color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.panel h2 { margin: 8px 0 0; color: var(--ink); font-family: "Noto Serif SC", STSong, SimSun, serif; font-size: 25px; font-weight: 600; letter-spacing: -.01em; }
.panel-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: #f7f9fb; color: var(--navy); font-size: 22px; }

label { display: block; margin-bottom: 9px; color: #35445a; font-size: 14px; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid #bdc8d5; border-radius: 2px; outline: none; background: #fbfcfd; color: var(--ink); padding: 0 15px; transition: .2s; }
input { height: 50px; }
textarea { min-height: 150px; padding: 14px 15px; resize: vertical; font-family: ui-monospace, Consolas, monospace; line-height: 1.6; }
.session-help { margin: 7px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.session-help a { color: var(--navy); overflow-wrap: anywhere; text-underline-offset: 3px; }
.session-help code { padding: 1px 4px; border: 1px solid var(--line); background: #f4f7fa; color: var(--navy); font-family: ui-monospace, Consolas, monospace; }
.browser-guide { margin: 0 0 18px; padding: 14px 15px; border: 1px solid #d8c78d; border-left: 4px solid #b0912a; background: #fffbef; color: #66551e; }
.browser-guide strong { font-family: "Noto Serif SC", STSong, SimSun, serif; font-size: 14px; }
.browser-guide p { margin: 6px 0 0; font-size: 13px; line-height: 1.75; }
.browser-guide.is-wechat { border-color: #d59b9f; border-left-color: var(--red); background: #fff4f4; color: #71383c; }
.browser-guide.is-wechat strong { color: var(--red); }
input:focus, textarea:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(23, 63, 115, .09); }
::placeholder { color: #98a3b2; }
.field-note { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.autofill-note { margin: 9px 0 0; color: var(--green); font-size: 13px; line-height: 1.55; }

button { border: 0; border-radius: 2px; cursor: pointer; transition: .2s; font-weight: 650; }
button:disabled { cursor: wait; opacity: .65; }
.primary { width: 100%; height: 50px; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(23, 63, 115, .16); }
.primary:hover:not(:disabled) { background: #24588f; transform: translateY(-1px); }
.secondary { height: 50px; padding: 0 18px; border: 1px solid #b9c4d0; background: #fff; color: #536176; }
.secondary:hover { border-color: var(--navy); color: var(--navy); }
.actions { display: grid; grid-template-columns: auto 1fr; gap: 11px; }
.actions .primary { margin: 0; }
.light { width: 100%; height: 46px; margin-top: 20px; border: 1px solid var(--navy); background: #fff; color: var(--navy); }
.light:hover { background: var(--navy-soft); }

.valid-badge { border: 1px solid #9ebbac; background: #eff7f3; padding: 7px 11px; color: var(--green); font-size: 12px; }
.plan-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; margin-bottom: 20px; border: 1px solid var(--line); background: #f7f9fb; }
.plan-card small, .plan-card strong { display: block; }
.plan-card small { color: #788599; }
.plan-card strong { margin-top: 5px; color: var(--ink); font-size: 14px; }
.consent { display: flex; gap: 10px; margin: 15px 0 20px; color: #67758a; font-size: 13px; line-height: 1.6; font-weight: 400; cursor: pointer; }
.consent input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--navy); }

.status-card { border: 1px solid var(--line); background: #f8fafc; padding: 19px; }
.progress-label { display: flex; justify-content: space-between; color: #657287; font-size: 13px; }
.progress-label strong { color: var(--navy); font-family: ui-monospace, monospace; }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; background: #dce3eb; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--navy); transition: width .45s ease; }
.status-card p { margin: 16px 0 0; color: #435168; font-size: 14px; line-height: 1.65; }
.status-card > small { display: block; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); color: #778397; font-family: ui-monospace, monospace; }
.status-card > small:empty { display: none; }
.status-steps { margin-top: 13px; }
.status-step { display: flex; align-items: center; gap: 10px; padding: 8px 4px; color: #58667b; font-size: 13px; }
.status-step i { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #8290a4; font-style: normal; }
.status-step.done i { border-color: #a6c2b5; background: #eff7f3; color: var(--green); }
.result-notice { margin: 18px 0; padding: 17px 18px; border: 1px solid; line-height: 1.65; }
.result-notice.is-success { border-color: #a6c2b5; background: #eff7f3; color: var(--green); }
.result-notice.is-failure { border-color: #dfb5b8; background: #fff4f4; color: var(--red); }
.result-notice strong { display: block; font-size: 19px; }
.result-notice p { margin: 6px 0 12px; font-size: 14px; }
.result-notice a, .result-notice button { display: inline-block; padding: 8px 12px; border: 1px solid currentColor; background: #fff; color: inherit; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; }
.result-notice a[hidden], .result-notice button[hidden] { display: none; }
.membership-card { margin: 18px 0; padding: 18px; border: 1px solid var(--line); }
.membership-card h3 { margin: 0 0 8px; }
.membership-card p, .invite-details p { margin: 8px 0; line-height: 1.6; font-size: 14px; }
.membership-card .primary { margin: 12px 0; }
.membership-card a { color: var(--navy); font-weight: 650; }
.invite-details { padding: 14px 24px 20px; }
.invite-details input { width: 100%; }
.invite-details button { margin: 8px 4px 4px 0; }
.membership-card [hidden] { display: none; }
.spinner { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; padding: 12px; border: 1px solid #dcb7ba; background: #fff4f4; color: var(--red); font-size: 13px; }
.error span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }
.error p { margin: 0; line-height: 1.5; }
.privacy { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); color: #7b8798; font-size: 12px; }

footer { position: relative; max-width: 1160px; margin: auto; border-top: 1px solid var(--line); padding: 24px 28px; display: flex; justify-content: space-between; gap: 20px; color: #748095; font-size: 12px; }
footer p { margin: 0; }
.maintenance-screen { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 28px; background: rgba(247,248,250,.97); text-align: center; }
.maintenance-screen > div { width: min(560px, 100%); padding: 54px 35px; border: 1px solid #cbd4de; border-top: 5px solid var(--navy); background: #fff; box-shadow: 0 22px 70px rgba(30,53,78,.12); }
.maintenance-screen span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border: 1px solid var(--navy); color: var(--navy); font-size: 30px; }
.maintenance-screen small { color: var(--navy); font: 700 12px/1 ui-monospace, Consolas, monospace; letter-spacing: .14em; }
.maintenance-screen h1 { margin: 16px 0 13px; font-size: clamp(30px, 6vw, 43px); letter-spacing: -.025em; }
.maintenance-screen p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.support-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 17px; border: 1px solid var(--navy); background: var(--navy); color: #fff; box-shadow: 0 10px 28px rgba(23,63,115,.22); font-size: 14px; }
.support-fab:hover { background: #0f315d; transform: translateY(-1px); }
.support-fab span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-weight: 800; }
.support-dialog { width: min(470px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid #aebccc; border-top: 4px solid var(--navy); border-radius: 2px; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(20,39,67,.3); }
.support-dialog::backdrop { background: rgba(18,35,58,.46); }
.support-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 15px; border-bottom: 1px solid var(--line); }
.support-dialog-head small { color: var(--navy); font: 700 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.support-dialog-head h2 { margin: 6px 0 0; font-size: 25px; }
.support-dialog-head button { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 24px; font-weight: 400; }
.support-dialog > p { margin: 18px 24px 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.support-refund-notice { display: block; margin: 0 24px 14px; padding: 12px 14px; border: 1px solid #e3c578; border-left: 4px solid #b58b13; background: #fff9e9; color: #765806; font-size: 16px; font-weight: 800; line-height: 1.65; }
.support-wechat-list { display: grid; gap: 16px; margin: 0 24px; }
.support-wechat-list figure { margin: 0; padding: 13px; border: 1px solid var(--line); background: #f8fafc; text-align: center; }
.support-wechat-list figure.is-recommended { border-color: #a6c2b5; background: #eff7f3; }
.support-wechat-list figcaption { margin-bottom: 10px; color: var(--navy); font-size: 14px; font-weight: 800; }
.support-wechat-list figcaption b { margin-left: 6px; padding: 3px 7px; background: var(--green); color: #fff; font-size: 11px; }
.support-wechat-list figcaption span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.support-wechat-list img { display: block; width: min(310px, 100%); max-height: 430px; margin: 0 auto; object-fit: contain; }
.support-dialog-tip { display: block; margin: 13px 24px 22px; color: #748095; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; padding-top: 40px; gap: 54px; }
  .intro { text-align: center; margin: auto; }
  .intro > p { margin: auto; }
  .stepper { margin-left: auto; margin-right: auto; text-align: left; }
  .panel-wrap { width: min(100%, 560px); margin: auto; }
}

@media (max-width: 540px) {
  .topbar, .shell, footer { padding-left: 18px; padding-right: 18px; }
  .connection { display: none; }
  .shell { padding-top: 28px; }
  .eyebrow { font-size: 12px; }
  h1 { font-size: 39px; }
  .intro > p { font-size: 15px; }
  .stepper li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
  .panel { padding: 23px; }
  .panel h2 { font-size: 22px; }
  footer { flex-direction: column; text-align: center; }
  .support-fab { right: 14px; bottom: 14px; }
}
